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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a3e 30%, #0d1b2a 70%, #0f0f23 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #e2e8f0;
    overflow: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(59, 130, 246, 0.05) 0%, transparent 50%),
                radial-gradient(circle at 70% 30%, rgba(139, 92, 246, 0.05) 0%, transparent 50%);
    animation: bgShift 15s ease-in-out infinite;
    z-index: 0;
}

@keyframes bgShift {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-5%, 3%); }
}

.container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 520px;
    padding: 20px;
}

.card {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 24px;
    padding: 48px 40px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4),
                0 0 100px rgba(59, 130, 246, 0.05);
    text-align: center;
    animation: cardAppear 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cardAppear {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.shield-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(139, 92, 246, 0.15));
    color: #60a5fa;
    margin-bottom: 24px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.2); }
    50% { box-shadow: 0 0 0 15px rgba(59, 130, 246, 0); }
}

h1 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.subtitle {
    font-size: 0.95rem;
    color: #94a3b8;
    line-height: 1.6;
    margin-bottom: 32px;
}

/* Steps indicator */
.steps {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 32px;
}

.step {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: #475569;
    transition: color 0.3s ease;
}

.step.active {
    color: #60a5fa;
}

.step.done {
    color: #10b981;
}

.step-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid currentColor;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.75rem;
    transition: all 0.3s ease;
}

.step.active .step-number {
    background: rgba(59, 130, 246, 0.15);
    border-color: #60a5fa;
}

.step.done .step-number {
    background: rgba(16, 185, 129, 0.15);
    border-color: #10b981;
}

/* Verify button */
.verify-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 36px;
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.01em;
}

.verify-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.35);
}

.verify-btn:active {
    transform: translateY(0);
}

.verify-btn.retry {
    margin-top: 20px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
}

/* Camera area */
.camera-area {
    margin-top: 24px;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

#video {
    width: 100%;
    border-radius: 16px;
    transform: scaleX(-1);
}

.camera-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.face-guide {
    width: 180px;
    height: 220px;
    border: 2px dashed rgba(59, 130, 246, 0.5);
    border-radius: 50%;
    animation: guidePulse 2s ease-in-out infinite;
}

@keyframes guidePulse {
    0%, 100% { border-color: rgba(59, 130, 246, 0.3); transform: scale(1); }
    50% { border-color: rgba(59, 130, 246, 0.7); transform: scale(1.02); }
}

.cam-hint {
    margin-top: 16px;
    font-size: 0.85rem;
    color: #94a3b8;
    animation: blink 1.5s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.progress-bar {
    margin-top: 16px;
    height: 4px;
    background: rgba(148, 163, 184, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #3b82f6, #10b981);
    border-radius: 2px;
    transition: width 0.1s linear;
}

/* Success area */
.success-area {
    padding: 20px 0;
    animation: fadeIn 0.5s ease;
}

.success-icon {
    margin-bottom: 16px;
    animation: bounceIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes bounceIn {
    from { transform: scale(0); }
    50% { transform: scale(1.2); }
    to { transform: scale(1); }
}

.success-area h2 {
    color: #10b981;
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.success-area p {
    color: #94a3b8;
    font-size: 0.9rem;
}

/* Error area */
.error-area {
    padding: 20px 0;
    animation: fadeIn 0.5s ease;
}

.error-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.error-area h2 {
    color: #f59e0b;
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.error-area p {
    color: #94a3b8;
    font-size: 0.9rem;
}

/* Trust badges */
.trust-badges {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.trust-badges span {
    font-size: 0.75rem;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Responsive */
@media (max-width: 540px) {
    .card {
        padding: 32px 24px;
    }

    h1 {
        font-size: 1.3rem;
    }

    .steps {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .trust-badges {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
}
