:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --bg-gradient-start: #0f172a;
    --bg-gradient-end: #1e293b;
    --card-bg: rgba(255, 255, 255, 0.05);
    /* Return to glass */
    --card-border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-secondary: #94a3b8;
    --input-bg: rgba(255, 255, 255, 0.05);
    --input-border: rgba(255, 255, 255, 0.1);
    --input-focus: #818cf8;
    --success-color: #22c55e;
    --error-color: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    min-height: 100vh;
    background: #000;
    /* Start black */
    color: var(--text-main);
    overflow: hidden;
    /* Prevent scroll during intro */
}

/* --- Intro Screen --- */
/* --- Intro Screen --- */
/* --- Intro Screen --- */
#intro-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    /* Fallback */
    height: 100dvh;
    /* Mobile viewport fix */
    background: #000;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 1s ease-in-out;
    overflow: hidden;
}

#intro-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Fill screen */
    filter: blur(15px) brightness(0.4);
    /* Blur effect */
    z-index: 0;
}

#intro-video {
    position: relative;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Default desktop: Cover */
    object-position: center;
    z-index: 1;
    /* Above backdrop */
}

/* Orientation Specific: Use Contain + Blur Backdrop on Portrait */
@media (orientation: portrait) {
    #intro-video {
        object-fit: contain;
        /* Base: Fit width */
        width: 100%;
        height: 100%;
        transform: scale(1.35);
        /* Hybrid Zoom: Fill more screen, crop edges slightly, keep center text */
        background: transparent;
    }
}

/* Orientation Specific: "Fill" screen on portrait to show text without black bars */
/* Orientation Specific: "Fill" screen on portrait to show text without black bars */
/* REMOVED: Previous 'fill' caused distortion. Replaced by Cinematic Blur logic above. */

/* ... Skip Button ... */
#skip-btn {
    position: absolute;
    bottom: 30px;
    right: 30px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 20px;
    cursor: pointer;
    backdrop-filter: blur(5px);
    font-size: 0.8rem;
    transition: all 0.3s;
    opacity: 0;
    animation: fadeIn 0.5s ease 2s forwards;
    z-index: 10000;
}

/* --- Main Content Background Video --- */
.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    /* geometric background fallback if video lags */
    background: #0f172a;
}

#bgVideo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    /* Slight dim for readibility */
}

#skip-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* --- Main Content --- */
#main-content {
    opacity: 0;
    /* Hidden initially */
    visibility: hidden;
    transition: opacity 1.5s ease-in-out;
    width: 100%;
    height: 100vh;
    position: relative;
    background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-end));
    /* Main BG */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Standard Premium Form Styles (Restored) */
.container {
    width: 100%;
    padding: 20px;
    display: flex;
    justify-content: center;
}

.form-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 40px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: translateY(20px);
    /* Start slightly lower for transition */
    transition: transform 1s ease-out;
}

.main-visible .form-card {
    transform: translateY(0);
    /* Slide up when visible */
}

.form-header {
    margin-bottom: 32px;
    text-align: center;
}

.form-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.form-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.input-group {
    margin-bottom: 24px;
    position: relative;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.3s;
}

.input-group:focus-within label {
    color: var(--primary-color);
}

input,
select {
    width: 100%;
    padding: 14px 16px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    color: var(--text-main);
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

select {
    appearance: none;
    cursor: pointer;
}

select option {
    background-color: var(--bg-gradient-end);
    color: white;
}

.select-wrapper {
    position: relative;
}

.select-wrapper::after {
    content: '▼';
    font-size: 0.8rem;
    color: var(--text-secondary);
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

input:focus,
select:focus {
    border-color: var(--input-focus);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    background: rgba(255, 255, 255, 0.08);
}

input::placeholder {
    color: rgba(148, 163, 184, 0.5);
}

.submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px var(--primary-color);
}

.submit-btn:active {
    transform: translateY(0);
}

.loading-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
    position: absolute;
}

.submit-btn.loading .btn-text {
    visibility: hidden;
}

.submit-btn.loading .loading-spinner {
    display: block;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.message {
    margin-top: 16px;
    text-align: center;
    font-size: 0.9rem;
    min-height: 24px;
    opacity: 0;
    transition: opacity 0.3s;
}

.message.success {
    color: var(--success-color);
    opacity: 1;
}

.message.error {
    color: var(--error-color);
    opacity: 1;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@media (max-width: 480px) {
    .form-card {
        padding: 30px 20px;
        background: rgba(255, 255, 255, 0.03);
    }
}