:root {
    /* Color Palette - Default Dark */
    --bg-color: #050508;
    --text-primary: #ffffff;
    --text-secondary: #656d76;
    --accent-color: #4a90e2;
    --accent-glow: rgba(74, 144, 226, 0.15);
    --panel-bg: rgba(20, 20, 25, 0.4);
    --panel-border: rgba(255, 255, 255, 0.05);
    
    /* Status Colors */
    --success: #2ea043;
    --warning: #d29922;
    --danger: #f85149;

    --font-primary: 'Outfit', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --transition-speed: 0.3s;
}

[data-theme="light"] {
    --bg-color: #f0f2f5;
    --text-primary: #1a1a1a;
    --text-secondary: #656d76;
    --accent-color: #0969da;
    --accent-glow: rgba(9, 105, 218, 0.15);
    --panel-bg: rgba(255, 255, 255, 0.6);
    --panel-border: rgba(0, 0, 0, 0.05);
}

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

body {
    font-family: var(--font-primary);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color var(--transition-speed), color var(--transition-speed);
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Premium Animations */
.animate-fade-in { opacity: 0; animation: fadeIn 1.5s ease-out forwards; }
.animate-slide-up { opacity: 0; transform: translateY(40px); animation: slideUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards; }

.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }

@keyframes fadeIn { to { opacity: 1; } }
@keyframes slideUp { to { opacity: 1; transform: translateY(0); } }

/* Premium Navigation */
.premium-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 4rem;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
}

.premium-logo {
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.3rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: rgba(255, 255, 255, 0.8);
}

.premium-nav-right { display: flex; align-items: center; gap: 1rem; }

.nav-btn {
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.7);
    padding: 0.5rem 1.2rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15rem;
    text-decoration: none;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.nav-btn.active, .nav-btn:hover {
    color: #fff; border-color: rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .nav-btn { border-color: rgba(0, 0, 0, 0.1); color: rgba(0, 0, 0, 0.6); }
[data-theme="light"] .nav-btn.active, [data-theme="light"] .nav-btn:hover {
    color: #000; border-color: rgba(0, 0, 0, 0.3); background: rgba(0, 0, 0, 0.05);
}

.icon-btn {
    background: transparent; border: 1px solid rgba(255, 255, 255, 0.1); color: rgba(255, 255, 255, 0.7);
    width: 36px; height: 36px; border-radius: 4px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.3s ease;
}

.icon-btn:hover { color: #fff; border-color: rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.08); }
[data-theme="light"] .icon-btn { border-color: rgba(0, 0, 0, 0.1); color: rgba(0, 0, 0, 0.7); }
[data-theme="light"] .icon-btn:hover { color: #000; border-color: rgba(0, 0, 0, 0.3); background: rgba(0, 0, 0, 0.05); }

[data-theme="dark"] .dark-icon { display: none; }
[data-theme="light"] .light-icon { display: none; }
[data-theme="light"] .premium-logo { color: rgba(0, 0, 0, 0.8); }


/* ─── NEW SCROLL NARRATIVE STYLES ───────────────────────────────────────── */

.landing-body {
    overflow-y: auto; /* Allow scrolling */
    scroll-behavior: smooth;
}

/* Map background layer, fixed behind everything. Invisible by default. */
.map-bg-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.map-bg-layer.is-visible {
    opacity: 1;
}

#world-map-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* Scroll Containers and Sections */
.scroll-container {
    position: relative;
    z-index: 10;
    width: 100%;
}

.scroll-section {
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 2rem;
}

/* Hero Section */
/* Hero Section SVG Text */
.hero-svg-text {
    font-size: clamp(4rem, 12vw, 12rem);
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-weight: 900;
    fill: transparent;
}

/* Base outline with drawing animation */
.base-stroke {
    stroke: rgba(255, 255, 255, 0.15);
    stroke-width: 2px;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawStroke 4s ease-in-out forwards;
}
[data-theme="light"] .base-stroke {
    stroke: rgba(0, 0, 0, 0.15);
}

@keyframes drawStroke {
    0% { stroke-dashoffset: 1000; }
    100% { stroke-dashoffset: 0; }
}

/* Bright glowing stroke revealed by mask */
.hover-stroke {
    stroke: #4a90e2; /* The glowing color */
    stroke-width: 3px;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Global Threats Section */
#section-threats {
    justify-content: flex-end;
    padding-bottom: 8vh;
}

.threats-content {
    text-align: center;
    max-width: 800px;
}

.threats-heading {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #fff 0%, #a0a0a0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
[data-theme="light"] .threats-heading {
    background: linear-gradient(135deg, #000 0%, #555 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.threats-sub {
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    margin-bottom: 4rem;
}

.live-stats-row {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.stat-pill {
    display: flex; align-items: center; gap: 0.8rem;
    background: rgba(0, 0, 0, 0.35); backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.07); border-radius: 50px;
    padding: 0.6rem 1.5rem; font-family: var(--font-mono); font-size: 0.8rem;
}
[data-theme="light"] .stat-pill {
    background: rgba(255, 255, 255, 0.5); border-color: rgba(0, 0, 0, 0.08);
}

.stat-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.pulse-red { background: #f85149; box-shadow: 0 0 6px #f85149; animation: pulse-dot 1.5s infinite; }
.pulse-orange { background: #d29922; box-shadow: 0 0 6px #d29922; animation: pulse-dot 2s infinite; }
.pulse-blue { background: #4a90e2; box-shadow: 0 0 6px #4a90e2; animation: pulse-dot 2.5s infinite; }

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.4; transform: scale(0.7); }
}

.stat-label { color: rgba(255, 255, 255, 0.4); letter-spacing: 0.1rem; font-size: 0.7rem; }
[data-theme="light"] .stat-label { color: rgba(0, 0, 0, 0.4); }
.stat-num { color: rgba(255, 255, 255, 0.9); font-weight: 700; font-size: 0.9rem; }
[data-theme="light"] .stat-num { color: rgba(0, 0, 0, 0.8); }


/* CTA Section */
#section-cta {
    background: radial-gradient(circle at center, rgba(74, 144, 226, 0.05) 0%, transparent 70%);
}
[data-theme="light"] #section-cta {
    background: radial-gradient(circle at center, rgba(9, 105, 218, 0.05) 0%, transparent 70%);
}

.cta-content {
    text-align: center;
}

.cta-heading {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 2rem;
}

.cta-massive-btn {
    font-size: 1.2rem;
    padding: 1rem 3rem;
    border-radius: 50px;
    letter-spacing: 0.1rem;
    text-transform: uppercase;
    box-shadow: 0 10px 30px var(--accent-glow);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.cta-massive-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px var(--accent-glow);
}

/* Intersection Observer Animations */
.hidden-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease-out, transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.hidden-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}


/* Internal Pages Navbar */
.navbar { display: flex; justify-content: space-between; align-items: center; padding: 1.5rem 5%; border-bottom: 1px solid var(--panel-border); background: rgba(var(--bg-color), 0.8); backdrop-filter: blur(10px); }
.logo { font-size: 1.5rem; font-weight: 800; display: flex; align-items: center; gap: 0.5rem; color: var(--text-primary); }
.nav-links a { color: var(--text-secondary); text-decoration: none; margin-left: 2rem; font-weight: 600; transition: color 0.2s; }
.nav-links a:hover { color: var(--text-primary); }

/* General Tools Layout */
.tools-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; padding: 2rem 5%; }
.tool-card { display: flex; flex-direction: column; gap: 1rem; transition: transform 0.3s ease; }
.tool-card:hover { transform: translateY(-5px); box-shadow: 0 10px 40px rgba(0,0,0,0.2); }
.glass-panel { background: var(--panel-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--panel-border); border-radius: 16px; padding: 2.5rem; }
.btn { padding: 0.8rem 1.5rem; border-radius: 8px; border: none; font-weight: 600; font-size: 1rem; cursor: pointer; transition: all 0.3s ease; font-family: inherit; text-decoration: none; display: inline-block; }
.primary-btn { background: var(--accent-color); color: #fff; box-shadow: 0 0 15px var(--accent-glow); }
.primary-btn:hover { transform: translateY(-2px); box-shadow: 0 0 25px var(--accent-glow); }
.secondary-btn { background: transparent; color: var(--text-primary); border: 1px solid var(--panel-border); }
input { width: 100%; padding: 1rem; border-radius: 8px; border: 1px solid var(--panel-border); background: rgba(0,0,0,0.2); color: var(--text-primary); font-family: var(--font-primary); font-size: 1rem; transition: border-color 0.3s; }
[data-theme="light"] input { background: rgba(255,255,255,0.5); }
input:focus { outline: none; border-color: var(--accent-color); }
.tool-icon { font-size: 2rem; color: var(--accent-color); margin-bottom: 0.5rem; }
.tool-input-group { display: flex; gap: 0.5rem; position: relative; }
.tool-input-group .icon-btn { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); }
.hidden { display: none !important; }
.tool-result { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--panel-border); animation: fadeIn 0.5s ease; }

/* Circular Chart */
.score-ring { width: 120px; height: 120px; margin: 0 auto 1rem; }
.circular-chart { display: block; margin: 0 auto; max-width: 80%; max-height: 250px; }
.circle-bg { fill: none; stroke: var(--panel-border); stroke-width: 3.8; }
.circle { fill: none; stroke-width: 3.8; stroke-linecap: round; transition: stroke-dasharray 1s ease-out; }
.percentage { fill: var(--text-primary); font-family: var(--font-primary); font-size: 0.5em; text-anchor: middle; font-weight: bold; }

/* Password Meter */
.pw-strength-meter { height: 8px; background: var(--panel-border); border-radius: 4px; margin-top: 1rem; overflow: hidden; }
.pw-bar { height: 100%; width: 0%; transition: width 0.3s, background-color 0.3s; }
.stat-box { display: flex; justify-content: space-between; align-items: center; background: rgba(0,0,0,0.2); padding: 1rem; border-radius: 8px; margin-bottom: 1rem; font-family: var(--font-mono); }
[data-theme="light"] .stat-box { background: rgba(0,0,0,0.05); }
.stat-value { color: var(--accent-color); font-weight: bold; }

/* Privacy Quiz */
.quiz-progress { height: 6px; background: var(--panel-border); border-radius: 3px; margin-bottom: 2rem; }
.progress-bar { height: 100%; background: var(--accent-color); width: 0%; transition: width 0.3s; }
.quiz-option { padding: 1rem; background: transparent; border: 1px solid var(--panel-border); border-radius: 8px; cursor: pointer; text-align: left; transition: all 0.2s; font-family: inherit; color: var(--text-primary); font-size: 1rem; }
.quiz-option:hover { border-color: var(--accent-color); background: var(--accent-glow); }
.score-display { font-size: 3rem; font-weight: 800; text-align: center; color: var(--accent-color); margin-bottom: 1rem; }
.score-max { font-size: 1.5rem; color: var(--text-secondary); }
.report-content { margin: 1.5rem 0; padding: 1.5rem; background: rgba(0,0,0,0.2); border-radius: 8px; border-left: 4px solid var(--accent-color); }
[data-theme="light"] .report-content { background: rgba(0,0,0,0.05); }

/* ─── WORKSPACE DASHBOARD UPGRADES ─────────────────────────────────────── */

/* Dashboard Layout */
.dashboard-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 900px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
    }
}

/* Security Tip Ticker */
.ticker-wrap {
    width: 100%;
    overflow: hidden;
    background-color: var(--accent-glow);
    border-bottom: 1px solid var(--panel-border);
    padding: 8px 0;
    box-sizing: border-box;
}

.ticker {
    display: inline-block;
    white-space: nowrap;
    padding-right: 100%;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
    animation-name: ticker;
    animation-duration: 25s;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent-color);
    font-weight: 600;
}

@keyframes ticker {
    0% { transform: translate3d(100%, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

/* Live Terminal Log */
.terminal-log {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: #4ade80; /* Hacker Green */
    height: 250px;
    overflow-y: hidden;
    position: relative;
    box-shadow: inset 0 0 15px rgba(0,0,0,0.8);
    margin-bottom: 2rem;
}
[data-theme="light"] .terminal-log {
    background: rgba(0, 0, 0, 0.85); /* Keep it dark */
}

.terminal-header {
    color: rgba(255,255,255,0.4);
    font-size: 0.7rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 8px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
}

.terminal-content {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: calc(100% - 30px);
}

.terminal-line {
    margin-bottom: 4px;
    opacity: 0;
    transform: translateY(10px);
    animation: terminalLineIn 0.2s ease forwards;
}
@keyframes terminalLineIn {
    to { opacity: 0.8; transform: translateY(0); }
}

/* How It Works Section */
.how-it-works {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    padding: 1.5rem;
}

.how-it-works h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
    border-bottom: 1px solid var(--panel-border);
    padding-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.how-it-works h4 {
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
    margin-top: 1.2rem;
}

.how-it-works p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}
