/* ============================================
   CITIZENAPP LANDING PAGE
   Ocean & Lagoon Theme - Evenly Distributed
   ============================================ */

:root {
    --bg-primary: #D5EEF5;
    --bg-secondary: #C8E6EF;
    --bg-card: #E8F4F8;
    --bg-hover: #BFE0EA;
    --text-primary: #1A2F38;
    --text-secondary: #3D5A68;
    --text-muted: #5A7A88;
    --text-inverse: #FFFFFF;
    --border-primary: #A8CED8;
    --accent-primary: #0D9488;
    --accent-secondary: #06B6D4;
    --accent-tertiary: #8B5CF6;
    --accent-gradient: linear-gradient(135deg, #0D9488 0%, #06B6D4 50%, #8B5CF6 100%);
    --stat-security: #0D9488;
    --stat-visitors: #8B5CF6;
    --radar-border: rgba(13, 148, 136, 0.5);
    --radar-glow: rgba(13, 148, 136, 0.3);
    --radar-sweep: rgba(6, 182, 212, 0.7);
    --shadow-sm: 0 2px 8px rgb(0 0 0 / 0.08);
    --shadow-md: 0 4px 16px rgb(0 0 0 / 0.1);
    --shadow-glow: 0 4px 20px rgba(13, 148, 136, 0.15);
    --grid-color: rgba(13, 148, 136, 0.06);
    --blip-low: #22D3EE;
    --blip-medium: #06B6D4;
    --blip-high: #0D9488;
}

[data-theme='dark'] {
    --bg-primary: #0F172A;
    --bg-secondary: #1E293B;
    --bg-card: #1E293B;
    --bg-hover: #334155;
    --text-primary: #F8FAFC;
    --text-secondary: #CBD5E1;
    --text-muted: #94A3B8;
    --text-inverse: #0F172A;
    --border-primary: #334155;
    --accent-primary: #2DD4BF;
    --accent-secondary: #22D3EE;
    --accent-tertiary: #A78BFA;
    --accent-gradient: linear-gradient(135deg, #2DD4BF 0%, #22D3EE 50%, #A78BFA 100%);
    --stat-security: #2DD4BF;
    --stat-visitors: #A78BFA;
    --radar-border: rgba(45, 212, 191, 0.5);
    --radar-glow: rgba(45, 212, 191, 0.3);
    --radar-sweep: rgba(34, 211, 238, 0.7);
    --shadow-sm: 0 2px 8px rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 16px rgb(0 0 0 / 0.4);
    --shadow-glow: 0 4px 24px rgba(45, 212, 191, 0.2);
    --grid-color: rgba(45, 212, 191, 0.04);
    --blip-low: #5EEAD4;
    --blip-medium: #2DD4BF;
    --blip-high: #14B8A6;
}

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

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

/* ============================================
   PAGE CONTAINER - Uniform gap
   ============================================ */
.page-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 15px;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
}

/* ============================================
   HEADER
   ============================================ */
.header {
    text-align: center;
}

h1 {
    font-size: 2.2rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
}

.subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.g4c-brand {
    font-size: 1.3em;
    font-weight: 800;
    background: var(--accent-gradient);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 4s linear infinite;
}

.g4c-four {
    display: inline-block;
    animation: wiggle 2s ease-in-out infinite;
    background: inherit;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes gradientShift {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

@keyframes wiggle {
    0%, 100% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(8deg) scale(1.2); }
}

/* ============================================
   WARNING BOX
   ============================================ */
.warning-box {
    background: var(--bg-card);
    border: 2px solid var(--accent-primary);
    border-radius: 10px;
    padding: 10px 16px;
    box-shadow: var(--shadow-glow);
    text-align: center;
    max-width: 480px;
}

.warning-title {
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.warning-box p {
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

.warning-highlight {
    color: var(--accent-secondary);
    font-weight: 600;
}

/* ============================================
   FEATURES ROW (4 items horizontal)
   ============================================ */
.features-row {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 1100px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    padding: 8px 12px;
    transition: all 0.2s ease;
    flex: 0 1 220px;
}

.feature-item:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

.feature-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.feature-item h3 {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-primary);
    margin-bottom: 2px;
}

.feature-item p {
    font-size: 0.65rem;
    color: var(--text-muted);
    line-height: 1.3;
}

/* ============================================
   RADAR SECTION (Stats | Radar | Stats)
   ============================================ */
.radar-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.stats-column {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 120px;
}

.stat-box {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    padding: 8px 12px;
    text-align: center;
    min-width: 105px;
    box-shadow: var(--shadow-sm);
}

.stat-value {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.stat-security { color: var(--stat-security); }
.stat-visitors { color: var(--stat-visitors); }

.stat-label {
    font-size: 0.6rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Radar */
#radar {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    border: 3px solid var(--radar-border);
    background: var(--bg-card);
    box-shadow: 0 0 40px var(--radar-glow), inset 0 0 40px var(--radar-glow);
    position: relative;
    flex-shrink: 0;
}

#radar::before,
#radar::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 1px solid var(--radar-border);
    opacity: 0.4;
}

#radar::before { width: 66%; height: 66%; }
#radar::after { width: 33%; height: 33%; }

.radar-sweep {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50%;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--radar-sweep));
    transform-origin: left center;
    animation: radarSweep 3s linear infinite;
}

@keyframes radarSweep {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 1px;
    background: var(--radar-border);
    transform: translate(-50%, -50%);
    opacity: 0.3;
}

.crosshair.vertical {
    width: 1px;
    height: 100%;
}

.shield-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 55px;
    animation: pulse 2s ease-in-out infinite;
    filter: drop-shadow(0 0 10px var(--radar-glow));
}

@keyframes pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.1); }
}

/* Blips */
.blip {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    animation: blipPulse 2s ease-in-out infinite;
}

.blip.yellow { background: var(--blip-low); box-shadow: 0 0 12px var(--blip-low); }
.blip.orange { background: var(--blip-medium); box-shadow: 0 0 12px var(--blip-medium); }
.blip.red { background: var(--blip-high); box-shadow: 0 0 12px var(--blip-high); }

@keyframes blipPulse {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.3); }
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    text-align: center;
    font-size: 0.7rem;
    color: var(--text-muted);
    padding-top: 12px;
    border-top: 1px solid var(--border-primary);
    max-width: 600px;
}

.footer p {
    margin-bottom: 4px;
}

.footer a {
    color: var(--accent-primary);
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* ============================================
   SUBTITLE ROW (with controls on each side)
   ============================================ */
.subtitle-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

/* ============================================
   LANGUAGE TOGGLE
   ============================================ */
.lang-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
}

.lang-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.25s ease;
    position: relative;
}

.lang-btn:hover {
    transform: scale(1.1);
}

.lang-btn.active {
    background: transparent;
    border: 2px solid var(--accent-primary);
    box-shadow: 0 0 4px var(--accent-primary), 0 0 8px rgba(45, 212, 191, 0.4);
}

/* ============================================
   THEME TOGGLE
   ============================================ */
.theme-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
}

.theme-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.25s ease;
    position: relative;
}

.theme-btn:hover {
    transform: scale(1.1);
}

.theme-btn.active {
    background: transparent;
    border: 2px solid var(--accent-primary);
    box-shadow: 0 0 4px var(--accent-primary), 0 0 8px rgba(45, 212, 191, 0.4);
}

/* ============================================
   SCANLINE
   ============================================ */
.scanline {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
    animation: scan 4s linear infinite;
    z-index: 100;
    pointer-events: none;
    opacity: 0.4;
}

@keyframes scan {
    0% { transform: translateY(0); }
    100% { transform: translateY(100vh); }
}

/* ============================================
   RESPONSIVE - TABLET
   ============================================ */
@media (max-width: 900px) {
    h1 { font-size: 1.8rem; }
    .subtitle { font-size: 0.85rem; }

    .warning-box { padding: 12px 16px; }
    .warning-title { font-size: 0.8rem; }
    .warning-box p { font-size: 0.75rem; }

    .features-row { gap: 10px; }
    .feature-item {
        flex: 0 1 220px;
        padding: 10px 14px;
    }
    .feature-item h3 { font-size: 0.75rem; }
    .feature-item p { font-size: 0.6rem; }

    .radar-section { gap: 20px; }
    #radar { width: 200px; height: 200px; }
    .shield-icon { font-size: 50px; }
    .stat-box { padding: 10px 14px; min-width: 110px; }
    .stat-value { font-size: 1.4rem; }
}

/* ============================================
   RESPONSIVE - MOBILE
   ============================================ */
@media (max-width: 700px) {
    .page-container {
        padding: 10px;
        justify-content: space-evenly;
        gap: 8px;
        padding-top: 35px;
        min-height: 100vh;
        padding-bottom: 10px;
    }

    h1 { font-size: 1.3rem; }
    .subtitle { font-size: 0.7rem; }

    .warning-box {
        padding: 8px 12px;
        max-width: 100%;
    }
    .warning-title { font-size: 0.7rem; }
    .warning-box p { font-size: 0.65rem; line-height: 1.4; }

    .features-row {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
        width: 100%;
        justify-content: center;
    }

    .feature-item {
        flex: 0 1 calc(50% - 4px);
        padding: 6px 8px;
        gap: 6px;
    }

    .feature-icon { font-size: 1.1rem; }
    .feature-item h3 { font-size: 0.6rem; }
    .feature-item p { font-size: 0.5rem; }

    .radar-section {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
    }

    .stats-column {
        flex-direction: column;
        gap: 6px;
        width: 80px;
    }

    #radar { width: 140px; height: 140px; }
    .shield-icon { font-size: 35px; }

    .stat-box {
        padding: 5px 8px;
        min-width: 70px;
    }
    .stat-value { font-size: 1rem; }
    .stat-label { font-size: 0.45rem; }

    .footer {
        font-size: 0.55rem;
        padding: 8px;
        border-top: none;
    }
    .footer p { margin-bottom: 2px; }

    .subtitle-row {
        gap: 8px;
    }

    .lang-toggle {
        gap: 2px;
    }

    .lang-btn {
        width: 26px;
        height: 26px;
        font-size: 16px;
    }

    .theme-toggle {
        gap: 2px;
    }

    .theme-btn {
        width: 26px;
        height: 26px;
        font-size: 14px;
    }
}

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

    .scanline { display: none; }
}
