/* ==========================================
   GENERAL
========================================== */

* {
    box-sizing: border-box;
}

body {
    margin: 0;

    font-family: Arial, sans-serif;

    background: #f4f5f7;

    color: #222;

    min-height: 100vh;
}


/* ==========================================
   MAIN CONTAINER
========================================== */

.container {
    max-width: 500px;

    margin: 0 auto;

    padding: 25px 20px;

    text-align: center;
}

.container h1 {
    font-size: 24px;

    margin-bottom: 25px;
}


/* ==========================================
   CAMERA
========================================== */

.camera-container {
    position: relative;

    width: 100%;

    aspect-ratio: 3 / 4;

    background: #111;

    border-radius: 20px;

    overflow: hidden;
}

#preview {
    width: 100%;

    height: 100%;

    object-fit: cover;

    transform: scaleX(-1);
}


/* ==========================================
   FACE OVERLAY
========================================== */

.face-overlay {
    position: absolute;

    inset: 0;

    pointer-events: none;
}

.face-overlay svg {
    width: 100%;

    height: 100%;
}


/* ==========================================
   STATUS
========================================== */

#status {
    margin-top: 25px;

    font-size: 16px;

    color: #555;

    line-height: 1.5;
}


/* ==========================================
   CONSENT SCREEN
========================================== */

.consent-screen {
    position: fixed;

    inset: 0;

    z-index: 1000;

    background: rgba(0, 0, 0, 0.85);

    display: flex;

    align-items: center;

    justify-content: center;

    padding: 20px;
}

.consent-card {
    width: 100%;

    max-width: 450px;

    background: white;

    padding: 30px;

    border-radius: 20px;

    text-align: center;
}

.consent-card h1 {
    font-size: 25px;

    margin-bottom: 25px;
}

.consent-card p {
    font-size: 15px;

    line-height: 1.6;

    color: #444;

    margin-bottom: 18px;
}


/* ==========================================
   BUTTON
========================================== */

button {
    width: 100%;

    padding: 16px;

    border: none;

    border-radius: 10px;

    background: #2563eb;

    color: white;

    font-size: 17px;

    font-weight: bold;

    cursor: pointer;

    margin-top: 15px;
}

button:hover {
    background: #1d4ed8;
}

button:disabled {
    opacity: 0.6;

    cursor: not-allowed;
}


/* ==========================================
   LOADING SCREEN
========================================== */

.loading-screen {
    position: fixed;

    inset: 0;

    z-index: 2000;

    background: #ffffff;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    text-align: center;

    padding: 30px;
}

.loading-screen h2 {
    margin-top: 30px;

    font-size: 24px;

    color: #222;
}

.loading-screen p {
    color: #666;

    font-size: 16px;
}


/* ==========================================
   ROTATING SPINNER
========================================== */

.spinner {
    width: 70px;

    height: 70px;

    border: 7px solid #e5e7eb;

    border-top: 7px solid #2563eb;

    border-radius: 50%;

    animation: spin 0.8s linear infinite;
}

@keyframes spin {

    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }

}


/* ==========================================
   FAILURE SCREEN
========================================== */

.failure-screen {
    position: fixed;

    inset: 0;

    background: #dc2626;

    color: white;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    text-align: center;

    padding: 30px;
}

.failure-icon {
    margin-bottom: 30px;
}

.failure-screen h1 {
    font-size: 30px;

    margin-bottom: 15px;
}

.failure-screen p {
    font-size: 17px;

    line-height: 1.6;

    max-width: 350px;
}


/* ==========================================
   HIDDEN ELEMENTS
========================================== */

.hidden {
    display: none !important;
}


/* ==========================================
   MOBILE
========================================== */

@media (max-width: 480px) {

    .container {
        padding: 20px 15px;
    }

    .consent-card {
        padding: 25px 20px;
    }

    .consent-card h1 {
        font-size: 23px;
    }

}