@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
    --primary: #0080dc;
    --primary-light: #339ae5;
    --primary-dark: #0066b3;
    --primary-glow: rgba(0, 128, 220, 0.3);
    --accent: #00b4d8;
    --accent-light: #48cae4;
    --gradient: linear-gradient(135deg, #0066b3 0%, #0080dc 40%, #00b4d8 100%);
    --gradient-text: linear-gradient(135deg, #339ae5, #00b4d8, #90e0ef);
    --gradient-subtle: linear-gradient(135deg, rgba(0,128,220,0.1), rgba(0,180,216,0.1));
    --bg: #0a0f1a;
    --bg-card: rgba(15, 23, 42, 0.8);
    --bg-glass: rgba(15, 23, 42, 0.6);
    --surface: #1e293b;
    --surface-light: #334155;
    --text: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border: rgba(148, 163, 184, 0.1);
    --border-light: rgba(148, 163, 184, 0.2);
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --radius: 16px;
    --radius-sm: 10px;
    --radius-full: 9999px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.4);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

#app {
    width: 100%;
    height: 100%;
    position: relative;
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    overflow-y: auto;
}

.screen.active {
    opacity: 1;
    visibility: visible;
}

.landing-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.landing-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -100px;
    right: -100px;
    animation: float 8s ease-in-out infinite;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: var(--accent);
    bottom: -50px;
    left: -50px;
    animation: float 10s ease-in-out infinite reverse;
}

.orb-3 {
    width: 200px;
    height: 200px;
    background: #8b5cf6;
    top: 50%;
    left: 50%;
    animation: float 12s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

.landing-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    position: relative;
    z-index: 2;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.brand-icon {
    color: var(--primary-light);
    display: flex;
}

.brand-name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
}

.nav-btn {
    background: var(--bg-glass);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.nav-btn:hover {
    background: var(--surface);
    color: var(--text);
}

.landing-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem 1.5rem 2rem;
    max-width: 560px;
    margin: 0 auto;
}

.landing-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 1rem;
    border-radius: var(--radius-full);
    background: rgba(0, 128, 220, 0.15);
    border: 1px solid rgba(0, 128, 220, 0.3);
    color: var(--primary-light);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.landing-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2rem, 6vw, 3rem);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 1rem;
    color: var(--text);
}

.gradient-text {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.landing-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 2rem;
    max-width: 440px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    width: 100%;
    margin-bottom: 2rem;
}

.feature-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0.5rem;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.feature-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.feature-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--gradient-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-light);
    font-size: 1rem;
}

.feature-text {
    text-align: center;
}

.feature-text strong {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
}

.feature-text span {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.cta-button {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2.5rem;
    background: var(--gradient);
    border: none;
    border-radius: var(--radius-full);
    color: white;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px var(--primary-glow);
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--primary-glow);
}

.cta-button:hover::before {
    left: 100%;
}

.cta-icon {
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.cta-button:hover .cta-icon {
    transform: translateX(4px);
}

.landing-steps {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.step-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.step-item span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.step-divider {
    width: 24px;
    height: 1px;
    background: var(--border-light);
}

.camera-view {
    position: relative;
    width: 100%;
    height: 100%;
    background: #000;
    overflow: hidden;
}

#video-stream {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.camera-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: var(--bg);
}

.camera-placeholder p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.placeholder-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--surface);
    border-top-color: var(--primary-light);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.scan-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.scan-overlay.active {
    opacity: 1;
}

.scan-frame {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 260px;
    height: 340px;
    transform: translate(-50%, -55%);
}

.oval-border {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid var(--primary-light);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 0 15px rgba(0, 128, 220, 0.2);
}

.oval-glow {
    position: absolute;
    top: -4px;
    left: -4px;
    width: calc(100% + 8px);
    height: calc(100% + 8px);
    border-radius: 50%;
    border: 2px solid transparent;
    background: conic-gradient(from 0deg, transparent 0%, var(--primary-light) 25%, transparent 50%, var(--accent) 75%, transparent 100%) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: ovalRotate 4s linear infinite;
    opacity: 0.6;
}

@keyframes ovalRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.scan-line-vertical {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -55%);
    width: 3px;
    height: 300px;
    background: linear-gradient(180deg, transparent 0%, rgba(255,255,255,0.8) 20%, rgba(255,255,255,0.9) 50%, rgba(255,255,255,0.8) 80%, transparent 100%);
    opacity: 0;
    animation: none;
    border-radius: 2px;
    filter: blur(0.5px);
    box-shadow: 0 0 8px rgba(255,255,255,0.3);
}

.scan-line-vertical.active {
    opacity: 0.85;
    animation: verticalScan 3s ease-in-out infinite;
}

@keyframes verticalScan {
    0% { opacity: 0; transform: translate(-50%, -55%) scaleY(0.3); }
    15% { opacity: 0.9; transform: translate(-50%, -55%) scaleY(0.6); }
    50% { opacity: 0.7; transform: translate(-50%, -55%) scaleY(1); }
    85% { opacity: 0.9; transform: translate(-50%, -55%) scaleY(0.6); }
    100% { opacity: 0; transform: translate(-50%, -55%) scaleY(0.3); }
}

.scan-overlay.face-detected .oval-border {
    border-color: var(--success);
    box-shadow: 0 0 25px rgba(34, 197, 94, 0.3), inset 0 0 15px rgba(34, 197, 94, 0.05);
}

.scan-overlay.face-detected .oval-glow {
    background: conic-gradient(from 0deg, transparent 0%, var(--success) 25%, transparent 50%, #4ade80 75%, transparent 100%) border-box;
    opacity: 0.8;
}

.scan-overlay.measuring .oval-border {
    border-color: var(--accent-light);
    box-shadow: 0 0 30px rgba(0, 180, 216, 0.4), inset 0 0 20px rgba(0, 180, 216, 0.05);
    animation: pulse-oval 1.5s ease-in-out infinite;
}

.scan-overlay.measuring .oval-glow {
    background: conic-gradient(from 0deg, transparent 0%, var(--accent-light) 25%, transparent 50%, #90e0ef 75%, transparent 100%) border-box;
    opacity: 1;
    animation: ovalRotate 2s linear infinite;
}

@keyframes pulse-oval {
    0%, 100% { box-shadow: 0 0 30px rgba(0, 180, 216, 0.4), inset 0 0 20px rgba(0, 180, 216, 0.05); }
    50% { box-shadow: 0 0 50px rgba(0, 180, 216, 0.6), inset 0 0 30px rgba(0, 180, 216, 0.1); }
}

.camera-top-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    z-index: 10;
    background: linear-gradient(to bottom, rgba(0,0,0,0.6), transparent);
}

.cam-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    font-size: 0.9rem;
}

.cam-btn:hover {
    background: rgba(0, 0, 0, 0.6);
}

.status-chip {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    backdrop-filter: blur(10px);
    max-width: 280px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--warning);
    flex-shrink: 0;
    animation: blink 1.5s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.status-chip.success .status-dot {
    background: var(--success);
    animation: none;
}

.status-chip.measuring .status-dot {
    background: var(--accent-light);
    animation: blink 0.8s ease-in-out infinite;
}

#status-text {
    color: white;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.detection-indicators {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.detection-indicators.visible {
    opacity: 1;
}

.indicator {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.65rem;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.indicator i {
    font-size: 0.65rem;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.indicator span {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 500;
    transition: color 0.3s ease;
}

.indicator.ok {
    border-color: rgba(34, 197, 94, 0.3);
    background: rgba(34, 197, 94, 0.1);
}

.indicator.ok i,
.indicator.ok span {
    color: var(--success);
}

.progress-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 15;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
}

.progress-ring {
    position: relative;
    width: 120px;
    height: 120px;
}

.progress-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.progress-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 5;
}

.progress-bar {
    fill: none;
    stroke: var(--primary-light);
    stroke-width: 5;
    stroke-linecap: round;
    stroke-dasharray: 339.29;
    stroke-dashoffset: 339.29;
    transition: stroke-dashoffset 0.1s linear;
    filter: drop-shadow(0 0 6px var(--primary-glow));
}

.progress-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.progress-pct {
    display: block;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

.progress-label {
    display: block;
    font-size: 0.65rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.camera-bottom-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    padding: 1.5rem;
    z-index: 10;
    background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-full);
    border: none;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.stop-action {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}

.stop-action:hover {
    background: rgba(239, 68, 68, 0.4);
}

#result-screen {
    background: var(--bg);
}

.result-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.result-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
}

.result-orb.orb-1 {
    width: 300px;
    height: 300px;
    background: var(--primary);
    top: -80px;
    left: -80px;
}

.result-orb.orb-2 {
    width: 250px;
    height: 250px;
    background: #8b5cf6;
    bottom: -60px;
    right: -60px;
}

.result-container {
    position: relative;
    z-index: 2;
    max-width: 420px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: 100%;
    justify-content: center;
}

.result-success-icon {
    margin-bottom: 1.5rem;
    animation: scaleIn 0.6s ease-out;
}

@keyframes scaleIn {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.success-ring {
    width: 80px;
    height: 80px;
    color: var(--success);
}

.success-ring svg {
    width: 100%;
    height: 100%;
}

.result-heading {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.result-subheading {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.result-value-card {
    width: 100%;
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    backdrop-filter: blur(10px);
    margin-bottom: 1rem;
    animation: slideUp 0.5s ease-out 0.2s both;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.result-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.result-big-value {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.pd-number {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 4rem;
    font-weight: 800;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.pd-unit {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.result-confidence {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.confidence-bar {
    flex: 1;
    height: 4px;
    background: var(--surface);
    border-radius: 2px;
    overflow: hidden;
}

.confidence-fill {
    height: 100%;
    background: var(--gradient);
    border-radius: 2px;
    width: 85%;
    transition: width 1s ease;
}

.confidence-text {
    font-size: 0.7rem;
    color: var(--success);
    font-weight: 500;
    white-space: nowrap;
}

.result-info-card {
    width: 100%;
    padding: 1rem;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 2rem;
    animation: slideUp 0.5s ease-out 0.4s both;
}

.info-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.info-row i {
    color: var(--primary-light);
    font-size: 0.875rem;
}

.info-row span {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.result-actions {
    display: flex;
    gap: 0.75rem;
    width: 100%;
    margin-bottom: 1.5rem;
    animation: slideUp 0.5s ease-out 0.6s both;
}

.result-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    border: none;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.result-btn.primary {
    background: var(--gradient);
    color: white;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.result-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--primary-glow);
}

.result-btn.secondary {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
}

.result-btn.secondary:hover {
    background: var(--surface-light);
}

.result-btn.glasses-btn {
    width: 100%;
    flex: none;
    background: linear-gradient(135deg, #0066b3, #0080dc, #00b4d8);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(0, 128, 220, 0.35);
    margin-bottom: 0.5rem;
    letter-spacing: 0.01em;
}

.result-btn.glasses-btn i {
    font-size: 1.1rem;
}

.result-btn.glasses-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(0, 128, 220, 0.5);
}

.home-link {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.home-link:hover {
    color: var(--text);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    max-width: 460px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease-out;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--bg);
    color: var(--text);
}

.modal-body {
    padding: 1.5rem;
}

.guide-step {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.guide-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--gradient-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-light);
    flex-shrink: 0;
}

.guide-content strong {
    display: block;
    font-size: 0.9rem;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.guide-content p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.guide-tips {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(0, 128, 220, 0.08);
    border: 1px solid rgba(0, 128, 220, 0.2);
    border-radius: var(--radius-sm);
}

.guide-tips h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--primary-light);
    margin-bottom: 0.75rem;
}

.guide-tips ul {
    list-style: none;
    padding: 0;
}

.guide-tips li {
    font-size: 0.8rem;
    color: var(--text-secondary);
    padding: 0.3rem 0;
    padding-left: 1.25rem;
    position: relative;
}

.guide-tips li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
    transform: translateY(-50%);
}

@media (max-width: 640px) {
    .landing-content {
        padding: 0.5rem 1.25rem 2rem;
    }

    .landing-title {
        font-size: 1.75rem;
    }

    .landing-subtitle {
        font-size: 0.9rem;
    }

    .features-grid {
        gap: 0.5rem;
    }

    .feature-card {
        padding: 0.75rem 0.25rem;
    }

    .feature-text strong {
        font-size: 0.7rem;
    }

    .feature-text span {
        font-size: 0.6rem;
    }

    .cta-button {
        padding: 0.875rem 2rem;
        font-size: 0.95rem;
    }

    .landing-steps {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }

    .step-divider {
        display: none;
    }

    .scan-frame {
        width: 200px;
        height: 270px;
    }

    .scan-line-vertical {
        height: 240px;
    }

    .detection-indicators {
        bottom: 100px;
        gap: 0.35rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .result-container {
        padding: 1.5rem 1rem;
    }

    .pd-number {
        font-size: 3rem;
    }

    .result-actions {
        flex-direction: column;
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    .scan-frame {
        width: 280px;
        height: 370px;
    }
}

@media (min-width: 1025px) {
    .landing-content {
        padding-top: 2rem;
    }

    .scan-frame {
        width: 300px;
        height: 400px;
    }

    .scan-line-vertical {
        height: 360px;
    }
}
