/* ==========================================================================
   FingerScan — Premium SaaS Theme
   Strong, Modern, High-Contrast UI
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;700&display=swap');

:root {
    --bg-base: #02040a;
    --bg-surface: #0d1117;
    --bg-card: rgba(22, 27, 34, 0.6);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.2);
    
    --text-main: #e6edf3;
    --text-muted: #7d8590;
    
    --accent: #3b82f6;
    --accent-glow: rgba(59, 130, 246, 0.5);
    
    --green: #10b981;
    --green-glow: rgba(16, 185, 129, 0.3);
    
    --red: #ef4444;
    --red-glow: rgba(239, 68, 68, 0.3);
    
    --orange: #f97316;
    --indigo: #6366f1;
    
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.5);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.5);
    --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.15);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
    background-color: var(--bg-base);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Background Gradients */
.bg-gradient-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    z-index: -1;
    background: 
        radial-gradient(circle at 15% 10%, rgba(59, 130, 246, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 85% 90%, rgba(99, 102, 241, 0.05) 0%, transparent 40%);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ════════════ HEADER ════════════ */
.main-header {
    background: rgba(13, 17, 23, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #fff;
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.5px;
}
.brand span span { color: var(--accent); }
.brand-icon {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--accent), var(--indigo));
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow-glow);
}
.brand-icon svg { width: 20px; height: 20px; color: #fff; }

.nav-links {
    display: flex; gap: 24px;
}
.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}
.nav-links a:hover { color: #fff; }

.nav-actions {
    display: flex; align-items: center; gap: 16px;
}
.lang-select {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    outline: none;
    font-family: var(--font-sans);
    cursor: pointer;
    font-size: 0.85rem;
}
.lang-select option { background: var(--bg-surface); }

.btn-primary {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--text-main);
    color: var(--bg-base);
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255,255,255,0.2);
}
.btn-primary svg { width: 16px; height: 16px; }

/* ════════════ HERO SECTION ════════════ */
.hero-section {
    padding: 80px 0 60px;
    text-align: center;
    position: relative;
}
.hero-badge {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 24px;
    text-transform: uppercase;
}
.hero-content h1 {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 40px;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-ip-card {
    position: relative;
    display: inline-block;
    cursor: pointer;
    padding: 30px 60px;
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.4) 0%, rgba(15, 23, 42, 0.4) 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), var(--shadow-md);
    transition: border-color 0.3s, transform 0.3s;
}
.hero-ip-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}
.hero-ip-pulse {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 100%; height: 100%;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 0;
    pointer-events: none;
}
.hero-ip-card:hover .hero-ip-pulse { opacity: 0.3; }

.ip-display {
    position: relative;
    z-index: 1;
    font-family: var(--font-mono);
    font-size: 3.5rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -2px;
    line-height: 1;
    margin-bottom: 12px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}
.hero-sub {
    position: relative;
    z-index: 1;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
}

/* ════════════ MAIN DASHBOARD GRID ════════════ */
.dashboard-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 40px;
}
.tool-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
}
.tool-head {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255,255,255,0.02);
}
.tool-head h3, .tool-head h4 {
    display: flex; align-items: center; gap: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
}
.head-icon, .card-icon svg {
    width: 20px; height: 20px;
    color: var(--accent);
}

.tool-body {
    padding: 24px;
}

/* Geo Layout */
.geo-layout {
    display: flex;
    flex-direction: column;
}
.geo-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 20px 24px;
    gap: 20px;
    border-bottom: 1px solid var(--border-color);
}
.info-item { display: flex; flex-direction: column; gap: 4px; }
.info-item label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-weight: 600;
}
.info-item span {
    font-size: 1.05rem;
    font-weight: 500;
    color: #fff;
}
.map-container {
    height: 300px;
    width: 100%;
    background: #000;
}

/* Privacy Score */
.privacy-wrap {
    padding: 30px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.score-circle {
    position: relative;
    width: 180px; height: 180px;
    margin-bottom: 30px;
}
.score-circle svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.score-circle circle {
    fill: none; stroke-width: 8;
}
.score-circle .track { stroke: rgba(255,255,255,0.05); }
.score-circle .fill {
    stroke: var(--green);
    stroke-linecap: round;
    transition: stroke-dashoffset 1s cubic-bezier(0.4, 0, 0.2, 1);
}
.score-data {
    position: absolute;
    top: 50%; left: 50%; transform: translate(-50%, -50%);
    text-align: center;
}
.score-val {
    display: block;
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
    color: #fff;
}
.score-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-muted);
}
.priv-indicators {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 20px;
}
.priv-item {
    display: flex; align-items: center; gap: 10px;
    font-size: 0.85rem;
    font-weight: 500;
}
.priv-dot {
    width: 10px; height: 10px; border-radius: 50%;
}
.priv-dot.good { background: var(--green); box-shadow: 0 0 8px var(--green-glow); }
.priv-dot.bad { background: var(--red); box-shadow: 0 0 8px var(--red-glow); }
.priv-dot.na { background: var(--text-muted); }

/* ════════════ TOOLS TABS ════════════ */
.tools-section { margin-bottom: 60px; }
.tabs-nav {
    display: flex;
    background: rgba(255,255,255,0.03);
    padding: 6px;
    border-radius: 12px;
    width: fit-content;
    margin: 0 auto 30px;
    border: 1px solid var(--border-color);
}
.tab-btn {
    display: flex; align-items: center; gap: 8px;
    background: transparent; border: none;
    color: var(--text-muted);
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 0.95rem; font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.tab-btn svg { width: 18px; height: 18px; }
.tab-btn:hover { color: #fff; }
.tab-btn.active {
    background: var(--bg-surface);
    color: #fff;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(255,255,255,0.1);
}

.tab-pane { display: none; animation: fadeIn 0.3s ease; }
.tab-pane.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

.tools-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}
.full-width { grid-column: 1 / -1; }

.btn-tool {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.85rem; font-weight: 600;
    cursor: pointer; transition: 0.2s;
}
.btn-tool:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2); }
.btn-tool.loading { opacity: 0.7; pointer-events: none; }

/* Fingerprint Grid */
.fp-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
.fp-tile {
    background: rgba(0,0,0,0.2); padding: 16px; border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.03);
}
.fp-tile-label { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 4px; text-transform: uppercase; font-weight: 600;}
.fp-tile-value { font-family: var(--font-mono); font-size: 0.9rem; color: #fff; word-break: break-all;}

/* Inputs & Utilities */
.fs-input {
    width: 100%;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 12px 16px;
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}
.fs-input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-glow); }

.placeholder-text {
    color: var(--text-muted); font-size: 0.9rem;
}
.table-scroll { overflow-x: auto; }
.data-table {
    width: 100%; border-collapse: collapse; font-size: 0.85rem;
}
.data-table td, .data-table th {
    padding: 12px; border-bottom: 1px solid rgba(255,255,255,0.05); text-align: left;
}
.data-table th { color: var(--text-muted); font-weight: 600; }
.mono { font-family: var(--font-mono); color: var(--accent); }

/* Status Boxes */
.status-box {
    display: flex; align-items: center; gap: 16px; padding: 16px;
    border-radius: 8px; margin-bottom: 16px;
    background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.05);
}
.status-box.safe { border-color: var(--green); background: rgba(16,185,129,0.05); }
.status-box.leak { border-color: var(--red); background: rgba(239,68,68,0.05); }
.status-icon { font-size: 1.5rem; }
.status-text { font-weight: 600; color: #fff; }

/* Utilities Grid */
.util-grid {
    display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; padding: 24px;
}
.util-item {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px; padding: 24px 10px;
    color: var(--text-muted); text-decoration: none;
    transition: all 0.2s;
}
.util-item:hover {
    background: rgba(59,130,246,0.1); border-color: var(--accent); color: var(--accent);
    transform: translateY(-2px);
}
.util-item span { font-size: 0.85rem; font-weight: 600; margin-top: 8px; }

/* Speed Nodes */
.speed-dashboard { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; text-align: center; }
.speed-node { background: rgba(0,0,0,0.2); border-radius: 8px; padding: 20px; border: 1px solid rgba(255,255,255,0.03); }
.node-label { color: var(--text-muted); font-size: 0.85rem; text-transform: uppercase; font-weight: 700; margin-bottom: 8px; }
.node-value { font-size: 2rem; font-weight: 800; color: #fff; }
.node-value small { font-size: 1rem; font-weight: 500; color: var(--text-muted); }

/* DNS Rounds */
.dns-rounds-visual { margin-bottom: 16px; }
.dns-round-row { display: flex; align-items: center; padding: 6px 0; border-bottom: 1px dashed rgba(255,255,255,0.05); font-size: 0.85rem;}
.rnd-label { width: 80px; color: var(--text-muted); }
.rnd-progress { flex: 1; display: flex; gap: 4px; }
.rnd-progress span { width: 12px; height: 12px; border-radius: 2px; background: rgba(255,255,255,0.1); }
.rnd-progress span.done { background: var(--accent); }
.rnd-servers { width: 120px; text-align: right; color: #fff; font-family: var(--font-mono);}

/* Footer */
.main-footer {
    margin-top: auto;
    border-top: 1px solid var(--border-color);
    padding: 40px 0;
    background: rgba(13, 17, 23, 0.8);
}
.footer-content { display: flex; justify-content: space-between; align-items: center; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; color: #fff;}
.footer-brand span span { color: var(--accent); }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--text-muted); text-decoration: none; font-size: 0.9rem; }
.footer-links a:hover { color: #fff; }
.footer-copy { color: var(--text-muted); font-size: 0.85rem; }

/* OVERLAY */
#scan-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(2, 4, 10, 0.95);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    z-index: 9999;
    display: none; align-items: center; justify-content: center;
}
#scan-overlay.active { display: flex; }
.scan-modal { text-align: center; max-width: 400px; width: 90%; }
.scan-visuals { position: relative; width: 120px; height: 120px; margin: 0 auto 30px; }
.scan-ring-outer { position: absolute; top:0; left:0; right:0; bottom:0; border: 2px dashed rgba(59,130,246,0.3); border-radius: 50%; animation: spin 8s linear infinite; }
.scan-ring-inner { position: absolute; top:10px; left:10px; right:10px; bottom:10px; border: 2px solid rgba(59,130,246,0.5); border-radius: 50%; border-top-color: transparent; animation: spin 2s linear infinite reverse; }
.scan-core { position: absolute; top:30px; left:30px; right:30px; bottom:30px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 30px var(--accent-glow); animation: pulse 1.5s ease-in-out infinite alternate; }
@keyframes spin { 100% { transform: rotate(360deg); } }
@keyframes pulse { 0% { transform: scale(0.9); opacity: 0.8; } 100% { transform: scale(1.1); opacity: 1; } }

.scan-content h2 { font-size: 1.5rem; color: #fff; margin-bottom: 8px; }
.scan-content p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 30px; }
.scan-progress-container { width: 100%; height: 6px; background: rgba(255,255,255,0.1); border-radius: 3px; overflow: hidden; position: relative; margin-bottom: 20px;}
.scan-progress-bar { height: 100%; background: var(--accent); width: 0%; box-shadow: 0 0 10px var(--accent); }
.scan-percentage { position: absolute; top: -25px; right: 0; font-size: 0.8rem; font-weight: 700; color: #fff; }

.scan-steps { text-align: left; font-size: 0.85rem; color: var(--text-muted); display: flex; flex-direction: column; gap: 8px;}
.scan-step { display: flex; align-items: center; gap: 10px; opacity: 0.5; transition: 0.3s; }
.scan-step.active { opacity: 1; color: #fff; }
.scan-step.done { opacity: 0.7; color: var(--green); }
.scan-step-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

/* Responsive adjustments */
@media(max-width: 992px) {
    .dashboard-layout { grid-template-columns: 1fr; }
    .geo-grid { grid-template-columns: repeat(2, 1fr); }
    .util-grid { grid-template-columns: repeat(3, 1fr); }
    .tools-grid { grid-template-columns: 1fr; }
}
@media(max-width: 768px) {
    .hero-content h1 { font-size: 2.2rem; }
    .ip-display { font-size: 2.5rem; }
    .tabs-nav { flex-wrap: wrap; justify-content: center; }
    .util-grid { grid-template-columns: repeat(2, 1fr); }
    .speed-dashboard { grid-template-columns: 1fr; }
    .footer-content { flex-direction: column; gap: 20px; text-align: center; }
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.badge-green { background: rgba(16, 185, 129, 0.1); color: var(--green); border: 1px solid rgba(16, 185, 129, 0.2); }
.badge-red { background: rgba(239, 68, 68, 0.1); color: var(--red); border: 1px solid rgba(239, 68, 68, 0.2); }
.badge-orange { background: rgba(249, 115, 22, 0.1); color: var(--orange); border: 1px solid rgba(249, 115, 22, 0.2); }
.badge-blue { background: rgba(59, 130, 246, 0.1); color: var(--accent); border: 1px solid rgba(59, 130, 246, 0.2); }

/* DNS Pending Status */
.dns-status.pending, .status-box.pending {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}
