/* Variables */
:root {
    --bg: #0f172a;
    --fg: #e5e7eb;
    --muted: #9ca3af;
}

/* Base Styles */
body {
    margin: 0;
    min-height: 100vh;
    font: 16px/1.45 system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    background: linear-gradient(180deg,#0b1027,#0f172a 40%);
    color: var(--fg);
    display: grid;
    place-items: center;
}

h1 {
    margin: 0 0 6px;
    font-size: clamp(18px,3.6vw,28px);
}

/* Card Layout */
.card {
    width: min(720px,92vw);
    background: linear-gradient(180deg, #4b2ca0, #6a4dc5);
    border: 1px solid #1f2937;
    border-radius: 20px;
    padding: 80px 28px 28px 28px;
    box-shadow: 0 10px 30px rgba(0,0,0,.35);
    position: relative;
    display: none;
    min-height: 200px;
}

.logo-container {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 1000;
}

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

.row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

/* Buttons */
button {
    appearance: none;
    border: 1px solid #334155;
    background: #0b1224;
    color: var(--fg);
    padding: 12px 14px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: 200px;
}

button:hover:not(:disabled) {
    border-color: #475569;
    background: #0d142b;
}

button:disabled {
    opacity: .6;
    cursor: not-allowed;
}

.google svg, .apple svg {
    width: 20px;
    height: 20px;
}

/* Survey Form */
.survey-card {
    padding: 20px 0 0 40px;
    border-radius: 12px;
    color: white;
    width: 65%;
}

.survey-card h3 {
    font-size: 1rem;
    margin-bottom: 15px;
}

.survey-option {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.survey-option input[type="radio"] {
    margin-right: 10px;
    accent-color: #fff;
}

.survey-input {
    position: relative;
    margin-bottom: 12px;
}

.survey-input input {
    padding: 10px 35px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    font-size: 0.9rem;
    width: 80%;
}

.survey-input input::placeholder {
    color: #ddd;
}

.survey-input .icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.8;
}

/* Submit Button */
.submit {
    margin: 10px 0 0 49%;
    padding-left: 16%;
    background: linear-gradient(180deg, #166534, #14532d);
    border: none;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
    text-shadow: 0 1px 1px rgba(0,0,0,0.2);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.submit:not(:disabled):hover {
    background: linear-gradient(180deg, #14532d, #052e16);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.submit:not(:disabled):active {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.submit:disabled {
    background: #4b5563;
    opacity: 0.7;
    cursor: not-allowed;
    box-shadow: none;
    color: #d1d5db;
}

/* Sign Out Button */
.signout-container {
    position: absolute;
    top: 10px;
    right: 20px;
}

.sign-out {
    padding: 8px 16px;
    margin: 0;
    width: auto;
    min-width: 100px;
}

/* Loading State */
.overlay {
    position: absolute;
    top: 15%;
    left: 2%;
    right: 2%;
    bottom: 9%;
    /*border-radius: 10px;*/
    /*border: 4px solid darkblue;*/
    /*background-color: rgba(255, 255, 255, 0.5);*/
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 1000;
    padding: 8% 0 0 32%;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 1s linear infinite;
    margin: 10px 0 0 23%;
}

.wait {
    text-align: center;
    background: linear-gradient(180deg, #4b2ca0, #6a4dc5);
    width: 275px;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.success {
    display: flex;
    margin-left: 36%;
}

#closeBtn {
    padding: 8px 16px 0 4%;
    margin: 0;
    width: auto;
    min-width: 100px;
}

.i_am {
    margin-top: 2px;
}

.title-hidden {
    font-size: 0;
    display: none;
}
/* Media Queries */
@media screen and (max-width: 480px) {
    .card {
        padding: 28px 5px;
        display: none;
        min-height: 200px;
    }
    #title {
        margin-top: 8%;
    }
    #closeBtn {
        padding-left: 5%;
        margin: 10px 0 0 40%;
    }
    .missing {
        margin-top: 8%;
    }
    .wait {
        width: 240px;
    }

    .success {
        margin-left: 21%;
    }
    .gender-title {
        margin-top: 20px;
    }

    .overlay {
        padding: 25% 0 0 15%;
    }

    .spinner {
        margin: 10px 0 0 32%;
    }

    .signout-container {
        top: 10px;
        right: 10px;
    }

    .sign-out {
        padding: 6px 12px;
        font-size: 14px;
        min-width: 80px;
    }

    .submit {
        padding-left: 22%;
        margin: 10px 0 0 20%;
    }

    .row {
        display: inline-grid;
    }

    .survey-card {
        width: 90%;
        padding: 15px;
        margin: 10px 0 0 0;
    }

    .survey-input input {
        width: 100%;
        font-size: 16px;
        padding: 8px 35px;
    }

    .survey-option {
        padding: 12px 0;
        min-height: 44px;
        width: 100%;
    }

    .survey-option input[type="radio"] {
        position: relative;
        appearance: none;
        width: 20px;
        height: 20px;
        border: 2px solid #fff;
        border-radius: 50%;
        margin-right: 10px;
        cursor: pointer;
        background-color: transparent;
    }

    .survey-option input[type="radio"]:checked::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 8px;          /* Reduced from 12px */
        height: 8px;         /* Reduced from 12px */
        background-color: #fff;
        border-radius: 50%;
    }

    .survey-option input[type="radio"]:hover {
        border-color: #93c5fd;
    }

    .apple {
        margin-top: 10px;
    }
}
