/* Human-Friendly Modern Design System for ip.just */

:root {
    --bg-dark: #0b0f19;
    --bg-card: rgba(22, 30, 46, 0.7);
    --bg-card-hover: rgba(30, 41, 64, 0.85);
    
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(56, 189, 248, 0.35);

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    /* Warm Human Accents */
    --accent-primary: #38bdf8;  /* Soft Cyan */
    --accent-indigo: #6366f1;   /* Indigo */
    --accent-emerald: #10b981;  /* Emerald Green */
    --accent-amber: #f59e0b;    /* Warm Amber */
    --accent-rose: #f43f5e;     /* Rose Red */

    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Outfit', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --radius-sm: 10px;
    --radius-md: 18px;
    --radius-lg: 24px;
    --radius-pill: 9999px;

    --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    --shadow-card: 0 12px 32px rgba(0, 0, 0, 0.35);
    --glow-cyan: 0 0 30px rgba(56, 189, 248, 0.25);
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Ambient Soft Glowing Orbs */
.ambient-background {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.25;
}

.orb-1 {
    top: -150px;
    left: 20%;
    width: 650px;
    height: 650px;
    background: radial-gradient(circle, #6366f1 0%, #38bdf8 100%);
}

.orb-2 {
    top: 400px;
    right: -100px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #f43f5e 0%, #a855f7 100%);
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header & Logo */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(11, 15, 25, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 16px 0;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-indigo));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 4px 20px rgba(56, 189, 248, 0.3);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.brand {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.brand-dot {
    color: var(--accent-primary);
}

.tag {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.nav-links {
    display: flex;
    gap: 6px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.07);
}

.nav-links a.nav-ftv-btn {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.15), rgba(99, 102, 241, 0.15));
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: var(--accent-primary);
    font-weight: 600;
}

.nav-links a.nav-ftv-btn:hover {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-indigo));
    color: #fff;
    border-color: transparent;
    box-shadow: var(--glow-cyan);
}

.header-status {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-subtle);
    font-size: 0.82rem;
    font-weight: 600;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-dot.success { background: var(--accent-emerald); box-shadow: 0 0 8px var(--accent-emerald); }
.status-dot.warning { background: var(--accent-amber); box-shadow: 0 0 8px var(--accent-amber); }
.status-dot.danger { background: var(--accent-rose); box-shadow: 0 0 8px var(--accent-rose); }

/* Main Content Structure */
.main-content {
    padding: 32px 24px 60px 24px;
}

.grid {
    display: grid;
    gap: 24px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 860px) {
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .nav-links { display: none; }
}

/* Cards */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 28px;
    transition: var(--transition);
    box-shadow: var(--shadow-card);
}

.card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 700;
}

.card-title svg {
    color: var(--accent-primary);
}

/* FTV Hero Banner */
.ftv-card-banner {
    background: linear-gradient(135deg, rgba(22, 30, 46, 0.95), rgba(30, 27, 55, 0.95));
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

@media (max-width: 860px) {
    .ftv-card-banner { flex-direction: column; text-align: center; }
}

.ftv-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(244, 63, 94, 0.15);
    color: var(--accent-rose);
    border: 1px solid rgba(244, 63, 94, 0.3);
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.ftv-content h2 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 10px;
    line-height: 1.25;
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-indigo));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ftv-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    max-width: 650px;
    margin-bottom: 18px;
}

.ftv-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pill-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    font-size: 0.82rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pill-item svg {
    color: var(--accent-emerald);
    width: 14px;
    height: 14px;
}

.ftv-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 250px;
}

.ftv-note {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-decoration: none;
}

.btn-ftv {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-indigo));
    color: #fff;
    width: 100%;
    padding: 16px 28px;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 700;
    box-shadow: 0 6px 24px rgba(56, 189, 248, 0.3);
}

.btn-ftv:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 32px rgba(56, 189, 248, 0.5);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-indigo));
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--glow-cyan);
}

.btn-subtle {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 8px 16px;
    font-size: 0.85rem;
}

.btn-subtle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.btn-icon {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-icon:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
}

/* Human IP Box */
.ip-hero-box {
    background: rgba(0, 0, 0, 0.25);
    border-radius: var(--radius-md);
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    margin-bottom: 20px;
}

.ip-main-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
}

.ip-big {
    font-family: var(--font-mono);
    font-size: 2.1rem;
    font-weight: 700;
    color: var(--accent-primary);
    letter-spacing: -0.5px;
}

.ip-type {
    background: rgba(56, 189, 248, 0.15);
    color: var(--accent-primary);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}

.ip-location-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.05rem;
    color: var(--text-secondary);
}

.flag-emoji { font-size: 1.3rem; }

.human-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.human-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    padding-bottom: 8px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
}

.h-label {
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.h-val {
    font-weight: 600;
    color: var(--text-primary);
}

/* Pills */
.pill {
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    font-size: 0.78rem;
    font-weight: 700;
}

.pill-success { background: rgba(16, 185, 129, 0.15); color: var(--accent-emerald); border: 1px solid rgba(16, 185, 129, 0.3); }
.pill-warning { background: rgba(245, 158, 11, 0.15); color: var(--accent-amber); border: 1px solid rgba(245, 158, 11, 0.3); }
.pill-danger { background: rgba(244, 63, 94, 0.15); color: var(--accent-rose); border: 1px solid rgba(244, 63, 94, 0.3); }

/* Circle Gauge */
.human-gauge-box {
    display: flex;
    justify-content: center;
    margin: 10px 0 20px 0;
}

.circle-gauge {
    position: relative;
    width: 170px;
    height: 170px;
}

.circle-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.circle-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.07);
    stroke-width: 12;
}

.circle-fill {
    fill: none;
    stroke: url(#gauge-gradient);
    stroke-width: 12;
    stroke-linecap: round;
    stroke-dasharray: 427;
    stroke-dashoffset: 427;
    transition: stroke-dashoffset 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.circle-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.big-score-number {
    font-family: var(--font-mono);
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1;
}

.small-score-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.human-checklist {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.check-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.2);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
}

.chk-icon {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    margin-right: 8px;
}

.chk-text {
    flex-grow: 1;
    color: var(--text-secondary);
}

/* Speed Test Section */
.section {
    margin-top: 48px;
}

.section-header {
    margin-bottom: 24px;
}

.section-header h2 {
    font-size: 1.45rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.section-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.speed-card {
    padding: 32px;
}

.speed-grid {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 36px;
    align-items: center;
}

@media (max-width: 800px) {
    .speed-grid { grid-template-columns: 1fr; }
}

.speed-dial-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.friendly-meter {
    position: relative;
    width: 200px;
    height: 180px;
}

.speed-meter-svg {
    width: 100%;
    height: 100%;
}

.meter-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.08);
    stroke-width: 12;
    stroke-linecap: round;
}

.meter-fill {
    fill: none;
    stroke: var(--accent-primary);
    stroke-width: 12;
    stroke-linecap: round;
    stroke-dasharray: 330;
    stroke-dashoffset: 330;
    transition: stroke-dashoffset 0.1s ease-out;
}

.meter-center {
    position: absolute;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    display: flex;
    flex-direction: column;
}

.live-speed {
    font-family: var(--font-mono);
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1;
}

.live-unit {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-primary);
}

.meter-status {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.speed-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.stat-card {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 18px;
    display: flex;
    gap: 14px;
    align-items: center;
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.icon-ping { background: rgba(56, 189, 248, 0.12); color: var(--accent-primary); }
.icon-jitter { background: rgba(99, 102, 241, 0.12); color: var(--accent-indigo); }
.icon-download { background: rgba(16, 185, 129, 0.12); color: var(--accent-emerald); }
.icon-upload { background: rgba(245, 158, 11, 0.12); color: var(--accent-amber); }

.stat-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.stat-label {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.stat-value-wrap {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.stat-number {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
}

.stat-unit {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.stat-desc {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    margin-top: 6px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: var(--accent-primary);
    transition: width 0.3s ease;
}

/* Leaks & Audit Rows */
.human-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.h-list-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.88rem;
    padding-bottom: 8px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
}

.h-list-label { color: var(--text-secondary); }
.h-list-val { font-weight: 600; color: var(--text-primary); }

.font-mono {
    font-family: var(--font-mono);
    color: var(--accent-primary);
}

.note-box {
    display: flex;
    gap: 12px;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
}

.note-warning {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: #fef08a;
}

.note-info {
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.2);
    color: #bae6fd;
}

.note-box svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 2px;
}

/* Extensions Grid */
.ext-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ext-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ext-badge-icon {
    width: 40px;
    height: 40px;
    background: rgba(56, 189, 248, 0.12);
    color: var(--accent-primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ftv-icon {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-indigo));
    color: #fff;
}

.ext-card.ext-featured {
    border-color: rgba(56, 189, 248, 0.4);
    background: linear-gradient(135deg, rgba(22, 30, 46, 0.9), rgba(35, 30, 60, 0.9));
}

.ext-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
}

.ext-text {
    font-size: 0.86rem;
    color: var(--text-secondary);
    flex-grow: 1;
}

.ext-footer {
    display: flex;
    gap: 10px;
    margin-top: 4px;
}

.btn-ext {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.btn-ext:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn-ftv-btn {
    background: var(--accent-primary) !important;
    color: #000 !important;
    font-weight: 700 !important;
    width: 100%;
}

/* FAQ Card */
.faq-card {
    padding: 32px;
}

.faq-heading {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-primary);
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

@media (max-width: 700px) {
    .faq-grid { grid-template-columns: 1fr; }
}

.faq-box h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.faq-box p {
    font-size: 0.88rem;
    color: var(--text-secondary);
}

/* Footer */
.footer {
    border-top: 1px solid var(--border-subtle);
    padding: 36px 0;
    background: rgba(8, 11, 19, 0.95);
    margin-top: 60px;
}

.footer-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-brand p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.footer-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.ftv-link {
    color: var(--accent-primary);
    text-decoration: none;
}

.ftv-link:hover {
    text-decoration: underline;
}

/* Toasts */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
}

.toast {
    background: rgba(22, 30, 46, 0.95);
    border: 1px solid var(--accent-primary);
    color: #fff;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    animation: toastIn 0.3s ease-out forwards;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
