/* ============================================================
   PhishGuard — style.css  (FIXED)
   Key fixes:
   1. font-family REMOVED from * selector — was breaking Font Awesome icons
   2. font-family applied to body only (inherits correctly)
   3. Stats dashboard grid fixed — 4 equal columns, no orphan card
   4. Stats dashboard no longer overlaps hero (margin-top removed)
   5. Navbar mobile wrap fixed
   6. All icon elements (i, .fa, .fas etc.) explicitly excluded from font override
   ============================================================ */

/* ── VARIABLES ─────────────────────────────────────────────── */
:root {
    --primary-color:   #2563eb;
    --primary-dark:    #1e40af;
    --secondary-color: #10b981;
    --danger-color:    #ef4444;
    --warning-color:   #f59e0b;
    --text-dark:       #1e293b;
    --text-light:      #64748b;
    --bg-light:        #f8fafc;
    --white:           #ffffff;
    --shadow:    0 4px 6px -1px rgba(0,0,0,.10), 0 2px 4px -1px rgba(0,0,0,.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.10), 0 4px 6px -2px rgba(0,0,0,.05);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,.10), 0 10px 10px -5px rgba(0,0,0,.04);
}

/* ── RESET ──────────────────────────────────────────────────
   CRITICAL FIX: Do NOT set font-family on *.
   Font Awesome icon fonts live on <i> tags — overriding them
   with a system font breaks every icon (shows □ boxes).
   Set font-family on body only and let it inherit normally.
─────────────────────────────────────────────────────────── */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* font-family removed from here intentionally */
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Explicit font exclusion for icon libraries — belt AND suspenders */
i,
.fa, .fas, .far, .fab, .fal, .fad,
[class^="fa-"], [class*=" fa-"] {
    font-family: inherit; /* Let Font Awesome's own @font-face win */
    font-style: normal;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.hidden { display: none !important; }

/* ── ANIMATIONS ────────────────────────────────────────────── */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}
@keyframes slideOut {
    from { transform: translateX(0);    opacity: 1; }
    to   { transform: translateX(100%); opacity: 0; }
}
@keyframes bounce {
    0%,20%,50%,80%,100% { transform: translateY(0); }
    40% { transform: translateY(-20px); }
    60% { transform: translateY(-10px); }
}
@keyframes pulse {
    0%,100% { opacity: 1; }
    50%      { opacity: 0.5; }
}
@keyframes spin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ── NAVBAR ─────────────────────────────────────────────────── */
.navbar {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 0.85rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .logo,
.navbar .nav-brand {
    font-size: 1.4rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--white);
    text-decoration: none;
    text-shadow: 0 2px 4px rgba(0,0,0,.1);
    white-space: nowrap;
}

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

.nav-links a {
    color: rgba(255,255,255,.88);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.25s ease;
    padding: 7px 14px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--white);
    background: rgba(255,255,255,.18);
}

/* ── HERO ───────────────────────────────────────────────────── */
.hero-section {
    text-align: center;
    padding: 4rem 1.5rem 3rem;
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.05)" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,138.7C960,139,1056,117,1152,106.7C1248,96,1344,96,1392,96L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom / cover;
    opacity: 0.3;
    pointer-events: none;
}

.hero-section > * { position: relative; z-index: 1; }

.hero-section h1 {
    font-size: 2.6rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 0 2px 8px rgba(0,0,0,.2);
    animation: fadeIn 0.8s ease;
    line-height: 1.2;
}

.small-hero { padding: 2rem 1rem; }

/* ── FEATURE PILLS ──────────────────────────────────────────── */
.feature-pills {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin: 1.5rem 0 0;
}

.feature-pill {
    background: rgba(255,255,255,.15);
    backdrop-filter: blur(10px);
    color: white;
    padding: 7px 16px;
    border-radius: 25px;
    font-size: 0.88rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: all 0.2s ease;
    border: 1px solid rgba(255,255,255,.22);
}

.feature-pill:hover {
    background: rgba(255,255,255,.26);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
}

/* ── STATS DASHBOARD ────────────────────────────────────────────
   FIX: Use 4 explicit equal columns on desktop.
        On tablets: 2 columns.
        On mobile: 1 column.
        Removed negative margin-top that caused overlap.
─────────────────────────────────────────────────────────────── */
.stats-dashboard {
    display: grid;
    grid-template-columns: repeat(4, 1fr);   /* 4 equal columns — no orphan */
    gap: 1.25rem;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    position: relative;
    z-index: 10;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 1.4rem 1.5rem;
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(37,99,235,.28);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
    animation: fadeIn 0.6s ease;
}
.stat-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 28px rgba(37,99,235,.38);
}
.stat-card.danger  { background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%); box-shadow: 0 8px 20px rgba(220,38,38,.28); }
.stat-card.danger:hover  { box-shadow: 0 14px 28px rgba(220,38,38,.38); }
.stat-card.warning { background: linear-gradient(135deg, #d97706 0%, #92400e 100%); box-shadow: 0 8px 20px rgba(217,119,6,.28); }
.stat-card.warning:hover { box-shadow: 0 14px 28px rgba(217,119,6,.38); }
.stat-card.success { background: linear-gradient(135deg, #16a34a 0%, #15803d 100%); box-shadow: 0 8px 20px rgba(22,163,74,.28); }
.stat-card.success:hover { box-shadow: 0 14px 28px rgba(22,163,74,.38); }

.stat-label {
    font-size: 0.78rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}
.stat-value {
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.4rem;
    text-shadow: 0 2px 4px rgba(0,0,0,.1);
}
.stat-subtitle {
    font-size: 0.72rem;
    opacity: 0.82;
}

/* ── BUTTONS ────────────────────────────────────────────────── */
.icon-btn {
    background: none;
    border: 1px solid #e2e8f0;
    color: var(--text-light);
    cursor: pointer;
    font-size: 1rem;
    padding: 10px 14px;
    transition: all 0.25s ease;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.icon-btn:hover {
    color: var(--primary-color);
    background: #eff6ff;
    border-color: var(--primary-color);
    transform: scale(1.06);
}

.primary-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    border: none;
    padding: 12px 26px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(37,99,235,.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}
.primary-btn:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #1e3a8a 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(37,99,235,.42);
}
.primary-btn:active  { transform: translateY(0); }
.primary-btn:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* ── TABS ───────────────────────────────────────────────────── */
.tabs-container {
    display: flex;
    gap: 0;
    margin-bottom: 1.75rem;
    border-bottom: 2px solid #e2e8f0;
    overflow-x: auto;
    scrollbar-width: none;
}
.tabs-container::-webkit-scrollbar { display: none; }

.tab-button {
    padding: 13px 26px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    color: #64748b;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.tab-button:hover         { color: var(--primary-color); background: #f8fafc; }
.tab-button.active        { color: var(--primary-color); border-bottom-color: var(--primary-color); background: #eff6ff; }

.tab-content              { display: none; animation: fadeIn 0.3s ease; }
.tab-content.active       { display: block; }

/* ── CARDS ──────────────────────────────────────────────────── */
.content-card, .project-info, .history-section, .quiz-section {
    background: var(--white);
    padding: 2.25rem;
    border-radius: 16px;
    box-shadow: var(--shadow);
    border: 1px solid #e2e8f0;
    margin-bottom: 2rem;
    animation: fadeIn 0.5s ease;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.content-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }

.project-info h2, .content-card h2 {
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-size: 1.75rem;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
}

/* ── SCAN INPUT BOX ─────────────────────────────────────────── */
.search-box {
    background: var(--white);
    padding: 14px 16px;
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    border: 2px solid #e2e8f0;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    flex-wrap: wrap;
}
.search-box:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(37,99,235,.1), var(--shadow-lg);
}
.search-box input {
    flex: 1;
    min-width: 200px;
    border: none;
    padding: 10px 14px;
    font-size: 1rem;
    outline: none;
    background: transparent;
    font-family: inherit;
}
.search-box input::placeholder { color: #94a3b8; }

/* ── QUICK ACTIONS ──────────────────────────────────────────── */
.quick-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 1rem;
}
.quick-action-btn {
    padding: 8px 15px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    color: #475569;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-weight: 500;
    font-family: inherit;
}
.quick-action-btn:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
}

/* ── SEARCH + FILTER ────────────────────────────────────────── */
.search-container {
    position: relative;
    margin-bottom: 1.5rem;
}
.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1rem;
    pointer-events: none;
}
.search-input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.2s ease;
    background: white;
}
.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}

.history-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.filter-btn {
    padding: 9px 16px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    color: #64748b;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: inherit;
}
.filter-btn:hover  { border-color: var(--primary-color); color: var(--primary-color); background: #eff6ff; }
.filter-btn.active { background: var(--primary-color); border-color: var(--primary-color); color: white; box-shadow: 0 4px 12px rgba(37,99,235,.3); }

/* ── BATCH ──────────────────────────────────────────────────── */
.batch-section {
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}
.batch-section:focus-within {
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 4px rgba(37,99,235,.1);
}
.batch-textarea {
    width: 100%;
    min-height: 180px;
    padding: 14px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-family: 'Courier New', monospace;
    font-size: 0.93rem;
    resize: vertical;
    transition: all 0.2s ease;
    background: white;
}
.batch-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}

/* ── INFO GRID (How It Works) ───────────────────────────────── */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.75rem;
    margin-top: 2rem;
}
.info-card {
    padding: 2rem;
    border-radius: 16px;
    background: white;
    border: 1px solid #e2e8f0;
    transition: all 0.28s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
}
.info-card:hover {
    transform: translateY(-7px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}
.info-card h4 {
    margin-bottom: 0.75rem;
    color: var(--text-dark);
    font-size: 1.15rem;
    font-weight: 700;
}
.icon-box { font-size: 2.4rem; color: var(--primary-color); margin-bottom: 1rem; }

/* ── TABLE ──────────────────────────────────────────────────── */
.table-wrapper {
    overflow-x: auto;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
}
table { width: 100%; border-collapse: collapse; background: white; }
th {
    text-align: left;
    padding: 0.9rem 1rem;
    background: #f8fafc;
    color: #475569;
    font-size: 0.82rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e2e8f0;
}
td { padding: 0.9rem 1rem; border-bottom: 1px solid #f1f5f9; color: var(--text-dark); }
tr:hover td    { background: #f8fafc; }
tr:last-child td { border-bottom: none; }

/* ── EMPTY STATE ────────────────────────────────────────────── */
.empty-state    { text-align: center; padding: 3.5rem 2rem; color: #94a3b8; }
.empty-state i  { font-size: 3.5rem; margin-bottom: 1rem; opacity: 0.45; display: block; }
.empty-state h3 { color: #64748b; margin-bottom: 0.5rem; }

/* ── QUIZ ───────────────────────────────────────────────────── */
.option-button {
    display: block;
    width: 100%;
    padding: 1.1rem 1.25rem;
    margin-bottom: 0.7rem;
    border: 2px solid #e2e8f0;
    background: var(--white);
    border-radius: 12px;
    cursor: pointer;
    text-align: left;
    font-size: 0.97rem;
    transition: all 0.2s ease;
    font-weight: 500;
    font-family: inherit;
    color: var(--text-dark);
}
.option-button:hover {
    background: #f8fafc;
    border-color: var(--primary-color);
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(37,99,235,.1);
}
.option-button.selected {
    background: #eff6ff;
    border-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(37,99,235,.18);
}

/* ── RESULTS (Technical Analysis) ──────────────────────────── */
.feature-analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}
.feature-card {
    background: var(--white);
    padding: 1rem 1.2rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,.04);
    transition: all 0.2s ease;
}
.feature-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(37,99,235,.1);
    transform: translateY(-2px);
}
.label { font-weight: 500; color: var(--text-dark); font-size: 0.88rem; display: flex; align-items: center; }

/* ── BADGES ─────────────────────────────────────────────────── */
.badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.badge-pass { background: #dcfce7; color: #166534; }
.badge-fail { background: #fee2e2; color: #991b1b; }
.badge-new  { background: #dbeafe; color: #1e40af; }
.badge-pro  { background: #fef3c7; color: #92400e; }

.critical-tag {
    background: #ef4444;
    color: white;
    font-size: 0.65rem;
    padding: 3px 8px;
    border-radius: 6px;
    margin-left: 8px;
    font-weight: bold;
}
.version-badge {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.74rem;
    font-weight: 600;
    margin-left: 10px;
    vertical-align: middle;
    box-shadow: 0 2px 8px rgba(37,99,235,.28);
}

/* ── TOOLTIPS ───────────────────────────────────────────────── */
.tooltip { position: relative; display: inline-block; cursor: help; }
.tooltip .tooltiptext {
    visibility: hidden;
    background: #1e293b;
    color: white;
    text-align: center;
    border-radius: 8px;
    padding: 7px 12px;
    position: absolute;
    z-index: 1000;
    bottom: 130%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.25s;
    font-size: 0.82rem;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
}
.tooltip .tooltiptext::after {
    content: '';
    position: absolute;
    top: 100%; left: 50%;
    margin-left: -5px;
    border: 5px solid transparent;
    border-top-color: #1e293b;
}
.tooltip:hover .tooltiptext { visibility: visible; opacity: 1; }

/* ── ABOUT / PROFILE ────────────────────────────────────────── */
.profile-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    border: 1px solid #e2e8f0;
}
.profile-header { display: flex; align-items: center; gap: 2rem; flex-wrap: wrap; }
.profile-icon   { font-size: 5rem; color: var(--primary-color); animation: pulse 2s infinite; }

.contact-links { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-top: 1.5rem; }
.contact-btn {
    padding: 11px 22px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    color: white;
    transition: all 0.28s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
}
.contact-btn:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.2); }
.linkedin { background: #0077b5; }
.github   { background: #1a1a2e; }
.email    { background: #ea4335; }

/* ── FOOTER ─────────────────────────────────────────────────── */
.main-footer {
    background-color: #0f172a;
    color: var(--white);
    padding: 3rem 1rem 1.5rem;
    margin-top: 4rem;
}
.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2.5rem;
}
.footer-col h3 {
    margin-bottom: 1rem;
    color: var(--white);
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}
.footer-col p { color: #94a3b8; font-size: 0.92rem; line-height: 1.7; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.6rem; }
.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.25s ease;
    font-size: 0.92rem;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}
.footer-links a:hover { color: #60a5fa; transform: translateX(4px); }
.footer-bottom {
    text-align: center;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,.08);
    font-size: 0.88rem;
    color: #64748b;
}
.footer-bottom a { color: #64748b; text-decoration: none; }
.footer-bottom a:hover { color: #94a3b8; }

/* ── NOTIFICATIONS ──────────────────────────────────────────── */
.notification {
    position: fixed;
    top: 20px; right: 20px;
    padding: 14px 18px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
    z-index: 10000;
    animation: slideIn 0.3s ease;
    border-left: 4px solid var(--primary-color);
    max-width: 340px;
    font-size: 0.92rem;
}
.notification.error   { border-left-color: var(--danger-color); }
.notification.success { border-left-color: var(--secondary-color); }

/* ── LOADING ────────────────────────────────────────────────── */
.loading-spinner {
    display: inline-block;
    width: 38px; height: 38px;
    border: 4px solid #f1f5f9;
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

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

/* Tablet: 2-column stats */
@media (max-width: 900px) {
    .stats-dashboard {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile */
@media (max-width: 640px) {
    .navbar {
        flex-direction: column;
        gap: 0.75rem;
        padding: 0.9rem 1rem;
    }
    .nav-links {
        gap: 2px;
        justify-content: center;
    }
    .nav-links a {
        padding: 6px 10px;
        font-size: 0.82rem;
    }

    .hero-section h1 { font-size: 1.7rem; }
    .feature-pills   { gap: 7px; }
    .feature-pill    { font-size: 0.8rem; padding: 6px 12px; }

    .stats-dashboard {
        grid-template-columns: repeat(2, 1fr);  /* 2x2 on phones — still no orphan */
        gap: 1rem;
        margin: 1.25rem auto;
    }
    .stat-value  { font-size: 2rem; }

    .search-box  { flex-direction: column; padding: 12px; border-radius: 14px; }
    .search-box input { width: 100%; }

    .tab-button  { padding: 11px 16px; font-size: 0.88rem; }

    .info-grid   { grid-template-columns: 1fr; }

    .history-filters {
        overflow-x: auto;
        flex-wrap: nowrap;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .history-filters::-webkit-scrollbar { display: none; }

    .feature-analysis-grid { grid-template-columns: 1fr; }
    .profile-header        { flex-direction: column; text-align: center; }
}

/* ── PRINT ──────────────────────────────────────────────────── */
@media print {
    .navbar, .primary-btn, .icon-btn, .footer-content, .quick-actions { display: none !important; }
    body { background: white; }
    .content-card, .project-info { box-shadow: none; border: 1px solid #ddd; }
}

/* ═══════════════════════════════════════════════════
   NEW TOOL PAGE STYLES
   ═══════════════════════════════════════════════════ */

/* ── Nav hamburger ─────────────────────────────────── */
.nav-hamburger {
    display: none;
    background: none;
    border: 1px solid rgba(255,255,255,.25);
    color: white;
    font-size: 1.05rem;
    cursor: pointer;
    padding: 7px 11px;
    border-radius: 7px;
    line-height: 1;
    transition: background .2s;
}
.nav-hamburger:hover { background: rgba(255,255,255,.1); }

/* ── Tool page hero ────────────────────────────────── */
.tool-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 60%, #0a2540 100%);
    color: white;
    padding: 52px 24px 44px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.tool-hero::before {
    content: '';
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(37,99,235,.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(37,99,235,.05) 1px, transparent 1px);
    background-size: 40px 40px;
}
.tool-hero-icon {
    width: 72px; height: 72px;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    border-radius: 20px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.9rem;
    margin: 0 auto 20px;
    box-shadow: 0 8px 24px rgba(37,99,235,.4);
    position: relative;
}
.tool-hero h1 {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}
.tool-hero p {
    font-size: 1rem;
    opacity: .78;
    max-width: 600px;
    margin: 0 auto;
}

/* ── Tool card ─────────────────────────────────────── */
.tool-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 16px rgba(0,0,0,.07);
    padding: 28px;
    margin-bottom: 20px;
}
.tool-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 18px;
    display: flex; align-items: center; gap: 9px;
}
.tool-card h3 i { color: #2563eb; }

/* ── Input row ─────────────────────────────────────── */
.input-row {
    display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
}
.input-row input {
    flex: 1; min-width: 200px;
    padding: 13px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: .95rem;
    font-family: inherit;
    transition: border-color .2s, box-shadow .2s;
    outline: none;
}
.input-row input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}

/* ── Result box ────────────────────────────────────── */
.result-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    display: none;
}
.result-box.visible { display: block; }

/* ── Risk banner ───────────────────────────────────── */
.risk-banner {
    border-radius: 10px;
    padding: 14px 18px;
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 16px;
    font-weight: 600;
}
.risk-banner.high   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.risk-banner.medium { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.risk-banner.low    { background: #dcfce7; color: #166534; border: 1px solid #86efac; }

/* ── Info grid (2-col) ─────────────────────────────── */
.info-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 14px;
}
.info-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 14px;
}
.info-item .label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: #64748b; margin-bottom: 4px; }
.info-item .value { font-size: .9rem; font-weight: 600; color: #1e293b; word-break: break-all; }

/* ── Chain trace ───────────────────────────────────── */
.redirect-chain { margin-top: 14px; }
.chain-step {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: .85rem;
}
.chain-step:last-child { border-bottom: none; }
.chain-num {
    width: 26px; height: 26px; border-radius: 50%;
    background: #2563eb; color: white;
    display: flex; align-items: center; justify-content: center;
    font-size: .75rem; font-weight: 700; flex-shrink: 0;
}
.chain-url { color: #334155; word-break: break-all; flex: 1; }
.chain-status { font-size: .75rem; font-weight: 700; padding: 2px 8px; border-radius: 12px; white-space: nowrap; }
.status-2xx { background: #dcfce7; color: #166534; }
.status-3xx { background: #fef3c7; color: #92400e; }
.status-err { background: #fee2e2; color: #991b1b; }

/* ── QR output ─────────────────────────────────────── */
.qr-output { text-align: center; padding: 24px; }
.qr-output img { max-width: 260px; border-radius: 12px; border: 6px solid #fff; box-shadow: 0 4px 20px rgba(0,0,0,.12); }

/* ── Tab switcher ──────────────────────────────────── */
.tab-switcher {
    display: flex; gap: 4px;
    background: #f1f5f9;
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 20px;
    width: fit-content;
}
.tab-sw-btn {
    background: none; border: none;
    padding: 9px 20px;
    border-radius: 7px;
    font-size: .87rem; font-weight: 600;
    color: #64748b; cursor: pointer;
    transition: all .15s; font-family: inherit;
    display: flex; align-items: center; gap: 7px;
}
.tab-sw-btn.active {
    background: #fff; color: #2563eb;
    box-shadow: 0 2px 6px rgba(0,0,0,.08);
}

/* ── Blog card ─────────────────────────────────────── */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 22px;
    margin-top: 28px;
}
.blog-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
    transition: transform .2s, box-shadow .2s;
    cursor: pointer;
}
.blog-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.blog-card-img {
    height: 180px;
    background: linear-gradient(135deg, #1e3a5f, #2563eb);
    display: flex; align-items: center; justify-content: center;
    font-size: 3rem; color: rgba(255,255,255,.4);
    overflow: hidden;
}
.blog-card-img img { width: 100%; height: 100%; object-fit: cover; }
.blog-card-body { padding: 20px; }
.blog-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.blog-tag {
    background: #eff6ff; color: #1d4ed8;
    padding: 3px 10px; border-radius: 12px;
    font-size: .72rem; font-weight: 700;
}
.blog-title {
    font-size: 1.05rem; font-weight: 700; color: #1e293b;
    margin-bottom: 8px; line-height: 1.4;
}
.blog-excerpt { font-size: .85rem; color: #64748b; line-height: 1.6; margin-bottom: 14px; }
.blog-meta { font-size: .75rem; color: #94a3b8; display: flex; align-items: center; gap: 10px; }

/* ── Blog post page ────────────────────────────────── */
.blog-post-body {
    max-width: 760px; margin: 0 auto;
    line-height: 1.8; color: #334155; font-size: .97rem;
}
.blog-post-body h2 { font-size: 1.4rem; color: #1e293b; margin: 28px 0 12px; }
.blog-post-body h3 { font-size: 1.1rem; color: #1e293b; margin: 20px 0 8px; }
.blog-post-body p  { margin-bottom: 16px; }
.blog-post-body ul, .blog-post-body ol { padding-left: 24px; margin-bottom: 16px; }
.blog-post-body li { margin-bottom: 6px; }
.blog-post-body code {
    background: #f1f5f9; color: #0f172a;
    padding: 2px 6px; border-radius: 4px; font-size: .88rem;
    font-family: 'JetBrains Mono', monospace;
}
.blog-post-body pre code { display: block; padding: 16px; overflow-x: auto; border-radius: 8px; }
.blog-post-body blockquote {
    border-left: 4px solid #2563eb;
    padding: 12px 18px;
    background: #eff6ff;
    border-radius: 0 8px 8px 0;
    margin: 18px 0;
}

/* ── Upload drop zone ──────────────────────────────── */
.drop-zone {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: all .2s;
    color: #64748b;
}
.drop-zone:hover, .drop-zone.drag-over {
    border-color: #2563eb;
    background: #eff6ff;
    color: #2563eb;
}
.drop-zone i { font-size: 2.5rem; margin-bottom: 12px; display: block; }

/* ── Flag ──────────────────────────────────────────── */
.flag-icon { font-size: 1.4rem; margin-right: 6px; }

/* ═══════════════════════════════════════════════════
   MOBILE FIXES FOR NAVBAR (overflow fix)
   ═══════════════════════════════════════════════════ */
@media (max-width: 920px) {
    .nav-hamburger { display: flex; align-items: center; }

    .nav-links {
        display: none;
        flex-direction: column;
        position: fixed;
        top: var(--nav-h, 60px); left: 0; right: 0;
        background: #0f172a;
        border-bottom: 1px solid rgba(255,255,255,.1);
        padding: 10px;
        gap: 2px;
        z-index: 9999;
        max-height: calc(100vh - 60px);
        overflow-y: auto;
        box-shadow: 0 8px 24px rgba(0,0,0,.4);
    }

    .nav-links.nav-open { display: flex; }

    .nav-links a {
        display: flex; align-items: center; gap: 8px;
        color: rgba(255,255,255,.75);
        text-decoration: none;
        padding: 12px 14px;
        border-radius: 8px;
        font-size: .9rem;
        font-weight: 500;
        transition: background .15s;
    }
    .nav-links a:hover, .nav-links a.active { background: rgba(255,255,255,.1); color: white; }

    /* Tool pages mobile */
    .info-grid-2 { grid-template-columns: 1fr; }
    .input-row   { flex-direction: column; }
    .input-row input { width: 100%; }
    .input-row .primary-btn { width: 100%; justify-content: center; }
    .tool-hero  { padding: 36px 16px 32px; }
    .blog-grid  { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════
   DARK MODE — added in production-hardened build
   Toggle via <button onclick="toggleDark()">
   ═══════════════════════════════════════════════════════ */
:root {
  --bg: #f8fafc;
  --card-bg: #ffffff;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --input-bg: #ffffff;
  --nav-bg: #0f172a;
}
[data-theme="dark"] {
  --bg: #0f172a;
  --card-bg: #1e293b;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --border: #334155;
  --input-bg: #1e293b;
  --nav-bg: #020617;
}
body { background: var(--bg); color: var(--text); transition: background .3s, color .3s; }
.container { color: var(--text); }
[data-theme="dark"] .stat-card,
[data-theme="dark"] .result-card,
[data-theme="dark"] .history-item,
[data-theme="dark"] .card { background: var(--card-bg); border-color: var(--border); }
[data-theme="dark"] input, [data-theme="dark"] textarea, [data-theme="dark"] select {
  background: var(--input-bg); color: var(--text); border-color: var(--border);
}
[data-theme="dark"] .navbar { background: var(--nav-bg); }
[data-theme="dark"] .tip-box { background: #1e3a5f; color: var(--text); }
[data-theme="dark"] .code-block { background: #020617; }

/* Dark mode toggle button */
.dark-toggle {
  position: fixed; bottom: 20px; right: 20px; z-index: 9999;
  width: 44px; height: 44px; border-radius: 50%;
  background: #1e3a8a; color: #fff; border: none; cursor: pointer;
  font-size: 1.1rem; box-shadow: 0 4px 14px rgba(0,0,0,.25);
  display: flex; align-items: center; justify-content: center;
  transition: background .3s, transform .2s;
}
.dark-toggle:hover { background: #2563eb; transform: scale(1.1); }

/* ═══════════════════════════════════════════════════════
   SKELETON LOADER — shown while data is loading
   ═══════════════════════════════════════════════════════ */
.skeleton {
  background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s infinite;
  border-radius: 6px;
}
[data-theme="dark"] .skeleton {
  background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
  background-size: 200% 100%;
}
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton-stat { height: 48px; width: 80px; margin: 0 auto; border-radius: 8px; }
.skeleton-row { height: 20px; border-radius: 4px; margin-bottom: 10px; }
.skeleton-row.short { width: 60%; }
.skeleton-row.long { width: 90%; }

/* ═══════════════════════════════════════════════════════
   COPY TO CLIPBOARD BUTTON — for result cards
   ═══════════════════════════════════════════════════════ */
.copy-result-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px; font-size: .8rem; font-weight: 600;
  background: transparent; border: 1px solid var(--border, #e2e8f0);
  border-radius: 6px; cursor: pointer; color: var(--text-muted, #64748b);
  transition: all .2s;
}
.copy-result-btn:hover { background: #f0f7ff; color: #2563eb; border-color: #93c5fd; }
.copy-result-btn.copied { background: #f0fdf4; color: #16a34a; border-color: #86efac; }

/* ═══════════════════════════════════════════════════════
   EMPTY STATE — shown when history is empty
   ═══════════════════════════════════════════════════════ */
.empty-state {
  text-align: center; padding: 48px 24px; color: var(--text-muted, #64748b);
}
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 16px; opacity: .5; }
.empty-state h3 { color: var(--text, #1e293b); margin-bottom: 8px; font-size: 1.1rem; }
.empty-state p { font-size: .9rem; margin-bottom: 20px; max-width: 320px; margin-left: auto; margin-right: auto; }
.empty-state a, .empty-state button {
  display: inline-block; padding: 10px 24px;
  background: #1e40af; color: #fff; border: none;
  border-radius: 8px; text-decoration: none; font-weight: 600; cursor: pointer;
}

/* ═══════════════════════════════════════════════════════
   ACCESSIBILITY IMPROVEMENTS
   ═══════════════════════════════════════════════════════ */
:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 2px;
  border-radius: 4px;
}
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
