@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* CSS Variables for Theme System */
:root {
    --hero-bg: url('../img/zy3.webp');
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --secondary: #0ea5e9;
    --accent: #8b5cf6;
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-md: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --radius-md: 12px;
    --radius-lg: 20px;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --hero-bg: url('../img/zy4.webp');
    --primary: #6366f1;
    --primary-hover: #818cf8;
    --secondary: #38bdf8;
    --accent: #a78bfa;
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border: #334155;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
    --shadow-md: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.4);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.5), 0 8px 10px -6px rgb(0 0 0 / 0.5);
    --glass-bg: rgba(15, 23, 42, 0.85);
    --glass-border: rgba(255, 255, 255, 0.05);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

[data-theme="night"] {
    --hero-bg: url('../img/zy4.webp');
    --primary: #3b82f6;
    --primary-hover: #60a5fa;
    --secondary: #1d4ed8;
    --accent: #2563eb;
    --bg-primary: #0b1120;
    --bg-secondary: #172033;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --border: #1e293b;
    --glass-bg: rgba(11, 17, 32, 0.85);
    --glass-border: rgba(255, 255, 255, 0.05);
}

[data-theme="blueprint"] {
    --hero-bg: url('../img/zy4.webp');
    --primary: #2563eb;
    --primary-hover: #3b82f6;
    --secondary: #1d4ed8;
    --bg-primary: #1e3a8a;
    --bg-secondary: #1e40af;
    --text-primary: #eff6ff;
    --text-secondary: #bfdbfe;
    --border: #3b82f6;
    --glass-bg: rgba(30, 58, 138, 0.85);
    --glass-border: rgba(59, 130, 246, 0.3);
    background-image: linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 20px 20px;
}

/* Base */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', -apple-system, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.2; }
.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    width: 100%;
}
.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.125rem;
    margin-bottom: 4rem;
    max-width: 600px;
    margin-inline: auto;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.75rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
    border: none;
    font-size: 1rem;
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 4px 15px -3px rgba(79, 70, 229, 0.4);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px -5px rgba(79, 70, 229, 0.5);
}
.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border);
}
.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.btn-video {
    background: linear-gradient(135deg, #fb7185, #e11d48);
    color: white;
    box-shadow: 0 4px 15px -3px rgba(225, 29, 72, 0.4);
}
.btn-video:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px -5px rgba(225, 29, 72, 0.5);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0; width: 100%; z-index: 1000;
    background: transparent;
    transition: var(--transition);
    padding: 1.5rem 0;
}
.navbar.scrolled {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    padding: 1rem 0;
}
.navbar .container {
    display: flex; justify-content: space-between; align-items: center;
}
.nav-brand .logo { height: 40px; width: auto; transition: var(--transition); }
.nav-menu { display: flex; gap: 2.5rem; list-style: none; }
.nav-menu a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: var(--transition);
}
.nav-menu a::after {
    content: ''; position: absolute; bottom: -4px; left: 0;
    width: 0; height: 2px;
    background: var(--primary);
    transition: var(--transition);
}
.nav-menu a:hover { color: var(--primary); }
.nav-menu a:hover::after { width: 100%; }

.nav-toggle {
    display: none; flex-direction: column; gap: 6px;
    background: none; border: none; cursor: pointer; padding: 4px;
}
.nav-toggle span {
    width: 24px; height: 2px; background: var(--text-primary);
    transition: var(--transition); border-radius: 2px;
}

/* Hero */
.hero {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    padding-top: 80px;
}
.hero-bg {
    position: absolute; inset: 0; z-index: -1;
    background-image: var(--hero-bg, url('/assets/img/zy_bg.jpg'));
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}
.hero-bg::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.5));
}
.hero-content {
    text-align: center; color: white;
    z-index: 1; max-width: 800px;
    padding: 3rem;
    animation: fadeUp 1s ease-out;
}
.hero-title {
    font-size: 4rem; font-weight: 800; margin-bottom: 1.5rem;
    color: white;
    text-shadow: 0 4px 15px rgba(0,0,0,0.5);
    background: none;
    -webkit-text-fill-color: initial;
}
.hero-slogan {
    font-size: 1.5rem; color: #f8fafc; margin-bottom: 2.5rem; font-weight: 400;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* Sections */
section { padding: 8rem 0; position: relative; }
section:nth-child(even) { 
    background-color: var(--bg-secondary);
    background-image: radial-gradient(var(--border) 1px, transparent 1px);
    background-size: 30px 30px;
}
section:nth-child(odd) {
    background-color: var(--bg-primary);
    background-image: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(79, 70, 229, 0.03) 100%);
}

/* Features */
.features-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 2rem;
}
.feature-card {
    background: var(--bg-secondary);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    z-index: 1;
}
.feature-card::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    opacity: 0; transition: var(--transition);
}
.feature-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-lg);
    border-color: rgba(79, 70, 229, 0.1);
}
.feature-card:hover::before { opacity: 1; }
.feature-icon {
    font-size: 3rem; margin-bottom: 1.5rem;
    display: inline-block;
    padding: 1rem;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}
.feature-card h3 { font-size: 1.25rem; margin-bottom: 1rem; color: var(--text-primary); }
.feature-card p { color: var(--text-secondary); font-size: 0.95rem; }

/* Gallery */
.gallery-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 1.5rem;
}
.gallery-item {
    position: relative; border-radius: var(--radius-md); overflow: hidden;
    aspect-ratio: 4/3; cursor: pointer; box-shadow: var(--shadow);
}
.gallery-item img {
    width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.gallery-item:hover img { transform: scale(1.08); }
.gallery-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 50%, transparent 100%);
    display: flex; flex-direction: column; justify-content: flex-end;
    padding: 2rem; color: white;
    opacity: 0; transition: var(--transition);
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-overlay h4 { font-size: 1.25rem; margin-bottom: 0.5rem; transform: translateY(20px); transition: var(--transition); }
.gallery-overlay p { font-size: 0.875rem; opacity: 0.8; transform: translateY(20px); transition: var(--transition); transition-delay: 0.05s; }
.gallery-item:hover .gallery-overlay h4,
.gallery-item:hover .gallery-overlay p { transform: translateY(0); }

/* Map */
.map-wrapper {
    position: relative; padding-bottom: 56.25%;
    border-radius: var(--radius-lg); overflow: hidden;
    box-shadow: var(--shadow-md); border: 1px solid var(--border);
}
.map-wrapper iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: none; }
.map-error {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    text-align: center; padding: 2rem; background: var(--bg-secondary); border-radius: var(--radius-md);
}
.btn-fullscreen {
    position: absolute; top: 1rem; right: 1rem; z-index: 10;
    background: var(--glass-bg); backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border); color: var(--text-primary);
    width: 48px; height: 48px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem; cursor: pointer; transition: var(--transition);
    box-shadow: var(--shadow);
}
.btn-fullscreen:hover { transform: scale(1.1); background: var(--bg-secondary); }

/* FAQ (Rules) */
.faq-list { max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; gap: 1rem; }
.faq-item {
    background: var(--bg-secondary); border-radius: var(--radius-md);
    border: 1px solid var(--border); overflow: hidden; transition: var(--transition);
}
.faq-item:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); }
.faq-question {
    width: 100%; padding: 1.5rem 2rem; background: none; border: none;
    text-align: left; font-size: 1.125rem; font-weight: 600; color: var(--text-primary);
    cursor: pointer; display: flex; justify-content: space-between; align-items: center;
}
.faq-answer {
    max-height: 0; overflow: hidden; transition: all 0.4s ease-in-out; opacity: 0;
}
.faq-item.active .faq-answer {
    max-height: 800px; opacity: 1; padding: 0 2rem 1.5rem;
}
.faq-item.active .faq-question { color: var(--primary); }
.faq-icon {
    font-size: 1.5rem; font-weight: 300; transition: transform 0.4s ease;
    color: var(--text-secondary);
}
.faq-item.active .faq-icon { transform: rotate(45deg); color: var(--primary); }
.faq-answer p { color: var(--text-secondary); line-height: 1.8; }

/* Contact */
.contact-info {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem;
    max-width: 1000px; margin: 0 auto 3rem;
}
.contact-item {
    background: var(--bg-secondary); padding: 2.5rem;
    border-radius: var(--radius-lg); text-align: center;
    border: 1px solid var(--border); box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.contact-item:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: var(--primary); }
.contact-item h3 { color: var(--text-secondary); font-size: 1rem; margin-bottom: 0.5rem; text-transform: uppercase; letter-spacing: 0.05em; }
.contact-item p { font-size: 1.5rem; font-weight: 700; color: var(--text-primary); }

/* Team */
.team-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; margin-bottom: 4rem;
}
.team-member {
    background: var(--bg-secondary); padding: 2.5rem 1.5rem;
    border-radius: var(--radius-lg); text-align: center;
    border: 1px solid var(--border); box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.team-member:hover { transform: translateY(-8px); box-shadow: var(--shadow-md); }
.member-avatar {
    width: 80px; height: 80px; margin: 0 auto 1.5rem;
    background: var(--bg-primary); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 2.5rem; box-shadow: inset 0 2px 4px rgba(0,0,0,0.06);
}
.team-member h4 { font-size: 1.25rem; margin-bottom: 0.25rem; }
.member-role { color: var(--primary); font-weight: 500; font-size: 0.875rem; margin-bottom: 0.5rem; }
.member-id { color: var(--text-secondary); font-size: 0.875rem; }

.sponsors {
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-primary));
    padding: 3rem; border-radius: var(--radius-lg); text-align: center;
    border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.sponsors h3 { font-size: 1.5rem; margin-bottom: 1rem; }
.sponsors p { color: var(--text-secondary); line-height: 1.8; }

/* Footer */
.footer {
    background: var(--bg-secondary); padding: 5rem 0 2rem;
    border-top: 1px solid var(--border);
}
.footer-content {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 3rem; margin-bottom: 4rem;
}
.footer-section h4 { font-size: 1.25rem; margin-bottom: 1.5rem; color: var(--text-primary); }
.footer-section p { color: var(--text-secondary); margin-bottom: 0.5rem; line-height: 1.8; }
.footer-section a {
    color: var(--text-secondary); text-decoration: none; transition: var(--transition);
    display: inline-block; margin-bottom: 0.5rem;
}
.footer-section a:hover { color: var(--primary); transform: translateX(5px); }
.footer-bottom {
    text-align: center; padding-top: 2rem; border-top: 1px solid var(--border);
    color: var(--text-secondary); font-size: 0.875rem;
}

/* Utilities & Overlays */
.back-to-top, .theme-toggle {
    position: fixed; right: 2rem;
    width: 3.5rem; height: 3.5rem;
    border-radius: 50%; border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center; font-size: 1.5rem;
    transition: var(--transition); z-index: 99;
    box-shadow: var(--shadow-md);
}
.back-to-top {
    bottom: 2rem; background: var(--primary); color: white;
    opacity: 0; visibility: hidden; transform: translateY(20px);
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { transform: translateY(-5px); background: var(--primary-hover); }
.theme-toggle {
    bottom: 6.5rem; background: var(--bg-secondary); color: var(--text-primary);
    border: 1px solid var(--border);
}
.theme-toggle:hover { transform: scale(1.1); }

.theme-panel {
    position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.9);
    background: var(--glass-bg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    padding: 2.5rem; border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5); border: 1px solid var(--glass-border);
    z-index: 1001; opacity: 0; visibility: hidden; transition: var(--transition);
    min-width: 320px;
}
.theme-panel.show { transform: translate(-50%, -50%) scale(1); opacity: 1; visibility: visible; }
.theme-panel h3 { margin-bottom: 1.5rem; text-align: center; }
.theme-options { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 2rem; }
.theme-option {
    padding: 1rem; border: 2px solid var(--border); background: var(--bg-secondary);
    color: var(--text-primary); border-radius: var(--radius-md);
    cursor: pointer; transition: var(--transition); font-weight: 500;
}
.theme-option:hover, .theme-option.active {
    border-color: var(--primary); background: var(--bg-primary); color: var(--primary);
}
.theme-close {
    width: 100%; padding: 1rem; background: var(--primary); color: white;
    border: none; border-radius: var(--radius-md); font-weight: 600; cursor: pointer;
    transition: var(--transition);
}
.theme-close:hover { background: var(--primary-hover); }

/* Lightbox */
.lightbox {
    position: fixed; inset: 0; background: rgba(0,0,0,0.9); backdrop-filter: blur(5px);
    display: flex; align-items: center; justify-content: center; flex-direction: column;
    z-index: 2000; opacity: 0; visibility: hidden; transition: var(--transition);
}
.lightbox.show { opacity: 1; visibility: visible; }
.lightbox-close {
    position: absolute; top: 2rem; right: 2rem; font-size: 3rem; color: white;
    background: none; border: none; cursor: pointer; transition: var(--transition);
    line-height: 1; padding: 10px; border-radius: 50%;
}
.lightbox-close:hover { transform: scale(1.1); color: var(--primary); }
.lightbox img { max-width: 90vw; max-height: 80vh; border-radius: var(--radius-md); box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5); }
.lightbox-caption { margin-top: 1.5rem; color: white; font-size: 1.25rem; font-weight: 500; }

/* Animations */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 768px) {
    section { padding: 5rem 0; }
    .section-title { font-size: 2rem; margin-bottom: 0.75rem; }
    .section-subtitle { font-size: 1rem; margin-bottom: 3rem; padding: 0 1rem; }
    
    .hero-title { font-size: 2.75rem; line-height: 1.1; margin-bottom: 1rem; }
    .hero-slogan { font-size: 1.125rem; margin-bottom: 2rem; padding: 0 1rem; }
    .hero-content { padding: 1.5rem 1rem; }
    
    .nav-toggle { display: flex; }
    .nav-menu {
        position: absolute; top: 100%; left: 0; right: 0;
        background: var(--bg-secondary);
        flex-direction: column; padding: 0; gap: 0;
        max-height: 0; overflow: hidden; transition: all 0.4s ease;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-md);
    }
    .nav-menu.active { max-height: 450px; padding: 1rem 0; }
    .nav-menu a { display: block; padding: 1.25rem 2rem; font-size: 1.1rem; border-bottom: 1px solid rgba(0,0,0,0.03); }
    .nav-menu li:last-child a { border-bottom: none; }
    .nav-menu a::after { display: none; }
    
    .features-grid, .gallery-grid, .contact-info, .team-grid { 
        grid-template-columns: 1fr; 
        gap: 1.5rem;
    }
    
    .feature-card { padding: 2rem; }
    .gallery-item { aspect-ratio: 16/10; }
    .team-member { padding: 2rem 1rem; }
    
    .faq-question { padding: 1.25rem; font-size: 1rem; }
    .faq-answer { padding: 0 1.25rem 1.25rem; }
    
    .back-to-top, .theme-toggle { width: 3rem; height: 3rem; font-size: 1.25rem; right: 1rem; }
    .theme-toggle { bottom: 5rem; }
    .back-to-top { bottom: 1rem; }

    .sponsors { padding: 2rem 1.5rem; }
    .footer-content { gap: 2rem; text-align: center; }
    .footer-section h4 { margin-bottom: 1rem; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 2.25rem; }
    .hero-actions .btn { width: 100%; }
}
