:root {
    /* Primary */
    --color-primary: #1e73be;
    --color-primary-light: #4a9fe8;
    --color-primary-dark: #145a94;

    /* Glass effects */
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.25);
    --glass-shadow: rgba(30, 115, 190, 0.3);

    /* Gradient background */
    --gradient-start: #0f2027;
    --gradient-mid: #203a43;
    --gradient-end: #1e73be;

    /* Text */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);

    /* Feedback */
    --color-success: #22c55e;
    --color-error: #ef4444;

    /* Font */
    --font-primary: "Avenir Next", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-primary);
    color: var(--text-primary);
    background-color: #0f172a;
    /* Deep dark blue base */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* Mesh Gradient Background */
body::before,
body::after {
    content: '';
    position: absolute;
    width: 60vw;
    height: 60vw;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.6;
    z-index: -1;
    animation: floatOrb 15s infinite alternate ease-in-out;
}

body::before {
    background: radial-gradient(circle, var(--color-primary-light), transparent 70%);
    top: -10%;
    left: -10%;
    animation-delay: 0s;
}

body::after {
    background: radial-gradient(circle, #8b5cf6, transparent 70%);
    /* Violet accent */
    bottom: -10%;
    right: -10%;
    animation-delay: -7s;
}

/* Additional Orb */
.app-container::before {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80vw;
    height: 80vw;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(30, 115, 190, 0.2), transparent 70%);
    filter: blur(120px);
    z-index: -2;
    pointer-events: none;
}

@keyframes floatOrb {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(50px, 50px) scale(1.1);
    }
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

p {
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
}

.section-intro {
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Liquid Glass Components */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow:
        0 8px 32px var(--glass-shadow),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    padding: 2rem;
}

.glass-button {
    background: linear-gradient(135deg,
            rgba(30, 115, 190, 0.8),
            rgba(30, 115, 190, 0.4));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    color: white;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    text-align: center;
    text-decoration: none;
    display: inline-block;
}

.glass-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(30, 115, 190, 0.4);
}

.glass-button:active {
    transform: translateY(0);
}

.secondary-button {
    background: rgba(255, 255, 255, 0.12);
    box-shadow: none;
}

.glass-input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 1rem;
    color: white;
    font-size: 1rem;
    width: 100%;
    margin-bottom: 1rem;
    font-family: var(--font-primary);
}

.input-required {
    border-width: 2px;
    border-color: rgba(255, 255, 255, 0.42);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.input-optional {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.08);
}

.glass-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.glass-input:focus {
    outline: none;
    border-color: var(--color-primary-light);
    background: rgba(255, 255, 255, 0.15);
}

/* Layout Containers */
.app-container {
    width: 100%;
    max-width: 1024px;
    /* Tablet landscape max */
    margin: 0 auto;
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-bottom: 80px;
    /* Space for fixed footer */
}

.screen {
    width: 100%;
    max-width: 600px;
    /* Optimal reading width */
    animation: fadeIn 0.5s ease-out;
}

#screen-camera-front {
    max-width: 980px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Specific Screen Styles */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    max-width: none;
    /* Override .screen max-width */
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: transparent;
    /* Let body gradient show through */
}

.splash-simple {
    width: 100%;
    max-width: 920px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 2.5rem 2rem 6rem;
    text-align: center;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        0 18px 50px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
}

.splash-simple h1 {
    max-width: 14ch;
    margin: 0 auto;
    font-size: clamp(2.2rem, 4.3vw, 3.8rem);
    line-height: 1.05;
    text-wrap: balance;
}

.splash-simple p {
    width: 100%;
    max-width: 44rem;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.84);
    font-size: 1.08rem;
    text-wrap: balance;
}

.splash-simple .glass-button {
    width: 100%;
    max-width: 340px;
    margin-top: 0.5rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.splash-note {
    margin-top: 0.2rem;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.95rem;
}

.app-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    /* More transparent */
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    /* High z-index to stay on top of everything */
}

.logo-container-footer {
    display: flex;
    align-items: center;
    opacity: 0.9;
}

.footer-brand {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.22em;
}

.camera-split-card {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
    gap: 1.5rem;
    max-width: 980px;
}

.camera-pane,
.skip-pane {
    min-width: 0;
}

.skip-pane {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1.5rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.skip-pane-badge {
    display: inline-flex;
    align-self: flex-start;
    margin-bottom: 1rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.skip-pane h3 {
    font-size: 2rem;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.skip-pane p {
    margin-bottom: 1.25rem;
    color: rgba(255, 255, 255, 0.78);
}

.camera-status {
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.28);
    color: rgba(255, 244, 214, 0.95);
    text-align: left;
}

/* Responsive Splash */
@media (max-width: 768px) {
    .splash-simple {
        width: 100%;
        gap: 0.85rem;
        padding: 1.5rem 1rem 5.5rem;
        border-radius: 22px;
    }

    .splash-simple h1 {
        max-width: 100%;
        font-size: clamp(2rem, 8vw, 2.8rem);
    }

    .splash-simple p {
        font-size: 1rem;
    }

    .camera-split-card {
        grid-template-columns: 1fr;
    }
}

.logo-container {
    margin-bottom: 2rem;
    animation: float 6s ease-in-out infinite;
}

.logo-svg {
    animation: scaleIn 1s ease-out;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}

@keyframes scaleIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    80% {
        transform: scale(1.1);
        opacity: 1;
    }

    100% {
        transform: scale(1);
    }
}

/* Form Validation */
.glass-input.valid {
    border-color: var(--color-success);
    background: rgba(34, 197, 94, 0.1);
}

.glass-input.invalid {
    border-color: var(--color-error);
    background: rgba(239, 68, 68, 0.1);
    animation: shake 0.4s cubic-bezier(.36, .07, .19, .97) both;
}

@keyframes shake {

    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
    }

    20%,
    80% {
        transform: translate3d(2px, 0, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-4px, 0, 0);
    }

    40%,
    60% {
        transform: translate3d(4px, 0, 0);
    }
}

/* Camera Overlay */
.camera-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 60%;
    border: 2px dashed rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
    /* Dim outside */
    pointer-events: none;
}

.camera-overlay::before,
.camera-overlay::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-color: var(--color-primary-light);
    border-style: solid;
}

.camera-overlay::before {
    top: -2px;
    left: -2px;
    border-width: 4px 0 0 4px;
    border-radius: 4px 0 0 0;
}

.camera-overlay::after {
    bottom: -2px;
    right: -2px;
    border-width: 0 4px 4px 0;
    border-radius: 0 0 4px 0;
}

.consent-list {
    display: grid;
    gap: 1rem;
    margin: 1rem 0 1.5rem;
    text-align: left;
}

.consent-item {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    padding: 0.95rem 1rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-secondary);
}

.consent-item input {
    margin-top: 0.25rem;
}

.skip-document-box {
    margin-top: 1rem;
    display: grid;
    gap: 0.85rem;
}

.settings-form label {
    display: block;
    margin-bottom: 0.45rem;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.95rem;
    font-weight: 600;
}

.settings-lock {
    position: absolute;
    top: 20px;
    right: 20px;
    opacity: 0.5;
    cursor: pointer;
    transition: opacity 0.3s;
    z-index: 1000;
}

.settings-lock:hover {
    opacity: 1;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}
