/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #fff;
}

/* Background Video */
#bg-video {
    position: fixed;
    top: -25%;
    left: -4%;
    width: 112%;
    height: 130%;
    z-index: -2;
    object-fit: cover;
    background: #0a0a1a;
}

#video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.25);
    z-index: -1;
}

/* Main Content */
main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    padding: 2rem;
    text-align: center;
}

/* Logo */
#logo {
    width: clamp(180px, 30vw, 380px);
    height: auto;
    margin-bottom: 1.5rem;
    animation: gentle-rotate 300s linear infinite;
    filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.15));
}

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

/* Tagline */
h1 {
    font-size: clamp(1.2rem, 3.5vw, 2.4rem);
    font-weight: 300;
    letter-spacing: 0.04em;
    margin-bottom: 2.5rem;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.6);
    font-style: italic;
}

/* Form */
#signup-form {
    width: 100%;
    max-width: 620px;
}

.form-row {
    display: flex;
    gap: 0;
    width: 100%;
}

#email {
    flex: 1;
    padding: 0.85rem 1.2rem;
    font-size: 1rem;
    border: 1.5px solid rgba(255, 255, 255, 0.5);
    border-right: none;
    border-radius: 4px 0 0 4px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    outline: none;
    transition: border-color 0.3s, background 0.3s;
}

#email::placeholder {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.9rem;
}

#email:focus {
    border-color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.12);
}

/* Hold-to-Submit Button */
#submit-btn {
    position: relative;
    padding: 0.85rem 1.8rem;
    font-size: 1rem;
    font-weight: 500;
    border: 1.5px solid rgba(255, 255, 255, 0.5);
    border-radius: 0 4px 4px 0;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    cursor: pointer;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    touch-action: manipulation;
    transition: border-color 0.3s;
    white-space: nowrap;
    min-width: 150px;
}

#submit-btn:hover {
    border-color: rgba(255, 255, 255, 0.85);
}

.btn-fill {
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, 
        rgba(59, 130, 246, 0.5) 0%, 
        rgba(147, 51, 234, 0.5) 50%, 
        rgba(236, 72, 153, 0.5) 100%
    );
    transition: none;
    z-index: 0;
    border-radius: 0 2px 2px 0;
}

.btn-fill.filling {
    transition: width 1s linear;
    width: 100%;
}

.btn-fill.complete {
    background: linear-gradient(90deg, 
        rgba(34, 197, 94, 0.6) 0%, 
        rgba(16, 185, 129, 0.6) 100%
    );
    width: 100%;
}

.btn-fill.resetting {
    transition: width 0.3s ease-out;
    width: 0%;
}

.btn-text {
    position: relative;
    z-index: 1;
}

/* Status Message */
#status-msg {
    margin-top: 1rem;
    font-size: 0.9rem;
    min-height: 1.4em;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s;
}

#status-msg.success {
    color: #86efac;
}

#status-msg.error {
    color: #fca5a5;
}

/* Copyright Footer */
#copyright {
    position: fixed;
    bottom: 8px;
    left: 12px;
    font-size: 0.55rem;
    color: rgba(255, 255, 255, 0.25);
    background: transparent;
    z-index: 1;
    letter-spacing: 0.02em;
}

/* Responsive */
@media (max-width: 600px) {
    .form-row {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    #email {
        border-right: 1.5px solid rgba(255, 255, 255, 0.5);
        border-radius: 4px;
    }
    
    #submit-btn {
        border-radius: 4px;
        min-width: unset;
    }

    .btn-fill {
        border-radius: 2px;
    }
}
