/* ================================================
   Irion Fansite - Index Page Styles ❄️
   Simple & Clean with Snowfall
   ================================================ */

/* Light Background for Index Page */
body {
    background: linear-gradient(180deg,
        #1a3a52 0%,     /* Deep winter sky */
        #2c5f7e 30%,    /* Mountain horizon */
        #4a8aaf 60%,    /* Lighter sky */
        #b8d8e8 100%    /* Snowy ground */
    );
    background-attachment: fixed;
}

/* ================================================
   Live Hero Section (방송 중)
   ================================================ */
.live-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 100px 20px 60px;
    overflow: hidden;
}

.live-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    z-index: -1;
    transition: background 0.3s ease;
}


.live-hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    width: 100%;
}

.live-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.live-badge-large {
    background: linear-gradient(135deg, #EF4444, #DC2626);
    color: white;
    padding: 12px 32px;
    border-radius: 50px;
    font-size: 1.5rem;
    font-weight: 700;
    animation: pulseBadge 1.5s infinite;
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.5);
}

@keyframes pulseBadge {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 30px rgba(239, 68, 68, 0.5);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 50px rgba(239, 68, 68, 0.7);
    }
}

.live-viewers-large {
    color: var(--text-secondary);
    font-size: 1.25rem;
    font-weight: 500;
}

.live-title-large {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 40px;
}

.live-thumbnail-large {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(239, 68, 68, 0.3);
}

.live-thumbnail-large a {
    display: block;
    position: relative;
}

.live-thumbnail-large img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.live-thumbnail-large:hover img {
    transform: scale(1.05);
}

.thumbnail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.live-thumbnail-large:hover .thumbnail-overlay {
    opacity: 1;
}

.play-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.9);
    color: #EF4444;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    padding-left: 8px;
}

.thumbnail-overlay span:last-child {
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
}

/* ================================================
   Default Hero Section (방송 안 할 때)
   ================================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 100px 20px 60px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    z-index: -2;
    transition: background 0.3s ease;
}


/* Floating Particles */
.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: rgba(165, 243, 252, 0.4);
    border-radius: 50%;
    animation: particleFloat 15s infinite;
}

.particle:nth-child(1) { left: 10%; top: 20%; animation-delay: 0s; animation-duration: 12s; }
.particle:nth-child(2) { left: 30%; top: 60%; animation-delay: 2s; animation-duration: 18s; }
.particle:nth-child(3) { left: 50%; top: 30%; animation-delay: 4s; animation-duration: 14s; }
.particle:nth-child(4) { left: 70%; top: 70%; animation-delay: 1s; animation-duration: 16s; }
.particle:nth-child(5) { left: 90%; top: 40%; animation-delay: 3s; animation-duration: 20s; }

@keyframes particleFloat {
    0%, 100% {
        transform: translateY(0) translateX(0) scale(1);
        opacity: 0.4;
    }
    25% {
        transform: translateY(-30px) translateX(10px) scale(1.2);
        opacity: 0.8;
    }
    50% {
        transform: translateY(-50px) translateX(-10px) scale(1);
        opacity: 0.4;
    }
    75% {
        transform: translateY(-20px) translateX(15px) scale(1.3);
        opacity: 0.6;
    }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

/* Offline Status */
.offline-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 32px;
}

.offline-icon {
    position: relative;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.offline-circle {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    animation: offlinePulse 3s ease-in-out infinite;
}

@keyframes offlinePulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.2;
    }
}

.offline-badge {
    background: rgba(156, 163, 175, 0.15);
    color: var(--text-muted);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 2px;
    border: 1px solid rgba(156, 163, 175, 0.2);
}

.hero-title {
    margin-bottom: 24px;
}

.hero-name {
    display: block;
    font-size: clamp(3.5rem, 12vw, 7rem);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
}

.hero-fansite {
    display: block;
    font-size: clamp(1.2rem, 4vw, 2rem);
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 12px;
    margin-top: 8px;
}

.hero-desc {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.hero-subdesc {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 40px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 48px;
}

.hero-buttons .btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 32px;
    font-size: 1rem;
}

.btn-icon {
    font-size: 1.125rem;
}

/* Profile Preview */
.hero-profile-preview {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    padding: 12px 24px 12px 12px;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.hero-profile-preview:hover {
    border-color: var(--border-glow);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.preview-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-light);
}

.preview-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.preview-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.preview-status {
    font-size: 0.813rem;
    color: var(--text-muted);
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================================================
   Quick Info & Other Sections
   ================================================ */
.quick-info,
.clips-section,
.videos-section {
    padding: 80px 0;
    background: transparent;
    transition: background 0.3s ease;
}

.videos-section {
    background: transparent;
}

.info-cards,
.clips-grid,
.videos-grid {
    display: grid;
    gap: 24px;
}

.info-cards { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.clips-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.videos-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

.section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 1.75rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 48px;
}

.title-icon {
    font-size: 1.5rem;
}

.info-card,
.clip-card,
.video-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: var(--transition);
    text-decoration: none;
    display: block;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.info-card::before,
.clip-card::before,
.video-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
}

.video-card {
    background: var(--bg-card);
}

.info-card {
    padding: 32px;
    text-align: center;
    cursor: pointer;
}

.clip-card, .video-card {
    overflow: hidden;
}

.info-card:hover,
.clip-card:hover,
.video-card:hover {
    transform: translateY(-8px);
    border-color: var(--border-glow);
    box-shadow: var(--shadow-lg);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.card-favicon {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.info-card h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.info-card p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.card-link {
    display: inline-block;
    color: var(--primary);
    font-weight: 500;
    transition: var(--transition);
}

.card-link:hover {
    color: var(--primary-light);
}

.clip-thumbnail,
.video-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 */
    background: var(--bg-card);
    overflow: hidden;
}

.video-thumbnail {
    background: rgba(30, 41, 59, 0.6);
}

.clip-thumbnail img,
.video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.clip-card:hover .clip-thumbnail img,
.video-card:hover .video-thumbnail img {
    transform: scale(1.1);
}

.clip-duration,
.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.clip-play-overlay,
.video-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.clip-card:hover .clip-play-overlay,
.video-card:hover .video-play-overlay {
    opacity: 1;
}

.clip-play-icon,
.video-play-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    padding-left: 4px;
    color: var(--primary);
    transform: scale(0.8);
    transition: var(--transition);
}

.clip-card:hover .clip-play-icon,
.video-card:hover .video-play-icon {
    transform: scale(1);
}

.clip-info,
.video-info {
    padding: 16px;
}

.clip-title,
.video-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.clip-meta,
.video-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.813rem;
    color: var(--text-muted);
}

.clip-meta-item,
.video-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Loading, Empty, More */
.clips-loading, .clips-empty,
.videos-loading, .videos-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    font-size: 1rem;
}

.clips-loading span,
.videos-loading span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.clips-loading span::before,
.videos-loading span::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.clips-empty span,
.videos-empty span {
    font-size: 1.25rem;
}

.clips-more,
.videos-more {
    text-align: center;
    margin-top: 40px;
}

.clips-more .btn,
.videos-more .btn {
    padding: 14px 48px;
    font-size: 1rem;
}

/* ================================================
   Responsive
   ================================================ */
@media (max-width: 768px) {
    .hero, .live-hero {
        min-height: auto;
        padding: 120px 20px 60px;
    }

    /* 모바일에서 파티클 애니메이션 비활성화 */
    .hero-particles,
    .particle {
        display: none;
    }

    /* 모바일에서 애니메이션 단순화 */
    @keyframes sparkle {
        0%, 100% { opacity: 1; transform: rotate(0deg) scale(1); }
        50% { opacity: 0.8; transform: rotate(0deg) scale(1); }
    }

    @keyframes pulseBadge {
        0%, 100% {
            transform: scale(1);
            box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
        }
        50% {
            transform: scale(1.02);
            box-shadow: 0 0 30px rgba(239, 68, 68, 0.5);
        }
    }

    .offline-status { flex-direction: column; gap: 12px; }
    .offline-icon { width: 40px; height: 40px; font-size: 1.25rem; }
    .offline-badge { padding: 6px 16px; font-size: 0.75rem; }
    .hero-desc { font-size: 1rem; }
    .hero-subdesc { font-size: 0.95rem; }
    .hero-buttons { flex-direction: column; align-items: center; }
    .hero-buttons .btn { width: 100%; max-width: 280px; justify-content: center; }
    .hero-profile-preview { padding: 10px 20px 10px 10px; }
    .preview-avatar { width: 40px; height: 40px; }
    .preview-name { font-size: 0.9rem; }
    .preview-status { font-size: 0.75rem; }

    .live-badge-large { padding: 10px 24px; font-size: 1.25rem; }
    .live-viewers-large { font-size: 1rem; }
    .live-title-large { font-size: 1.25rem; margin-bottom: 24px; }
    .play-icon { width: 60px; height: 60px; font-size: 1.5rem; }

    .quick-info, .clips-section, .videos-section { padding: 60px 0; }
    .section-title { font-size: 1.5rem; margin-bottom: 32px; }
    .clips-grid, .videos-grid { grid-template-columns: 1fr; gap: 16px; }
    .clip-info, .video-info { padding: 14px; }
    .clip-title, .video-title { font-size: 0.95rem; }

    /* 터치 디바이스에서 호버 효과 제거 */
    @media (hover: none) and (pointer: coarse) {
        .info-card:hover,
        .clip-card:hover,
        .video-card:hover {
            transform: none;
            box-shadow: var(--shadow-md);
        }

        .live-thumbnail-large:hover img {
            transform: none;
        }

        .clip-thumbnail img,
        .video-thumbnail img {
            transition: none;
        }

        .hero-profile-preview:hover {
            transform: none;
            box-shadow: var(--shadow-md);
        }

        .community-card:hover {
            transform: none;
            box-shadow: var(--shadow-md);
        }

        .community-card:hover .community-icon {
            transform: none;
            box-shadow: var(--shadow-sm);
        }

        /* 탭 피드백만 제공 */
        .info-card:active,
        .clip-card:active,
        .video-card:active,
        .community-card:active {
            transform: scale(0.98);
            transition: transform 0.1s ease;
        }
    }

    /* 모바일에서 fixed background 제거 */
    body {
        background-attachment: scroll;
    }
}

/* ================================================
   Dark Mode Overrides
   ================================================ */
[data-theme="dark"] .live-hero-bg {
    background:
            radial-gradient(ellipse at 30% 20%, rgba(239, 68, 68, 0.3) 0%, transparent 50%),
            radial-gradient(ellipse at 70% 80%, rgba(236, 72, 153, 0.2) 0%, transparent 50%),
            var(--bg-dark);
}

[data-theme="dark"] .live-badge-large {
    background: linear-gradient(135deg, #EF4444, #DC2626);
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.5);
}

[data-theme="dark"] @keyframes pulseBadge {
                        0%, 100% {
                            transform: scale(1);
                            box-shadow: 0 0 30px rgba(239, 68, 68, 0.5);
                        }
                        50% {
                            transform: scale(1.05);
                            box-shadow: 0 0 50px rgba(239, 68, 68, 0.7);
                        }
                    }

[data-theme="dark"] .live-thumbnail-large {
    box-shadow: 0 20px 60px rgba(239, 68, 68, 0.3);
}

[data-theme="dark"] .thumbnail-overlay {
    background: rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .play-icon {
    color: #EF4444;
}

[data-theme="dark"] .hero-bg {
    background: transparent;
}

[data-theme="dark"] .hero-name {
    color: var(--text-primary);
}

[data-theme="dark"] .hero-profile-preview {
    background: rgba(26, 26, 46, 0.8);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .hero-profile-preview:hover {
    border-color: rgba(165, 243, 252, 0.3);
    box-shadow: 0 10px 30px rgba(165, 243, 252, 0.1);
}

[data-theme="dark"] .preview-avatar {
    border: 2px solid rgba(165, 243, 252, 0.3);
}

[data-theme="dark"] .info-card:hover,
[data-theme="dark"] .clip-card:hover,
[data-theme="dark"] .video-card:hover {
    box-shadow: var(--shadow-md);
}

/* ================================================
   Community Section
   ================================================ */
.community-section {
    padding: 80px 0;
    background: transparent;
}

.community-section .section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 1.75rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
}

.community-card {
    display: block;
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 40px;
    text-decoration: none;
    overflow: hidden;
    transition: all 0.4s ease;
    box-shadow: var(--shadow-md);
}

.community-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
}

.community-card:hover {
    border-color: var(--border-glow);
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.community-card-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(6, 182, 212, 0.05);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.community-card:hover .community-card-bg {
    opacity: 1;
}

.community-card-content {
    position: relative;
    display: flex;
    align-items: center;
    gap: 24px;
    z-index: 1;
}

.community-icon {
    width: 80px;
    height: 80px;
    background: var(--bg-card);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.community-card:hover .community-icon {
    background: var(--bg-card-hover);
    transform: scale(1.1) rotate(-5deg);
    box-shadow: var(--shadow-md);
}

.community-favicon {
    width: 40px;
    height: 40px;
    object-fit: contain;
    transition: var(--transition);
}

.community-card:hover .community-favicon {
    filter: brightness(1.2);
}

.community-info {
    flex: 1;
}

.community-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    transition: var(--transition);
}

.community-card:hover .community-info h3 {
    color: var(--primary-light);
}

.community-info p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.community-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary);
    transition: var(--transition);
}

.community-link svg {
    transition: transform 0.3s ease;
}

.community-card:hover .community-link svg {
    transform: translateX(4px);
}

.community-decoration {
    display: flex;
    gap: 12px;
    font-size: 2rem;
    opacity: 0.3;
    transition: var(--transition);
}

.community-card:hover .community-decoration {
    opacity: 0.6;
}

.community-decoration span {
    animation: float 3s ease-in-out infinite;
}

.community-decoration span:nth-child(1) { animation-delay: 0s; }
.community-decoration span:nth-child(2) { animation-delay: 0.5s; }
.community-decoration span:nth-child(3) { animation-delay: 1s; }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* Responsive */
@media (max-width: 768px) {
    .community-section {
        padding: 60px 0;
    }

    .community-card {
        padding: 24px;
        border-radius: 16px;
    }

    .community-card-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .community-icon {
        width: 64px;
        height: 64px;
        border-radius: 16px;
    }

    .community-favicon {
        width: 32px;
        height: 32px;
    }

    .community-info h3 {
        font-size: 1.25rem;
    }

    .community-info p {
        font-size: 0.9rem;
    }

    .community-decoration {
        display: none;
    }
}

/* ================================================
   Footer - Index Page
   ================================================ */
.footer-text {
    color: #2c3e50;
}

.footer-text a {
    color: #1a3a52 !important;
}