:root {
    --bg: #050505;
    --surface: #121212;
    --surface-light: #1E1E1E;
    --primary: #FFC107;
    --accent-red: #FF3B30;
    --text-main: #FFFFFF;
    --text-muted: #888888;
    --font-main: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
body { background: var(--bg); color: var(--text-main); font-family: var(--font-main); overflow-x: hidden; }

.bg-glow-top { position: fixed; top: -20%; left: -20%; width: 50vw; height: 50vw; background: radial-gradient(circle, rgba(255,193,7,0.15), transparent 70%); z-index: -1; pointer-events: none; }
.bg-glow-bottom { position: fixed; bottom: -20%; right: -20%; width: 50vw; height: 50vw; background: radial-gradient(circle, rgba(255,59,48,0.1), transparent 70%); z-index: -1; pointer-events: none; }
.bg-grid { position: fixed; width: 100%; height: 100%; background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px); background-size: 40px 40px; z-index: -2; opacity: 0.5; }

.navbar { position: fixed; width: 100%; top: 0; z-index: 100; backdrop-filter: blur(12px); background: rgba(0,0,0,0.7); border-bottom: 1px solid rgba(255,255,255,0.05); }
.nav-container { max-width: 1200px; margin: 0 auto; height: 70px; display: flex; justify-content: space-between; align-items: center; padding: 0 20px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: white; font-weight: 800; font-size: 1.2rem; }
.logo-icon-img { width: 32px; height: 32px; border-radius: 8px; object-fit: contain; }
.nav-links { display: flex; gap: 24px; align-items: center; }
.nav-links a { color: var(--text-muted); text-decoration: none; font-weight: 500; transition: 0.2s; font-size: 0.95rem; }
.nav-links a:hover { color: white; }
.btn-nav { background: white; color: black !important; padding: 8px 20px; border-radius: 20px; font-weight: 700; }

.nav-support { color: #FF3B30 !important; font-weight: 800; display: inline-flex; align-items: center; gap: 6px; transition: transform 0.2s; }
.nav-support:hover { transform: scale(1.05); text-shadow: 0 0 10px rgba(255, 59, 48, 0.4); }
.nav-fb { color: #1877F2; font-weight: 700; margin-right: 8px; display: inline-flex; align-items: center; text-decoration: none; transition: color 0.2s, text-shadow 0.2s; }
.nav-fb:hover { color: #4e9af1; text-shadow: 0 0 10px rgba(24, 119, 242, 0.6); }

.hero { min-height: 100vh; padding-top: 80px; display: flex; align-items: center; position: relative; }
.hero-layout { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 60px; padding: 0 20px; align-items: center; width: 100%; }

.status-pill-live { display: inline-flex; align-items: center; gap: 8px; background: rgba(52, 199, 89, 0.1); color: #34C759; padding: 6px 12px; border-radius: 50px; font-size: 0.8rem; font-weight: 700; margin-bottom: 24px; border: 1px solid rgba(52, 199, 89, 0.2); }
.pulsing-dot { width: 8px; height: 8px; background: #34C759; border-radius: 50%; box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.7); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.4); } 70% { box-shadow: 0 0 0 10px rgba(52, 199, 89, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 199, 89, 0); } }

h1 { font-size: 3.5rem; line-height: 1.1; font-weight: 800; margin-bottom: 24px; }
.text-gradient { background: linear-gradient(90deg, #FFFFFF, #999999); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero p { color: var(--text-muted); font-size: 1.1rem; max-width: 500px; margin-bottom: 32px; line-height: 1.6; }

.hero-actions { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.btn-primary-hero { background: var(--primary); color: black; padding: 14px 32px; border-radius: 12px; font-weight: 700; text-decoration: none; transition: transform 0.2s; white-space: nowrap; }
.btn-primary-hero:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(255, 193, 7, 0.2); }
.btn-outline { background: transparent; color: white; border: 1px solid rgba(255, 255, 255, 0.2); padding: 14px 24px; border-radius: 12px; font-weight: 600; text-decoration: none; transition: all 0.2s; }
.btn-outline:hover { border-color: white; background: rgba(255, 255, 255, 0.05); }

.hero-phone { display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; perspective: 1000px; cursor: grab; }
.hero-phone:active { cursor: grabbing; }
.phone-wrapper { position: relative; transition: transform 0.1s ease-out; transform-style: preserve-3d; }
.phone-case { width: 300px; height: 620px; background: #000; border-radius: 48px; border: 8px solid #1a1a1a; box-shadow: 0 0 0 2px #333, 0 30px 60px rgba(0,0,0,0.5); position: relative; overflow: hidden; }
.phone-screen { width: 100%; height: 100%; background: #000; position: relative; overflow: hidden; }
.phone-notch { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 100px; height: 26px; background: #000; border-bottom-left-radius: 14px; border-bottom-right-radius: 14px; z-index: 20; display: flex; justify-content: center; align-items: center; gap: 8px; }
.camera-dot { width: 8px; height: 8px; background: #222; border-radius: 50%; }
.speaker-slot { width: 40px; height: 4px; background: #222; border-radius: 2px; }
.status-bar { display: flex; justify-content: space-between; padding: 10px 20px 0; color: white; font-size: 11px; font-weight: 600; z-index: 10; position: relative; }
.status-right { display: flex; gap: 4px; }
.sm-icon { font-size: 12px; }

.app-view { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: #000; padding-top: 30px; display: flex; flex-direction: column; opacity: 0; visibility: hidden; transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1); transform: scale(0.95) translateY(10px); }
.app-view.active { opacity: 1; visibility: visible; transform: scale(1) translateY(0); }

.app-header { padding: 10px 16px 10px; display: flex; flex-direction: column; gap: 8px; border-bottom: 1px solid rgba(255,255,255,0.05); background: rgba(0,0,0,0.8); backdrop-filter: blur(10px); }
.header-row { display: flex; justify-content: space-between; align-items: center; }
.header-right { display: flex; gap: 12px; }
.h-btn { font-size: 22px; color: #888; cursor: pointer; transition: 0.2s; }
.h-btn:hover { color: white; }
.h-btn:active { transform: scale(0.9); }
.app-logo-text { font-weight: 800; font-size: 1.2rem; letter-spacing: 1px; color: white; text-align: center; margin-top: -4px; padding-bottom: 4px; }
.app-content { flex: 1; padding: 0 16px; overflow-y: auto; scrollbar-width: none; }

.dash-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 20px; margin-top: 16px; }
.dash-card { aspect-ratio: 1.3; border-radius: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; position: relative; transition: 0.1s; border: 1px solid rgba(255,255,255,0.05); padding: 10px; }
.dash-card:active { transform: scale(0.95); filter: brightness(0.8); }

.dash-card.red { background: var(--accent-red); color: white; }
.dash-card.yellow { background: var(--primary); color: black; }
.dash-card.green { background: #34C759; color: white; }
.dash-card.purple { background: #AF52DE; color: white; }
.dash-card.blue { background: #2196F3; color: white; }
.dash-card.orange { background: #FF9800; color: white; }
.dash-card.cyan { background: #00BCD4; color: black; }
.dash-card.dark { background: #1C1C1E; color: white; border-color: #333; }
.dash-card.indigo { background: #5E5CE6; color: white; }
.dash-card.pink { background: #FF2D55; color: white; }
.dash-card.teal { background: #30B0C7; color: white; }
.dash-card.gray { background: #8E8E93; color: white; }

.icon-lg { font-size: 28px; margin-bottom: 6px; }
.card-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; text-align: center; }

.widget-pod { background: #1C1C1E; border-radius: 16px; overflow: hidden; border: 1px solid #333; margin-bottom: 20px; cursor: pointer; transition: 0.2s; }
.widget-pod:active { transform: scale(0.98); }
.widget-img-holder { height: 120px; position: relative; }
.widget-img-holder img { width: 100%; height: 100%; object-fit: cover; }
.pod-badge { position: absolute; top: 8px; left: 8px; background: rgba(0,0,0,0.6); color: white; padding: 2px 8px; border-radius: 4px; font-size: 10px; font-weight: 600; backdrop-filter: blur(4px); }
.pod-badge.month { background: rgba(175, 82, 222, 0.8); color: white; }

.widget-text { padding: 12px; }
.widget-text h5 { font-size: 0.9rem; margin-bottom: 2px; }
.widget-text p { font-size: 0.75rem; color: var(--text-muted); }

.fab-main { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); width: 64px; height: 64px; background: var(--primary); border-radius: 50%; display: grid; place-items: center; color: black; box-shadow: 0 4px 20px rgba(255, 193, 7, 0.3); cursor: pointer; transition: 0.2s; z-index: 50; }
.fab-main:hover { transform: translateX(-50%) scale(1.1); }
.fab-main:active { transform: translateX(-50%) scale(0.9); }

.view-nav { padding: 10px 20px 20px; display: flex; align-items: center; gap: 16px; }
.back-btn { cursor: pointer; padding: 8px; margin-left: -8px; border-radius: 50%; transition: background 0.2s; }
.back-btn:hover { background: rgba(255,255,255,0.1); }
.view-title { font-weight: 700; font-size: 1.1rem; }

.signal-list { display: flex; flex-direction: column; gap: 12px; padding-bottom: 80px; }
.signal-item { display: flex; gap: 12px; background: #1C1C1E; padding: 10px; border-radius: 12px; border: 1px solid #333; cursor: pointer; transition: 0.2s; }
.signal-item:active { transform: scale(0.98); }
.signal-item img { width: 60px; height: 60px; object-fit: cover; border-radius: 8px; }
.signal-info { display: flex; flex-direction: column; justify-content: center; width: 100%; }
.signal-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.plate-badge { background: #333; padding: 2px 6px; border-radius: 4px; font-family: var(--font-mono); font-size: 0.8rem; }
.status-text { font-size: 0.75rem; font-weight: 700; }
.status-text.approved { color: #34C759; }
.status-text.pending { color: #FFC107; }
.signal-date { font-size: 0.75rem; color: #888; }

.map-container { flex: 1; background: #1a2332; position: relative; margin: 0 16px 16px; border-radius: 16px; border: 1px solid #333; overflow: hidden; z-index: 1; }

.report-preview { height: 200px; background: #222; margin: 0 16px 20px; border-radius: 16px; overflow: hidden; border: 1px solid #333; }
.report-preview img { width: 100%; height: 100%; object-fit: cover; }
.report-preview.large { height: 260px; }
.report-form { padding: 0 16px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 0.75rem; color: var(--text-muted); margin-bottom: 6px; }
input { width: 100%; background: #1C1C1E; border: 1px solid #333; color: white; padding: 12px; border-radius: 10px; font-family: var(--font-mono); font-size: 1rem; }
.fake-input { width: 100%; background: #1C1C1E; border: 1px solid #333; color: var(--text-muted); padding: 12px; border-radius: 10px; font-size: 0.9rem; }
.btn-submit { width: 100%; background: white; color: black; border: none; padding: 14px; border-radius: 12px; font-weight: 700; font-size: 1rem; cursor: pointer; margin-top: 10px; transition: 0.1s; }
.btn-submit:active { transform: scale(0.98); opacity: 0.8; }

.viewer-meta { margin-bottom: 20px; }
.viewer-meta h3 { font-family: var(--font-mono); font-size: 1.5rem; margin-bottom: 4px; }
.viewer-meta p { font-size: 0.8rem; color: #888; }
.viewer-stats { display: flex; justify-content: space-between; background: #1C1C1E; padding: 16px; border-radius: 12px; border: 1px solid #333; }
.stat-box { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 0.8rem; color: #aaa; }
.stat-box span:first-child { color: white; font-size: 1.2rem; }

.ach-list { display: flex; flex-direction: column; gap: 12px; padding-bottom: 20px; }
.ach-card { display: flex; align-items: center; gap: 16px; background: #1C1C1E; padding: 16px; border-radius: 16px; border: 1px solid #333; transition: 0.2s; position: relative; overflow: hidden; }
.ach-card:active { transform: scale(0.98); }
.ach-card.locked { opacity: 0.7; }
.ach-icon-box { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; font-size: 24px; background: rgba(255,255,255,0.05); color: #666; transition: 0.3s; flex-shrink: 0; }
.ach-card.unlocked .ach-icon-box { background: rgba(52, 199, 89, 0.2); color: #34C759; box-shadow: 0 0 15px rgba(52, 199, 89, 0.2); }
.ach-text { flex: 1; }
.ach-text h4 { margin: 0 0 4px 0; font-size: 0.95rem; font-weight: 700; }
.ach-text p { margin: 0; font-size: 0.75rem; color: #888; }
.ach-progress-bg { height: 4px; background: #333; border-radius: 2px; margin-top: 10px; width: 100%; position: relative; overflow: hidden; }
.ach-progress-fill { height: 100%; background: #34C759; width: 0%; transition: width 1s ease; }
.ach-check { opacity: 0; transition: 0.3s; color: #34C759; }
.ach-card.unlocked .ach-check { opacity: 1; }

.lb-list { display: flex; flex-direction: column; gap: 10px; padding-bottom: 20px; }
.lb-card { display: flex; align-items: center; gap: 12px; background: #1C1C1E; padding: 12px 16px; border-radius: 14px; border: 1px solid #333; transition: 0.2s; }
.lb-card:active { transform: scale(0.98); }
.lb-rank { font-family: var(--font-mono); font-weight: 800; width: 24px; text-align: center; color: #666; font-size: 0.9rem; }

.lb-card.top-1 { border-color: rgba(255, 215, 0, 0.3); background: linear-gradient(90deg, rgba(255, 215, 0, 0.1), rgba(28, 28, 30, 0)); }
.lb-card.top-1 .lb-rank { color: #FFD700; font-size: 1.2rem; text-shadow: 0 0 10px rgba(255, 215, 0, 0.4); }
.lb-card.top-2 .lb-rank { color: #C0C0C0; font-size: 1.1rem; }
.lb-card.top-3 .lb-rank { color: #CD7F32; font-size: 1.1rem; }

.lb-avatar { width: 40px; height: 40px; border-radius: 50%; background: #333; display: grid; place-items: center; font-weight: 700; color: white; font-size: 0.9rem; position: relative; }
.lb-avatar::after { content: ''; position: absolute; bottom: 0; right: 0; width: 10px; height: 10px; background: #34C759; border-radius: 50%; border: 2px solid #1C1C1E; }
.lb-info { flex: 1; }
.lb-name { font-weight: 600; font-size: 0.9rem; margin-bottom: 2px; }
.lb-region { font-size: 0.7rem; color: #888; }
.lb-score { font-family: var(--font-mono); font-weight: 700; color: var(--primary); text-align: right; font-size: 0.95rem; }

.stat-card { background: #1C1C1E; border-radius: 12px; padding: 16px; margin-bottom: 12px; border: 1px solid #333; }
.stat-header { font-size: 0.9rem; color: #888; margin-bottom: 8px; }
.stat-value { font-size: 1.8rem; font-weight: 800; color: #00BCD4; }
.chart-container { display: flex; align-items: flex-end; gap: 8px; height: 120px; margin-top: 20px; padding-bottom: 10px; border-bottom: 1px solid #333; }
.chart-bar { flex: 1; background: #333; border-radius: 4px 4px 0 0; position: relative; transition: height 0.5s ease; }
.chart-bar.active { background: #00BCD4; }
.bar-label { position: absolute; bottom: -20px; left: 50%; transform: translateX(-50%); font-size: 0.7rem; color: #888; }

.secret-wrapper { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 80%; padding: 20px; text-align: center; }
.secret-lock-icon { font-size: 64px; color: var(--accent-red); margin-bottom: 20px; }
.secret-lock-icon span { font-size: 64px; }
.secret-pin-dots { display: flex; gap: 12px; margin: 30px 0; }
.secret-pin-dots span { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #555; transition: 0.2s; }
.secret-pin-dots span.filled { background: white; border-color: white; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; width: 100%; max-width: 280px; }
.key { aspect-ratio: 1; background: rgba(255,255,255,0.1); border-radius: 50%; display: grid; place-items: center; font-size: 1.5rem; font-weight: 600; cursor: pointer; transition: 0.1s; }
.key:active { background: rgba(255,255,255,0.3); }

.shake { 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); } }

.loading-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.8); backdrop-filter: blur(5px); z-index: 90; display: flex; justify-content: center; align-items: center; opacity: 0; pointer-events: none; transition: 0.2s; }
.loading-overlay.active { opacity: 1; pointer-events: all; }
.spinner { width: 40px; height: 40px; border: 4px solid rgba(255,255,255,0.1); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.camera-flash { position: absolute; inset: 0; background: white; z-index: 80; opacity: 0; pointer-events: none; transition: opacity 0.1s; }
.camera-flash.flash-active { opacity: 1; }

.success-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.9); display: flex; flex-direction: column; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: 0.3s; z-index: 100; }
.success-overlay.show { opacity: 1; pointer-events: all; }
.success-circle { width: 80px; height: 80px; background: #34C759; border-radius: 50%; display: grid; place-items: center; font-size: 40px; margin-bottom: 20px; box-shadow: 0 0 30px rgba(52, 199, 89, 0.4); transform: scale(0); transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.success-overlay.show .success-circle { transform: scale(1); }

.section-features { padding: 100px 0; border-top: 1px solid rgba(255,255,255,0.05); }
.section-title { font-size: 2.5rem; text-align: center; margin-bottom: 60px; font-weight: 800; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; }
.feature-card { background: var(--surface-light); padding: 30px; border-radius: 24px; border: 1px solid rgba(255,255,255,0.05); transition: 0.3s; }
.feature-card:hover { transform: translateY(-10px); border-color: rgba(255,255,255,0.1); }
.f-icon { width: 50px; height: 50px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 20px; }
.f-icon.red { background: rgba(255,59,48,0.1); color: var(--accent-red); }
.f-icon.amber { background: rgba(255,193,7,0.1); color: var(--primary); }
.f-icon.cyan { background: rgba(0,188,212,0.1); color: #00BCD4; }
.feature-card h3 { margin-bottom: 10px; font-size: 1.2rem; }
.feature-card p { color: var(--text-muted); line-height: 1.5; font-size: 0.95rem; }

.section-download { padding: 80px 0; text-align: center; }
.download-box { background: linear-gradient(180deg, var(--surface-light), black); padding: 60px 20px; border-radius: 32px; border: 1px solid rgba(255,255,255,0.1); max-width: 800px; margin: 0 auto; }
.download-box h2 { font-size: 2rem; margin-bottom: 30px; font-weight: 800; }
.store-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.btn-store { background: white; color: black; border: none; padding: 12px 24px; border-radius: 50px; font-weight: 700; cursor: pointer; transition: 0.2s; font-size: 1rem; }
.btn-store:hover { transform: scale(1.05); background: var(--primary); }

footer { padding: 40px 0 100px; border-top: 1px solid rgba(255,255,255,0.05); text-align: center; color: var(--text-muted); font-size: 0.9rem; }
.phone-hint { text-align: center; margin-top: 20px; color: var(--text-muted); font-size: 0.9rem; animation: bounce 2s infinite; }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

.footer-content { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.footer-links { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.footer-links a { color: var(--text-muted); text-decoration: none; font-size: 0.85rem; font-weight: 600; transition: color 0.2s; }
.footer-links a:hover { color: white; text-decoration: underline; }
.sep { color: #333; font-size: 0.8rem; }

@media (max-width: 900px) {
    .hero { height: auto; padding-top: 100px; padding-bottom: 40px; }
    .hero-layout { grid-template-columns: 1fr; text-align: center; gap: 40px; }
    .hero-text { display: flex; flex-direction: column; align-items: center; }
    h1 { font-size: 2.8rem; }
    .hero-phone { margin-top: 20px; }
    .phone-case { transform: rotateY(0) rotateX(0); box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
    .phone-wrapper { transform: scale(1); }
    
    .nav-links {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: rgba(0, 0, 0, 0.9);
        backdrop-filter: blur(20px);
        display: flex;
        justify-content: space-around;
        padding: 12px 10px 24px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        gap: 0;
        z-index: 1000;
    }
    
    .nav-links a {
        font-size: 0.7rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        text-align: center;
        flex: 1;
    }
    
    .btn-nav {
        background: var(--primary) !important;
        padding: 6px 12px !important;
        border-radius: 8px !important;
    }

    .nav-fb, .nav-support { margin: 0; }
}

@media (max-width: 400px) {
    .phone-wrapper { transform: scale(0.85); transform-origin: top center; margin-bottom: -80px; }
    h1 { font-size: 2.2rem; }
    .btn-primary-hero, .btn-secondary-hero { padding: 12px 20px; font-size: 0.9rem; }
}