/* =======================================================================
   PHISHGUARD AI — MERGED & FIXED CSS v7.0
   Combines style.css + guide_styles.css into one unified file.
   Fixes:
     1. Glow orb square bug (removed overflow-x:hidden that clipped border-radius)
     2. Unified button styles — guide-btn and download-extension-btn are
        now consistent and defined in a single place.
   ======================================================================= */

/* ------------------------------------------------------------------
   RESET & BASE
   ------------------------------------------------------------------ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

:root {
    --bg-primary:      #0a0e1a;
    --bg-secondary:    #131825;
    --bg-tertiary:     #1a1f35;
    --text-primary:    #e0e6ff;
    --text-secondary:  #9ca3bf;
    --accent-primary:  #00ff9c;
    --accent-danger:   #ff3b3b;
    --accent-warning:  #ff9800;
    --border-color:    rgba(0, 255, 156, 0.2);
    --shadow-glow:     0 0 20px rgba(0, 255, 156, 0.3);
    --color-safe:      #00ff41;
    --color-suspicious:#ffbe0b;
    --color-phishing:  #ff006e;
}

[data-theme="dark"] {
    --bg-primary:      #121212;
    --bg-secondary:    #1e1e1e;
    --bg-tertiary:     #2a2a2a;
    --text-primary:    #ffffff;
    --text-secondary:  #b0b0b0;
    --accent-primary:  #667eea;
    --accent-danger:   #dc3545;
    --accent-warning:  #ffc107;
    --border-color:    rgba(102, 126, 234, 0.3);
    --shadow-glow:     0 0 20px rgba(102, 126, 234, 0.2);
    --color-safe:      #00ff41;
    --color-suspicious:#ffc107;
    --color-phishing:  #dc3545;
}

[data-theme="light"] {
    --bg-primary:      #f8f9fa;
    --bg-secondary:    #ffffff;
    --bg-tertiary:     #e9ecef;
    --text-primary:    #212529;
    --text-secondary:  #6c757d;
    --accent-primary:  #28a745;
    --accent-danger:   #dc3545;
    --accent-warning:  #ffc107;
    --border-color:    rgba(0, 0, 0, 0.1);
    --shadow-glow:     0 2px 8px rgba(0, 0, 0, 0.1);
    --color-safe:      #28a745;
    --color-suspicious:#ffc107;
    --color-phishing:  #dc3545;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    /* FIX 1: Do NOT set overflow-x:hidden here — it creates a new stacking
       context that prevents fixed/absolute children from painting correctly,
       which caused the glow orbs to be clipped into squares.
       Horizontal overflow is handled per-section where actually needed. */
}

/* ------------------------------------------------------------------
   BACKGROUND EFFECTS  (glow orbs — FIX 1)
   ------------------------------------------------------------------ */
.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(0, 255, 156, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 156, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: -1;
}

.glow-orb {
    position: fixed;
    width: 500px;
    height: 500px;
    border-radius: 50%;           /* circle */
    filter: blur(100px);
    opacity: 0.3;
    pointer-events: none;
    z-index: -1;
    animation: float 20s infinite ease-in-out;
    /* Prevent any parent clip from squaring the orb */
    will-change: transform;
    transform: translateZ(0);
}

.glow-orb-1 {
    background: radial-gradient(circle, var(--accent-primary), transparent);
    top: -200px;
    left: -200px;
}

.glow-orb-2 {
    background: radial-gradient(circle, #764ba2, transparent);
    bottom: -200px;
    right: -200px;
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50%       { transform: translate(50px, 50px); }
}

/* ------------------------------------------------------------------
   CONTAINER
   ------------------------------------------------------------------ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    /* clip horizontal overflow here instead of on body */
    overflow-x: clip;
}

/* ------------------------------------------------------------------
   HEADER
   ------------------------------------------------------------------ */
.header {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeInDown 0.8s ease-out;
    position: relative;
}

.header-content {
    margin-bottom: 30px;
}

.header-top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 0;
}

/* Left: logo + subtitle */
.logo-and-subtitle {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    position: relative;
    padding-left: 25px;
}

.logo-and-subtitle::before {
    content: "";
    position: absolute;
    left: 0;
    top: 5px;
    width: 4px;
    height: 85%;
    background: linear-gradient(to bottom, var(--accent-primary), var(--accent-danger));
    border-radius: 4px;
}

/* ------------------------------------------------------------------
   FIX 2 — UNIFIED HEADER BUTTONS
   Both buttons share the same base sizing/layout and differ only in
   fill vs. outline treatment.  All previous duplicate rules removed.
   ------------------------------------------------------------------ */
.header-right-buttons {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 15px;
    flex-shrink: 0;
}

/* ============================================================
   REPLACE YOUR BUTTON STYLES WITH THIS THEME-AWARE VERSION
   ============================================================ */

.guide-btn,
.download-extension-btn {
    /* Layout */
    display: inline-flex;
    align-items: center;
    gap: 8px;
    /* Positioning — always static inside the flex container */
    position: static !important;
    top: auto !important;
    right: auto !important;
    margin: 0 !important;
    /* Size */
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
    white-space: nowrap;
    /* Shape */
    border-radius: 10px;
    /* Animation */
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
    overflow: hidden;
    /* Shimmer pseudo-element prep */
    position: relative !important; /* override static only for ::before */
}

.guide-btn::before,
.download-extension-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.guide-btn:hover::before,
.download-extension-btn:hover::before {
    left: 100%;
}

.guide-btn:hover,
.download-extension-btn:hover {
    transform: translateY(-2px);
}

/* ✅ THEME-AWARE: "How It Works" button */
.guide-btn {
    background: color-mix(in srgb, var(--accent-primary) 10%, transparent);
    color: var(--accent-primary);
    border: 2px solid var(--accent-primary);
    box-shadow: 0 4px 12px color-mix(in srgb, var(--accent-primary) 30%, transparent);
    text-transform: none;
}

.guide-btn:hover {
    background: color-mix(in srgb, var(--accent-primary) 20%, transparent);
    box-shadow: 0 6px 20px color-mix(in srgb, var(--accent-primary) 50%, transparent);
}

/* ✅ THEME-AWARE: "Download Extension" button */
.download-extension-btn {
    background: var(--accent-primary);
    color: var(--bg-primary);
    border: 2px solid var(--accent-primary);
    box-shadow: 0 4px 12px color-mix(in srgb, var(--accent-primary) 40%, transparent);
    text-transform: uppercase;
}

.download-extension-btn:hover {
    background: color-mix(in srgb, var(--accent-primary) 85%, #000);
    box-shadow: 0 6px 20px color-mix(in srgb, var(--accent-primary) 60%, transparent);
}

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

.guide-btn i,
.download-extension-btn i {
    font-size: 16px;
}

.download-extension-btn i {
    animation: bounceDownload 2s ease-in-out infinite;
}

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

/* ------------------------------------------------------------------
   TITLE
   ------------------------------------------------------------------ */
.title {
    font-family: 'Orbitron', monospace;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.title i {
    color: var(--accent-primary);
    filter: drop-shadow(0 0 10px var(--accent-primary));
    font-size: 2.2rem;
}

.neon-green {
    color: var(--accent-primary);
    text-shadow: 0 0 20px var(--accent-primary);
}

.neon-red {
    color: var(--accent-danger);
    text-shadow: 0 0 20px var(--accent-danger);
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin: 0;
    text-align: left;
}

/* ------------------------------------------------------------------
   STATS GRID
   ------------------------------------------------------------------ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
    margin-top: 30px;
}

.stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    animation: fadeInUp 0.8s ease-out;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow);
    border-color: var(--accent-primary);
}

.stat-card i {
    font-size: 2rem;
    color: var(--accent-primary);
    margin-bottom: 10px;
    display: block;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: 5px;
}

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

/* ------------------------------------------------------------------
   HEADER ACTIONS (user controls row)
   ------------------------------------------------------------------ */
.header-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.user-badge i { color: var(--accent-primary); }

.user-badge:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

.user-badge.clickable { cursor: pointer; }

#username {
    color: var(--accent-primary);
    text-shadow: 0 0 10px var(--accent-primary);
}

.icon-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    background: var(--accent-primary);
    color: var(--bg-primary);
    transform: rotate(15deg);
    box-shadow: var(--shadow-glow);
}

.logout-btn { border-color: rgba(255, 0, 110, 0.4); }

.logout-btn:hover {
    background: var(--accent-danger);
    color: white;
    transform: rotate(0deg);
}

/* ------------------------------------------------------------------
   SCAN CARD
   ------------------------------------------------------------------ */
.scan-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-glow);
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.scan-card h2 {
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    margin-bottom: 25px;
    color: var(--accent-primary);
}

.scan-card h2 i { margin-right: 10px; }

/* ------------------------------------------------------------------
   INPUT WRAPPER
   ------------------------------------------------------------------ */
.input-wrapper {
    position: relative;
    margin-bottom: 20px;
}

#urlInput {
    width: 100%;
    padding: 18px 20px;
    font-size: 1rem;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

#urlInput:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(0, 255, 156, 0.1);
}

.url-preview {
    margin-top: 10px;
    padding: 10px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: none;
    align-items: center;
    gap: 8px;
}

.url-preview.show  { display: flex; }
.url-preview.error { color: var(--accent-danger); }
.url-preview i     { font-size: 1rem; }

/* ------------------------------------------------------------------
   QUICK TESTS
   ------------------------------------------------------------------ */
.quick-tests {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
    align-items: center;
}

.quick-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-right: 5px;
}

.quick-btn {
    padding: 8px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.quick-btn:hover {
    background: var(--accent-primary);
    color: var(--bg-primary);
    transform: translateY(-2px);
}

.quick-btn i { margin-right: 5px; }

/* ------------------------------------------------------------------
   SCAN BUTTON
   ------------------------------------------------------------------ */
.scan-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, var(--accent-primary), #00d17a);
    border: none;
    border-radius: 12px;
    color: var(--bg-primary);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(0, 255, 156, 0.3);
}

.scan-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 255, 156, 0.5);
}

.scan-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ------------------------------------------------------------------
   LOADING
   ------------------------------------------------------------------ */
.loading {
    text-align: center;
    padding: 40px 20px;
    display: none;
}

.loading:not(.hidden) { display: block; }

.spinner-advanced {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 25px;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1.5s linear infinite;
}

.spinner-ring:nth-child(2) {
    border-top-color: var(--accent-danger);
    animation-delay: -0.5s;
    width: 60%; height: 60%;
    top: 20%; left: 20%;
}

.spinner-ring:nth-child(3) {
    border-top-color: var(--accent-warning);
    animation-delay: -1s;
    width: 40%; height: 40%;
    top: 30%; left: 30%;
}

@keyframes spin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text     { margin-bottom: 15px; }
.loading-stage    { font-size: 1rem; color: var(--text-primary); margin-bottom: 5px; }
.loading-time     { font-size: 0.9rem; color: var(--text-secondary); }
.loading-progress { width: 100%; height: 6px; background: var(--bg-tertiary); border-radius: 3px; overflow: hidden; }

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), #00d17a);
    width: 0%;
    transition: width 0.3s ease;
}

/* ------------------------------------------------------------------
   RESULT CARD
   ------------------------------------------------------------------ */
.result-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-glow);
    display: none;
    animation: fadeInUp 0.8s ease-out;
}

.result-card:not(.hidden) { display: block; }

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.result-header h2 {
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    color: var(--accent-primary);
}

.result-actions { display: flex; gap: 10px; }

.action-btn {
    width: 40px;
    height: 40px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-btn:hover {
    background: var(--accent-primary);
    color: var(--bg-primary);
    transform: translateY(-2px);
}

/* ------------------------------------------------------------------
   SCANNED URL
   ------------------------------------------------------------------ */
.scanned-url {
    padding: 15px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    word-break: break-all;
}

.scanned-url i { color: var(--accent-primary); font-size: 1.2rem; }

/* ------------------------------------------------------------------
   STATUS SECTION
   ------------------------------------------------------------------ */
.status-section {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 30px;
}

.status {
    padding: 20px 40px;
    border-radius: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: 2px solid;
}

.status.safe       { background: rgba(0,255,65,.15); color: var(--color-safe);      border-color: var(--color-safe);      box-shadow: 0 0 20px rgba(0,255,65,.3); }
.status.safe i     { color: var(--color-safe); }
.status.suspicious { background: rgba(255,190,11,.15); color: var(--color-suspicious); border-color: var(--color-suspicious); box-shadow: 0 0 20px rgba(255,190,11,.3); }
.status.suspicious i { color: var(--color-suspicious); }
.status.phishing,
.status.danger     { background: rgba(255,0,110,.15); color: var(--color-phishing);  border-color: var(--color-phishing);  box-shadow: 0 0 20px rgba(255,0,110,.3); animation: pulse-danger 2s ease-in-out infinite; }
.status.phishing i,
.status.danger i   { color: var(--color-phishing); }
.status.warning    { background: rgba(255,190,11,.15); color: var(--color-suspicious); border-color: var(--color-suspicious); box-shadow: 0 0 20px rgba(255,190,11,.3); }
.status.warning i  { color: var(--color-suspicious); }

@keyframes pulse-danger {
    0%, 100% { box-shadow: 0 0 20px rgba(255,0,110,.3); }
    50%       { box-shadow: 0 0 30px rgba(255,0,110,.6); }
}

/* ------------------------------------------------------------------
   CONFIDENCE METER
   ------------------------------------------------------------------ */
.confidence-meter  { position: relative; width: 160px; height: 160px; }
.circular-progress { transform: rotate(-90deg); }
.bg-circle         { fill: none; stroke: var(--bg-tertiary); stroke-width: 12; }

.progress-circle {
    fill: none;
    stroke-width: 12;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s ease-out, stroke 0.3s ease;
}

.progress-circle.safe       { stroke: var(--color-safe); }
.progress-circle.suspicious { stroke: var(--color-suspicious); }
.progress-circle.phishing,
.progress-circle.danger     { stroke: var(--color-phishing); }

.confidence-value {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.confidence-value span              { font-size: 2.5rem; font-weight: 700; display: block; }
.confidence-value span.safe         { color: var(--color-safe); }
.confidence-value span.suspicious   { color: var(--color-suspicious); }
.confidence-value span.phishing,
.confidence-value span.danger       { color: var(--color-phishing); }
.confidence-label                   { font-size: 0.9rem; color: var(--text-secondary); margin-top: 5px; }

/* ------------------------------------------------------------------
   METRICS GRID
   ------------------------------------------------------------------ */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.metric-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.metric-card:hover { transform: translateY(-3px); border-color: var(--accent-primary); }
.metric-card i     { font-size: 1.8rem; margin-bottom: 10px; display: block; }

.metric-card i.safe       { color: var(--color-safe); }
.metric-card i.suspicious { color: var(--color-suspicious); }
.metric-card i.phishing,
.metric-card i.danger     { color: var(--color-phishing); }

.metric-label   { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 8px; }
.metric-value   { font-size: 1.3rem; font-weight: 700; color: var(--text-primary); }

.metric-value.safe       { color: var(--color-safe); }
.metric-value.suspicious { color: var(--color-suspicious); }
.metric-value.phishing,
.metric-value.danger     { color: var(--color-phishing); }
.metric-value.warning    { color: var(--color-suspicious); }

/* ------------------------------------------------------------------
   RISK SECTION
   ------------------------------------------------------------------ */
.risk-section          { margin-bottom: 30px; }
.risk-section h3       { font-size: 1.2rem; margin-bottom: 15px; color: var(--accent-primary); display: flex; align-items: center; gap: 8px; }
.risk-factors          { display: flex; flex-direction: column; gap: 10px; list-style: none; padding: 0; }

.risk-factor {
    padding: 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-left: 4px solid;
    transition: all 0.3s ease;
}

.risk-factor i              { font-size: 1.2rem; min-width: 20px; }
.risk-factor.safe,
.risk-factor.low            { background: rgba(0,255,65,.1);  border-left-color: var(--color-safe);       color: var(--color-safe); }
.risk-factor.safe i,
.risk-factor.low i          { color: var(--color-safe); }
.risk-factor.suspicious,
.risk-factor.medium         { background: rgba(255,190,11,.15); border-left-color: var(--color-suspicious); color: var(--color-suspicious); }
.risk-factor.suspicious i,
.risk-factor.medium i       { color: var(--color-suspicious); }
.risk-factor.phishing,
.risk-factor.danger,
.risk-factor.high           { background: rgba(255,0,110,.15); border-left-color: var(--color-phishing);   color: var(--color-phishing); }
.risk-factor.phishing i,
.risk-factor.danger i,
.risk-factor.high i         { color: var(--color-phishing); }
.risk-factor.critical       { background: rgba(139,0,0,.2);   border-left-color: #8b0000; color: #ff4444; }
.risk-factor.critical i     { color: #ff0000; }

/* ------------------------------------------------------------------
   MODEL INFO
   ------------------------------------------------------------------ */
.model-info {
    display: flex;
    justify-content: space-between;
    padding: 20px;
    background: var(--bg-tertiary);
    border-radius: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.model-badge,
.scan-time      { display: flex; align-items: center; gap: 8px; color: var(--text-secondary); font-size: 0.9rem; }

.model-badge i,
.scan-time i    { color: var(--accent-primary); font-size: 1.1rem; }

/* ------------------------------------------------------------------
   DETAILS SECTION (collapsible)
   ------------------------------------------------------------------ */
.details-section { margin-top: 20px; }

.details-toggle {
    width: 100%;
    padding: 15px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1rem;
}

.details-toggle:hover {
    background: var(--accent-primary);
    color: var(--bg-primary);
}

.details-toggle i { transition: transform 0.3s ease; }

.details-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.details-content.expanded {
    max-height: 2000px;
    margin-top: 20px;
    padding: 20px;
    background: rgba(26, 31, 53, 0.8);
    border-radius: 8px;
    min-height: 300px;
}

/* Charts */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.chart-container {
    background: rgba(0, 255, 65, 0.05);
    padding: 20px;
    border-radius: 12px;
    border: 2px solid rgba(0, 255, 65, 0.2);
}

.chart-container h3 {
    color: #00ff41;
    margin: 0 0 15px 0;
    font-size: 16px;
    text-align: center;
}

.chart-container canvas  { max-height: 300px; }

#featuresChart {
    width: 100% !important;
    height: 300px !important;
    max-width: 100%;
}

.risk-factors-section {
    background: rgba(255, 0, 110, 0.05);
    padding: 20px;
    border-radius: 12px;
    border: 2px solid rgba(255, 0, 110, 0.2);
}

.risk-factors-section h3   { color: #ff006e; margin: 0 0 15px 0; font-size: 16px; }
.risk-factors-list         { list-style: none; padding: 0; margin: 0; }

.risk-factors-list li {
    padding: 10px;
    margin: 8px 0;
    background: rgba(0,0,0,.3);
    border-left: 3px solid #ff006e;
    border-radius: 4px;
    color: #e8e8e8;
}

.risk-factors-list .factor-icon { color: #ffbe0b; margin-right: 10px; }
.risk-factors-list .no-factors  { color: #00ff41; border-left-color: #00ff41; text-align: center; }

/* ------------------------------------------------------------------
   HISTORY SIDEBAR
   ------------------------------------------------------------------ */
.history-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100%;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    box-shadow: -5px 0 20px rgba(0,0,0,.3);
    transition: right 0.3s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.history-sidebar:not(.hidden) { right: 0; }

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-header h3 { font-family: 'Orbitron', monospace; font-size: 1.3rem; color: var(--accent-primary); }

.close-btn {
    width: 35px; height: 35px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex; align-items: center; justify-content: center;
}

.close-btn:hover { background: var(--accent-danger); color: white; }

.history-list { flex: 1; overflow-y: auto; padding: 20px; }

.history-empty { text-align: center; color: var(--text-secondary); padding: 40px 20px; }

.history-item {
    display: flex;
    flex-direction: column;
    padding: 15px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.history-item:hover { transform: translateX(-5px); border-color: var(--accent-primary); }

.history-icon {
    width: 40px; height: 40px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

.history-icon.safe            { background: rgba(0,255,65,.1);  color: var(--color-safe); }
.history-icon.suspicious,
.history-icon.warning         { background: rgba(255,190,11,.1); color: var(--color-suspicious); }
.history-icon.phishing,
.history-icon.danger          { background: rgba(255,0,110,.1); color: var(--color-phishing); }

.history-header    { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.history-status    { padding: 4px 12px; border-radius: 12px; font-size: 0.75rem; font-weight: 700; display: flex; align-items: center; gap: 5px; }
.history-status.safe    { background: rgba(0,255,65,.1); color: var(--color-safe); }
.history-status.warning { background: rgba(255,190,11,.1); color: var(--color-suspicious); }
.history-status.danger  { background: rgba(255,0,110,.1); color: var(--color-phishing); }
.history-confidence { font-weight: 700; color: var(--accent-primary); }
.history-details    { flex: 1; min-width: 0; }
.history-url        { font-size: 0.95rem; color: var(--text-primary); margin-bottom: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history-meta       { font-size: 0.8rem; color: var(--text-secondary); display: flex; justify-content: space-between; }

.clear-history-btn {
    margin: 20px;
    padding: 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--accent-danger);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}

.clear-history-btn:hover { background: var(--accent-danger); color: white; }

/* ------------------------------------------------------------------
   TOAST
   ------------------------------------------------------------------ */
.toast {
    position: fixed;
    top: 20px; right: 20px;
    padding: 15px 25px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-glow);
    z-index: 2000;
    animation: slideInRight 0.3s ease-out;
    max-width: 300px;
}

.toast.hidden  { display: none; }
.toast.success { border-color: var(--accent-primary); color: var(--accent-primary); }
.toast.error   { border-color: var(--accent-danger);  color: var(--accent-danger); }
.toast.info    { border-color: var(--text-secondary); color: var(--text-secondary); }

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}

/* ------------------------------------------------------------------
   FOOTER
   ------------------------------------------------------------------ */
.footer {
    text-align: center;
    padding: 40px 20px;
    margin-top: 60px;
    border-top: 1px solid var(--border-color);
}

.footer-content p  { margin-bottom: 10px; color: var(--text-secondary); font-size: 0.9rem; }
.footer-content i  { color: var(--accent-primary); margin-right: 5px; }
.footer-sub        { font-size: 0.85rem !important; }

.footer-links {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.footer-links a:hover { color: var(--accent-primary); }
.footer-links a i     { margin-right: 5px; }

/* ------------------------------------------------------------------
   AUTH MODAL
   ------------------------------------------------------------------ */
.auth-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.auth-modal.hidden { display: none; }

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

.auth-modal-content {
    position: relative;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    padding: 40px;
    max-width: 450px; width: 90%;
    max-height: 90vh; overflow-y: auto;
    box-shadow: 0 10px 50px rgba(0,255,156,.3);
    animation: slideUp 0.3s ease-out;
}

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

.auth-modal-close {
    position: absolute; top: 15px; right: 15px;
    width: 40px; height: 40px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
}

.auth-modal-close:hover { background: var(--accent-danger); color: white; transform: rotate(90deg); }

.auth-modal-header              { text-align: center; margin-bottom: 30px; }
.auth-modal-header h2           { font-family: 'Orbitron', monospace; font-size: 1.8rem; color: var(--accent-primary); margin-bottom: 8px; }
.auth-modal-header p            { color: var(--text-secondary); font-size: 0.95rem; }

.auth-tabs { display: flex; gap: 10px; margin-bottom: 25px; }

.auth-tab {
    flex: 1; padding: 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem; font-weight: 600;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}

.auth-tab:hover  { background: rgba(0,255,156,.1); color: var(--accent-primary); }
.auth-tab.active { background: linear-gradient(135deg, var(--accent-primary), #00d17a); color: var(--bg-primary); border-color: var(--accent-primary); }

.auth-form        { display: none; }
.auth-form.active { display: block; animation: fadeIn 0.3s ease-out; }

.form-group           { margin-bottom: 20px; }
.form-group label     { display: block; color: var(--text-primary); font-size: 0.9rem; font-weight: 600; margin-bottom: 8px; }
.form-group label i   { color: var(--accent-primary); margin-right: 5px; }

.form-group input {
    width: 100%; padding: 14px 16px;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-group input:focus { outline: none; border-color: var(--accent-primary); box-shadow: 0 0 0 3px rgba(0,255,156,.1); }
.form-group small      { display: block; color: var(--text-secondary); font-size: 0.8rem; margin-top: 5px; }

.password-input       { position: relative; }

.toggle-password {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    background: none; border: none;
    color: var(--text-secondary); cursor: pointer;
    padding: 5px; transition: color 0.3s ease;
}

.toggle-password:hover { color: var(--accent-primary); }

.form-error {
    padding: 12px;
    background: rgba(255,59,59,.1);
    border: 1px solid rgba(255,59,59,.3);
    border-radius: 8px;
    color: var(--accent-danger);
    font-size: 0.9rem;
    margin-bottom: 15px;
    display: none;
}

.form-error.show { display: block; animation: shake 0.4s ease-out; }

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25%       { transform: translateX(-10px); }
    75%       { transform: translateX(10px); }
}

.auth-submit-btn {
    width: 100%; padding: 16px;
    background: linear-gradient(135deg, var(--accent-primary), #00d17a);
    border: none; border-radius: 10px;
    color: var(--bg-primary); font-size: 1rem; font-weight: 700;
    cursor: pointer; transition: all 0.3s ease;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    box-shadow: 0 4px 15px rgba(0,255,156,.3);
}

.auth-submit-btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 6px 25px rgba(0,255,156,.5); }
.auth-submit-btn:disabled             { opacity: 0.6; cursor: not-allowed; }

.auth-footer          { margin-top: 20px; text-align: center; padding-top: 20px; border-top: 1px solid var(--border-color); }
.auth-footer p        { color: var(--text-secondary); font-size: 0.9rem; }
.auth-footer a        { color: var(--accent-primary); text-decoration: none; font-weight: 600; transition: color 0.3s ease; }
.auth-footer a:hover  { color: #00d17a; }

/* ------------------------------------------------------------------
   INSTALLATION MODAL
   ------------------------------------------------------------------ */
.install-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 10001;
    display: flex; align-items: center; justify-content: center;
    animation: fadeIn 0.3s ease;
}

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

.install-modal-content {
    position: relative;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 20px;
    max-width: 650px; width: 90%;
    max-height: 90vh; overflow-y: auto;
    padding: 40px;
    box-shadow: 0 25px 70px rgba(0,255,65,.3);
    border: 3px solid #00ff41;
    animation: slideUpModal 0.4s ease;
    z-index: 1;
}

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

.install-modal-close {
    position: absolute; top: 20px; right: 20px;
    width: 45px; height: 45px;
    background: rgba(255,0,110,.2);
    border: 2px solid #ff006e;
    color: #ff006e;
    border-radius: 50%;
    font-size: 22px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex; align-items: center; justify-content: center;
    z-index: 2;
}

.install-modal-close:hover { background: #ff006e; color: white; transform: rotate(90deg) scale(1.1); box-shadow: 0 0 20px rgba(255,0,110,.6); }

.install-header { text-align: center; margin-bottom: 35px; padding-bottom: 25px; border-bottom: 2px solid #00ff41; }

.install-icon {
    font-size: 60px; color: #00ff41; margin-bottom: 15px;
    filter: drop-shadow(0 0 15px rgba(0,255,65,.6));
    animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { transform: scale(1);    filter: drop-shadow(0 0 15px rgba(0,255,65,.6)); }
    50%       { transform: scale(1.05); filter: drop-shadow(0 0 25px rgba(0,255,65,.8)); }
}

.install-header h2 { color: #00ff41; margin: 15px 0 10px; font-size: 32px; font-family: 'Orbitron', monospace; text-shadow: 0 0 20px rgba(0,255,65,.5); }
.install-header p  { color: #a0a0a0; font-size: 15px; margin: 0; }

.install-steps { margin: 25px 0; }

.install-step {
    display: flex; gap: 18px;
    margin-bottom: 25px; padding: 20px;
    background: rgba(0,255,65,.05);
    border-radius: 12px; border-left: 5px solid #00ff41;
    transition: all 0.3s ease;
}

.install-step:hover { background: rgba(0,255,65,.1); transform: translateX(8px); box-shadow: 0 5px 20px rgba(0,255,65,.2); }

.step-num {
    flex-shrink: 0; width: 40px; height: 40px;
    background: linear-gradient(135deg, #00ff41 0%, #0d7377 100%);
    color: #000; font-weight: 900;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; box-shadow: 0 0 20px rgba(0,255,65,.6);
    font-family: 'Orbitron', monospace;
}

.step-content           { flex: 1; }
.step-content h3        { color: #e8e8e8; margin: 0 0 10px 0; font-size: 18px; font-weight: 700; }
.step-content p         { color: #b0b0b0; margin: 5px 0; font-size: 15px; line-height: 1.6; }
.step-content code      { background: rgba(0,255,65,.2); padding: 4px 10px; border-radius: 6px; color: #00ff41; font-family: 'Courier New', monospace; font-size: 14px; font-weight: 600; border: 1px solid rgba(0,255,65,.3); }

.step-content .tip {
    display: flex; align-items: center; gap: 8px;
    margin-top: 10px; padding: 10px;
    background: rgba(255,190,11,.1); border-left: 3px solid #ffbe0b;
    border-radius: 6px; font-size: 14px; color: #e8e8e8;
}

.step-content .tip i { color: #ffbe0b; font-size: 16px; }

.install-footer { text-align: center; margin-top: 30px; padding-top: 25px; border-top: 2px solid rgba(0,255,65,.2); }

.btn-close-modal {
    padding: 14px 35px;
    background: linear-gradient(135deg, #00ff41 0%, #0d7377 100%);
    color: #0a0e27; border: none; border-radius: 10px;
    font-weight: 700; font-size: 16px; cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(0,255,65,.4);
    text-transform: uppercase; letter-spacing: 1px;
    display: inline-flex; align-items: center; gap: 10px;
}

.btn-close-modal:hover  { transform: translateY(-3px); box-shadow: 0 8px 30px rgba(0,255,65,.6); background: linear-gradient(135deg, #00ff41 0%, #00cc6f 100%); }
.btn-close-modal:active { transform: translateY(-1px); }
.btn-close-modal i      { font-size: 18px; }

.install-modal-content::-webkit-scrollbar       { width: 8px; }
.install-modal-content::-webkit-scrollbar-track { background: rgba(0,0,0,.3); border-radius: 10px; }
.install-modal-content::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #00ff41, #0d7377); border-radius: 10px; }
.install-modal-content::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #00cc6f, #0a5a5e); }

/* ============================================================
   GUIDE MODAL  (merged from guide_styles.css)
   ============================================================ */
.guide-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 20px;

    will-change: opacity, transform;
    transform: translateZ(0);
}


.guide-modal.active {
    display: flex;
    animation: fadeIn 0.3s ease-in-out;
}

.guide-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 16px;
    max-width: 900px; width: 100%;
    max-height: 90vh; overflow-y: auto;
    padding: 40px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,255,65,.2);
    border: 2px solid #00ff41;
    scroll-behavior: smooth;
    scrollbar-gutter: stable;
    animation: slideUp 0.3s ease;
    will-change: transform;
    transform: translateZ(0);
}

.guide-close {
    position: absolute; top: 20px; right: 20px;
    background: rgba(255,0,0,.2);
    border: 2px solid #ff006e;
    color: #ff006e;
    width: 40px; height: 40px;
    border-radius: 50%;
    font-size: 28px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.3s ease;
    line-height: 1; padding: 0;
}

.guide-close:hover { background: #ff006e; color: white; transform: rotate(90deg); }

.guide-header {
    text-align: center;
    margin-bottom: 30px; padding-bottom: 20px;
    border-bottom: 2px solid #00ff41;
}

.guide-icon  { font-size: 60px; margin-bottom: 10px; }
.guide-header h1 { color: #00ff41; margin: 10px 0; font-size: 32px; }
.guide-header p  { color: #a0a0a0; font-size: 16px; }

/* Guide Tabs */
.guide-tabs { display: flex; gap: 10px; margin-bottom: 30px; border-bottom: 2px solid #2d4059; }

.guide-tab {
    padding: 12px 24px;
    background: transparent; border: none;
    color: #a0a0a0; cursor: pointer;
    font-size: 16px; font-weight: 600;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.guide-tab:hover       { color: #00ff41; }
.guide-tab.active      { color: #00ff41; border-bottom-color: #00ff41; }

.guide-tab-content     { display: none; }
.guide-tab-content.active { display: block; }
.guide-tab-content p   { color: #d6fdf0; }
.guide-tab-content h2  { color: #00ff41; margin-bottom: 20px; font-size: 24px; }
.guide-tab-content h3  { color: #e8e8e8; margin: 15px 0 10px; font-size: 18px; }

/* Guide Steps */
.guide-step {
    display: flex; gap: 20px;
    margin-bottom: 30px; padding: 20px;
    background: rgba(0,255,65,.05);
    border-radius: 12px; border-left: 4px solid #00ff41;
}

.step-number {
    flex-shrink: 0; width: 40px; height: 40px;
    background: linear-gradient(135deg, #00ff41 0%, #0d7377 100%);
    color: #000; font-weight: 800;
    box-shadow: 0 0 15px rgba(0,255,65,.6);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
}

.step-content ul  { margin: 10px 0; padding-left: 20px; }
.step-content li  { margin: 5px 0; color: #e8e8e8; }
.step-content p   { color: #e8faff; font-size: 15px; line-height: 1.6; }

.tip {
    margin-top: 10px; padding: 10px;
    background: rgba(255,190,11,.1);
    border-left: 3px solid #ffbe0b;
    border-radius: 4px; font-size: 14px; color: #e8e8e8;
}

/* Keyboard Shortcuts */
.keyboard-shortcuts {
    margin-top: 30px; padding: 20px;
    background: rgba(0,255,65,.05);
    border-radius: 12px;
}

.shortcut-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; margin-top: 15px; }

.shortcut-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px;
    background: rgba(255,255,255,.05);
    border-radius: 8px;
}

kbd {
    background: rgba(0,255,65,.15); padding: 6px 10px; border-radius: 6px;
    border: 1px solid #00ff41; font-family: monospace; font-size: 14px;
    color: #00ff41; font-weight: 600;
}

/* Flow Diagram */
.flow-diagram { padding: 20px; }

.flow-step {
    margin-bottom: 20px; padding: 20px;
    background: rgba(0,255,65,.05);
    border-radius: 12px; border-left: 4px solid #00ff41;
}

.flow-icon    { font-size: 32px; margin-bottom: 10px; }
.flow-step h3 { color: #00ff41; margin: 10px 0; }
.flow-arrow   { text-align: center; font-size: 24px; color: #00ff41; margin: 10px 0; }

.flow-features { list-style: none; padding: 0; margin: 10px 0; }

.flow-features li {
    padding: 5px 0 5px 20px; position: relative; color: #e8e8e8;
}

.flow-features li::before { content: "✓"; position: absolute; left: 0; color: #00ff41; }

.flow-final  { background: rgba(0,255,65,.1); border-left-color: #00ff41; border-left-width: 6px; }
.flow-result { background: linear-gradient(135deg, rgba(0,255,65,.1) 0%, rgba(13,115,119,.1) 100%); border: 2px solid #00ff41; }

.ensemble-formula { margin-top: 15px; padding: 15px; background: rgba(0,0,0,.3); border-radius: 8px; }
.ensemble-formula code { color: #00ff41; font-size: 14px; line-height: 1.6; display: block; }

.flow-note { margin-top: 20px; padding: 15px; background: rgba(255,190,11,.1); border-left: 4px solid #ffbe0b; border-radius: 8px; color: #e8e8e8; }

/* About Section */
.about-section { margin-bottom: 30px; padding: 20px; background: rgba(0,255,65,.05); border-radius: 12px; }

.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; margin-top: 15px; }

.feature-card {
    padding: 15px; background: rgba(0,0,0,.3); border-radius: 8px;
    border: 1px solid rgba(0,255,65,.2); text-align: center;
    transition: all 0.3s ease;
}

.feature-card:hover { border-color: #00ff41; transform: translateY(-5px); box-shadow: 0 8px 20px rgba(0,255,65,.2); }
.feature-icon       { font-size: 36px; margin-bottom: 10px; }
.feature-card h4    { color: #00ff41; margin: 10px 0; font-size: 16px; }
.feature-card p     { color: #a0a0a0; font-size: 14px; margin: 0; }

.tech-stack { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 15px; margin-top: 15px; }

.tech-item {
    padding: 12px; background: rgba(0,0,0,.3); border-radius: 8px;
    border-left: 3px solid #00ff41; color: #e8e8e8;
}

.tech-item strong { color: #00ff41; }

/* About metrics (inside guide modal — prefixed to avoid collision with result-card .metric) */
.about-section .metrics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 15px; margin-top: 15px; }

.about-section .metric {
    text-align: center; padding: 20px; background: rgba(0,0,0,.3);
    border-radius: 8px; border: 2px solid #00ff41;
}

.about-section .metric-value { font-size: 32px; font-weight: bold; color: #00ff41; margin-bottom: 8px; }
.about-section .metric-label { color: #a0a0a0; font-size: 14px; }

.important-notes { list-style: none; padding: 0; margin: 15px 0; }

.important-notes li {
    padding: 10px 10px 10px 35px; margin: 8px 0;
    background: rgba(255,0,110,.1); border-left: 3px solid #ff006e;
    border-radius: 4px; position: relative; color: #e8e8e8;
}

.important-notes li::before { content: "⚠"; position: absolute; left: 10px; font-size: 18px; }

.version-info              { background: rgba(0,255,65,.1); border: 2px solid #00ff41; }
.version-info p            { margin: 8px 0; color: #e8e8e8; }
.version-info strong       { color: #00ff41; }

/* Guide scrollbar */
.guide-content::-webkit-scrollbar       { width: 8px; }
.guide-content::-webkit-scrollbar-track { background: transparent; border-radius: 10px; }
.guide-content::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #00ff41, #0d7377); border-radius: 10px; }

/* ------------------------------------------------------------------
   ANIMATIONS
   ------------------------------------------------------------------ */
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to   { opacity: 1; transform: translateY(0); }
}

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

/* ------------------------------------------------------------------
   UTILITY
   ------------------------------------------------------------------ */
.hidden { display: none !important; }

/* ------------------------------------------------------------------
   SCROLLBAR (global)
   ------------------------------------------------------------------ */
::-webkit-scrollbar       { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-tertiary); }
::-webkit-scrollbar-thumb { background: var(--accent-primary); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #00d17a; }

/* ------------------------------------------------------------------
   RESPONSIVE
   ------------------------------------------------------------------ */
@media (max-width: 1024px) {
    .title   { font-size: 2rem; }
    .title i { font-size: 1.8rem; }
}

@media (max-width: 768px) {
    .header-top-row       { flex-direction: column; align-items: center; gap: 20px; }
    .logo-and-subtitle    { align-items: center; text-align: center; padding-left: 0; }
    .logo-and-subtitle::before { display: none; }
    .title                { font-size: 1.8rem; justify-content: center; }
    .subtitle             { font-size: 1rem; text-align: center; }

    /* Stack buttons vertically on mobile */
    .header-right-buttons { flex-direction: column; width: 100%; max-width: 320px; }
    .guide-btn,
    .download-extension-btn { width: 100%; justify-content: center; }

    .stats-grid           { grid-template-columns: repeat(2, 1fr); }
    .scan-card,
    .result-card          { padding: 25px; }
    .status-section       { flex-direction: column; }
    .metrics-grid         { grid-template-columns: 1fr; }
    .history-sidebar      { width: 100%; right: -100%; }
    .model-info           { flex-direction: column; }
    .result-header        { flex-direction: column; align-items: flex-start; }
    .quick-tests          { flex-direction: column; align-items: stretch; }
    .quick-btn            { width: 100%; }
    .charts-grid          { grid-template-columns: 1fr; }

    .install-modal-content { padding: 30px 25px; max-width: 95%; }
    .install-header h2     { font-size: 26px; }
    .install-icon          { font-size: 50px; }
    .install-step          { padding: 15px; gap: 15px; }
    .step-num              { width: 35px; height: 35px; font-size: 18px; }

    .guide-content         { padding: 20px; }
    .guide-header h1       { font-size: 24px; }
    .guide-tabs            { flex-direction: column; }
    .features-grid         { grid-template-columns: 1fr; }

    .auth-modal-content    { padding: 30px 20px; }
}

@media (max-width: 480px) {
    .container { padding: 15px; }

    .title   { font-size: 1.5rem; flex-direction: column; gap: 8px; }
    .title i { font-size: 1.5rem; }

    .subtitle             { font-size: 0.9rem; }
    .header-right-buttons { width: 100%; }

    .guide-btn,
    .download-extension-btn { padding: 12px 16px; font-size: 13px; }

    .stats-grid     { grid-template-columns: 1fr; gap: 15px; }
    .header-actions { gap: 10px; }

    .user-badge { font-size: 0.85rem; padding: 6px 12px; }
    .icon-btn   { width: 40px; height: 40px; }

    .confidence-meter      { width: 120px; height: 120px; }
    .confidence-value span { font-size: 2rem; }

    .auth-modal-content    { padding: 25px 20px; }
    .auth-modal-header h2  { font-size: 1.5rem; }

    .install-modal-content { padding: 25px 20px; }
    .install-header h2     { font-size: 22px; }

    .install-step  { flex-direction: column; text-align: center; padding: 15px; }
    .step-num      { margin: 0 auto 10px; }

    .btn-close-modal { padding: 12px 25px; font-size: 14px; width: 100%; }
}