:root {
  /* ... (Previous Variables) ... */
  --bg-page: #fbfbfd;
  --bg-card: rgba(255, 255, 255, 0.7);
  --bg-card-hover: rgba(255, 255, 255, 0.9);
  --bg-input: rgba(255, 255, 255, 0.8);
  --bg-modal: rgba(255, 255, 255, 0.8);
  --bg-warning: rgba(255, 159, 10, 0.1);
  
  --text-primary: #1d1d1f;
  --text-secondary: #86868b;
  --text-tertiary: #a1a1a6;
  --text-warning: #ff9f0a;

  --accent-color: #0071e3;
  --accent-gradient: linear-gradient(135deg, #0071e3 0%, #40a0ff 100%);
  --accent-glow: rgba(0, 113, 227, 0.3);
  
  --success: #34c759;
  --error: #ff3b30;
  
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.08);
  --shadow-modal: 0 40px 80px rgba(0, 0, 0, 0.2);
  
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --font-stack: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
}

[data-theme="dark"] {
  --bg-page: #000000;
  --bg-card: rgba(28, 28, 30, 0.7);
  --bg-card-hover: rgba(44, 44, 46, 0.9);
  --bg-input: rgba(28, 28, 30, 0.8);
  --bg-modal: rgba(28, 28, 30, 0.8);
  --bg-warning: rgba(255, 159, 10, 0.15);
  
  --text-primary: #f5f5f7;
  --text-secondary: #98989d;
  --text-tertiary: #636366;
  
  --accent-color: #2997ff;
  --accent-gradient: linear-gradient(135deg, #2997ff 0%, #40a0ff 100%);
  --accent-glow: rgba(41, 151, 255, 0.2);
  
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.5);
  --shadow-modal: 0 40px 80px rgba(0, 0, 0, 0.6);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-stack);
    background-color: var(--bg-page);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
    /* Transition disabled by default, enabled by JS class .loaded */
    transition: none;
}

body.loaded {
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Ambient BG */
.ambient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 20s infinite ease-in-out;
}
.orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    top: -200px;
    left: -100px;
}
.orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(100, 200, 255, 0.1) 0%, transparent 70%);
    bottom: -100px;
    right: -100px;
    animation-delay: -10s;
}
@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
}

/* Layout & Header */
.container {
    width: 100%;
    max-width: 1024px;
    margin: 0 auto;
    padding: 0 32px;
    flex: 1;
    display: flex;
    flex-direction: column;
    z-index: 1;
}

/* --- Header & Navigation --- */
header {
    padding: 24px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 100;
}

.brand {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-primary);
    text-decoration: none;
    z-index: 101; /* Above mobile menu */
}

.brand-logo { width: 28px; height: 28px; }
.brand-text { 
    font-size: 20px; 
    font-weight: 800; 
    letter-spacing: -0.02em;
    white-space: nowrap;
}

/* Desktop Nav */
.main-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.2s;
}
.nav-link:hover, .nav-link.active { color: var(--text-primary); }

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 101;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 8px;
    cursor: pointer;
    z-index: 102;
}

.theme-toggle {
    background: transparent;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.theme-toggle:hover { background: rgba(128,128,128,0.1); }

.btn-account {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--accent-gradient);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.2);
    text-decoration: none;
}

.btn-account:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 113, 227, 0.3);
}

.btn-account:active {
    transform: translateY(0);
}

/* Hero & Search (Updated for Split Layout) */
.hero-section {
    padding: 100px 0 60px; /* Aligned with Proxy page */
}

.hero-split {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
    align-items: center;
    margin-bottom: 60px;
}

.hero-text-side {
    text-align: left;
}

.hero-visual-side {
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
}

.hero-title {
    font-size: 64px;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.1;
    margin-bottom: 24px;
    color: var(--text-primary);
    text-align: left; /* Explicitly left */
}

/* Gradient Text Animation */
.animate-gradient {
    background: linear-gradient(
        to right,
        var(--text-primary) 20%,
        var(--text-secondary) 40%,
        var(--text-secondary) 60%,
        var(--text-primary) 80%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 5s linear infinite;
}

@keyframes shine {
    to {
        background-position: 200% center;
    }
}

.hero-subtitle {
    font-size: 20px;
    color: var(--text-secondary);
    font-weight: 400;
    margin-bottom: 40px;
    text-align: left; /* Explicitly left */
}

.search-container {
    width: 100%;
    max-width: 500px;
    position: relative;
    z-index: 5;
    margin: 0; /* Left align: remove auto margins */
}

.ip-input {
    width: 100%;
    height: 60px;
    padding: 0 70px 0 24px;
    font-size: 18px;
    background: var(--bg-card);
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 30px;
    color: var(--text-primary);
    box-shadow: var(--shadow-md);
    transition: all 0.3s var(--ease-out);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}
.ip-input:focus {
    outline: none;
    background: var(--bg-card-hover);
    box-shadow: var(--shadow-lg), 0 0 0 2px var(--accent-color);
}
.search-btn-icon {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--accent-gradient);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.3);
}
.search-btn-icon:hover { transform: translateY(-50%) scale(1.08); }

/* Cyber Globe Animation */
.cyber-globe-container {
    width: 360px;
    height: 360px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
}

.cyber-globe {
    width: 240px;
    height: 240px;
    border-radius: 50%;
    position: relative;
    background: radial-gradient(circle at 30% 30%, rgba(0, 113, 227, 0.1), rgba(0, 0, 0, 0) 70%);
    box-shadow: 0 0 60px rgba(0, 113, 227, 0.15), inset 0 0 20px rgba(0, 113, 227, 0.1);
    transform-style: preserve-3d;
}

/* Internal Grid/Scanlines */
.globe-grid {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 50%;
    background: 
        linear-gradient(rgba(0, 113, 227, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 113, 227, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.5;
    mask-image: radial-gradient(circle, black 40%, transparent 100%);
    -webkit-mask-image: radial-gradient(circle, black 40%, transparent 100%);
    animation: rotateGlobe 60s linear infinite;
}

/* Rotating Rings */
.globe-ring {
    position: absolute;
    top: 50%; left: 50%;
    border: 1px solid rgba(0, 113, 227, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 10px rgba(0, 113, 227, 0.1);
}

.r1 {
    width: 320px; height: 320px;
    border-color: rgba(0, 113, 227, 0.15);
    animation: orbit 20s linear infinite;
}

.r1::after { /* Satellite */
    content: ''; position: absolute; top: 0; left: 50%;
    width: 6px; height: 6px; background: var(--accent-color);
    border-radius: 50%; box-shadow: 0 0 10px var(--accent-color);
    transform: translate(-50%, -50%);
}

.r2 {
    width: 280px; height: 280px;
    border-top-color: transparent;
    border-bottom-color: transparent;
    animation: orbit 15s linear infinite reverse;
}

.r3 {
    width: 260px; height: 260px;
    border: 1px dashed rgba(0, 113, 227, 0.2);
    animation: orbit 30s linear infinite;
}

/* Center Core */
.globe-core {
    position: absolute;
    top: 50%; left: 50%;
    width: 10px; height: 10px;
    background: var(--accent-color);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 20px var(--accent-color);
    animation: pulseCore 2s ease-in-out infinite;
}

/* Animations */
@keyframes rotateGlobe {
    from { background-position: 0 0; }
    to { background-position: 40px 20px; }
}

@keyframes orbit {
    from { transform: translate(-50%, -50%) rotate(0deg) rotateX(60deg); }
    to { transform: translate(-50%, -50%) rotate(360deg) rotateX(60deg); }
}

/* Specific ring tilts */
.r1 { animation: orbit1 20s linear infinite; }
@keyframes orbit1 {
    from { transform: translate(-50%, -50%) rotate(0deg) rotateX(70deg); }
    to { transform: translate(-50%, -50%) rotate(360deg) rotateX(70deg); }
}

.r2 { animation: orbit2 25s linear infinite reverse; }
@keyframes orbit2 {
    from { transform: translate(-50%, -50%) rotate(0deg) rotateY(60deg); }
    to { transform: translate(-50%, -50%) rotate(360deg) rotateY(60deg); }
}

.r3 { animation: orbit3 40s linear infinite; border: none; border-top: 1px solid rgba(0, 113, 227, 0.3); border-bottom: 1px solid rgba(0, 113, 227, 0.3); }
@keyframes orbit3 {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes pulseCore {
    0%, 100% { box-shadow: 0 0 20px var(--accent-color); opacity: 1; }
    50% { box-shadow: 0 0 40px var(--accent-color); opacity: 0.7; }
}

/* Hide visual on mobile */
@media (max-width: 768px) {
    .hero-visual-side { display: none; }
}

/* Bento Grid (Adjusted for flow) */
.result-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-gap: 24px;
    width: 100%;
    margin-bottom: 60px;
}
.bento-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(255,255,255,0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all 0.3s;
    opacity: 0;
    transform: translateY(20px);
    position: relative;
}
.result-grid:not(.hidden) .bento-card {
    animation: cardEntrance 0.6s var(--ease-out) forwards;
}
.result-grid:not(.hidden) .bento-card:nth-child(1) { animation-delay: 0.1s; }
.result-grid:not(.hidden) .bento-card:nth-child(2) { animation-delay: 0.2s; }
.result-grid:not(.hidden) .bento-card:nth-child(3) { animation-delay: 0.3s; }
.result-grid:not(.hidden) .bento-card:nth-child(4) { animation-delay: 0.4s; }
.result-grid:not(.hidden) .bento-card:nth-child(5) { animation-delay: 0.5s; }

.bento-card:hover {
    transform: translateY(-8px);
    background: var(--bg-card-hover);
    box-shadow: var(--shadow-md);
}

.bento-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--bg-page);
    color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}
.bento-label {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 12px;
    letter-spacing: 0.05em;
}
.bento-value {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    word-break: break-word;
    line-height: 1.2;
}

.card-ip { grid-column: span 7; background: linear-gradient(135deg, var(--bg-card) 0%, rgba(0, 113, 227, 0.05) 100%); }
.card-ip .bento-value {
    font-size: 42px;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.card-region { grid-column: span 5; }
.card-provider { grid-column: span 12; }
.card-type { grid-column: span 5; }
.card-tips { grid-column: span 7; }

/* Speed Test Action Button */
.speed-test-action {
    position: absolute;
    top: 32px;
    right: 32px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-page);
    color: var(--accent-color);
    border: 1px solid rgba(0, 113, 227, 0.1);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
}
.speed-test-action:hover {
    background: var(--accent-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.speed-test-action svg {
    width: 16px;
    height: 16px;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--bg-modal);
    width: 90%;
    max-width: 500px;
    border-radius: var(--radius-xl);
    padding: 32px;
    position: relative;
    box-shadow: var(--shadow-modal);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: scale(0.95) translateY(20px);
    transition: transform 0.4s var(--ease-out);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    display: flex;
    flex-direction: column;
    max-height: 85vh;
}

.modal.active .modal-content {
    transform: scale(1) translateY(0);
}

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

.modal-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.btn-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-close:hover { background: rgba(0,0,0,0.05); color: var(--text-primary); }

.modal-disclaimer {
    background: var(--bg-warning);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    margin-bottom: 24px;
    font-size: 13px;
    color: var(--text-warning);
    display: flex;
    align-items: flex-start;
    line-height: 1.5;
}

.test-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 24px;
    overflow-y: auto;
}

.test-card {
    background: var(--bg-page);
    padding: 16px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid transparent;
    transition: all 0.3s;
}

.test-card-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.test-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.service-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.latency-value {
    font-family: monospace;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Status Colors */
.test-card.success { border-color: var(--accent-glow); background: rgba(0, 113, 227, 0.03); }
.test-card.success .latency-value { color: var(--accent-color); font-weight: 700; }
.test-card.error { border-color: rgba(255, 59, 48, 0.3); background: rgba(255, 59, 48, 0.05); }
.test-card.error .latency-value { color: var(--error); }

/* DNS Leak Test Styles */
.dns-leak-description {
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(0, 113, 227, 0.08) 0%, rgba(41, 151, 255, 0.05) 100%);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    border: 1px solid rgba(0, 113, 227, 0.1);
}

.dns-leak-description p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.dns-leak-results {
    min-height: 120px;
    max-height: 350px;
    overflow-y: auto;
    padding-right: 4px;
}

.dns-leak-results::-webkit-scrollbar {
    width: 6px;
}

.dns-leak-results::-webkit-scrollbar-track {
    background: transparent;
}

.dns-leak-results::-webkit-scrollbar-thumb {
    background: var(--text-tertiary);
    border-radius: 3px;
}

.dns-leak-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 20px;
    gap: 16px;
}

.dns-leak-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(0, 113, 227, 0.1);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.dns-leak-loading p {
    font-size: 14px;
    color: var(--text-secondary);
}

.dns-leak-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dns-leak-item {
    background: var(--bg-card);
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 14px;
    padding: 14px 16px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 14px;
}

[data-theme="dark"] .dns-leak-item {
    border-color: rgba(255, 255, 255, 0.06);
}

.dns-leak-item:hover {
    background: var(--bg-card-hover);
    transform: translateX(2px);
    box-shadow: var(--shadow-sm);
}

.dns-leak-item-flag {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--bg-input);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dns-leak-item-flag .fi {
    font-size: 24px;
    width: 28px;
    line-height: 1;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dns-leak-item-flag .flag-emoji {
    font-size: 26px;
}

.dns-leak-item-info {
    flex: 1;
    min-width: 0;
}

.dns-leak-item-ip {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    font-family: "SF Mono", "Monaco", "Consolas", monospace;
    margin-bottom: 4px;
}

.dns-leak-item-location {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dns-leak-item-isp {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dns-leak-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    padding: 20px;
}

.dns-leak-empty p {
    font-size: 14px;
    color: var(--text-secondary);
    text-align: center;
}

.modal-footer {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: var(--accent-gradient);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.7; cursor: not-allowed; }

.status-text {
    font-size: 13px;
    color: var(--text-secondary);
    min-height: 20px;
}

.btn-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Footer & Enhanced Bottom */
footer {
    padding: 40px 0;
    text-align: center;
    margin-top: auto;
    border-top: 1px solid rgba(0,0,0,0.03); /* Subtle divider */
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.footer-text {
    font-size: 13px;
    color: var(--text-tertiary);
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.2s ease;
    cursor: pointer;
    position: relative;
    z-index: 10;
}
.footer-link:hover {
    color: var(--accent-color);
}

.footer-divider {
    color: var(--text-tertiary);
    font-size: 13px;
}

/* Animations & Utils */
@keyframes spin { 100% { transform: rotate(360deg); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: translateY(0); } }
@keyframes cardEntrance { from { opacity: 0; transform: translateY(30px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.5; } 100% { opacity: 1; } }

.hidden { display: none !important; }

/* ... (Previous code) ... */

/* Skeleton Loading - Enhanced */
.skeleton {
    background: linear-gradient(90deg,
        var(--bg-card-hover) 0%,
        rgba(255, 255, 255, 0.15) 20%,
        rgba(255, 255, 255, 0.25) 40%,
        rgba(255, 255, 255, 0.15) 60%,
        var(--bg-card-hover) 80%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.8s ease-in-out infinite;
    border-radius: 8px;
    color: transparent !important;
    user-select: none;
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .skeleton {
    background: linear-gradient(90deg,
        var(--bg-card-hover) 0%,
        rgba(255, 255, 255, 0.08) 20%,
        rgba(255, 255, 255, 0.12) 40%,
        rgba(255, 255, 255, 0.08) 60%,
        var(--bg-card-hover) 80%
    );
}

@keyframes skeleton-loading {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.skeleton-text {
    height: 1em;
    width: 60%;
    display: inline-block;
    min-height: 20px;
}

.skeleton-title {
    height: 1.2em;
    width: 40%;
    margin-bottom: 8px;
    min-height: 24px;
}

/* --- Tablet Responsive --- */
@media (max-width: 1024px) {
    .container {
        padding: 0 24px;
    }

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

    .card-ip { grid-column: span 2; }
    .card-region { grid-column: span 1; }
    .card-provider { grid-column: span 1; }
    .card-type { grid-column: span 1; }
    .card-tips { grid-column: span 1; }
}

/* Hide mobile actions on desktop */
.mobile-actions {
    display: none;
}

/* --- Mobile Responsive --- */
@media (max-width: 768px) {
    /* Home Page Mobile */
    .hero-split {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }
    .hero-text-side {
        text-align: center;
        margin: 0 auto;
    }
    .hero-title, .hero-subtitle {
        text-align: center;
    }
    .search-container {
        margin: 0 auto;
    }
    .hero-visual-side {
        display: none;
    }

    header {
        position: relative;
        padding: 20px 0;
        z-index: 100;
    }

    .mobile-menu-btn {
        display: block;
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        z-index: 102;
    }

    .header-actions {
        display: none;
    }

    /* Mobile Nav Overlay */
    .main-nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        height: 100dvh; /* Dynamic viewport height for mobile browsers */
        background: var(--bg-page);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 32px;
        transform: translateY(-100%);
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 101;
        padding: 40px;
        overflow: hidden;
    }

    .main-nav.active {
        transform: translateY(0);
    }

    .nav-link {
        font-size: 24px;
        font-weight: 700;
        padding: 12px;
    }

    /* Mobile actions only visible inside nav menu */
    .mobile-actions {
        display: flex;
        flex-direction: column;
        gap: 20px;
        align-items: center;
        margin-top: 40px;
    }

    /* Fix Logo Position */
    .brand {
        position: relative;
        z-index: 102;
    }
    
    /* Proxy Page Mobile Adjustments */
    .hero-title { font-size: 42px; }
    .card-ip .bento-value { font-size: 28px; }
    .bento-card { grid-column: span 12 !important; padding: 24px; }
    .modal-content { width: 95%; padding: 24px; }
    .test-card { padding: 12px; }

    .speed-test-action {
        top: 24px;
        right: 24px;
        padding: 6px 12px;
        font-size: 13px;
    }
}

/* ========================================
   About & Privacy Page Styles (Refined)
   ======================================== */

.about-page, .privacy-page {
    padding: 100px 0 60px; /* Synced with Home/Proxy Hero */
    max-width: 900px;
    margin: 0 auto;
}

/* Page Headers */
.page-header {
    margin-bottom: 80px;
    text-align: left;
}

.badge-capsule {
    display: inline-block;
    padding: 6px 12px;
    border: 1px solid var(--text-tertiary);
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 24px;
}

.page-title {
    font-size: 64px; /* Matches Home/Proxy Hero */
    font-weight: 800;
    line-height: 1.1;
    color: var(--text-primary);
    margin-bottom: 24px;
    letter-spacing: -0.04em;
}

.text-gradient {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.page-desc {
    font-size: 20px; /* Matches Home/Proxy Hero */
    line-height: 1.7;
    color: var(--text-secondary);
    max-width: 600px;
}

/* About: Values Grid */
.values-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 100px;
}

.value-item .icon-box {
    width: 48px;
    height: 48px;
    background: var(--bg-card);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.value-item h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.value-item p {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* About: Tech Stack */
.tech-section {
    border-top: 1px solid rgba(0,0,0,0.05);
    padding-top: 40px;
}
[data-theme="dark"] .tech-section { border-color: rgba(255,255,255,0.1); }

.section-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    margin-bottom: 24px;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.tech-tags span {
    padding: 8px 16px;
    background: var(--bg-card);
    border-radius: 100px;
    font-size: 14px;
    color: var(--text-secondary);
    border: 1px solid rgba(0,0,0,0.05);
}

/* Privacy: Layout */
.policy-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 800px; /* Reduced width for better readability */
    margin: 0 auto;
    gap: 60px;
}

.policy-sidebar {
    display: none; /* Sidebar removed */
}

.toc {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.toc-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s;
}

.toc-link:hover, .toc-link.active {
    color: var(--text-primary);
    background: var(--bg-card);
}

.policy-section {
    margin-bottom: 60px;
}

.policy-section h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
}

.policy-section p, .policy-section li {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.policy-section ul {
    padding-left: 0;
    list-style: none;
}

.policy-section li {
    padding-left: 20px;
    position: relative;
}

.policy-section li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--accent-color);
}

.alert-box {
    background: rgba(255, 159, 10, 0.1);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}
.alert-box strong {
    display: block;
    color: var(--text-warning);
    margin-bottom: 8px;
}
.alert-box p {
    margin-bottom: 0;
    font-size: 15px;
}

.contact-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
}

/* Animation Utilities */
.reveal-up {
    opacity: 0;
    animation: fadeInUp 0.8s var(--ease-out) forwards;
}

.delay-200 { animation-delay: 0.2s; }

/* --- Privacy Page Enhanced Styles --- */

.policy-content-stack {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.policy-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s, box-shadow 0.3s;
}

.policy-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card-header {
    padding: 24px 32px;
    border-bottom: 1px solid rgba(0,0,0,0.03);
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(var(--accent-color), 0.02);
}

[data-theme="dark"] .card-header { border-bottom-color: rgba(255,255,255,0.05); }

.card-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--bg-page);
    color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.policy-card h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
}

.card-body {
    padding: 32px;
}

.highlight-box {
    background: rgba(0, 113, 227, 0.05);
    border-left: 4px solid var(--accent-color);
    padding: 16px 20px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin-top: 16px;
    color: var(--text-primary);
}

/* Comparison Grid */
.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.col-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.success-text { color: var(--success); }
.error-text { color: var(--error); }

.check-list, .cross-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.check-list li, .cross-list li {
    font-size: 15px;
    color: var(--text-secondary);
    padding-left: 24px;
    position: relative;
    line-height: 1.5;
}

.check-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: 800;
}

.cross-list li::before {
    content: "✕";
    position: absolute;
    left: 0;
    color: var(--error);
    font-weight: 800;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-bottom: 24px;
}

.info-item h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

/* Feature List */
.feature-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.feature-list li {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.feature-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 16px;
}

.feature-desc {
    color: var(--text-secondary);
    font-size: 15px;
}

/* Contact Card */
.contact-card {
    text-align: center;
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(0, 113, 227, 0.05) 100%);
}

.contact-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.btn-primary-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    border-radius: 20px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-primary-outline:hover {
    background: var(--accent-color);
    color: white;
}

@media (max-width: 768px) {
    .policy-container {
        grid-template-columns: 1fr;
    }
    .policy-sidebar {
        display: none; /* Hide TOC on mobile for simplicity, or make it sticky top */
    }
    .comparison-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .info-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .card-header {
        padding: 20px 24px;
    }
    .card-body {
        padding: 24px;
    }
}


