/* ================================================================== */
/*  PulsrWeb Sitemap Generator v3.0 — Premium Dark UI + RTL + i18n     */
/*  style.css                                                          */
/* ================================================================== */


/* ─── Design Tokens ─────────────────────────────────────────────── */
:root {
    --bg-base: #06060e;
    --bg-primary: #0a0a14;
    --bg-secondary: #10101c;
    --bg-card: rgba(16, 16, 32, 0.7);
    --bg-card-solid: #11112a;
    --bg-card-hover: rgba(24, 24, 50, 0.85);
    --bg-input: rgba(14, 14, 28, 0.95);
    --border: rgba(99, 102, 241, 0.12);
    --border-hover: rgba(99, 102, 241, 0.35);
    --border-active: rgba(99, 102, 241, 0.6);
    --text-primary: #f0f0f5;
    --text-secondary: #a1a1b5;
    --text-muted: #64647a;
    --accent: #6366f1;
    --accent-light: #818cf8;
    --accent-lighter: #a78bfa;
    --accent-glow: rgba(99, 102, 241, 0.15);
    --gradient: linear-gradient(135deg, #6366f1, #8b5cf6, #a78bfa);
    --gradient-subtle: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(167, 139, 250, 0.05));
    --success: #22c55e;
    --success-bg: rgba(34, 197, 94, 0.1);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.1);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.1);
    --info: #3b82f6;
    --info-bg: rgba(59, 130, 246, 0.1);
    --radius-xs: 6px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 15px rgba(99, 102, 241, 0.2);
    --font: 'Inter', -apple-system, 'Segoe UI', system-ui, sans-serif;
    --font-ar: 'Noto Sans Arabic', 'Inter', sans-serif;
    --font-zh: 'Noto Sans SC', 'Inter', sans-serif;
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── RTL / Language Font ───────────────────────────────────────── */
[dir="rtl"] {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

[lang="zh"] {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

[dir="rtl"] .form-grid {
    direction: rtl;
}

[dir="rtl"] .search-box .search-icon {
    left: auto;
    right: 0.75rem;
}

[dir="rtl"] .search-box input {
    padding-left: 0.9rem;
    padding-right: 2.4rem;
}

[dir="rtl"] .card-header .badge-count {
    margin-left: 0;
    margin-right: auto;
}

[dir="rtl"] .action-bar {
    direction: rtl;
}

[dir="rtl"] .results-table th {
    text-align: right;
}

[dir="rtl"] .sort-icon {
    margin-left: 0;
    margin-right: 0.3rem;
}

[dir="rtl"] .health-metric {
    direction: rtl;
}

[dir="rtl"] .stat-card {
    text-align: right;
}

[dir="rtl"] .issue-item {
    direction: rtl;
}

[dir="rtl"] .issue-item .issue-count {
    margin-left: 0;
    margin-right: auto;
}

[dir="rtl"] .prev-notice {
    direction: rtl;
}

[dir="rtl"] .faq-item summary {
    text-align: right;
}

[dir="rtl"] .faq-item p {
    text-align: right;
}

/* ─── Reset ─────────────────────────────────────────────────────── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.65;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ─── Premium Background Pattern ───────────────────────────────── */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image:
        radial-gradient(circle at top right, rgba(99, 102, 241, 0.08), transparent 40%),
        radial-gradient(circle at bottom left, rgba(6, 182, 212, 0.05), transparent 40%),
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 40px 40px, 40px 40px;
    pointer-events: none;
}

/* ─── App Container ─────────────────────────────────────────────── */
.app-container {
    position: relative;
    z-index: 1;
    max-width: 1440px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0 auto;
    padding: 1.5rem 2rem 0;
}

/* ─── Language Switcher ─────────────────────────────────────────── */
.lang-switcher {
    display: flex;
    gap: 0.3rem;
    justify-content: center;
    margin-bottom: 0.85rem;
}

.lang-btn {
    padding: 0.35rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    background: transparent;
    color: var(--text-muted);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.25s var(--ease);
}

.lang-btn:hover {
    background: rgba(99, 102, 241, 0.08);
    border-color: var(--border-hover);
    color: var(--text-secondary);
}

.lang-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    box-shadow: none;
}

/* ─── Header ────────────────────────────────────────────────────── */
.app-header {
    text-align: center;
    margin-bottom: 2.5rem;
    padding: 1.5rem 0 1.5rem;
}

.header-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 0.6rem;
}

.logo-icon {
    width: 56px;
    height: 56px;
    background: var(--gradient);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    box-shadow: none;
    animation: logoPulse 4s ease-in-out infinite;
    position: relative;
}

.logo-icon::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: var(--radius-md);
    background: var(--gradient);
    z-index: -1;
    opacity: 0.3;
    filter: blur(10px);
}

@keyframes logoPulse {

    0%,
    100% {
        box-shadow: none;
        transform: scale(1)
    }

    50% {
        box-shadow: none;
        transform: scale(1.03)
    }
}

.header-brand h1 {
    font-size: 2.4rem;
    font-weight: 900;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.03em;
}

.header-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 400;
    max-width: 540px;
    margin: 0 auto;
}

.header-version {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.2rem 0.7rem;
    border-radius: 100px;
    background: var(--gradient-subtle);
    border: 1px solid var(--border);
    color: var(--accent-light);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

/* ─── Premium Glass Card ────────────────────────────────────────── */
.glass-card {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.6) 0%, rgba(15, 23, 42, 0.8) 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease, border-color 0.3s ease;
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    z-index: 1;
}

.glass-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3), 0 0 15px rgba(99, 102, 241, 0.05);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.card-header .icon {
    font-size: 1.15rem;
}

.card-header h2 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.card-header .badge-count {
    margin-left: auto;
    padding: 0.15rem 0.6rem;
    border-radius: 100px;
    background: var(--accent-glow);
    color: var(--accent-light);
    font-size: 0.72rem;
    font-weight: 700;
}

/* ─── Form ──────────────────────────────────────────────────────── */
.config-section {
    margin-bottom: 1.75rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 1.25rem;
    align-items: end;
}

@media (max-width: 900px) {
    .form-grid {
        grid-template-columns: 1fr 1fr;
    }

    .form-grid .form-group:first-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 600px) {
    .form-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.form-group label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.form-group input,
.form-group select {
    padding: 0.7rem 0.9rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 0.88rem;
    transition: all 0.25s var(--ease);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: none;
}

.form-group input::placeholder {
    color: var(--text-muted);
}

/* ─── Buttons ───────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.7rem 1.4rem;
    border: none;
    border-radius: var(--radius-sm);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 0.83rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s var(--ease);
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient);
    color: #fff;
    box-shadow: none;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s;
}

.btn-primary:hover::before {
    transform: translateX(100%);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: none;
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

.btn-primary:disabled::before {
    display: none;
}

.btn-secondary {
    background: rgba(99, 102, 241, 0.08);
    color: var(--accent-lighter);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: rgba(99, 102, 241, 0.16);
    border-color: var(--border-hover);
    transform: translateY(-1px);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.78rem;
}

/* ─── Progress ──────────────────────────────────────────────────── */
.progress-section {
    margin: 1.5rem 0;
    display: none;
}

.progress-section.active {
    display: block;
    animation: fadeUp 0.4s var(--ease);
}

.progress-bar-wrap {
    background: rgba(99, 102, 241, 0.08);
    border-radius: 100px;
    height: 6px;
    overflow: hidden;
    margin-bottom: 0.6rem;
}

/* === Loading === */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0e1a;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s;
}

.loading-card {
    text-align: center;
    padding: 48px 64px;
    max-width: 420px;
}

.loading-spinner {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
}

.spinner-ring {
    position: absolute;
    border: 3px solid transparent;
    border-radius: 50%;
    animation: spin 1.5s linear infinite;
}

.spinner-ring:nth-child(1) {
    width: 80px;
    height: 80px;
    border-top-color: #6366f1;
    animation-duration: 1.5s;
}

.spinner-ring:nth-child(2) {
    width: 60px;
    height: 60px;
    top: 10px;
    left: 10px;
    border-top-color: #06b6d4;
    animation-duration: 1s;
    animation-direction: reverse;
}

.spinner-ring:nth-child(3) {
    width: 40px;
    height: 40px;
    top: 20px;
    left: 20px;
    border-top-color: #8b5cf6;
    animation-duration: 0.8s;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.loading-status {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 20px;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #6366f1, #06b6d4);
    border-radius: 2px;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

.hidden {
    display: none !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ─── Health Ring ───────────────────────────────────────────────── */
.health-ring-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    flex-wrap: wrap;
    padding: 1.5rem 0;
}

.health-ring {
    position: relative;
    width: 160px;
    height: 160px;
}

.health-ring svg {
    transform: rotate(-90deg);
}

.health-ring .ring-bg {
    fill: none;
    stroke: rgba(99, 102, 241, 0.08);
    stroke-width: 10;
}

.health-ring .ring-progress {
    fill: none;
    stroke-width: 10;
    stroke-linecap: round;
    transition: stroke-dashoffset 1.5s var(--ease), stroke 0.5s;
}

.health-ring .ring-label {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.health-ring .score-value {
    font-size: 2.4rem;
    font-weight: 900;
    line-height: 1;
}

.health-ring .score-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 0.2rem;
}

.health-ring .score-grade {
    font-size: 0.78rem;
    font-weight: 700;
    margin-top: 0.15rem;
}

.health-details {
    flex: 1;
    min-width: 260px;
}

.health-metric {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid rgba(99, 102, 241, 0.06);
}

.health-metric:last-child {
    border-bottom: none;
}

.health-metric .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.health-metric .label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    flex: 1;
}

.health-metric .value {
    font-size: 0.9rem;
    font-weight: 700;
}

/* ─── Stats Grid ────────────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 0.85rem;
    margin-bottom: 1.75rem;
}

.stat-card {
    background: var(--bg-card);

    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1rem 1.1rem;
    transition: all 0.3s var(--ease);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient);
    opacity: 0;
    transition: opacity 0.3s;
}

.stat-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-hover);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-icon {
    font-size: 1.3rem;
    margin-bottom: 0.3rem;
}

.stat-value {
    font-size: 1.65rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.15rem;
}

/* ─── Action Bar ────────────────────────────────────────────────── */
.action-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-bottom: 1.25rem;
}

.action-left {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
    flex: 1;
}

.action-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 220px;
    max-width: 340px;
}

.search-box input {
    width: 100%;
    padding: 0.6rem 0.9rem 0.6rem 2.4rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 0.83rem;
    transition: all 0.25s var(--ease);
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent);
}

.search-box .search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.85rem;
    pointer-events: none;
    color: var(--text-muted);
}

.filter-select {
    padding: 0.6rem 0.9rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 0.83rem;
    cursor: pointer;
    transition: all 0.25s var(--ease);
}

.filter-select:focus {
    outline: none;
    border-color: var(--accent);
}

/* ─── Table ─────────────────────────────────────────────────────── */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--bg-card);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.results-table thead {
    position: sticky;
    top: 0;
    z-index: 2;
}

.results-table th {
    background: rgba(16, 16, 32, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    color: var(--accent-lighter);
    padding: 0.75rem 0.85rem;
    text-align: left;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 2px solid var(--border);
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    transition: all 0.2s;
}

.results-table th:hover {
    color: var(--text-primary);
    background: rgba(40, 40, 70, 0.95);
}

.results-table th .sort-icon {
    margin-left: 0.3rem;
    opacity: 0.35;
    font-size: 0.65rem;
}

.results-table th.sorted .sort-icon {
    opacity: 1;
    color: var(--accent);
}

.results-table td {
    padding: 0.6rem 0.85rem;
    border-bottom: 1px solid rgba(99, 102, 241, 0.05);
    vertical-align: middle;
}

.results-table tbody tr {
    transition: background 0.2s;
}

.results-table tbody tr:hover td {
    background: var(--bg-card-hover);
}

.url-cell {
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.url-cell a {
    color: var(--accent-light);
    text-decoration: none;
}

.url-cell a:hover {
    color: var(--accent);
    text-decoration: underline;
}

.title-cell {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}

/* ─── Score / Badge ─────────────────────────────────────────────── */
.score-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.55rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
}

.score-good {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.score-warn {
    background: var(--warning-bg);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.score-bad {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.17rem 0.55rem;
    border-radius: var(--radius-xs);
    font-size: 0.72rem;
    font-weight: 700;
}

.badge-high {
    background: var(--success-bg);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.badge-med {
    background: var(--warning-bg);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-low {
    background: var(--danger-bg);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.badge-freq {
    background: var(--info-bg);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

/* ─── Charts ────────────────────────────────────────────────────── */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.75rem;
}

.chart-card {
    background: var(--bg-card);

    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
}

.chart-card h3 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.chart-card canvas {
    max-height: 230px;
}

/* ─── Issues ────────────────────────────────────────────────────── */
.issue-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(99, 102, 241, 0.05);
    font-size: 0.83rem;
}

.issue-item:last-child {
    border-bottom: none;
}

.issue-item .issue-icon {
    font-size: 0.9rem;
}

.issue-item .issue-text {
    flex: 1;
    color: var(--text-secondary);
}

.issue-item .issue-count {
    padding: 0.15rem 0.5rem;
    border-radius: 100px;
    background: var(--danger-bg);
    color: var(--danger);
    font-size: 0.72rem;
    font-weight: 700;
}

/* ─── Errors ────────────────────────────────────────────────────── */
.error-section {
    margin-top: 1.5rem;
}

.error-list {
    list-style: none;
    max-height: 180px;
    overflow-y: auto;
}

.error-list li {
    padding: 0.45rem 0.65rem;
    border-bottom: 1px solid rgba(239, 68, 68, 0.08);
    font-size: 0.8rem;
    color: #f87171;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.error-list li::before {
    content: '✕';
    font-weight: 700;
    font-size: 0.68rem;
}

/* ─── Pagination ────────────────────────────────────────────────── */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    margin-top: 1.25rem;
    flex-wrap: wrap;
}

.pagination button {
    padding: 0.4rem 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    color: var(--text-secondary);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.2s;
}

.pagination button:hover {
    background: rgba(99, 102, 241, 0.12);
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.pagination button.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.pagination button:disabled {
    opacity: 0.25;
    cursor: not-allowed;
}

.pagination .page-info {
    font-size: 0.78rem;
    color: var(--text-muted);
    padding: 0 0.4rem;
}

/* ─── Toast ─────────────────────────────────────────────────────── */
.toast-container {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

[dir="rtl"] .toast-container {
    right: auto;
    left: 1.25rem;
}

.toast {
    padding: 0.75rem 1.1rem;
    border-radius: var(--radius-sm);
    font-size: 0.83rem;
    font-weight: 500;
    box-shadow: none;
    animation: toastIn 0.35s var(--ease);
    display: flex;
    align-items: center;
    gap: 0.45rem;
    max-width: 420px;

}

.toast-success {
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.25);
    color: #4ade80;
}

.toast-error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #f87171;
}

.toast-info {
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.25);
    color: #818cf8;
}

@keyframes toastIn {
    from {
        transform: translateX(100%);
        opacity: 0
    }

    to {
        transform: translateX(0);
        opacity: 1
    }
}

[dir="rtl"] .toast {
    animation-name: toastInRtl;
}

@keyframes toastInRtl {
    from {
        transform: translateX(-100%);
        opacity: 0
    }

    to {
        transform: translateX(0);
        opacity: 1
    }
}

/* ─── Tabs ──────────────────────────────────────────────────────── */
.tab-nav {
    display: flex;
    gap: 0.25rem;
    padding: 0.25rem;
    background: rgba(99, 102, 241, 0.04);
    border-radius: var(--radius-sm);
    margin-bottom: 1.25rem;
    overflow-x: auto;
}

.tab-btn {
    padding: 0.55rem 1.1rem;
    border: none;
    border-radius: var(--radius-xs);
    background: transparent;
    color: var(--text-muted);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.tab-btn:hover {
    color: var(--text-secondary);
    background: rgba(99, 102, 241, 0.06);
}

.tab-btn.active {
    background: var(--accent);
    color: #fff;
    box-shadow: none;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
    animation: fadeUp 0.3s var(--ease);
}

/* ─── Sections / Results ────────────────────────────────────────── */
.results-section {
    display: none;
}

.results-section.active {
    display: block;
    animation: fadeUp 0.5s var(--ease);
}

.section-spacing {
    margin-bottom: 1.5rem;
}

/* ─── Previous Notice ───────────────────────────────────────────── */
.prev-notice {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.85rem 1rem;
    background: var(--gradient-subtle);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: var(--radius-sm);
    margin-bottom: 1.25rem;
    font-size: 0.83rem;
    color: var(--text-secondary);
}

.prev-notice strong {
    color: var(--accent-light);
}

/* ─── FAQ ───────────────────────────────────────────────────────── */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.faq-item {
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.75rem;
}

.faq-item summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    padding: 0.4rem 0;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.faq-item summary::before {
    content: '▸';
    font-size: 0.8rem;
    color: var(--accent-light);
    transition: transform 0.25s;
}

.faq-item[open] summary::before {
    transform: rotate(90deg);
}

[dir="rtl"] .faq-item summary::before {
    content: '◂';
}

[dir="rtl"] .faq-item[open] summary::before {
    transform: rotate(-90deg);
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item p {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.7;
    padding-left: 1.3rem;
}

[dir="rtl"] .faq-item p {
    padding-left: 0;
    padding-right: 1.3rem;
}

/* ─── Recommendations ───────────────────────────────────────────── */
.rec-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(99, 102, 241, 0.06);
}

.rec-item:last-child {
    border-bottom: none;
}

.rec-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.rec-icon-danger {
    background: var(--danger-bg);
}

.rec-icon-warning {
    background: var(--warning-bg);
}

.rec-icon-success {
    background: var(--success-bg);
}

.rec-icon-info {
    background: var(--info-bg);
}

.rec-text {
    flex: 1;
}

.rec-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.rec-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

/* ─── Animations ────────────────────────────────────────────────── */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(16px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

.fade-in {
    animation: fadeUp 0.45s var(--ease);
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg)
    }
}

.empty-state {
    text-align: center;
    padding: 3.5rem 1.5rem;
    color: var(--text-muted);
}

.empty-state .icon {
    font-size: 3rem;
    margin-bottom: 0.85rem;
    opacity: 0.45;
}

.empty-state h3 {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 0.35rem;
}

.empty-state p {
    font-size: 0.88rem;
    max-width: 380px;
    margin: 0 auto;
}

/* ─── Footer ────────────────────────────────────────────────────── */
.app-footer {
    text-align: center;
    padding: 2rem 0 1rem;
    color: var(--text-muted);
    font-size: 0.78rem;
    border-top: 1px solid var(--border);
    margin-top: 2.5rem;
}

.app-footer a {
    color: var(--accent-lighter);
    text-decoration: none;
}

.app-footer a:hover {
    text-decoration: underline;
}

/* ─── Scrollbar ─────────────────────────────────────────────────── */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.25);
    border-radius: 100px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.45);
}

/* ================================================================== */
/*  RESPONSIVE                                                          */
/* ================================================================== */

@media (max-width: 1024px) {
    .form-grid {
        grid-template-columns: 1fr 1fr;
    }

    .form-grid>.form-group:first-child {
        grid-column: span 2;
    }

    .health-ring-container {
        gap: 1.5rem;
    }

    .charts-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .app-container {
        padding: 0.5rem 0.5rem 2rem;
    }

    .glass-card {
        padding: 1.25rem;
        border-radius: var(--radius-lg);
    }

    .header-brand h1 {
        font-size: 1.8rem;
    }

    .header-subtitle {
        font-size: 0.85rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-grid>.form-group:first-child {
        grid-column: span 1;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.65rem;
    }

    .stat-card {
        padding: 0.85rem 0.9rem;
    }

    .stat-value {
        font-size: 1.35rem;
    }

    .action-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .action-left {
        flex-direction: column;
    }

    .action-right {
        justify-content: center;
    }

    .search-box {
        max-width: none;
    }

    .health-ring-container {
        flex-direction: column;
        align-items: center;
        gap: 1.25rem;
    }

    .health-ring {
        width: 140px;
        height: 140px;
    }

    .health-ring .score-value {
        font-size: 2rem;
    }

    .health-details {
        min-width: auto;
        width: 100%;
    }

    .results-table {
        font-size: 0.78rem;
    }

    .results-table th,
    .results-table td {
        padding: 0.5rem 0.55rem;
    }

    .tab-nav {
        gap: 0.15rem;
        padding: 0.2rem;
    }

    .tab-btn {
        padding: 0.45rem 0.85rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .app-container {
        padding: 0.75rem 0.65rem 2rem;
    }

    .glass-card {
        padding: 1rem;
        border-radius: var(--radius-md);
    }

    .header-brand h1 {
        font-size: 1.45rem;
    }

    .header-brand {
        gap: 0.5rem;
    }

    .logo-icon {
        width: 42px;
        height: 42px;
        font-size: 1.3rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .stat-card {
        padding: 0.7rem;
    }

    .stat-value {
        font-size: 1.15rem;
    }

    .stat-label {
        font-size: 0.62rem;
    }

    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.78rem;
    }

    .btn-sm {
        padding: 0.4rem 0.7rem;
        font-size: 0.72rem;
    }

    .results-table th,
    .results-table td {
        padding: 0.4rem 0.35rem;
        font-size: 0.72rem;
    }

    .pagination button {
        padding: 0.3rem 0.55rem;
        font-size: 0.72rem;
    }

    .url-cell {
        max-width: 140px;
    }

    .title-cell {
        max-width: 120px;
    }

    .toast {
        max-width: calc(100vw - 2rem);
        font-size: 0.78rem;
        padding: 0.6rem 0.85rem;
    }

    .lang-switcher {
        gap: 0.2rem;
    }

    .lang-btn {
        padding: 0.25rem 0.55rem;
        font-size: 0.68rem;
    }
}

@media (max-width: 360px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.4rem;
    }

    .header-brand h1 {
        font-size: 1.3rem;
    }

    .action-right {
        flex-direction: column;
        width: 100%;
    }

    .action-right .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ═══════════════════════════════════════
   UNIFIED HEADER & FOOTER
   ═══════════════════════════════════════ */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    background: #0a0e1a;


    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.top-bar-left,
.top-bar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.back-btn {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #f1f5f9;
    background: #111827;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.brand-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 6px 12px;
    border-radius: 20px;
    background: rgba(99, 102, 241, 0.1);
    color: #f1f5f9;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.brand-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: none;

}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: none;
    }

    70% {
        transform: scale(1);
        box-shadow: none;
    }

    100% {
        transform: scale(0.95);
        box-shadow: none;
    }
}

.lang-switcher {
    display: flex;
    gap: 4px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 4px;
}

.lang-btn {
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.6);
    border-radius: 6px;
    transition: all 0.3s;
    text-transform: uppercase;
}

.lang-btn:hover {
    color: #fff;
    background: #111827;
}

.lang-btn.active {
    color: #fff;
    background: linear-gradient(135deg, #6366f1, #06b6d4);
    box-shadow: none;
}

.unified-footer {
    text-align: center;
    padding: 30px 20px;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: #0a0e1a;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1.1rem;
    color: #fff;
}

.footer-logo span:last-child {
    font-size: 0.7rem;
    background: linear-gradient(135deg, #6366f1, #06b6d4);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 800;
    letter-spacing: 1px;
}

.unified-footer p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    margin: 0;
}

@media (max-width: 768px) {
    .top-bar {
        padding: 10px 8px;
        flex-wrap: nowrap;
    }

    .hidden-mobile {
        display: none !important;
    }

    .back-btn {
        padding: 6px 10px;
        font-size: 0.85rem;
    }

    .lang-btn {
        padding: 6px 8px;
        font-size: 0.75rem;
    }

    .app-container {
        padding: 0;
        overflow-x: hidden;
    }

    .main {
        outline: none;
    }

    .glass,
    .glass-card,
    .card,
    .chart-card,
    .search-card,
    .stat-card {
        border-radius: 12px;
    }

    .scores-grid,
    .stats-grid,
    .form-grid {
        gap: 10px !important;
    }
}