/* CSS Reset & Roots */
:root {
    --bg-color: #050505;
    --text-primary: #e2e8f0;
    --text-secondary: #a1a1aa;
    
    --twitch-color: #9146FF;
    --twitch-hover: #7a35e0;
    
    --youtube-color: #FF0000;
    --youtube-hover: #cc0000;
    
    --discord-color: #5865F2;
    --discord-hover: #4752c4;
    
    --poe-accent: #b43822; /* Red accent */
    --poe-gold: #d4af37;  /* Gold accent */
    
    --glass-bg: rgba(15, 15, 20, 0.65);
    --glass-border: rgba(212, 175, 55, 0.15);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.9);
    
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Parallax Background */
.parallax-bg {
    position: fixed;
    top: -10%;
    left: -10%;
    width: 120vw;
    height: 120vh;
    background: url('poe-bg.webp') no-repeat center center;
    background-size: cover;
    z-index: -2;
    filter: brightness(0.30) contrast(1.1);
    will-change: transform;
    pointer-events: none;
}

/* Embers / Particles */
.embers-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.ember {
    position: absolute;
    bottom: -10px;
    background-color: #ff5e00;
    border-radius: 50%;
    filter: blur(2px) drop-shadow(0 0 5px #ff0000);
    opacity: 0;
    animation: float-up linear infinite;
    will-change: transform, opacity;
}

@keyframes float-up {
    0% { transform: translateY(0) scale(1); opacity: 0; }
    20% { opacity: 0.8; }
    80% { opacity: 0.4; }
    100% { transform: translateY(-100vh) scale(0.5); opacity: 0; }
}

/* Background Shapes for modern feel */
.bg-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    opacity: 0.4;
    animation: float 20s infinite alternate cubic-bezier(0.5, 0, 0.5, 1);
    pointer-events: none;
}

.shape-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(180,56,34,0.3) 0%, rgba(0,0,0,0) 70%);
}

.shape-2 {
    bottom: 10%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(212,175,55,0.15) 0%, rgba(0,0,0,0) 70%);
    animation-delay: -5s;
}

.shape-3 {
    top: 40%;
    left: 40%;
    width: 30vw;
    height: 30vw;
    background: radial-gradient(circle, rgba(145,70,255,0.15) 0%, rgba(0,0,0,0) 70%);
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(5%, 5%) scale(1.1); }
    100% { transform: translate(-5%, 5%) scale(0.9); }
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 6rem;
}

/* Glassmorphism utility */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: var(--glass-shadow);
    position: relative;
}

/* Top Navigation (Language & Back) */
.top-nav {
    position: absolute;
    top: 1rem;
    left: 1rem;
    right: 1rem;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: none; /* Let clicks pass through empty space */
}

.top-nav > * {
    pointer-events: auto; /* Re-enable clicks on buttons */
}

.nav-back {
    padding: 0.5rem 1.2rem;
    font-size: 0.9rem;
}

.lang-switch {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    background: rgba(0,0,0,0.5);
    border-color: rgba(255,255,255,0.2);
}

/* Typography */
h1, h2, h3 {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    line-height: 1.2;
    text-shadow: 2px 4px 8px rgba(0,0,0,0.8);
    letter-spacing: 1px;
}

.section-title {
    font-size: 2.8rem;
    margin-bottom: 2.5rem;
    text-align: center;
    background: linear-gradient(135deg, var(--poe-gold), #fff, var(--poe-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.dot {
    color: var(--poe-accent);
    margin: 0 0.5rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    border-radius: 4px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Cinzel', serif;
}

.btn i {
    font-size: 1.2rem;
}

.btn-twitch {
    background: linear-gradient(135deg, var(--twitch-color) 0%, var(--twitch-hover) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(145, 70, 255, 0.4);
    border: 1px solid rgba(255,255,255,0.2);
}

.btn-twitch:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(145, 70, 255, 0.6);
}

.btn-outline {
    background: rgba(0,0,0,0.5);
    color: var(--poe-gold);
    border: 1px solid var(--poe-gold);
}

.btn-outline:hover {
    background: var(--poe-gold);
    color: #000;
    box-shadow: 0 0 20px rgba(212,175,55,0.4);
}

/* Hero Section */
.hero {
    text-align: center;
    padding-top: 4rem;
}

.avatar-container {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 2.5rem;
}

.avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #000;
    border: 3px solid var(--poe-gold);
    box-shadow: 0 0 30px rgba(212,175,55,0.3), inset 0 0 20px rgba(0,0,0,0.8);
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--poe-gold);
    animation: avatarFloat 6s ease-in-out infinite;
}

@keyframes avatarFloat {
    0%, 100% { transform: translateY(0); box-shadow: 0 0 20px rgba(212,175,55,0.4); }
    50% { transform: translateY(-15px); box-shadow: 0 15px 40px rgba(212,175,55,0.6); }
}

.live-badge {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background-color: #ff0000;
    color: white;
    font-size: 0.8rem;
    font-weight: 800;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    border: 1px solid #ff4444;
    box-shadow: 0 0 10px rgba(255,0,0,0.8);
    animation: pulse 2s infinite;
    text-transform: uppercase;
    letter-spacing: 1px;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.8); }
    70% { box-shadow: 0 0 0 10px rgba(255, 0, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 0, 0, 0); }
}

.title {
    font-size: 4.5rem;
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
    background: linear-gradient(to bottom, #fff, var(--poe-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 5px rgba(0,0,0,1));
}

.subtitle {
    font-size: 1.3rem;
    color: var(--poe-gold);
    font-weight: 600;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    font-family: 'Cinzel', serif;
}

.bio {
    max-width: 650px;
    margin: 0 auto 3rem;
    color: var(--text-primary);
    font-size: 1.15rem;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.9);
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

/* Schedule Section */
.schedule-card {
    padding: 3rem;
    transition: var(--transition);
    border-top: 2px solid var(--poe-accent);
}

.schedule-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(180,56,34,0.15);
}

.schedule-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.schedule-info {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.schedule-icon {
    font-size: 3.5rem;
    color: var(--poe-accent);
    filter: drop-shadow(0 0 10px rgba(180,56,34,0.5));
}

.schedule-text h3 {
    font-size: 1.8rem;
    margin-bottom: 0.8rem;
    color: var(--poe-gold);
}

.schedule-text p {
    color: var(--text-primary);
    font-size: 1.05rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

/* Banner Section */
.banner-container {
    padding: 0;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
    border-top: 2px solid var(--poe-gold);
}

.banner-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(212,175,55,0.15);
}

.league-banner-obj {
    width: 100%;
    aspect-ratio: 2 / 1;
    display: block;
}

/* Socials Section */
.social-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.social-card {
    padding: 3rem 2rem;
    text-decoration: none;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.social-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: transparent;
    transition: var(--transition);
}

.twitch-card::before { background: var(--twitch-color); }
.youtube-card::before { background: var(--youtube-color); }
.discord-card::before { background: var(--discord-color); }

.social-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.twitch-card .social-icon { color: var(--twitch-color); filter: drop-shadow(0 0 10px rgba(145, 70, 255, 0.4)); }
.youtube-card .social-icon { color: var(--youtube-color); filter: drop-shadow(0 0 10px rgba(255, 0, 0, 0.4)); }
.discord-card .social-icon { color: var(--discord-color); filter: drop-shadow(0 0 10px rgba(88, 101, 242, 0.4)); }

.social-card h3 {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
    color: var(--poe-gold);
}

.social-card p {
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 1.5rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.card-arrow {
    position: absolute;
    bottom: -30px;
    right: 30px;
    font-size: 1.5rem;
    opacity: 0;
    transition: var(--transition);
}

.twitch-card .card-arrow { color: var(--twitch-color); }
.youtube-card .card-arrow { color: var(--youtube-color); }
.discord-card .card-arrow { color: var(--discord-color); }

.social-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    background: rgba(20,20,25,0.8);
}

.social-card:hover .social-icon {
    transform: scale(1.15) translateY(-5px);
}

.social-card:hover .card-arrow {
    bottom: 30px;
    opacity: 1;
}

/* Footer */
.footer {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 4rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(10px);
}

/* Animations Triggered by JS */
.hidden {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.show {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .title {
        font-size: 3rem;
    }
    .schedule-wrapper {
        flex-direction: column;
        text-align: center;
    }
    .schedule-info {
        flex-direction: column;
    }
    .container {
        gap: 4rem;
        padding-top: 5rem; /* Make room for top-nav when stacked */
    }
    .btn {
        width: 100%;
    }
    .hero-buttons {
        flex-direction: column;
    }
    
    /* Top Nav specific for mobile */
    .top-nav {
        flex-direction: column-reverse; /* Back button on bottom, lang on top or vice versa based on design preference */
        gap: 0.5rem;
        align-items: stretch;
    }
    .top-nav .btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Ladder Table specific for mobile */
    .ladder-table th, .ladder-table td {
        padding: 0.5rem;
        font-size: 0.85rem;
    }
    #ladder-pagination {
        flex-direction: column;
        gap: 1rem;
    }
}
