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

:root {
    --teal-primary: #0D7377;
    --teal-light: #14FFEC;
    --white: #ffffff;
    --black: #000000;
    --gray-light: rgba(255, 255, 255, 0.9);
    --gray-dark: rgba(0, 0, 0, 0.5);
}

html {
    height: 100%;
    width: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--white);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.8s ease-out;
}

.loading-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loading-logo {
    max-width: 200px;
    height: auto;
}

/* Main Content */
.main-content {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    padding: 2rem;
    opacity: 1;
    transition: opacity 0.8s ease-in;
    overflow: hidden;
}

.main-content.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Video Background */
.video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.video-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
    pointer-events: none;
}

.background-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.background-video.active {
    opacity: 1;
}

/* Signup Card */
.signup-card {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 24px;
    padding: 3rem 2.5rem;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

/* Center Logo */
.center-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
}

.center-logo img {
    max-width: 400px;
    width: 80vw;
    height: auto;
    filter: drop-shadow(0 10px 40px rgba(0, 0, 0, 0.3));
}

/* Countdown Timer */
.countdown {
    display: none;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    width: 100%;
}

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

.countdown-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--teal-primary);
    line-height: 1;
}

.countdown-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-dark);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Headline */
.headline {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--white);
    text-align: center;
    line-height: 1.3;
}

/* Email Form */
.email-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: all 0.3s ease;
}

#email-input {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid rgba(13, 115, 119, 0.2);
    border-radius: 12px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
    outline: none;
}

#email-input:focus {
    border-color: var(--teal-primary);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(13, 115, 119, 0.1);
}

#email-input::placeholder {
    color: rgba(0, 0, 0, 0.4);
}

#submit-btn {
    width: 100%;
    padding: 1rem 1.25rem;
    background: var(--teal-primary);
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    max-height: 200px;
    opacity: 1;
    overflow: hidden;
}

#submit-btn.hidden {
    max-height: 0;
    opacity: 0;
    padding: 0 1.25rem;
    margin: 0;
    pointer-events: none;
}

#submit-btn:hover:not(:disabled) {
    background: #0a5e62;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 115, 119, 0.3);
}

#submit-btn:active:not(:disabled) {
    transform: translateY(0);
}

#submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Form Messages */
.form-message {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    text-align: center;
    display: none;
}

.form-message.success {
    display: block;
    background: rgba(16, 185, 129, 0.1);
    color: #047857;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.form-message.error {
    display: block;
    background: rgba(239, 68, 68, 0.1);
    color: #b91c1c;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Social Icons */
.social-icons {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1rem;
    z-index: 100;
}

.social-icons a {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--white);
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-icons a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-content {
        padding: 0;
        padding-bottom: env(safe-area-inset-bottom);
    }

    .social-icons {
        top: 1.5rem;
        gap: 0.75rem;
    }

    .social-icons a {
        width: 44px;
        height: 44px;
    }

    .center-logo img {
        max-width: 280px;
    }

    .signup-card {
        padding: 1.5rem 1.5rem calc(2rem + env(safe-area-inset-bottom)) 1.5rem;
        max-width: 100%;
        width: 100%;
        margin-bottom: 0;
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.3);
        gap: 1.25rem;
    }

    .countdown {
        gap: 0.75rem;
    }

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

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

    .headline {
        font-size: 1.35rem;
        line-height: 1.2;
    }
}

@media (max-width: 480px) {
    .social-icons {
        top: 1rem;
        gap: 0.5rem;
    }

    .social-icons a {
        width: 40px;
        height: 40px;
    }

    .center-logo img {
        max-width: 220px;
    }

    .signup-card {
        padding: 1.25rem 1.25rem calc(1.75rem + env(safe-area-inset-bottom)) 1.25rem;
        width: 100%;
        margin-bottom: 0;
        border-radius: 20px 20px 0 0;
        gap: 1rem;
    }

    .countdown {
        gap: 0.5rem;
    }

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

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

    .headline {
        font-size: 1.15rem;
        line-height: 1.3;
    }

    .email-form {
        gap: 0.75rem;
    }

    #email-input,
    #submit-btn {
        padding: 0.875rem 1rem;
        font-size: 0.9375rem;
    }
}
