/* Phishing Checker Dashboard - Premium UI v2 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    --bg: #080a12;
    --surface: #0f1119;
    --surface-2: #161925;
    --surface-3: #1e2133;
    --border: #252840;
    --border-hover: #3a3f5c;
    --text: #eceef4;
    --text-secondary: #a0a5c0;
    --text-muted: #6b7094;
    --text-dim: #454868;
    --primary: #7c6cf0;
    --primary-light: #a29bfe;
    --primary-glow: rgba(124,108,240,0.12);
    --primary-glow-strong: rgba(124,108,240,0.25);
    --danger: #ff5757;
    --danger-bg: rgba(255,87,87,0.06);
    --danger-border: rgba(255,87,87,0.2);
    --warning: #ffb347;
    --warning-bg: rgba(255,179,71,0.06);
    --warning-border: rgba(255,179,71,0.2);
    --success: #00d68f;
    --success-bg: rgba(0,214,143,0.06);
    --success-border: rgba(0,214,143,0.2);
    --info: #4ea8de;
    --info-bg: rgba(78,168,222,0.06);
    --info-border: rgba(78,168,222,0.2);
    --radius: 14px;
    --radius-sm: 10px;
    --radius-xs: 6px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { font-size: 15px; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    min-height: 100vh;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(124,108,240,0.07) 0%, transparent 70%),
        radial-gradient(ellipse 60% 40% at 80% 100%, rgba(0,214,143,0.03) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1350px;
    margin: 0 auto;
    padding: 20px 28px;
    position: relative;
    z-index: 1;
}

/* ========== HEADER ========== */
header {
    text-align: center;
    padding: 32px 0 24px;
}

header h1 {
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: 5px;
    background: linear-gradient(135deg, #a29bfe 0%, #7c6cf0 50%, #c084fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 40px rgba(124,108,240,0.15);
}

.subtitle {
    color: var(--text-dim);
    font-size: 0.78rem;
    margin-top: 6px;
    letter-spacing: 1.5px;
    font-weight: 400;
    text-transform: uppercase;
}

/* ========== STATUS BANNER ========== */
.status-banner {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 24px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    transition: var(--transition);
    min-height: 56px;
}

.status-banner .status-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.status-banner .status-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-banner.active {
    border-color: var(--primary);
    background: linear-gradient(135deg, var(--surface), rgba(124,108,240,0.05));
    box-shadow: 0 0 40px rgba(124,108,240,0.08);
}

.status-banner #status-text {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.92rem;
}

.status-banner.active #status-text {
    color: var(--primary-light);
    font-weight: 600;
}

/* Pulsing dot */
.pulse-dot {
    width: 10px; height: 10px;
    background: var(--primary);
    border-radius: 50%;
    display: none;
    position: relative;
}
.pulse-dot::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    animation: pulseRing 1.5s ease-out infinite;
}
.status-banner.active .pulse-dot { display: block; }

@keyframes pulseRing {
    0% { transform: scale(0.8); opacity: 1; }
    100% { transform: scale(1.8); opacity: 0; }
}

/* Progress bar inside status banner */
.progress-track {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
    background: rgba(124,108,240,0.1);
    border-radius: 0 0 var(--radius) var(--radius);
    overflow: hidden;
    display: none;
}
.status-banner.active .progress-track { display: block; }

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #c084fc);
    border-radius: 3px;
    transition: width 0.5s ease;
    position: relative;
}
.progress-fill::after {
    content: '';
    position: absolute;
    right: 0; top: 0; bottom: 0;
    width: 40px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15));
    animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
    0% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; }
}

.status-banner { position: relative; overflow: hidden; }

.last-scan { color: var(--text-dim); font-size: 0.75rem; font-weight: 400; }

.btn-stop {
    background: linear-gradient(135deg, #ff5757, #e03e3e);
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: var(--radius-xs);
    cursor: pointer;
    font-weight: 700;
    font-size: 0.72rem;
    letter-spacing: 1px;
    transition: var(--transition);
    text-transform: uppercase;
}
.btn-stop:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(255,87,87,0.35);
}

/* ========== CONTROLS ========== */
.controls { margin-bottom: 24px; }

.control-group {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 28px;
    transition: var(--transition);
}
.control-group:hover { border-color: var(--border-hover); }

.control-group h3 {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: var(--text-dim);
    margin-bottom: 14px;
    font-weight: 600;
}

.inline-form {
    display: flex;
    gap: 10px;
    align-items: center;
    width: 100%;
}

.input-field {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 13px 18px;
    color: var(--text);
    font-size: 0.92rem;
    font-family: inherit;
    outline: none;
    transition: var(--transition);
    flex: 1;
}
.input-field::placeholder { color: var(--text-dim); }
.input-field:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.btn {
    border: none;
    border-radius: var(--radius-sm);
    padding: 13px 28px;
    font-size: 0.88rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    letter-spacing: 0.3px;
}

.btn-primary {
    background: linear-gradient(135deg, #7c6cf0, #6c5ce7);
    color: white;
    box-shadow: 0 2px 16px rgba(124,108,240,0.3);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(124,108,240,0.4);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-danger {
    background: linear-gradient(135deg, #ff5757, #e03e3e);
    color: white;
}
.btn-danger:hover { box-shadow: 0 4px 20px rgba(255,87,87,0.3); }

.btn-small { padding: 8px 16px; font-size: 0.78rem; }

/* ========== SPINNER ========== */
.spinner {
    display: inline-block;
    width: 18px; height: 18px;
    border: 2.5px solid rgba(124,108,240,0.2);
    border-top-color: var(--primary-light);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.spinner-lg {
    width: 32px; height: 32px;
    border-width: 3px;
}

/* ========== RESULTS ========== */
.results-section { margin-bottom: 28px; }

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.results-header h2 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
}
.results-header h2 span { color: var(--primary-light); font-weight: 800; }

.results-table-wrap {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.results-table th {
    background: var(--surface-2);
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.68rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 2;
}

.results-table td {
    padding: 13px 16px;
    border-bottom: 1px solid rgba(37,40,64,0.6);
    vertical-align: middle;
    transition: background 0.2s;
}

.results-table tbody tr { transition: var(--transition); }
.results-table tbody tr:hover { background: rgba(124,108,240,0.04) !important; }

/* Row accents */
.row-danger { border-left: 3px solid var(--danger); background: var(--danger-bg); }
.row-warning { border-left: 3px solid var(--warning); background: var(--warning-bg); }
.row-success { border-left: 3px solid var(--success); background: var(--success-bg); }
.row-info { border-left: 3px solid var(--info); background: var(--info-bg); }

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}
.badge-danger { background: rgba(255,87,87,0.12); color: #ffa0a0; border: 1px solid var(--danger-border); }
.badge-warning { background: rgba(255,179,71,0.12); color: #ffd699; border: 1px solid var(--warning-border); }
.badge-success { background: rgba(0,214,143,0.12); color: #6bf0c2; border: 1px solid var(--success-border); }
.badge-info { background: rgba(78,168,222,0.12); color: #9dd5f5; border: 1px solid var(--info-border); }

.fw-bold { font-weight: 600; }
.text-muted { color: var(--text-dim); }

.url-link {
    color: var(--info);
    text-decoration: none;
    word-break: break-all;
    transition: color 0.2s;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
}
.url-link:hover { color: var(--primary-light); text-decoration: underline; }

.link-chain {
    font-size: 0.78rem;
    color: var(--text-muted);
    max-width: 320px;
    word-break: break-all;
    line-height: 1.5;
    font-family: 'JetBrains Mono', monospace;
}

.no-results {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-dim);
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px dashed var(--border);
}
.no-results p { font-size: 0.88rem; }

/* ========== LIVE RESULT ROWS ========== */
@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateX(-12px); }
    to { opacity: 1; transform: translateX(0); }
}
.result-row-new { animation: fadeSlideIn 0.35s ease-out; }

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

/* ========== MENU GRID ========== */
.menu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    max-width: 800px;
    margin: 0 auto;
}

.menu-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 44px 36px;
    text-decoration: none;
    color: var(--text);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.menu-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), #c084fc);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.menu-card:hover {
    border-color: var(--primary);
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(124,108,240,0.12);
}
.menu-card:hover::before { transform: scaleX(1); }

.menu-icon { color: var(--primary); margin-bottom: 20px; opacity: 0.85; }
.menu-icon-report { color: var(--warning); }

.menu-card h2 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: 0.3px;
}
.menu-card p {
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.7;
    margin-bottom: 16px;
}
.menu-arrow {
    color: var(--text-dim);
    font-size: 1.3rem;
    transition: var(--transition);
}
.menu-card:hover .menu-arrow {
    color: var(--primary);
    transform: translateX(6px);
}

/* ========== BACK LINK ========== */
.back-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.back-link:hover { color: var(--primary-light); }

/* ========== STATS BAR ========== */
.stats-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.stat-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    flex: 1;
    min-width: 100px;
    text-align: center;
    transition: var(--transition);
}
.stat-item:hover { border-color: var(--border-hover); }

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}
.stat-label {
    display: block;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-dim);
    margin-top: 4px;
    font-weight: 500;
}

/* ========== DOMAIN TEXTAREA ========== */
.domain-textarea {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px 18px;
    color: var(--text);
    font-size: 0.88rem;
    font-family: 'JetBrains Mono', monospace;
    outline: none;
    resize: vertical;
    min-height: 130px;
    transition: var(--transition);
    line-height: 1.9;
}
.domain-textarea::placeholder { color: var(--text-dim); font-family: 'Inter', sans-serif; }
.domain-textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    html { font-size: 14px; }
    .container { padding: 12px 16px; }
    header { padding: 20px 0 14px; }
    header h1 { font-size: 1.3rem; letter-spacing: 3px; }
    .inline-form { flex-direction: column; width: 100%; }
    .input-field { width: 100%; min-width: 0; }
    .btn { width: 100%; text-align: center; }
    .results-table { font-size: 0.78rem; }
    .results-table th, .results-table td { padding: 10px 12px; }
    .status-banner { flex-wrap: wrap; gap: 10px; padding: 14px 18px; }
    .menu-grid { grid-template-columns: 1fr; }
    .stats-bar { flex-direction: column; }
}
