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

:root {
    --black: #000000;
    --white: #ffffff;
    --gray-50: #fafafa;
    --gray-100: #f5f5f5;
    --gray-200: #e5e5e5;
    --gray-300: #d4d4d4;
    --gray-400: #a3a3a3;
    --gray-500: #737373;
    --gray-600: #525252;
    --gray-700: #404040;
    --gray-800: #262626;
    --gray-900: #171717;
    
    /* Theme colors */
    --bg-primary: var(--black);
    --bg-secondary: rgba(255, 255, 255, 0.02);
    --text-primary: var(--white);
    --text-secondary: var(--gray-400);
    --border-color: rgba(255, 255, 255, 0.1);
    --border-color-hover: var(--white);
    --shadow-color: rgba(255, 255, 255, 0.3);
    --circle-bg: rgba(255, 255, 255, 0.05);
}

/* Light Theme */
[data-theme="light"] {
    --bg-primary: var(--white);
    --bg-secondary: rgba(0, 0, 0, 0.02);
    --text-primary: var(--black);
    --text-secondary: var(--gray-600);
    --border-color: rgba(0, 0, 0, 0.1);
    --border-color-hover: var(--black);
    --shadow-color: rgba(0, 0, 0, 0.15);
    --circle-bg: rgba(0, 0, 0, 0.03);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Container */
.container {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    overflow: hidden;
}

.content {
    position: relative;
    z-index: 10;
    max-width: 900px;
    width: 100%;
    text-align: center;
    animation: fadeInUp 1s ease-out;
}

/* Brand Section */
.brand {
    margin-bottom: 3rem;
    animation: fadeIn 1s ease-out 0.2s both;
}

.logo {
    display: inline-block;
    margin-bottom: 1rem;
    animation: rotate 20s linear infinite;
}

.logo svg {
    color: var(--text-primary);
    filter: drop-shadow(0 0 20px var(--shadow-color));
}

.brand-name {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}

/* Main Message */
.main-message {
    margin-bottom: 4rem;
    animation: fadeIn 1s ease-out 0.4s both;
}

.title {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 300;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Countdown Timer */
.countdown {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(0.5rem, 2vw, 1.5rem);
    margin-bottom: 4rem;
    padding: 2rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    animation: fadeIn 1s ease-out 0.6s both;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.countdown-value {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    min-width: clamp(3rem, 6vw, 5rem);
    text-align: center;
}

.countdown-label {
    font-size: clamp(0.75rem, 1.5vw, 0.875rem);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

.countdown-separator {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 300;
    color: var(--text-secondary);
    align-self: flex-start;
    padding-top: 0.5rem;
}

/* Subscription Form */
.subscription {
    margin-bottom: 3rem;
    animation: fadeIn 1s ease-out 0.8s both;
}

.subscription-form {
    display: flex;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.email-input {
    flex: 1;
    min-width: 250px;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    color: var(--text-primary);
    font-family: inherit;
    transition: all 0.3s ease;
}

.email-input:focus {
    outline: none;
    background: var(--bg-secondary);
    border-color: var(--border-color-hover);
    box-shadow: 0 0 0 4px var(--border-color);
}

.email-input::placeholder {
    color: var(--text-secondary);
}

.submit-btn {
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    background: var(--text-primary);
    color: var(--bg-primary);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px var(--shadow-color);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn svg {
    transition: transform 0.3s ease;
}

.submit-btn:hover svg {
    transform: translateX(4px);
}

.subscription-note {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    top: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.theme-toggle:hover {
    transform: rotate(15deg) scale(1.1);
    border-color: var(--border-color-hover);
    box-shadow: 0 5px 20px var(--shadow-color);
}

.theme-toggle .sun-icon {
    display: none;
}

.theme-toggle .moon-icon {
    display: block;
}

[data-theme="light"] .theme-toggle .sun-icon {
    display: block;
}

[data-theme="light"] .theme-toggle .moon-icon {
    display: none;
}

/* Language Selector */
.language-selector {
    position: fixed;
    top: 2rem;
    left: 2rem;
    z-index: 100;
}

.language-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border: 1px solid var(--border-color);
    border-radius: 50px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.language-toggle:hover {
    border-color: var(--border-color-hover);
    box-shadow: 0 5px 20px var(--shadow-color);
    transform: translateY(-2px);
}

.language-toggle svg {
    flex-shrink: 0;
}

#currentLanguage {
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.language-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    min-width: 200px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 0.5rem;
    display: none;
    flex-direction: column;
    gap: 0.25rem;
    backdrop-filter: blur(20px);
    box-shadow: 0 10px 40px var(--shadow-color);
    animation: dropdownFadeIn 0.2s ease-out;
}

.language-dropdown.active {
    display: flex;
}

.language-option {
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 12px;
    background: transparent;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.875rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.language-option:hover {
    background: var(--border-color);
    transform: translateX(4px);
}

.language-option.active {
    background: var(--text-primary);
    color: var(--bg-primary);
    font-weight: 600;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Background SVG */
.bg-svg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
    display: block;
}

.bg-svg__content {
    position: absolute;
    inset: -10vh -10vw;
    width: 120vw;
    height: 120vh;
    transform: translate(0, 0);
    pointer-events: none;
    opacity: 0.28;
    filter: grayscale(100%) brightness(0.9);
}

[data-theme="light"] .bg-svg__content {
    opacity: 0.16;
    filter: grayscale(100%) brightness(1.1);
}

.bg-svg__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        var(--bg-primary) 0%,
        transparent 25%,
        transparent 75%,
        var(--bg-primary) 100%
    );
    pointer-events: none;
}

/* Background Animation */
.bg-animation {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
    display: block;
}

.bg-animation.hidden {
    display: none;
}

.gradient-circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    mix-blend-mode: screen;
}

.gradient-1 {
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(200, 200, 200, 0.4) 0%, rgba(150, 150, 150, 0.2) 40%, transparent 70%);
    top: -300px;
    right: -300px;
    animation: morphing1 20s ease-in-out infinite;
}

.gradient-2 {
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(180, 180, 180, 0.35) 0%, rgba(120, 120, 120, 0.15) 40%, transparent 70%);
    bottom: -250px;
    left: -250px;
    animation: morphing2 18s ease-in-out infinite;
}

.gradient-3 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(220, 220, 220, 0.3) 0%, rgba(140, 140, 140, 0.12) 40%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: morphing3 22s ease-in-out infinite;
}

[data-theme="light"] .gradient-1 {
    background: radial-gradient(circle, rgba(100, 100, 100, 0.15) 0%, rgba(80, 80, 80, 0.08) 40%, transparent 70%);
}

[data-theme="light"] .gradient-2 {
    background: radial-gradient(circle, rgba(90, 90, 90, 0.12) 0%, rgba(70, 70, 70, 0.06) 40%, transparent 70%);
}

[data-theme="light"] .gradient-3 {
    background: radial-gradient(circle, rgba(110, 110, 110, 0.1) 0%, rgba(85, 85, 85, 0.05) 40%, transparent 70%);
}

@keyframes morphing1 {
    0%, 100% {
        transform: translate(0, 0) scale(1) rotate(0deg);
        border-radius: 50%;
    }
    33% {
        transform: translate(100px, -80px) scale(1.2) rotate(120deg);
        border-radius: 40% 60% 70% 30%;
    }
    66% {
        transform: translate(-50px, 60px) scale(0.85) rotate(240deg);
        border-radius: 60% 40% 30% 70%;
    }
}

@keyframes morphing2 {
    0%, 100% {
        transform: translate(0, 0) scale(1) rotate(0deg);
        border-radius: 50%;
    }
    33% {
        transform: translate(-80px, 70px) scale(0.9) rotate(-120deg);
        border-radius: 30% 70% 50% 50%;
    }
    66% {
        transform: translate(60px, -50px) scale(1.15) rotate(-240deg);
        border-radius: 70% 30% 60% 40%;
    }
}

@keyframes morphing3 {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
        border-radius: 50%;
    }
    25% {
        transform: translate(-45%, -55%) scale(1.1) rotate(90deg);
        border-radius: 45% 55% 65% 35%;
    }
    50% {
        transform: translate(-55%, -45%) scale(0.95) rotate(180deg);
        border-radius: 55% 45% 35% 65%;
    }
    75% {
        transform: translate(-50%, -50%) scale(1.05) rotate(270deg);
        border-radius: 35% 65% 45% 55%;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1.5rem;
    }

    .theme-toggle {
        top: 1rem;
        right: 1rem;
        width: 44px;
        height: 44px;
    }

    .language-selector {
        top: 1rem;
        left: 1rem;
    }

    .language-toggle {
        padding: 0.625rem 1rem;
        font-size: 0.8125rem;
    }

    .countdown {
        padding: 1.5rem 1rem;
        gap: 0.5rem;
    }

    .countdown-separator {
        display: none;
    }

    .subscription-form {
        flex-direction: column;
        gap: 0.75rem;
    }

    .email-input,
    .submit-btn {
        width: 100%;
        min-width: auto;
    }

    .brand {
        margin-bottom: 2rem;
        flex-direction: row;
    }

    .main-message {
    }
}

@media (max-width: 480px) {
    .countdown-value {
        font-size: 2rem;
        min-width: 3rem;
    }

    .countdown-label {
        font-size: 0.625rem;
    }
}



/* High contrast mode */
@media (prefers-contrast: high) {
    .countdown {
        border-width: 2px;
    }

    .email-input,
    .social-link {
        border-width: 2px;
    }
}

/* Footer */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem 2rem;
    text-align: center;
    background: rgb(0, 0, 0);
    background: rgba(0, 0, 0, 0.95);
    border-top: 1px solid var(--border-color);
    z-index: 9999;
    font-size: 0.875rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    isolation: isolate;
    -webkit-font-smoothing: antialiased;
}

[data-theme="light"] .footer {
    background: rgb(255, 255, 255);
    background: rgba(255, 255, 255, 0.98);
}

.footer p {
    margin: 0;
    font-weight: 400;
    letter-spacing: 0.01em;
}

@media (max-width: 768px) {
    .footer {
        padding: 0.75rem 1rem;
        font-size: 0.75rem;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
