:root {
    --bg-color: #0a0a0a;
    --text-color: #f5f5f5;
    --primary-color: #f2c94c;
    --secondary-color: #2d9cdb;
    --glow-color: rgba(242, 201, 76, 0.6);
    --border-color: rgba(255, 255, 255, 0.1);
    --glass-bg: rgba(15, 15, 15, 0.6);
    --font-display: 'Lalezar', cursive;
    --font-body: 'Vazirmatn', sans-serif;
}

*, *::before, *::after { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

html { 
    scroll-behavior: smooth; 
}

body { 
    background-color: var(--bg-color); 
    color: var(--text-color); 
    font-family: var(--font-body); 
    overflow-x: hidden; 
    -webkit-font-smoothing: antialiased;
    line-height: 1.7;
}

body.mobile-nav-active { 
    overflow: hidden; 
}

/* --- PRELOADER --- */
#preloader { position: fixed; inset: 0; background-color: var(--bg-color); z-index: 10000; display: flex; justify-content: center; align-items: center; transition: opacity 1.5s ease-in-out; }
#procedural-flame-container { position: relative; width: 100px; height: 160px; display: flex; justify-content: center; align-items: flex-end; }
.flame { position: absolute; bottom: 0; border-radius: 50% 50% 50% 50% / 70% 70% 30% 30%; background: radial-gradient(circle at 50% 30%, #ffdd55, #ff6a00 70%, transparent 100%); animation: flicker 1.5s infinite ease-in-out; mix-blend-mode: screen; opacity: 0.8; }
.flame1 { width: 60px; height: 100px; animation-delay: 0s; }
.flame2 { width: 50px; height: 90px; animation-delay: 0.2s; background: radial-gradient(circle at 50% 30%, #ffef88, #ff8000 70%, transparent 100%); }
.flame3 { width: 40px; height: 80px; animation-delay: 0.4s; background: radial-gradient(circle at 50% 30%, #fff6bb, #ff9933 70%, transparent 100%); }
.flame4 { width: 30px; height: 70px; animation-delay: 0.6s; background: radial-gradient(circle at 50% 30%, #fffddd, #ffaa33 70%, transparent 100%); }
.flame5 { width: 20px; height: 60px; animation-delay: 0.8s; background: radial-gradient(circle at 50% 30%, #ffffff, #ffcc66 70%, transparent 100%); }
@keyframes flicker { 0%, 100% { transform: scale(1) translateY(0); opacity: 0.9; } 25% { transform: scale(1.05,0.95) translateY(-4px); opacity: 0.75; } 50% { transform: scale(0.95,1.05) translateY(-8px); opacity: 0.85; } 75% { transform: scale(1.08,0.92) translateY(-4px); opacity: 0.7; } }

/* --- TYPOGRAPHY --- */
h1, h2, h3, h4, .card-title { font-family: var(--font-display); text-rendering: optimizeLegibility; line-height: 1.2; }
h2.section-title { font-size: clamp(3rem, 8vw, 5rem); background: linear-gradient(135deg, #f2c94c 0%, #f5de98 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; margin-bottom: 2.5rem; text-align: center; }

/* --- CURSOR --- */
#cursor-glow { position: fixed; top: 0; left: 0; width: 30px; height: 30px; background: radial-gradient(circle, var(--glow-color) 10%, transparent 70%); border-radius: 50%; z-index: 9999; pointer-events: none; transform: translate(-50%, -50%); transition: transform 0.15s ease-out, opacity 0.2s ease-out; opacity: 0; display: none; }
body:hover #cursor-glow { opacity: 1; }

/* --- HEADER & NAVIGATION --- */
.site-header { position: fixed; top: 0; width: 100%; left: 0; padding: 1.2rem 5%; z-index: 100; background: rgba(10, 10, 10, 0.75); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); border-bottom: 1px solid var(--border-color); transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); display: flex; justify-content: space-between; align-items: center; }
.site-header.hidden { transform: translateY(-100%); }
.logo { height: 45px; object-fit: contain; transition: transform 0.3s ease; }
.logo:hover { transform: scale(1.05); }
.desktop-nav { display: none; gap: 2.5rem; }
.desktop-nav a { font-weight: 500; color: var(--text-color); text-decoration: none; position: relative; padding: 0.5rem 0; transition: all 0.3s ease; font-size: 1rem; }
.desktop-nav a:hover { color: var(--primary-color); text-shadow: 0 0 8px var(--glow-color); }
.desktop-nav a::after { content: ''; position: absolute; bottom: -2px; left: 0; width: 0; height: 2px; background: var(--primary-color); transition: width 0.3s ease; }
.desktop-nav a:hover::after { width: 100%; }
#hamburger-btn { display: block; background: none; border: none; cursor: pointer; z-index: 1001; padding: 10px; }
#hamburger-btn span { display: block; width: 28px; height: 2px; background-color: var(--text-color); margin: 6px 0; transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1); }
body.mobile-nav-active #hamburger-btn span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
body.mobile-nav-active #hamburger-btn span:nth-child(2) { opacity: 0; }
body.mobile-nav-active #hamburger-btn span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
#mobile-nav-panel { position: fixed; top: 0; right: -100%; width: 75%; max-width: 320px; height: 100%; background: rgba(15, 15, 15, 0.95); backdrop-filter: blur(20px); z-index: 1000; transition: right 0.5s cubic-bezier(0.23, 1, 0.32, 1); display: flex; flex-direction: column; justify-content: center; }
body.mobile-nav-active #mobile-nav-panel { right: 0; }
#mobile-nav-links { display: flex; flex-direction: column; gap: 1.5rem; text-align: center; padding: 0 2rem; }
#mobile-nav-links a { color: var(--text-color); text-decoration: none; font-size: 1.5rem; font-family: var(--font-display); padding: 1rem 0; opacity: 0; transform: translateX(30px); transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
body.mobile-nav-active #mobile-nav-links a { opacity: 1; transform: translateX(0); }
body.mobile-nav-active #mobile-nav-links a:nth-child(1) { transition-delay: 0.15s; }
body.mobile-nav-active #mobile-nav-links a:nth-child(2) { transition-delay: 0.25s; }
body.mobile-nav-active #mobile-nav-links a:nth-child(3) { transition-delay: 0.35s; }
body.mobile-nav-active #mobile-nav-links a:nth-child(4) { transition-delay: 0.45s; }
body.mobile-nav-active #mobile-nav-links a:nth-child(5) { transition-delay: 0.55s; }
body.mobile-nav-active #mobile-nav-links a:nth-child(6) { transition-delay: 0.65s; }

/* --- HERO SECTION --- */
.hero { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; position: relative; padding: 0 5%; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(10,10,10,0.3) 0%, rgba(10,10,10,0.8) 70%); }
.hero-title { font-size: clamp(4rem, 12vw, 10rem); line-height: 1; margin-bottom: 1.5rem; background: linear-gradient(135deg, #f2c94c 0%, #f2994a 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; text-shadow: 0 0 50px rgba(242, 201, 76, 0.3); position: relative; z-index: 2;}
.hero-subtitle { font-size: clamp(1.3rem, 3vw, 1.8rem); font-weight: 300; color: #ccc; max-width: 600px; margin: 0 auto; position: relative; z-index: 2; }

/* --- GENERAL SECTION STYLING --- */
.background-section { position: relative; min-height: 100vh; width: 100%; display: flex; align-items: center; justify-content: center; background-size: cover; background-position: center; overflow: hidden; padding: 8rem 5%; }
.background-section::before { content: ''; position: absolute; inset: 0; background: rgba(10, 10, 10, 0.85); z-index: 1; }
.container { position: relative; z-index: 2; width: 100%; max-width: 1200px; }

/* --- EMBER PARTICLE ANIMATION --- */
.particle-container { position: absolute; inset: 0; overflow: hidden; z-index: 1; pointer-events: none; }
.particle { position: absolute; bottom: -10px; background-color: var(--primary-color); border-radius: 50%; opacity: 0; animation: ember-rise 10s infinite ease-in; }
@keyframes ember-rise { 0% { transform: translateY(0) scale(1); opacity: 0; } 20% { opacity: var(--opacity); } 100% { transform: translateY(-100vh) scale(0.5); opacity: 0; } }
.particle::before { content: ''; position: absolute; inset: -5px; background: radial-gradient(circle, var(--glow-color) 20%, transparent 70%); border-radius: 50%; }

/* --- ABOUT & EDITORIAL SECTIONS --- */
.glass-content { background: var(--glass-bg); backdrop-filter: blur(20px); border: 1px solid var(--border-color); border-radius: 20px; padding: clamp(2rem, 5vw, 4rem); text-align: center; box-shadow: 0 20px 40px rgba(0,0,0,0.3); }
#about-description, #editorial-description { font-size: clamp(1.1rem, 2.2vw, 1.3rem); line-height: 1.8; color: #e0e0e0; margin-bottom: 2rem; max-width: 800px; margin-left: auto; margin-right: auto; }
.cta-button { display: inline-block; padding: 0.9rem 2.2rem; border-radius: 12px; background: linear-gradient(135deg, var(--primary-color), #f2994a); color: #121212; text-decoration: none; font-weight: 700; font-size: 1.1rem; transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94); box-shadow: 0 8px 20px rgba(242, 201, 76, 0.3); }
.cta-button:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 12px 25px rgba(242, 201, 76, 0.4); }

/* --- ORBITAL TEAM CONSTELLATION (NEW) --- */
#team-pyramid-container {
    padding: 2rem 0;
    perspective: 1000px;
}

.orbital-team-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2.5rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem;
    justify-items: center;
}

.orbital-leader-card {
    position: relative;
    width: 220px;
    height: 280px;
    background: rgba(25, 25, 25, 0.7);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    overflow: hidden;
    backdrop-filter: blur(12px);
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    animation: floatIn var(--delay, 0s) ease-out forwards;
    opacity: 0;
    transform: translateY(40px) scale(0.9);
}

.orbital-leader-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(242, 201, 76, 0.15), transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 1;
}

.orbital-leader-card:hover::before {
    opacity: 1;
}

.orbital-glow {
    position: absolute;
    top: 50%; left: 50%;
    width: 120px; height: 120px;
    background: radial-gradient(circle, var(--glow-color) 0%, transparent 60%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: all 0.5s ease;
    pointer-events: none;
    z-index: 0;
}

.orbital-leader-card:hover .orbital-glow {
    opacity: 0.8;
    transform: translate(-50%, -50%) scale(1.8);
}

.orbital-leader-card img {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    margin: 2rem auto 1rem;
    display: block;
    border: 3px solid rgba(255,255,255,0.2);
    transition: all 0.5s ease;
    position: relative;
    z-index: 2;
}

.orbital-leader-card:hover img {
    transform: scale(1.1);
    border-color: var(--primary-color);
    box-shadow: 0 0 30px var(--glow-color);
}

.orbital-info {
    text-align: center;
    padding: 0 1rem;
    position: relative;
    z-index: 2;
}

.orbital-info .name {
    font-family: var(--font-display);
    font-size: 1.35rem;
    margin-bottom: 0.4rem;
    background: linear-gradient(135deg, #f2c94c, #f2994a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.orbital-info .role {
    font-size: 0.95rem;
    color: #ccc;
    line-height: 1.4;
}

.orbital-leader-card:hover {
    transform: translateY(-12px) scale(1.05);
    border-color: var(--primary-color);
    box-shadow: 0 30px 60px rgba(0,0,0,0.5), 0 0 40px rgba(242, 201, 76, 0.3);
}

/* Float-in animation */
@keyframes floatIn {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsive */
@media (max-width: 640px) {
    .orbital-leader-card {
        width: 180px;
        height: 240px;
    }
    .orbital-leader-card img {
        width: 90px;
        height: 90px;
    }
}

/* --- JURY & SELECTION COMMITEE --- */
.jury-grid, .selection-committee-grid { display: grid; gap: 2.5rem; }
.jury-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.selection-committee-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.jury-card, .selection-committee-card { background: rgba(30,30,30,0.7); border: 1px solid var(--border-color); border-radius: 16px; padding: 2rem; text-align: center; transition: transform 0.4s ease, box-shadow 0.4s ease; }
.jury-card:hover, .selection-committee-card:hover { transform: translateY(-10px) scale(1.03); box-shadow: 0 25px 50px rgba(0,0,0,0.4); border-color: var(--primary-color); }
.jury-card img, .selection-committee-card img { border-radius: 50%; object-fit: cover; margin: 0 auto 1.5rem; border: 3px solid rgba(255,255,255,0.15); transition: all 0.4s ease; }
.jury-card:hover img, .selection-committee-card:hover img { box-shadow: 0 0 25px var(--glow-color); border-color: var(--primary-color); }
.jury-card img { width: 160px; height: 160px; filter: grayscale(50%); }
.jury-card:hover img { filter: grayscale(0%); }
.selection-committee-card img { width: 120px; height: 120px; }
.jury-card .name, .selection-committee-card .name { font-size: 1.5rem; margin-bottom: 0.5rem; }
.jury-card .role { color: #aaa; }
.jury-card .bio { font-size: 0.9rem; color: #888; margin-top: 1rem; }
.selection-committee-card .name { font-size: 1.2rem; }

/* --- NEW FLAME COUNTDOWN --- */
.countdown-container { text-align: center; margin-bottom: 3.5rem; }
#countdown-date { font-size: 1.5rem; color: #ccc; margin-bottom: 2rem; direction: rtl; }
.flame-countdown-wrapper { display: flex; justify-content: center; gap: clamp(1rem, 4vw, 2.5rem); direction: ltr; }
.flame-clock-item { display: flex; flex-direction: column; align-items: center; }
.flame-clock-digits { display: flex; }
.digit {
    font-family: var(--font-display);
    font-size: clamp(3rem, 10vw, 6rem);
    line-height: 1;
    color: #fff;
    position: relative;
    transition: opacity 0.3s ease-in-out;
}
.digit.changing { opacity: 0; }
.flame-clock-label { font-size: clamp(1rem, 2vw, 1.2rem); color: #999; margin-top: 1rem; }
.deadline-ended { font-size: 1.8rem; color: var(--primary-color); font-weight: 600; padding: 2rem 0; }

@keyframes flame-flicker {
    0% { text-shadow: 0 0 10px #fefcc9, 0 0 15px #feec85, 0 0 20px #ffae34, 0 0 25px #ec760c, 0 0 30px #cd4606, 0 0 35px #973716, 0 0 40px #451b0e; }
    25% { text-shadow: 0 0 12px #fefcc9, 0 0 18px #feec85, 0 0 22px #ffae34, 0 0 28px #ec760c, 0 0 32px #cd4606, 0 0 38px #973716, 0 0 45px #451b0e; }
    50% { text-shadow: 0 0 10px #fefcc9, 0 0 14px #feec85, 0 0 18px #ffae34, 0 0 25px #ec760c, 0 0 30px #cd4606, 0 0 35px #973716, 0 0 40px #451b0e; }
    75% { text-shadow: 0 0 13px #fefcc9, 0 0 17px #feec85, 0 0 23px #ffae34, 0 0 27px #ec760c, 0 0 33px #cd4606, 0 0 37px #973716, 0 0 44px #451b0e; }
    100% { text-shadow: 0 0 10px #fefcc9, 0 0 15px #feec85, 0 0 20px #ffae34, 0 0 25px #ec760c, 0 0 30px #cd4606, 0 0 35px #973716, 0 0 40px #451b0e; }
}
.digit { animation: flame-flicker 2s linear infinite; }
.digit:nth-child(2) { animation-delay: 0.3s; }
.digit:nth-child(3) { animation-delay: 0.7s; }
/* Stagger animation for each clock item */
.flame-clock-item:nth-child(2) .digit { animation-delay: 0.2s; }
.flame-clock-item:nth-child(3) .digit { animation-delay: 0.5s; }
.flame-clock-item:nth-child(4) .digit { animation-delay: 0.8s; }

/* --- SUBMISSION BUTTONS --- */
.submission-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2.5rem; margin-top: 4rem; }
.submission-card { position: relative; display: flex; justify-content: center; align-items: center; aspect-ratio: 4 / 3; padding: 2rem; border-radius: 16px; border: 1px solid var(--border-color); text-decoration: none; color: var(--text-color); background-color: #1a1a1a; transition: all 0.4s ease; overflow: hidden; }
.submission-card .card-title { font-size: clamp(2rem, 5vw, 2.5rem); transition: all 0.4s ease; z-index: 2; }
.submission-card::before { content: ''; position: absolute; inset: 0; z-index: 1; background: radial-gradient(circle at center, var(--primary-color) 0%, transparent 70%); transform: scale(0); opacity: 0; transition: transform 0.5s ease, opacity 0.5s ease; }
.submission-card:hover { border-color: var(--primary-color); transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,0,0,0.3); }
.submission-card:hover::before { transform: scale(2); opacity: 0.3; }
.submission-card:hover .card-title { transform: scale(1.05); text-shadow: 0 0 20px var(--glow-color); }

/* --- CONTACT SECTION --- */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; max-width: 1000px; margin: 0 auto; }
.contact-item { background: rgba(30,30,30,0.7); border: 1px solid var(--border-color); border-radius: 16px; padding: 2.5rem; text-align: center; transition: all 0.3s ease; }
.contact-item:hover { transform: translateY(-5px); border-color: var(--primary-color); }
.contact-item h3 { font-size: 1.6rem; color: var(--primary-color); margin-bottom: 1rem; }
.contact-item p { font-size: 1.1rem; color: #ccc; word-wrap: break-word; }
.contact-item a { color: var(--text-color); text-decoration: none; transition: color 0.3s ease; }
.contact-item a:hover { color: var(--primary-color); }

/* --- FOOTER & UTILITIES --- */
.site-footer { text-align: center; padding: 5rem 5% 3rem; color: #777; background: #080808; position: relative; z-index: 5; border-top: 1px solid rgba(255,255,255,0.05); }
.social-links { display: flex; justify-content: center; gap: 1.5rem; margin-bottom: 2.5rem; }
.social-links a { color: #888; transition: all 0.3s ease; }
.social-links a:hover { color: var(--primary-color); transform: translateY(-3px) scale(1.1); }
.social-links svg { width: 28px; height: 28px; }
#goToTopBtn { position: fixed; bottom: 2rem; right: 2rem; z-index: 100; width: 50px; height: 50px; background: var(--primary-color); color: #121212; border: none; border-radius: 50%; font-size: 1.5rem; cursor: pointer; display: flex; justify-content: center; align-items: center; opacity: 0; visibility: hidden; transform: translateY(20px) scale(0.9); transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
#goToTopBtn:hover { transform: translateY(-3px) scale(1.05); }
#goToTopBtn.show { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }

/* --- RESPONSIVE ADJUSTMENTS --- */
@media (max-width: 768px) {
    .background-section { background-attachment: scroll; }
}
@media (min-width: 769px) {
    #hamburger-btn { display: none; }
    .desktop-nav { display: flex; }
}
@media (min-width: 1025px) {
    body { cursor: none; }
    #cursor-glow { display: block; }
}