@import url('https://fonts.googleapis.com/css2?family=Prompt:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
}

body {
    font-family: 'Prompt', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #0f172a;
    color: #f8fafc;
    -webkit-tap-highlight-color: transparent;
}

.hidden {
    display: none;
}

/* Remove default number input spinner arrows */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}
input[type="number"] {
    -moz-appearance: textfield !important;
    appearance: textfield !important;
}

/* Glassmorphism Cards */
.glass-panel {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Header Single-Line Compact Styles */
header nav button {
    white-space: nowrap !important;
    word-break: keep-all !important;
}


.glass-card {
    background: rgba(30, 41, 59, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Video & Canvas Overlay container */
.camera-container {
    position: relative;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    aspect-ratio: 3/4; /* Vertical / Portrait orientation for smartphones */
    max-height: 62vh;
    background: #020617;
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(99, 102, 241, 0.35);
}

@media (min-width: 768px) {
    .camera-container {
        max-width: 600px;
        aspect-ratio: 4/3;
        max-height: none;
    }
}

.camera-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.camera-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Radar Scan Line Animation */
.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #38bdf8, #818cf8, transparent);
    box-shadow: 0 0 15px #38bdf8;
    animation: scanAnimation 2.5s ease-in-out infinite;
    pointer-events: none;
    z-index: 10;
}

@keyframes scanAnimation {
    0% {
        top: 5%;
        opacity: 0.8;
    }
    50% {
        top: 90%;
        opacity: 1;
    }
    100% {
        top: 5%;
        opacity: 0.8;
    }
}

/* Target Face Guide Overlay */
.face-guide-box {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 260px;
    max-width: 65%;
    max-height: 65%;
    border: 2px dashed rgba(255, 255, 255, 0.4);
    border-radius: 50% 50% 45% 45% / 60% 60% 40% 40%;
    pointer-events: none;
    z-index: 5;
    transition: all 0.3s ease;
}

.face-guide-box.detected {
    border-color: #10b981;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

/* Corner HUD accents */
.hud-corner {
    position: absolute;
    width: 20px;
    height: 20px;
    border-color: #6366f1;
    pointer-events: none;
}
.hud-tl { top: 12px; left: 12px; border-top: 3px solid #6366f1; border-left: 3px solid #6366f1; border-top-left-radius: 6px; }
.hud-tr { top: 12px; right: 12px; border-top: 3px solid #6366f1; border-right: 3px solid #6366f1; border-top-right-radius: 6px; }
.hud-bl { bottom: 12px; left: 12px; border-bottom: 3px solid #6366f1; border-left: 3px solid #6366f1; border-bottom-left-radius: 6px; }
.hud-br { bottom: 12px; right: 12px; border-bottom: 3px solid #6366f1; border-right: 3px solid #6366f1; border-bottom-right-radius: 6px; }

/* Pulse Animation */
@keyframes pulseGlow {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.03);
    }
}

.animate-pulse-glow {
    animation: pulseGlow 2s infinite ease-in-out;
}

/* Success Pop Notification */
.check-success-badge {
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: translate(-50%, 20px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, 0) scale(1);
    }
}

/* Bottom Nav bar safe area for iOS & high visibility */
.safe-bottom {
    padding-bottom: max(env(safe-area-inset-bottom, 0px), 8px);
}

.mobile-bottom-nav {
    background: rgba(15, 23, 42, 0.96) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #0f172a;
}
::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

