/* Reset and Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #FFA500;
    --primary-dark: #ff8c00;
    --bg-dark: #0a0a0a;
    --bg-card: rgba(20, 20, 20, 0.85);
    --bg-card-hover: rgba(30, 30, 30, 0.9);
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --text-muted: #666666;
    --border-color: rgba(255, 165, 0, 0.2);
    --glow-color: rgba(255, 165, 0, 0.4);
    --cyan: #20c0c0;
    --green: #20c040;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-dark);
    min-height: 100vh;
    overflow-x: hidden;
    max-width: 100vw;
}

/* Three.js Background Container */
#three-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    transition: opacity 1s ease-in-out;
    overflow: hidden;
}

#three-background canvas {
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

main {
    overflow-x: hidden;
}

/* Navbar */
.navbar {
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand h1 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin: 0;
    font-weight: 700;
    letter-spacing: 2px;
    text-shadow: 0 0 20px var(--glow-color);
}

.navbar-logo {
    height: 50px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    vertical-align: middle;
}

.navbar-menu {
    display: flex;
    gap: 1rem;
}

.navbar-menu a {
    color: var(--text-primary);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.navbar-menu a:hover {
    background: rgba(255, 165, 0, 0.15);
    color: var(--primary-color);
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 100px 20px 60px;
    position: relative;
    overflow: visible;
}

.hero-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4rem;
    max-width: 1400px;
    width: 100%;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.hero-poster {
    flex-shrink: 0;
    max-width: 350px;
    animation: posterFloat 6s ease-in-out infinite;
}

.poster-image {
    width: 100%;
    height: auto;
    max-height: 65vh;
    object-fit: contain;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px var(--glow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.poster-image:hover {
    transform: scale(1.02);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.6), 0 0 60px var(--glow-color);
}

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

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

.hero-content.with-poster {
    text-align: left;
    max-width: 600px;
}

.edition-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--bg-dark);
    padding: 0.4rem 1.2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    box-shadow: 0 0 30px var(--glow-color);
}

.hero-title {
    font-size: clamp(2rem, 6vw, 4rem);
    font-weight: 800;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, #fff 0%, var(--primary-color) 50%, #fff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.hero-date {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-weight: 300;
}

/* Countdown Timer */
.countdown-container {
    margin: 1.5rem 0;
}

.countdown-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.countdown-timer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    min-width: 65px;
}

.countdown-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
    font-family: 'Courier New', monospace;
}

.countdown-unit {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-top: 0.3rem;
}

.countdown-separator {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 300;
    opacity: 0.5;
}

.countdown-ended {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 600;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Open Compos Badge */
.open-compos-badge {
    display: inline-block;
    background: rgba(32, 192, 192, 0.15);
    border: 1px solid rgba(32, 192, 192, 0.3);
    color: var(--cyan);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.compos-count {
    font-weight: 700;
    font-size: 1rem;
    margin-right: 0.25rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--bg-dark);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--glow-color);
}

.btn-glow {
    box-shadow: 0 0 20px var(--glow-color);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: rgba(255, 165, 0, 0.1);
    transform: translateY(-2px);
}

.btn-large {
    padding: 1.125rem 2.5rem;
    font-size: 1.1rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-muted);
    animation: bounce 2s infinite;
    opacity: 0.5;
    cursor: pointer;
    transition: opacity 0.3s;
}

.scroll-indicator:hover {
    opacity: 0.8;
}

.scroll-indicator svg {
    width: 28px;
    height: 28px;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(8px);
    }
    60% {
        transform: translateX(-50%) translateY(4px);
    }
}

.section-cta {
    text-align: center;
    margin-top: 3rem;
}

/* Section Styles */
section, .info-section, .compos-section, .editions-section, .cta-final {
    padding: 5rem 0;
    position: relative;
}

.info-section {
    background: rgba(15, 15, 15, 0.7);
    backdrop-filter: blur(5px);
}

.info-section h2,
.compos-section h2,
.editions-section h2,
.cta-final h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.section-description {
    text-align: center;
    font-size: 1.15rem;
    max-width: 700px;
    margin: 0 auto 3rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Features Grid */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    padding: 2.5rem 2rem;
    border-radius: 16px;
    text-align: center;
    transition: all 0.3s ease;
}

.feature:hover {
    transform: translateY(-8px);
    border-color: var(--primary-color);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 30px var(--glow-color);
}

.feature-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, rgba(255, 165, 0, 0.2), rgba(255, 165, 0, 0.1));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon svg {
    width: 30px;
    height: 30px;
    stroke: var(--primary-color);
}

.feature h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.feature p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Compos Section */
.compos-section {
    background: transparent;
}

.compos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.compo-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
}

.compo-card:hover {
    border-color: var(--cyan);
    box-shadow: 0 0 20px rgba(32, 192, 192, 0.2);
}

.compo-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.compo-icon svg {
    width: 30px;
    height: 30px;
    stroke: var(--cyan);
}

.compo-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.compo-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.compos-cta {
    text-align: center;
    margin-top: 2rem;
}

/* Editions Section */
.editions-section {
    background: rgba(15, 15, 15, 0.7);
    backdrop-filter: blur(5px);
    text-align: center;
}

/* CTA Final */
.cta-final {
    text-align: center;
    background: transparent;
}

.cta-final p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--text-secondary);
}

/* Sponsors Section */
.sponsors-section {
    padding: 5rem 0;
    background: transparent;
}

.sponsors-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 400;
}

.sponsors-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: 2rem;
}

.sponsor-item {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem 2rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sponsor-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), 0 0 20px var(--glow-color);
    transform: translateY(-5px);
}

.sponsor-link {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.sponsor-logo {
    max-height: 60px;
    max-width: 180px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(30%) brightness(0.9);
    transition: filter 0.3s ease;
}

.sponsor-item:hover .sponsor-logo {
    filter: grayscale(0%) brightness(1);
}

.sponsor-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
}

/* Footer */
footer {
    background: rgba(5, 5, 5, 0.9);
    backdrop-filter: blur(10px);
    padding: 2rem 0;
    text-align: center;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
}

/* Effect Selector Bar - Horizontal React-style */
.effect-selector-bar {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.effect-selector-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.effect-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
}

/* Toggle Switch */
.effect-switch {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 24px;
    flex-shrink: 0;
}

.effect-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.effect-switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: 0.3s;
    border-radius: 24px;
}

.effect-switch-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: var(--text-secondary);
    transition: 0.3s;
    border-radius: 50%;
}

.effect-switch input:checked + .effect-switch-slider {
    background-color: var(--primary-color);
}

.effect-switch input:checked + .effect-switch-slider:before {
    transform: translateX(18px);
    background-color: var(--bg-dark);
}

.effect-switch input:focus + .effect-switch-slider {
    box-shadow: 0 0 1px var(--primary-color);
}

/* Effect Dropdown */
.effect-dropdown {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: var(--text-primary);
    padding: 6px 28px 6px 10px;
    font-size: 0.875rem;
    cursor: pointer;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23b0b0b0' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    min-width: 110px;
}

.effect-dropdown:hover:not(:disabled) {
    border-color: var(--primary-color);
}

.effect-dropdown:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(255, 165, 0, 0.2);
}

.effect-dropdown:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.effect-dropdown option {
    background: var(--bg-dark);
    color: var(--text-primary);
    padding: 8px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-section {
        padding: 100px 20px 40px;
    }

    .hero-wrapper {
        flex-direction: column;
        gap: 2rem;
    }

    .hero-poster {
        max-width: 280px;
    }

    .poster-image {
        max-height: 45vh;
    }

    .hero-content.with-poster {
        text-align: center;
    }

    .hero-content.with-poster .cta-buttons {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        gap: 1rem;
    }

    .hero-section {
        padding: 90px 15px 30px;
    }

    .hero-poster {
        max-width: 200px;
    }

    .poster-image {
        max-height: 35vh;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-date {
        font-size: 1.1rem;
    }

    .countdown-item {
        padding: 0.75rem 1rem;
        min-width: 65px;
    }

    .countdown-value {
        font-size: 1.8rem;
    }

    .countdown-separator {
        font-size: 1.5rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 300px;
    }

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

    .info-section h2,
    .compos-section h2,
    .editions-section h2,
    .sponsors-section h2,
    .cta-final h2 {
        font-size: 2rem;
    }

    .sponsors-grid {
        gap: 1rem;
    }

    .sponsor-item {
        padding: 1rem 1.5rem;
    }

    .sponsor-logo {
        max-height: 45px;
        max-width: 140px;
    }
}

@media (max-width: 480px) {
    .countdown-timer {
        gap: 0.25rem;
    }

    .countdown-item {
        padding: 0.5rem 0.75rem;
        min-width: 55px;
    }

    .countdown-value {
        font-size: 1.5rem;
    }

    .countdown-unit {
        font-size: 0.65rem;
    }

    .effect-selector-bar {
        bottom: 15px;
        right: 15px;
        padding: 6px 12px;
    }

    .effect-selector-content {
        gap: 8px;
    }

    .effect-label {
        font-size: 0.75rem;
    }

    .effect-switch {
        width: 36px;
        height: 20px;
    }

    .effect-switch-slider:before {
        height: 14px;
        width: 14px;
    }

    .effect-switch input:checked + .effect-switch-slider:before {
        transform: translateX(16px);
    }

    .effect-dropdown {
        font-size: 0.75rem;
        min-width: 90px;
        padding: 4px 24px 4px 8px;
    }
}
