/* ═══════════════════════════════════════════════════════════════════════════════
   WCProbe — style.css
   Apple Glassmorphism Nav | 3D Earth BG | White Theme | Fully Responsive
   ═══════════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Space+Mono:ital,wght@0,400;0,700;1,400&family=Syne:wght@400;600;700;800&display=swap');

:root {
    /* White / Light theme as default */
    --bg-base:        #f0f4f9;
    --bg-surface:     #ffffff;
    --bg-card:        rgba(255, 255, 255, 0.82);
    --bg-card-hover:  rgba(255, 255, 255, 0.98);
    --bg-input:       rgba(240, 244, 249, 0.9);

    --border-subtle:  rgba(0, 0, 0, 0.05);
    --border-mid:     rgba(0, 0, 0, 0.09);
    --border-strong:  rgba(0, 0, 0, 0.16);

    --text-primary:   #0d1117;
    --text-secondary: #4a5568;
    --text-muted:     #8a9ac0;
    --text-accent:    #0066ff;

    --accent:         #0066ff;
    --accent-dim:     rgba(0, 102, 255, 0.1);
    --accent-glow:    rgba(0, 102, 255, 0.25);
    --accent-2:       #00c896;

    --danger:         #e03e3e;
    --warning:        #e88b00;
    --success:        #00a86b;
    --info:           #0066ff;

    --glass-bg:       rgba(255, 255, 255, 0.72);
    --glass-border:   rgba(255, 255, 255, 0.55);
    --glass-shadow:   0 8px 32px rgba(0, 0, 0, 0.08), 0 1px 0 rgba(255,255,255,0.9) inset;

    --radius-sm:      10px;
    --radius-md:      16px;
    --radius-lg:      28px;
    --radius-xl:      40px;
    --radius-full:    999px;

    --shadow-card:    0 4px 24px rgba(0, 0, 0, 0.07), 0 1px 0 rgba(255,255,255,0.9) inset;
    --shadow-glow:    0 0 30px var(--accent-glow);

    --font-display:   'Syne', sans-serif;
    --font-mono:      'Space Mono', monospace;
    --transition:     0.3s cubic-bezier(0.25, 0.8, 0.25, 1);

    --header-height:  68px;
}

[data-theme="dark"] {
    --bg-base:        #080b12;
    --bg-surface:     #0e1420;
    --bg-card:        rgba(14, 20, 32, 0.65);
    --bg-card-hover:  rgba(20, 28, 46, 0.85);
    --bg-input:       rgba(6, 10, 18, 0.7);

    --border-subtle:  rgba(255, 255, 255, 0.05);
    --border-mid:     rgba(255, 255, 255, 0.1);
    --border-strong:  rgba(255, 255, 255, 0.18);

    --text-primary:   #e8eef8;
    --text-secondary: #8a9bb8;
    --text-muted:     #4d5f7a;
    --text-accent:    #4af0b0;

    --accent:         #4af0b0;
    --accent-dim:     rgba(74, 240, 176, 0.15);
    --accent-glow:    rgba(74, 240, 176, 0.4);
    --accent-2:       #4ab4f0;

    --success:        #4af0b0;
    --info:           #4ab4f0;

    --glass-bg:       rgba(14, 20, 32, 0.72);
    --glass-border:   rgba(255, 255, 255, 0.08);
    --glass-shadow:   0 8px 32px rgba(0, 0, 0, 0.4), 0 1px 0 rgba(255,255,255,0.04) inset;

    --shadow-card:    0 8px 32px rgba(0, 0, 0, 0.4), 0 1px 0 rgba(255,255,255,0.05) inset;
}

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

html, body {
    font-size: 15px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    width: 100vw;
    max-width: 100vw;
    overflow-x: hidden;
    background: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-display);
    transition: background 0.4s ease, color 0.4s ease;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   LOADING SCREEN
   ═══════════════════════════════════════════════════════════════════════════════ */

#loadingScreen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

[data-theme="dark"] #loadingScreen {
    background: #080b12;
}

#loadingScreen.hide {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loading-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    animation: loadPulse 1.8s ease-in-out infinite;
}

.loading-logo img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    border-radius: 18px;
    filter: drop-shadow(0 8px 24px rgba(0, 102, 255, 0.25));
}

[data-theme="dark"] .loading-logo img {
    filter: drop-shadow(0 8px 24px rgba(74, 240, 176, 0.3));
}

.loading-logo-text {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}

.loading-logo-text span {
    color: var(--accent);
}

.loading-bar-wrap {
    width: 180px;
    height: 3px;
    background: var(--border-mid);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.loading-bar-inner {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    border-radius: var(--radius-full);
    animation: loadBar 1.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    box-shadow: 0 0 10px var(--accent-glow);
}

.loading-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    animation: loadFade 0.5s ease 0.3s both;
}

@keyframes loadPulse {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

@keyframes loadBar {
    0% { width: 0%; }
    40% { width: 55%; }
    70% { width: 80%; }
    100% { width: 100%; }
}

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

/* ═══════════════════════════════════════════════════════════════════════════════
   3D EARTH CANVAS
   ═══════════════════════════════════════════════════════════════════════════════ */

#earthCanvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.55;
    transition: opacity 0.4s ease;
}

[data-theme="dark"] #earthCanvas {
    opacity: 0.7;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   AMBIENT BG (fallback / overlay)
   ═══════════════════════════════════════════════════════════════════════════════ */

.ambient-bg {
    position: fixed; inset: 0; pointer-events: none; z-index: 1; overflow: hidden;
}

.orb {
    position: absolute; border-radius: 50%; filter: blur(120px);
    animation: drift 25s ease-in-out infinite alternate;
}
.orb-1 { width: 60vw; height: 60vw; background: rgba(0, 102, 255, 0.05); top: -10vw; left: -10vw; animation-delay: 0s; }
.orb-2 { width: 50vw; height: 50vw; background: rgba(0, 200, 150, 0.04); bottom: 5vw; right: -5vw; animation-delay: -7s; }
.orb-3 { width: 40vw; height: 40vw; background: rgba(100, 0, 220, 0.03); top: 50%; left: 50%; transform: translate(-50%, -50%); animation-delay: -14s; }

[data-theme="dark"] .orb-1 { background: rgba(74, 240, 176, 0.06); }
[data-theme="dark"] .orb-2 { background: rgba(74, 180, 240, 0.05); }
[data-theme="dark"] .orb-3 { background: rgba(120, 74, 240, 0.04); }

.grid-overlay {
    position: absolute; inset: 0;
    background-image: linear-gradient(var(--border-subtle) 1px, transparent 1px),
                      linear-gradient(90deg, var(--border-subtle) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(ellipse at center, transparent 15%, black 85%);
}

@keyframes drift {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(40px, 30px) scale(1.1); }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   GLASSMORPHISM HEADER / NAV
   ═══════════════════════════════════════════════════════════════════════════════ */

.site-header {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 48px);
    max-width: 1240px;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    height: var(--header-height);
    background: var(--glass-bg);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--glass-shadow);
    transition: background 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.site-header.scrolled {
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12), 0 1px 0 rgba(255,255,255,0.7) inset;
}

[data-theme="dark"] .site-header.scrolled {
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5), 0 1px 0 rgba(255,255,255,0.04) inset;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
    flex-shrink: 0;
}

.logo-img {
    width: 34px;
    height: 34px;
    object-fit: contain;
    border-radius: 10px;
    filter: drop-shadow(0 2px 8px var(--accent-glow));
    transition: transform var(--transition);
}

.logo:hover .logo-img {
    transform: rotate(-8deg) scale(1.08);
}

.logo-text {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}

.logo-text strong {
    color: var(--accent);
    font-weight: 800;
}

/* Nav links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
}

.nav-links a {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    transition: all var(--transition);
    letter-spacing: -0.01em;
    position: relative;
}

.nav-links a:hover {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .nav-links a:hover {
    background: rgba(255, 255, 255, 0.07);
}

.nav-links a.active {
    color: var(--accent);
    background: var(--accent-dim);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--bg-input);
    border: 1px solid var(--border-mid);
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: 1rem;
    transition: all var(--transition);
    color: var(--text-secondary);
    flex-shrink: 0;
}

.theme-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-dim);
    transform: scale(1.08);
}

.toggle-sun { display: block; }
.toggle-moon { display: none; }
[data-theme="dark"] .toggle-sun { display: none; }
[data-theme="dark"] .toggle-moon { display: block; }

/* Hamburger Button */
.hamburger {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: var(--bg-input);
    border: 1px solid var(--border-mid);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition);
    flex-shrink: 0;
    padding: 0;
}

.hamburger:hover {
    border-color: var(--accent);
    background: var(--accent-dim);
}

.ham-line {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text-secondary);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    transform-origin: center;
}

.hamburger.open .ham-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
    background: var(--accent);
}

.hamburger.open .ham-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger.open .ham-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
    background: var(--accent);
}

/* Mobile nav dropdown */
.mobile-nav {
    display: none;
    position: fixed;
    top: calc(16px + var(--header-height) + 8px);
    left: 24px;
    right: 24px;
    background: var(--glass-bg);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
    z-index: 99;
    overflow: hidden;
    transform: translateY(-10px) scale(0.98);
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.mobile-nav.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.mobile-nav ul {
    list-style: none;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mobile-nav a {
    display: block;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 12px 18px;
    border-radius: var(--radius-md);
    transition: all var(--transition);
    letter-spacing: -0.01em;
}

.mobile-nav a:hover, .mobile-nav a.active {
    color: var(--accent);
    background: var(--accent-dim);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   MAIN LAYOUT
   ═══════════════════════════════════════════════════════════════════════════════ */

.main-layout {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
    padding-top: calc(16px + var(--header-height) + 32px);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════════════════════════════════════════════ */

.sidebar {
    position: sticky;
    top: calc(16px + var(--header-height) + 20px);
    height: fit-content;
    padding: 1.5rem;
    border-right: 1px solid var(--border-subtle);
    max-height: calc(100vh - 140px);
    overflow-y: auto;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.sidebar-title {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    font-weight: 700;
}

.clear-history {
    background: none;
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    width: 26px; height: 26px;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: 0.7rem;
    display: flex; align-items: center; justify-content: center;
    transition: all var(--transition);
}

.clear-history:hover { border-color: var(--danger); color: var(--danger); }

.history-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.history-empty { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-muted); text-align: center; padding: 1.5rem 0; }
.history-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    cursor: pointer;
    border: 1px solid transparent;
    transition: all var(--transition);
    background: transparent;
}
.history-item:hover { background: var(--accent-dim); border-color: var(--accent); }
.hi-icon { color: var(--accent); font-size: 0.8rem; flex-shrink: 0; }
.hi-text { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.hi-count { background: var(--bg-input); border: 1px solid var(--border-mid); border-radius: var(--radius-full); font-family: var(--font-mono); font-size: 0.65rem; color: var(--text-muted); padding: 2px 8px; flex-shrink: 0; }

/* ═══════════════════════════════════════════════════════════════════════════════
   CENTRAL PANEL
   ═══════════════════════════════════════════════════════════════════════════════ */

.central-panel {
    padding: 2rem 2.5rem 4rem;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* Hero */
.hero { margin-bottom: 2.5rem; }
.hero h1 {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.1;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}
.hero h1 .accent { color: var(--accent); }
.hero-sub { font-size: 1rem; color: var(--text-secondary); line-height: 1.6; max-width: 520px; }
@keyframes fadeUp { from { opacity:0; transform:translateY(24px); } to { opacity:1; transform:translateY(0); } }
.hero { animation: fadeUp 0.7s ease both; }

/* Card */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-mid);
    border-radius: var(--radius-lg);
    padding: 2rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-card);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

.input-card { animation: fadeUp 0.7s ease 0.1s both; margin-bottom: 2rem; }
.input-card:hover { border-color: var(--border-strong); }

.drop-overlay {
    position: absolute; inset: 0; background: var(--accent-dim);
    border: 2px dashed var(--accent); border-radius: var(--radius-lg);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none; transition: opacity var(--transition); z-index: 10;
}
.drop-overlay.active { opacity: 1; }
.drop-message { display: flex; flex-direction: column; align-items: center; gap: 12px; color: var(--accent); }
.drop-icon { font-size: 2rem; animation: bounce 1s ease infinite; }
@keyframes bounce { 0%,100% { transform:translateY(0); } 50% { transform:translateY(-10px); } }
.drop-message span:last-child { font-family: var(--font-mono); font-size: 0.9rem; font-weight: 700; }

.input-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; flex-wrap: wrap; gap: 10px; }
.input-label { font-family: var(--font-display); font-size: 0.9rem; font-weight: 700; color: var(--text-primary); }
.input-label .muted { color: var(--text-muted); font-weight: 400; font-size: 0.8rem; margin-left: 4px; }
.toolbar-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.btn-ghost {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    background: var(--bg-input);
    border: 1px solid var(--border-mid);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }
.file-label { cursor: pointer; }

.domain-textarea {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-mid);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.88rem;
    padding: 1.25rem;
    resize: vertical;
    min-height: 170px;
    outline: none;
    transition: all var(--transition);
    line-height: 1.6;
    box-sizing: border-box;
}
.domain-textarea::placeholder { color: var(--text-muted); }
.domain-textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }

.input-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 1.25rem; flex-wrap: wrap; gap: 12px; }
.domain-count { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-muted); }

.btn-primary {
    display: inline-flex; align-items: center; gap: 10px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius-full);
    padding: 13px 30px;
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: 0 4px 16px var(--accent-glow);
    letter-spacing: -0.01em;
}
.btn-primary:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 10px 28px var(--accent-glow); }
.btn-primary:active { transform: translateY(0) scale(0.98); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-arrow { transition: transform var(--transition); }
.btn-primary:hover .btn-arrow { transform: translateX(5px); }

/* Progress */
.progress-wrap {
    margin-bottom: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-mid);
    border-radius: var(--radius-lg);
    padding: 1.5rem 2rem;
    backdrop-filter: blur(16px);
    width: 100%;
    box-sizing: border-box;
}
.progress-info { display: flex; justify-content: space-between; margin-bottom: 1rem; font-family: var(--font-mono); font-size: 0.85rem; color: var(--text-secondary); }
#progressPercent { color: var(--accent); font-weight: 700; font-size: 1rem; }
.progress-track { height: 6px; background: var(--bg-input); border-radius: var(--radius-full); overflow: hidden; border: 1px solid var(--border-subtle); }
.progress-bar { height: 100%; background: linear-gradient(90deg, var(--info), var(--accent)); border-radius: var(--radius-full); width: 0%; transition: width 0.4s cubic-bezier(0.25, 1, 0.5, 1); box-shadow: 0 0 15px var(--accent-glow); }

/* Results */
.results-section { animation: fadeUp 0.5s ease both; width: 100%; max-width: 100%; overflow: hidden; }
.print-header { display: none !important; }

.results-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; flex-wrap: wrap; gap: 1rem; width: 100%; }
.results-meta { display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.results-count { font-family: var(--font-display); font-size: 1.3rem; font-weight: 800; color: var(--text-primary); }
.results-time { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-muted); }
.export-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.btn-export {
    font-family: var(--font-mono); font-size: 0.75rem;
    background: var(--bg-card); border: 1px solid var(--border-mid);
    color: var(--text-secondary); padding: 8px 18px;
    border-radius: var(--radius-full); cursor: pointer;
    transition: all var(--transition); white-space: nowrap;
}
.btn-export:hover { background: var(--accent-dim); border-color: var(--accent); color: var(--text-primary); transform: translateY(-2px); }

.table-filter {
    display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem;
    flex-wrap: wrap; background: var(--bg-card); padding: 12px;
    border-radius: var(--radius-md); border: 1px solid var(--border-mid);
    width: 100%; box-sizing: border-box;
}
.filter-input {
    flex: 1; min-width: 150px; background: var(--bg-input);
    border: 1px solid var(--border-subtle); border-radius: var(--radius-full);
    color: var(--text-primary); font-family: var(--font-mono); font-size: 0.85rem;
    padding: 10px 16px; outline: none; transition: all var(--transition);
    width: 100%; box-sizing: border-box;
}
.filter-input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-dim); }
.filter-toggles { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-tag {
    font-family: var(--font-mono); font-size: 0.75rem;
    background: var(--bg-input); border: 1px solid var(--border-subtle);
    color: var(--text-secondary); padding: 8px 16px;
    border-radius: var(--radius-full); cursor: pointer; transition: all var(--transition);
}
.filter-tag.active, .filter-tag:hover { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }

.table-wrap {
    border-radius: var(--radius-lg); border: 1px solid var(--border-mid);
    background: var(--bg-card); width: 100%; max-width: 100vw;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    box-shadow: var(--shadow-card); display: block;
}
.results-table { width: 100%; min-width: 800px; border-collapse: collapse; font-family: var(--font-mono); font-size: 0.85rem; }
.results-table thead { background: rgba(0,0,0,0.03); border-bottom: 1px solid var(--border-mid); }
[data-theme="dark"] .results-table thead { background: rgba(0,0,0,0.2); }
.results-table th { padding: 16px 20px; text-align: left; font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); white-space: nowrap; font-weight: 700; }
.results-table td { padding: 18px 20px; border-bottom: 1px dashed var(--border-subtle); vertical-align: middle; color: var(--text-secondary); transition: background var(--transition); }
.results-table tr:last-child td { border-bottom: none; }
.results-table tbody tr { transition: all var(--transition); }
.results-table tbody tr:hover { background: rgba(0,0,0,0.02); }
[data-theme="dark"] .results-table tbody tr:hover { background: rgba(255,255,255,0.03); }
.results-table tbody tr.error-row td { color: var(--danger); opacity: 0.8; }

.td-domain { color: var(--text-primary) !important; font-weight: 700; font-size: 0.95rem; white-space: nowrap; }
.td-ip { color: var(--accent) !important; font-weight: 700; white-space: nowrap; }
.td-location { white-space: nowrap; }
.flag { font-size: 1.2em; margin-right: 6px; }

.badge-ssl-valid { display: inline-flex; align-items: center; gap: 6px; background: rgba(0, 168, 107, 0.1); color: var(--success); padding: 4px 10px; border-radius: var(--radius-full); font-size: 0.7rem; white-space: nowrap; border: 1px solid rgba(0, 168, 107, 0.3); }
.badge-ssl-invalid { display: inline-flex; align-items: center; gap: 6px; background: rgba(224, 62, 62, 0.1); color: var(--danger); padding: 4px 10px; border-radius: var(--radius-full); font-size: 0.7rem; border: 1px solid rgba(224, 62, 62, 0.25); }
[data-theme="dark"] .badge-ssl-valid { background: rgba(74, 240, 176, 0.15); color: #4af0b0; border-color: rgba(74,240,176,0.3); }

.mx-list { display: flex; flex-direction: column; gap: 4px; }
.mx-item { font-size: 0.75rem; color: var(--text-secondary); white-space: nowrap; }
.mx-priority { display: inline-block; background: var(--bg-input); padding: 2px 6px; border-radius: var(--radius-sm); margin-right: 6px; font-size: 0.65rem; color: var(--text-muted); border: 1px solid var(--border-subtle); }
.td-rdns { font-size: 0.75rem; color: var(--text-muted) !important; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.error-msg { color: var(--danger); font-size: 0.8rem; font-weight: 700; }

/* Toast */
.toast {
    position: fixed; bottom: 2rem; right: 2rem;
    background: var(--bg-card); border: 1px solid var(--border-mid);
    backdrop-filter: blur(20px); color: var(--text-primary);
    font-family: var(--font-mono); font-size: 0.85rem;
    padding: 16px 24px; border-radius: var(--radius-full);
    box-shadow: var(--shadow-card); transform: translateY(30px);
    opacity: 0; pointer-events: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1000;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.success { border-color: var(--accent); }
.toast.error   { border-color: var(--danger); }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-mid); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }

/* ═══════════════════════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════════════════════
   FOOTER (UPDATED)
   ═══════════════════════════════════════════════════════════════════════════════ */

.site-footer {
    position: relative;
    z-index: 2;
    border-top: 1px solid var(--border-subtle);
    padding: 3rem 4rem;
    display: grid;
    grid-template-columns: 2fr 1.5fr 1.5fr;
    gap: 3rem;
    background: var(--bg-card);
    backdrop-filter: blur(16px);
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
    width: fit-content;
}

.footer-brand img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 8px;
}

.footer-brand-text {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: -0.02em;
}

.footer-brand-text strong { color: var(--accent); }

.footer-copy {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.footer-heading {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    transition: all var(--transition);
    display: inline-block;
    width: fit-content;
}

.footer-links a:hover {
    color: var(--accent);
    transform: translateX(4px);
}

.social-icons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: var(--bg-input);
    border: 1px solid var(--border-mid);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    transition: all var(--transition);
}

.social-icons a:hover {
    background: var(--accent-dim);
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 4px 12px var(--accent-glow);
}

.social-icons svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Footer Responsive Updates */
@media (max-width: 850px) {
    .site-footer {
        grid-template-columns: 1fr;
        padding: 3rem 2rem;
        gap: 2.5rem;
        text-align: center;
    }
    
    .footer-col { align-items: center; }
    .footer-brand { margin: 0 auto; }
    .footer-links a:hover { transform: translateX(0) scale(1.05); }
    .social-icons { justify-content: center; }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
    .main-layout { grid-template-columns: 220px 1fr; }
    .central-panel { padding: 2rem 1.5rem; }
}

@media (max-width: 850px) {
    :root { --header-height: 60px; }

    .site-header {
        top: 12px;
        width: calc(100% - 32px);
        padding: 0 1.1rem;
    }

    .nav-links { display: none; }
    .hamburger { display: flex; }

    .main-layout {
        grid-template-columns: 1fr;
        padding-top: calc(12px + var(--header-height) + 60px);
        overflow-x: hidden;
    }

    .sidebar {
        position: static;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-mid);
        padding: 1.5rem;
        background: transparent;
        display: flex;
        flex-direction: column;
    }
    .sidebar-header { margin-bottom: 1rem; }
    .history-list { display: flex; overflow-x: auto; gap: 10px; padding-bottom: 10px; scrollbar-width: none; flex-direction: row; }
    .history-list::-webkit-scrollbar { display: none; }
    .history-item { flex: 0 0 auto; margin-bottom: 0; }

    .central-panel { padding: 1.5rem 1rem; width: 100vw; max-width: 100vw; overflow-x: hidden; box-sizing: border-box; }
    .hero h1 { font-size: 2.2rem; }
    .hero-sub { font-size: 0.88rem; padding: 0 2px; }

    .input-card { padding: 1.25rem; border-radius: var(--radius-md); width: 100%; box-sizing: border-box; }
    .input-toolbar { flex-direction: column; align-items: stretch; gap: 12px; }
    .toolbar-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; }
    .btn-ghost, .file-label { justify-content: center; width: 100%; text-align: center; }
    .domain-textarea { padding: 1rem; font-size: 0.85rem; min-height: 150px; }
    .input-footer { flex-direction: column; align-items: stretch; gap: 12px; }
    .btn-primary { width: 100%; justify-content: center; }

    .results-section { width: 100%; max-width: 100vw; overflow: hidden; box-sizing: border-box; padding: 0; }
    .results-header { flex-direction: column; align-items: stretch; gap: 1rem; width: 100%; }
    .export-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; }
    .btn-export { width: 100%; justify-content: center; }

    .table-filter { padding: 10px; gap: 10px; flex-direction: column; align-items: stretch; }
    .filter-toggles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; width: 100%; }
    .filter-tag { justify-content: center; text-align: center; }
    .table-wrap { width: 100%; max-width: 100%; display: block; overflow-x: auto; border-radius: var(--radius-md); }

    .site-footer { padding: 2rem 1.5rem; flex-direction: column; align-items: center; text-align: center; }
}

@media (max-width: 480px) {
    .site-header { width: calc(100% - 24px); top: 10px; }
    .logo-text { font-size: 1rem; }
    .hero h1 { font-size: 1.8rem; }
    .results-count { font-size: 1.1rem; }
    .toolbar-actions { grid-template-columns: 1fr 1fr; }
    .file-label { grid-column: span 2; }
    .export-actions { grid-template-columns: 1fr 1fr; }
    #exportPDF { grid-column: span 2; }
    .filter-toggles { grid-template-columns: 1fr 1fr 1fr; }
    .mobile-nav { left: 12px; right: 12px; }
}

/* ─── Print / PDF Styles ─────────────────────────────────────────────────────── */
@media print {
    .ambient-bg, #earthCanvas, .site-header, .mobile-nav, .sidebar, .input-card, .progress-wrap, .export-actions, .table-filter, .theme-toggle, .hero, #loadingScreen, .site-footer { display: none !important; }
    body, .main-layout, .central-panel { all: unset; display: block; font-family: 'Space Mono', monospace; font-size: 11px; color: #000; background: #fff; }
    .results-section { display: block !important; padding: 1rem; }
    .results-table, .results-table th, .results-table td { border: 1px solid #ccc; color: #000; background: #fff; }
    .results-table thead { background: #f5f5f5 !important; }
    .badge-ssl-valid  { background: #e6f9f2; color: #007a4a; }
    .badge-ssl-invalid{ background: #fde8e8; color: #c0392b; }
    @page { margin: 1.5cm; }
    .print-header { display: block !important; margin-bottom: 1rem; border-bottom: 2px solid #000; padding-bottom: 0.5rem; }
}
