/* ============================================
   CapVPN — IP Detector Tool CSS
   Modern 2026 Design
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&family=Syne:wght@400;600;700;800&display=swap');

/* ===== CSS Variables ===== */
:root {
    --bg:        #060810;
    --bg2:       #0c0f1d;
    --bg3:       #111827;
    --border:    rgba(255,255,255,0.07);
    --border2:   rgba(255,255,255,0.12);
    --text:      #e8eaf0;
    --text2:     #8892a4;
    --text3:     #4a5568;
    --accent:    #00e5ff;
    --accent2:   #7c3aed;
    --safe:      #00c9a7;
    --warn:      #f59e0b;
    --danger:    #ef4444;
    --font-head: 'Syne', sans-serif;
    --font-mono: 'Space Mono', monospace;
    --radius:    14px;
    --radius-sm: 8px;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-head);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* ===== Background Effects ===== */
.bg-grid {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(0,229,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,229,255,0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
}

.bg-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
    z-index: 0;
}

.bg-glow-1 {
    width: 600px;
    height: 600px;
    background: rgba(0, 229, 255, 0.06);
    top: -200px;
    right: -200px;
}

.bg-glow-2 {
    width: 500px;
    height: 500px;
    background: rgba(124, 58, 237, 0.06);
    bottom: 0;
    left: -150px;
}

/* ===== Navbar ===== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: 56px;
    background: rgba(6, 8, 16, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.nav-back {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text2);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: color 0.2s, transform 0.2s;
    padding: 6px 12px 6px 8px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
}

.nav-back:hover {
    color: var(--accent);
    border-color: rgba(0,229,255,0.2);
    transform: translateX(-2px);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 1rem;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.nav-logo svg { color: var(--accent); }

.nav-tools {
    font-size: 0.82rem;
    color: var(--text2);
    text-decoration: none;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.nav-tools:hover {
    color: var(--text);
    border-color: var(--border2);
    background: rgba(255,255,255,0.04);
}

/* ===== Hero ===== */
.hero {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 64px 20px 40px;
}

.hero-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 3px;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 20px;
    opacity: 0.8;
}

.hero-ip {
    font-family: var(--font-mono);
    font-size: clamp(2.2rem, 7vw, 4rem);
    font-weight: 700;
    color: #fff;
    letter-spacing: -1px;
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeUp 0.6s ease both;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ip-skeleton { color: var(--text3); }

.dots {
    display: inline-block;
    animation: blink 1.2s steps(3, end) infinite;
    width: 24px;
    text-align: left;
    overflow: hidden;
}

@keyframes blink {
    0%, 100% { width: 4px; }
    33%       { width: 10px; }
    66%       { width: 18px; }
}

.hero-badges {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.hbadge {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 20px;
    letter-spacing: 0.5px;
}

.hbadge-blue {
    background: rgba(0,229,255,0.1);
    color: var(--accent);
    border: 1px solid rgba(0,229,255,0.25);
}

.hbadge-safe {
    background: rgba(0,201,167,0.1);
    color: var(--safe);
    border: 1px solid rgba(0,201,167,0.25);
}

.hbadge-warn {
    background: rgba(245,158,11,0.1);
    color: var(--warn);
    border: 1px solid rgba(245,158,11,0.25);
}

.copy-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 20px;
    background: rgba(255,255,255,0.06);
    color: var(--text2);
    border: 1px solid var(--border2);
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.3px;
}

.copy-btn:hover {
    background: rgba(0,229,255,0.08);
    color: var(--accent);
    border-color: rgba(0,229,255,0.3);
}

.copy-btn.copied {
    background: rgba(0,201,167,0.1);
    color: var(--safe);
    border-color: rgba(0,201,167,0.3);
}

.hero-sub {
    margin-top: 14px;
    font-size: 0.88rem;
    color: var(--text2);
    letter-spacing: 0.3px;
}

/* ===== Privacy Score Bar ===== */
.score-bar-wrap {
    position: relative;
    z-index: 1;
    padding: 0 20px 32px;
    max-width: 600px;
    margin: 0 auto;
}

.score-bar-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 20px;
}

.score-label {
    font-size: 0.78rem;
    color: var(--text2);
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: 0.3px;
}

.score-track {
    flex: 1;
    height: 6px;
    background: rgba(255,255,255,0.06);
    border-radius: 10px;
    overflow: hidden;
}

.score-fill {
    height: 100%;
    width: 0%;
    border-radius: 10px;
    transition: width 1.2s cubic-bezier(0.4,0,0.2,1), background 0.4s;
    background: linear-gradient(90deg, #00c9a7, #00e5ff);
}

.score-value {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--safe);
    white-space: nowrap;
    min-width: 55px;
    text-align: right;
}

/* ===== Main Grid ===== */
.main-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px 40px;
}

/* ===== Cards ===== */
.card {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    border-color: var(--border2);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

.card-anim {
    opacity: 0;
    animation: cardIn 0.5s ease both;
    animation-delay: var(--delay, 0s);
}

@keyframes cardIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.card-full {
    grid-column: 1 / -1;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    background: rgba(255,255,255,0.02);
}

.card-icon {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,229,255,0.08);
    border-radius: 8px;
    color: var(--accent);
    flex-shrink: 0;
}

.card-header h2 {
    font-family: var(--font-head);
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text2);
    text-transform: uppercase;
    letter-spacing: 1px;
    flex: 1;
}

.card-badge {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(124,58,237,0.15);
    color: #a78bfa;
    border: 1px solid rgba(124,58,237,0.2);
    letter-spacing: 0.5px;
}

.card-body { padding: 16px 20px; }
.card-note {
    font-size: 0.78rem;
    color: var(--text3);
    margin-top: 14px;
    line-height: 1.5;
}

/* ===== Data Rows ===== */
.data-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 9px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    gap: 12px;
}

.data-row:last-child { border-bottom: none; }

.dl {
    font-size: 0.8rem;
    color: var(--text3);
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    padding-top: 1px;
}

.dv {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text);
    text-align: right;
    word-break: break-all;
    line-height: 1.4;
}

/* ===== Map Button ===== */
.map-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(0,229,255,0.2);
    background: rgba(0,229,255,0.05);
    transition: all 0.2s;
    letter-spacing: 0.3px;
}

.map-btn:hover {
    background: rgba(0,229,255,0.1);
    border-color: rgba(0,229,255,0.4);
}

/* ===== Status Pills ===== */
.status-pill-wrap { margin-bottom: 4px; }

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.82rem;
    font-weight: 700;
    border: 1px solid var(--border2);
    background: rgba(255,255,255,0.03);
    color: var(--text2);
    letter-spacing: 0.3px;
}

.status-pill.safe {
    background: rgba(0,201,167,0.08);
    color: var(--safe);
    border-color: rgba(0,201,167,0.25);
}

.status-pill.warn {
    background: rgba(245,158,11,0.08);
    color: var(--warn);
    border-color: rgba(245,158,11,0.25);
}

.status-pill.danger {
    background: rgba(239,68,68,0.08);
    color: var(--danger);
    border-color: rgba(239,68,68,0.25);
}

.pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    display: inline-block;
    animation: pulseAnim 1.5s ease-in-out infinite;
}

@keyframes pulseAnim {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.5; transform: scale(0.8); }
}

/* ===== Check List ===== */
.check-list {
    list-style: none;
    margin-top: 14px;
}

.check-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    font-size: 0.82rem;
    font-family: var(--font-mono);
}

.check-list li:last-child { border-bottom: none; }
.check-list li.clean  { color: var(--safe); }
.check-list li.listed { color: var(--danger); }

/* ===== IP List (WebRTC) ===== */
.ip-list {
    list-style: none;
    margin-top: 12px;
}

.ip-list li {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--danger);
    padding: 6px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.ip-list li:last-child { border-bottom: none; }

/* ===== User Agent ===== */
.ua-string {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text2);
    word-break: break-all;
    line-height: 1.6;
    background: rgba(255,255,255,0.02);
    padding: 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

/* ===== Headers Table ===== */
.headers-wrap { overflow-x: auto; }

.headers-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
}

.headers-table tr {
    border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: background 0.15s;
}

.headers-table tr:last-child { border-bottom: none; }
.headers-table tr:hover { background: rgba(255,255,255,0.02); }

.headers-table .hk {
    font-family: var(--font-mono);
    color: var(--accent);
    padding: 9px 16px 9px 0;
    width: 30%;
    vertical-align: top;
    white-space: nowrap;
    font-weight: 700;
}

.headers-table .hv {
    font-family: var(--font-mono);
    color: var(--text2);
    padding: 9px 0;
    word-break: break-all;
    line-height: 1.5;
}

/* ===== CTA Banner ===== */
.cta-banner {
    position: relative;
    z-index: 1;
    padding: 0 20px 40px;
    max-width: 1140px;
    margin: 0 auto;
}

.cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: linear-gradient(135deg, rgba(124,58,237,0.15), rgba(0,229,255,0.08));
    border: 1px solid rgba(124,58,237,0.25);
    border-radius: var(--radius);
    padding: 24px 32px;
    flex-wrap: wrap;
}

.cta-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.cta-sub {
    font-size: 0.85rem;
    color: var(--text2);
}

.cta-btn {
    display: inline-block;
    padding: 12px 28px;
    background: linear-gradient(135deg, #7c3aed, #00e5ff);
    color: #fff;
    font-weight: 800;
    font-size: 0.88rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    white-space: nowrap;
    transition: opacity 0.2s, transform 0.2s;
    letter-spacing: 0.3px;
}

.cta-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* ===== FAQ ===== */
.faq-section {
    position: relative;
    z-index: 1;
    padding: 0 20px 60px;
}

.faq-inner {
    max-width: 1140px;
    margin: 0 auto;
}

.faq-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 28px;
    letter-spacing: -0.5px;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.faq-item {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 24px;
    transition: border-color 0.2s;
}

.faq-item:hover { border-color: var(--border2); }

.faq-item h3 {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 10px;
    line-height: 1.4;
}

.faq-item p {
    font-size: 0.84rem;
    color: var(--text2);
    line-height: 1.7;
}

/* ===== Footer ===== */
.footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--border);
    padding: 20px;
}

.footer-inner {
    max-width: 1140px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--text3);
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: var(--text3);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover { color: var(--text2); }

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .main-grid { grid-template-columns: repeat(2, 1fr); }
    .faq-grid  { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .main-grid    { grid-template-columns: 1fr; }
    .hero-ip      { font-size: 1.8rem; }
    .cta-inner    { flex-direction: column; text-align: center; }
    .footer-inner { flex-direction: column; text-align: center; }
    .navbar       { padding: 0 16px; }
    .nav-back span { display: none; }
}