/* =====================================================
   COMMUNITY FEATURES CSS
   작은슥슥이 종이접기 커뮤니티 플랫폼
   ===================================================== */

/* ---- Hero Stats ---- */
.hero-stats {
    display: flex;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
}

.hero-stat {
    text-align: center;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    min-width: 80px;
}

.stat-num {
    display: block;
    font-family: var(--font-main);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1.2;
}

.stat-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* ---- Section Headers ---- */
.section-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.section-icon {
    font-size: 1.4rem;
}

/* ---- Sort Options ---- */
.sort-options {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

.sort-btn {
    padding: 6px 16px;
    border: 2px solid var(--bg-section);
    border-radius: var(--radius-full);
    background: white;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    font-family: var(--font-body);
    transition: all 0.3s ease;
}

.sort-btn:hover {
    border-color: var(--color-primary-light);
}

.sort-btn.active {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

/* ---- Popular Posts Section ---- */
.popular-section {
    padding: var(--space-2xl) 0;
    background: white;
}

.popular-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-lg);
}

.popular-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-card);
    box-shadow: var(--shadow-card);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.popular-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-card-hover);
}

.popular-card-link {
    display: block;
    color: inherit;
}

.popular-card-link:hover {
    color: inherit;
}

.popular-card-rank {
    position: absolute;
    top: var(--space-sm);
    left: var(--space-sm);
    z-index: 2;
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    font-size: 1.2rem;
    font-weight: 700;
}

.rank-badge.rank-num {
    font-size: 0.85rem;
    font-family: var(--font-main);
    color: var(--text-secondary);
}

.popular-card-thumb {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.popular-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.popular-card:hover .popular-card-thumb img {
    transform: scale(1.06);
}

.popular-card-info {
    padding: var(--space-md);
}

.popular-card-title {
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: var(--space-sm);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.popular-card-stats {
    display: flex;
    gap: var(--space-md);
    font-size: 0.78rem;
    color: var(--text-light);
    margin-bottom: var(--space-xs);
}

.popular-card-meta {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
    margin-top: var(--space-xs);
}

.popular-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: var(--space-2xl) 0;
    color: var(--text-secondary);
}

/* ---- Best Section ---- */
.best-section {
    padding: var(--space-2xl) 0;
    background: var(--bg-section);
}

.best-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--space-lg);
}

.best-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: white;
    box-shadow: var(--shadow-card);
    transition: all 0.3s ease;
}

.best-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
}

.best-card-link {
    display: block;
    color: inherit;
}

.best-card-link:hover {
    color: inherit;
}

.best-card-thumb {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
}

.best-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.best-card-likes {
    position: absolute;
    bottom: var(--space-sm);
    right: var(--space-sm);
    background: rgba(255, 255, 255, 0.95);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.best-card-title {
    padding: var(--space-md);
    font-family: var(--font-main);
    font-size: 0.95rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---- Difficulty & Time Badges ---- */
.difficulty-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 10px;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 600;
    background: color-mix(in srgb, var(--diff-color) 15%, white);
    color: var(--diff-color);
    border: 1px solid color-mix(in srgb, var(--diff-color) 30%, white);
}

.diff-icon {
    font-size: 0.6rem;
    line-height: 1;
}

.time-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 10px;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 500;
    background: rgba(79, 195, 247, 0.12);
    color: #0288D1;
    border: 1px solid rgba(79, 195, 247, 0.25);
}

.time-icon {
    flex-shrink: 0;
}

.post-card-info-badges {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: var(--space-xs);
}

.post-card-like-badge {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
    background: rgba(255, 255, 255, 0.92);
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

/* ---- Single Post: Origami Info ---- */
.single-origami-info {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
    margin-top: var(--space-lg);
    padding: var(--space-lg);
    background: var(--bg-section);
    border-radius: var(--radius-lg);
}

.info-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: white;
    border-radius: var(--radius-md);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: relative;
}

.info-item.has-popup {
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.info-item.has-popup:hover,
.info-item.has-popup:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.info-item.has-popup:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Expand hint "?" badge */
.info-expand-hint {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 18px;
    height: 18px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    font-size: 0.65rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: hintPulse 2s ease-in-out infinite;
}

.info-item.has-popup:hover .info-expand-hint {
    transform: scale(1.2);
    animation: none;
}

@keyframes hintPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.info-difficulty {
    border-left: 3px solid var(--diff-color);
}

.info-time {
    border-left: 3px solid #4FC3F7;
}

.info-materials {
    border-left: 3px solid #FFD93D;
}

.info-icon {
    font-size: 1.3rem;
    display: flex;
    align-items: center;
}

.info-icon svg {
    color: #4FC3F7;
}

.info-label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    display: block;
    font-family: var(--font-main);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* ---- Info Popup Layer ---- */
.info-popup {
    position: absolute;
    top: calc(100% + 14px);
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    width: 320px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.18), 0 2px 8px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), visibility 0.3s;
    overflow: hidden;
}

.info-item.popup-active .info-popup {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.info-popup-arrow {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 8px;
    overflow: hidden;
}

.info-popup-arrow::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background: white;
    box-shadow: -2px -2px 4px rgba(0, 0, 0, 0.05);
}

.info-popup-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border: none;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    border-radius: 50%;
    font-size: 1.1rem;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
    z-index: 2;
    line-height: 1;
}

.info-popup-close:hover {
    background: rgba(0, 0, 0, 0.08);
    color: #333;
}

.info-popup-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
}

.info-popup-emoji {
    font-size: 1.8rem;
    line-height: 1;
    flex-shrink: 0;
}

.info-popup-title {
    display: block;
    font-family: var(--font-main);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.info-popup-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    color: white;
    letter-spacing: 0.3px;
}

.info-popup-body {
    padding: 0 20px 20px;
}

.info-popup-desc {
    font-size: 0.88rem;
    line-height: 1.65;
    color: #555;
    margin: 0 0 14px;
}

.info-popup-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.info-popup-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    background: #F5F5F5;
    border-radius: 8px;
    font-size: 0.8rem;
    color: #555;
}

.info-popup-meta-item strong {
    color: var(--text-primary);
}

.info-popup-tip {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 12px 14px;
    background: linear-gradient(135deg, #FFF8E1, #FFFDE7);
    border-radius: 10px;
    border-left: 3px solid #FFD54F;
}

.info-popup-tip-icon {
    font-size: 1rem;
    flex-shrink: 0;
    line-height: 1.5;
}

.info-popup-tip span:last-child {
    font-size: 0.82rem;
    line-height: 1.5;
    color: #6D4C00;
}

/* Progress bar for time popup */
.info-popup-progress {
    margin-bottom: 14px;
}

.info-popup-progress-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #888;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-popup-progress-bar {
    height: 8px;
    background: #E8E8E8;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 4px;
}

.info-popup-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4FC3F7, #0288D1);
    border-radius: 4px;
    transition: width 0.6s ease;
}

.info-popup-progress-scale {
    display: flex;
    justify-content: space-between;
    font-size: 0.65rem;
    color: #aaa;
}

/* Checklist for materials popup */
.info-popup-checklist {
    list-style: none;
    padding: 0;
    margin: 0 0 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.info-popup-check-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #F9FBE7;
    border-radius: 8px;
    font-size: 0.88rem;
    color: var(--text-primary);
    transition: background 0.2s;
}

.info-popup-check-item:hover {
    background: #F0F4C3;
}

.info-popup-check-icon {
    font-size: 0.9rem;
    flex-shrink: 0;
}

/* Popup backdrop overlay for mobile */
.info-popup-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    backdrop-filter: blur(2px);
}

.info-popup-backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* ---- Single Post: Counters ---- */
.single-counters {
    display: flex;
    justify-content: center;
    gap: var(--space-lg);
    margin-top: var(--space-md);
    padding: var(--space-md) 0;
}

.counter-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    color: var(--text-light);
}

.counter-item svg {
    flex-shrink: 0;
}

/* ---- Community Interaction Area ---- */
.community-interaction {
    margin: var(--space-2xl) 0;
    padding: var(--space-xl);
    background: linear-gradient(135deg, #FFF5F9 0%, #F0E6FF 100%);
    border-radius: var(--radius-xl);
    text-align: center;
    border: 2px solid rgba(255, 107, 157, 0.15);
}

/* Like Button */
.like-section {
    margin-bottom: var(--space-xl);
}

.like-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 16px 40px;
    border: 3px solid var(--color-primary-light);
    border-radius: var(--radius-full);
    background: white;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-body);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.15);
}

.like-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 30px rgba(255, 107, 157, 0.3);
    border-color: var(--color-primary);
}

.like-btn.liked {
    background: linear-gradient(135deg, var(--color-primary), #FF4081);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 20px rgba(255, 107, 157, 0.4);
}

.like-icon {
    font-size: 1.4rem;
    transition: transform 0.3s ease;
}

.like-btn:hover .like-icon {
    transform: scale(1.2);
}

.like-btn.liked .like-icon {
    animation: likePopIn 0.5s ease;
}

@keyframes likePopIn {
    0% { transform: scale(1); }
    30% { transform: scale(1.5); }
    60% { transform: scale(0.9); }
    100% { transform: scale(1); }
}

.like-count {
    background: rgba(255, 107, 157, 0.15);
    padding: 2px 12px;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 700;
    min-width: 32px;
    text-align: center;
}

.like-btn.liked .like-count {
    background: rgba(255, 255, 255, 0.25);
}

/* Cheer Section */
.cheer-section {
    padding-top: var(--space-lg);
    border-top: 1px solid rgba(255, 107, 157, 0.15);
}

.cheer-title {
    font-family: var(--font-main);
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.cheer-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
}

.cheer-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    justify-content: center;
}

.cheer-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border: 2px solid rgba(255, 107, 157, 0.2);
    border-radius: var(--radius-full);
    background: white;
    color: var(--text-primary);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    font-family: var(--font-body);
    transition: all 0.3s ease;
}

.cheer-btn:hover {
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.2);
}

.cheer-btn:active {
    transform: scale(0.95);
}

.cheer-btn.sent {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.cheer-emoji {
    font-size: 1.15rem;
}

.cheer-count {
    background: rgba(255, 107, 157, 0.12);
    padding: 1px 8px;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
}

.cheer-count:empty {
    display: none;
}

.cheer-btn.sent .cheer-count {
    background: rgba(255, 255, 255, 0.25);
}

/* Toast Notification */
.toast-notification {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--text-primary);
    color: white;
    padding: 14px 28px;
    border-radius: var(--radius-full);
    font-size: 0.92rem;
    font-weight: 500;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    z-index: 10001;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

.toast-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast-notification.toast-error {
    background: #FF4444;
}

.toast-notification.toast-success {
    background: #6BCB77;
}

/* ---- Ad Zones (깔끔한 광고 배치) ---- */
.ad-section {
    padding: var(--space-md) 0;
}

.ad-section-slim {
    padding: var(--space-sm) 0;
}

.ad-zone {
    max-width: 728px;
    margin: 0 auto;
    text-align: center;
}

.ad-zone-inner {
    position: relative;
    background: rgba(255, 245, 249, 0.5);
    border: 1px solid rgba(255, 107, 157, 0.08);
    border-radius: var(--radius-sm);
    padding: var(--space-sm);
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-slim .ad-zone-inner {
    min-height: 50px;
    max-height: 100px;
    overflow: hidden;
}

.ad-label {
    position: absolute;
    top: 2px;
    right: 6px;
    font-size: 0.55rem;
    color: var(--text-light);
    opacity: 0.5;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ad-widget {
    width: 100%;
}

/* ---- Mobile Community Nav ---- */
.mobile-community-nav {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.mobile-nav-highlight {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 12px;
    background: var(--bg-section);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.mobile-nav-highlight:hover {
    background: var(--color-primary);
    color: white;
}

/* ---- Footer Stats ---- */
.footer-stats {
    display: flex;
    justify-content: center;
    gap: var(--space-xl);
    padding: var(--space-xl) 0;
    margin-bottom: var(--space-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-stat {
    text-align: center;
}

.footer-stat-num {
    display: block;
    font-family: var(--font-main);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-primary-light);
}

.footer-stat-label {
    display: block;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 2px;
}

/* ---- Responsive Adjustments ---- */
@media (max-width: 1024px) {
    .popular-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    .best-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .hero-stats {
        gap: var(--space-sm);
        justify-content: center;
    }

    .hero-stat {
        padding: var(--space-sm) var(--space-md);
        min-width: 70px;
    }

    .stat-num {
        font-size: 1.2rem;
    }

    .popular-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .popular-card-thumb {
        aspect-ratio: 16/9;
    }

    .best-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-sm);
    }

    .single-origami-info {
        flex-direction: column;
        padding: var(--space-md);
    }

    .info-item {
        width: 100%;
    }

    /* Mobile: popup becomes bottom sheet style */
    .info-popup {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-height: 80vh;
        overflow-y: auto;
        transform: translateX(0) translateY(100%);
        border-radius: 20px 20px 0 0;
        z-index: 1001;
    }

    .info-item.popup-active .info-popup {
        transform: translateX(0) translateY(0);
    }

    .info-popup-arrow {
        display: none;
    }

    /* Mobile drag handle */
    .info-popup::before {
        content: '';
        display: block;
        width: 40px;
        height: 4px;
        background: #ddd;
        border-radius: 2px;
        margin: 10px auto 0;
    }

    .single-counters {
        gap: var(--space-md);
        flex-wrap: wrap;
    }

    .community-interaction {
        padding: var(--space-lg);
        margin: var(--space-xl) 0;
    }

    .like-btn {
        padding: 14px 30px;
        font-size: 1rem;
    }

    .cheer-buttons {
        gap: 6px;
    }

    .cheer-btn {
        padding: 8px 14px;
        font-size: 0.82rem;
    }

    .cheer-title {
        font-size: 1.1rem;
    }

    .footer-stats {
        gap: var(--space-lg);
    }

    .footer-stat-num {
        font-size: 1.4rem;
    }

    .ad-zone {
        max-width: 100%;
    }
}

@media (max-width: 380px) {
    .hero-stats {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }

    .best-grid {
        grid-template-columns: 1fr;
    }

    .cheer-btn {
        padding: 6px 10px;
        font-size: 0.78rem;
    }
}

/* =====================================================
   MOBILE BOTTOM NAV (앱스타일)
   ===================================================== */
.mobile-bottom-nav {
    display: none;
}

@media (max-width: 768px) {
    .mobile-bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 900;
        display: flex;
        align-items: stretch;
        background: white;
        border-top: 1px solid #eee;
        box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.08);
        padding-bottom: env(safe-area-inset-bottom, 0);
    }

    .bottom-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        padding: 8px 0 6px;
        font-size: 0.65rem;
        font-weight: 500;
        color: #999;
        text-decoration: none;
        border: none;
        background: none;
        cursor: pointer;
        transition: color 0.2s;
        -webkit-tap-highlight-color: transparent;
    }

    .bottom-nav-item svg {
        transition: transform 0.2s;
    }

    .bottom-nav-item.active,
    .bottom-nav-item:active {
        color: var(--color-primary);
    }

    .bottom-nav-item.active svg {
        stroke: var(--color-primary);
    }

    .bottom-nav-item:active svg {
        transform: scale(0.9);
    }

    /* YouTube center button (앱 가운데 강조 버튼) */
    .bottom-nav-yt {
        position: relative;
    }

    .bottom-nav-yt-circle {
        width: 44px;
        height: 44px;
        background: #FF0000;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-top: -18px;
        box-shadow: 0 4px 14px rgba(255, 0, 0, 0.35);
        transition: transform 0.2s, box-shadow 0.2s;
    }

    .bottom-nav-yt:active .bottom-nav-yt-circle {
        transform: scale(0.92);
    }

    .bottom-nav-yt span:last-child {
        color: #FF0000;
        font-weight: 600;
    }

    /* Add bottom padding to body for bottom nav */
    body {
        padding-bottom: 72px;
    }

    /* Hide footer bottom SEO text on mobile - cleaner */
    .footer-seo-text {
        display: none;
    }
}

/* =====================================================
   SCROLL PROGRESS BAR
   ===================================================== */
.scroll-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 9999;
    pointer-events: none;
}

.scroll-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--color-primary), #FF6B9D, #FFD93D);
    transition: width 0.1s linear;
    border-radius: 0 2px 2px 0;
}

/* =====================================================
   MOBILE SEARCH OVERLAY
   ===================================================== */
.mobile-search-overlay {
    position: fixed;
    inset: 0;
    z-index: 1100;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 80px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.mobile-search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-search-overlay-inner {
    background: white;
    border-radius: 16px;
    padding: 20px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
    transform: translateY(-20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mobile-search-overlay.active .mobile-search-overlay-inner {
    transform: translateY(0);
}

.mobile-search-overlay-close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 50%;
    font-size: 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-search-overlay-inner {
    position: relative;
}

.mobile-search-overlay-form {
    display: flex;
    gap: 8px;
}

.mobile-search-overlay-form input {
    flex: 1;
    padding: 14px 16px;
    border: 2px solid #eee;
    border-radius: 12px;
    font-size: 1rem;
    font-family: var(--font-body);
    outline: none;
    transition: border-color 0.2s;
}

.mobile-search-overlay-form input:focus {
    border-color: var(--color-primary);
}

.mobile-search-overlay-form button {
    padding: 14px 20px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
}

/* =====================================================
   RANKING SECTION
   ===================================================== */
.ranking-section {
    padding: var(--space-xxl) 0;
    background: linear-gradient(180deg, #FFF8E1 0%, #FFFDE7 50%, white 100%);
}

.ranking-tabs {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: var(--space-xl);
}

.ranking-tab {
    padding: 8px 20px;
    border: 2px solid #ddd;
    border-radius: 20px;
    background: white;
    font-size: 0.88rem;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}

.ranking-tab.active {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: white;
}

.ranking-tab:hover:not(.active) {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.ranking-list {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ranking-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: white;
    border-radius: 14px;
    text-decoration: none;
    color: var(--text-primary);
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.ranking-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.ranking-num {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 800;
    color: #999;
    background: #f5f5f5;
    flex-shrink: 0;
}

.ranking-num.ranking-top {
    background: linear-gradient(135deg, #FFD700, #FFA000);
    color: white;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(255, 160, 0, 0.3);
}

.ranking-thumb {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f9f9f9;
}

.ranking-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ranking-thumb-empty {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.ranking-info {
    flex: 1;
    min-width: 0;
}

.ranking-title {
    display: block;
    font-size: 0.92rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.ranking-stats {
    display: flex;
    gap: 10px;
    font-size: 0.72rem;
    color: #999;
}

.ranking-medal {
    font-size: 1.3rem;
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .ranking-item {
        padding: 10px 12px;
        gap: 10px;
    }

    .ranking-thumb {
        width: 44px;
        height: 44px;
    }

    .ranking-title {
        font-size: 0.85rem;
    }
}

/* ---- Print overrides ---- */
@media print {
    .community-interaction,
    .popular-section,
    .best-section,
    .ranking-section,
    .ad-section,
    .ad-zone,
    .hero-stats,
    .mobile-community-nav,
    .mobile-bottom-nav,
    .scroll-progress-bar,
    .footer-stats {
        display: none !important;
    }
}
