/* ═══════════════════════════════════════════════════════════
   Robots.txt & .htaccess Tester — Premium 2026 Dark Theme
   Multi-language (EN / AR / ZH) with RTL support
   ═══════════════════════════════════════════════════════════ */

/* ─── CSS Variables ─── */
:root {
    --bg-primary: #06060e;
    --bg-secondary: #0c0c1a;
    --bg-card: #111122;
    --bg-card-hover: #171730;
    --bg-input: #0a0a18;
    --bg-glass: rgba(99, 102, 241, 0.04);
    --border-color: rgba(99, 102, 241, 0.12);
    --border-hover: rgba(99, 102, 241, 0.32);
    --border-active: rgba(99, 102, 241, 0.5);
    --text-primary: #e8e8f4;
    --text-secondary: #9898be;
    --text-muted: #5e5e80;
    --accent: #6366f1;
    --accent-light: #818cf8;
    --accent-dark: #4f46e5;
    --accent-glow: rgba(99, 102, 241, 0.2);
    --accent2: #a855f7;
    --accent2-glow: rgba(168, 85, 247, 0.15);
    --green: #10b981;
    --green-bg: rgba(16, 185, 129, 0.1);
    --green-border: rgba(16, 185, 129, 0.25);
    --yellow: #f59e0b;
    --yellow-bg: rgba(245, 158, 11, 0.1);
    --yellow-border: rgba(245, 158, 11, 0.25);
    --red: #ef4444;
    --red-bg: rgba(239, 68, 68, 0.1);
    --red-border: rgba(239, 68, 68, 0.25);
    --blue: #3b82f6;
    --blue-bg: rgba(59, 130, 246, 0.1);
    --blue-border: rgba(59, 130, 246, 0.25);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 6px;
    --shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-accent: 0 4px 25px rgba(99, 102, 241, 0.2);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
    --font: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'Fira Code', 'Cascadia Code', 'JetBrains Mono', 'Consolas', monospace;
}

/* ─── Language-specific fonts ─── */
.lang-ar {
    --font: 'Noto Kufi Arabic', 'Inter', system-ui, sans-serif;
}

.lang-zh {
    --font: 'Noto Sans SC', 'Inter', system-ui, sans-serif;
}

/* ─── Reset & Base ─── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ─── Ambient Background ─── */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 800px 500px at 15% 5%, rgba(99, 102, 241, 0.07), transparent),
        radial-gradient(ellipse 600px 400px at 85% 15%, rgba(168, 85, 247, 0.05), transparent),
        radial-gradient(ellipse 700px 500px at 50% 90%, rgba(59, 130, 246, 0.04), transparent);
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: repeating-conic-gradient(rgba(255, 255, 255, 0.005) 0%, transparent 0.5%, transparent 2%);
    pointer-events: none;
    z-index: 0;
    animation: subtleRotate 120s linear infinite;
}

@keyframes subtleRotate {
    to {
        transform: rotate(360deg);
    }
}

/* ─── Container ─── */
.container {
    position: relative;
    z-index: 1;
    max-width: 1320px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0 auto;
    padding: 0 20px 0;
}

/* ═══════════════════════════════════════
   TOP BAR / NAV
   ═══════════════════════════════════════ */
.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 0;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--accent-light);
    letter-spacing: 0.3px;
}

.brand-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: none;

}

@keyframes pulse-dot {

    0%,
    100% {
        box-shadow: none;
    }

    50% {
        box-shadow: none;
    }
}

.version-chip {
    font-size: 0.7rem;
    color: var(--text-muted);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ─── Language Switcher ─── */
.lang-switcher {
    display: flex;
    gap: 4px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 3px;
}

.lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: var(--transition);
    white-space: nowrap;
}

.lang-btn:hover {
    color: var(--text-primary);
    background: #111827;
}

.lang-btn.active {
    background: var(--accent);
    color: #fff;
    box-shadow: none;
}

.lang-name {
    font-size: 0.75rem;
}

/* ═══════════════════════════════════════
   HERO HEADER
   ═══════════════════════════════════════ */
.hero {
    position: relative;
    text-align: center;
    padding: 50px 20px 35px;
    overflow: hidden;
}

.hero-glow {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 300px;
    background: radial-gradient(ellipse, rgba(99, 102, 241, 0.12), rgba(168, 85, 247, 0.06), transparent 70%);
    pointer-events: none;
    filter: blur(40px);
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--accent-light);
    margin-bottom: 18px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.hero-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green);

}

.hero h1 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    letter-spacing: -0.8px;
    line-height: 1.2;
    margin-bottom: 14px;
    background: linear-gradient(135deg, #fff 0%, var(--accent-light) 40%, var(--accent2) 80%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    color: var(--text-secondary);
    font-size: clamp(0.9rem, 1.5vw, 1.05rem);
    max-width: 680px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ─── Feature Pills ─── */
.feature-pills {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
    margin-top: 30px;
    position: relative;
    z-index: 1;
}

.pill {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    text-align: start;
}

.pill:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: none;
}

.pill-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.pill-text strong {
    display: block;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 3px;
}

.pill-text span {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ═══════════════════════════════════════
   CARDS
   ═══════════════════════════════════════ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 26px;
    margin-bottom: 18px;
    transition: var(--transition);
}

.card:hover {
    border-color: var(--border-hover);
}

.glass-card {
    background: rgba(17, 17, 34, 0.7);


}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
}

.card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-title .icon {
    font-size: 1.2rem;
}

.card-title-badge {
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--accent);
    background: var(--accent-glow);
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ═══════════════════════════════════════
   FORM ELEMENTS
   ═══════════════════════════════════════ */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 7px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.label-icon {
    font-size: 0.95rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-prefix {
    position: absolute;
    left: 14px;
    font-size: 0.88rem;
    color: var(--text-muted);
    pointer-events: none;
    font-weight: 500;
    z-index: 2;
}

[dir="rtl"] .input-prefix {
    left: auto;
    right: 14px;
}

.form-input {
    width: 100%;
    padding: 13px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    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.95rem;
    transition: var(--transition);
    outline: none;
}

.form-input.has-prefix {
    padding-left: 80px;
}

[dir="rtl"] .form-input.has-prefix {
    padding-left: 16px;
    padding-right: 80px;
}

.form-input:focus,
.form-textarea:focus {
    border-color: var(--accent);
    box-shadow: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-muted);
}

.form-textarea {
    width: 100%;
    padding: 13px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    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.92rem;
    transition: var(--transition);
    outline: none;
    min-height: 110px;
    resize: vertical;
    line-height: 1.7;
}

.code-textarea {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 0.82rem;
    line-height: 1.8;
}

/* ─── File Upload ─── */
.file-upload-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-sm);
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg-input);
    position: relative;
    overflow: hidden;
}

.file-upload-area::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--accent-glow), transparent);
    opacity: 0;
    transition: var(--transition);
}

.file-upload-area:hover::before,
.file-upload-area.dragover::before {
    opacity: 1;
}

.file-upload-area:hover,
.file-upload-area.dragover {
    border-color: var(--accent);
    transform: translateY(-1px);
}

.upload-icon-wrap {
    position: relative;
    display: inline-block;
    margin-bottom: 8px;
}

.upload-icon {
    font-size: 2rem;
    display: block;
    position: relative;
    z-index: 1;
}

.upload-ring {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    animation: ring-pulse 3s ease infinite;
}

@keyframes ring-pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.15);
        opacity: 0;
    }
}

.file-upload-area p {
    color: var(--text-secondary);
    font-size: 0.82rem;
    position: relative;
    z-index: 1;
}

.file-upload-area .filename {
    color: var(--accent-light);
    font-weight: 700;
    margin-top: 5px;
    font-size: 0.85rem;
}

.file-upload-area input[type="file"] {
    display: none;
}

/* ─── Grid Layouts ─── */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* === 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;
    }
}

/* ═══════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 28px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn-icon {
    font-size: 1.1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark), var(--accent2));
    background-size: 200% 200%;
    color: #fff;
    box-shadow: none;
    animation: gradient-shift 4s ease infinite;
}

@keyframes gradient-shift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: none;
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    animation: none;
}

.btn-glow::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    z-index: -1;
    filter: blur(12px);
    opacity: 0.4;
    transition: var(--transition);
}

.btn-glow:hover::after {
    opacity: 0.6;
    filter: blur(18px);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--accent);
    background: var(--bg-card-hover);
    transform: translateY(-1px);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

.btn-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-full {
    width: 100%;
    padding: 15px;
    font-size: 1rem;
}

/* ═══════════════════════════════════════
   STATS GRID
   ═══════════════════════════════════════ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 18px 14px;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: 3px 3px 0 0;
}

.stat-card.green::before {
    background: linear-gradient(90deg, var(--green), #34d399);
}

.stat-card.yellow::before {
    background: linear-gradient(90deg, var(--yellow), #fbbf24);
}

.stat-card.red::before {
    background: linear-gradient(90deg, var(--red), #f87171);
}

.stat-card.blue::before {
    background: linear-gradient(90deg, var(--blue), #60a5fa);
}

.stat-card.purple::before {
    background: linear-gradient(90deg, var(--accent), var(--accent2));
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: none;
    border-color: var(--border-hover);
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-card.green .stat-number {
    color: var(--green);
}

.stat-card.yellow .stat-number {
    color: var(--yellow);
}

.stat-card.red .stat-number {
    color: var(--red);
}

.stat-card.blue .stat-number {
    color: var(--blue);
}

.stat-card.purple .stat-number {
    color: var(--accent-light);
}

.stat-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 700;
}

/* ═══════════════════════════════════════
   SCORE RING
   ═══════════════════════════════════════ */
.score-section {
    text-align: center;
    margin-bottom: 5px;
}

.score-ring {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto 12px;
}

.score-ring svg {
    width: 150px;
    height: 150px;
    transform: rotate(-90deg);
}

.score-ring circle {
    fill: none;
    stroke-width: 7;
    stroke-linecap: round;
}

.score-ring .bg {
    stroke: var(--border-color);
}

.score-ring .progress {
    stroke: var(--accent);
    stroke-dasharray: 395;
    stroke-dashoffset: 395;
    transition: stroke-dashoffset 1.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.score-ring .score-text {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.score-ring .score-value {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
}

.score-ring .score-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
    margin-top: 2px;
}

/* ═══════════════════════════════════════
   RESULTS TABLE
   ═══════════════════════════════════════ */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.86rem;
}

.results-table thead th {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.6px;
    padding: 13px 14px;
    text-align: start;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 5;
}

.results-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: var(--transition-fast);
}

.results-table tbody tr:hover {
    background: var(--bg-card-hover);
}

.results-table td {
    padding: 11px 14px;
    color: var(--text-primary);
    vertical-align: middle;
}

.results-table td.url-cell {
    max-width: 320px;
    word-break: break-all;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 0.8rem;
}

/* ═══════════════════════════════════════
   BADGES
   ═══════════════════════════════════════ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.73rem;
    font-weight: 700;
    white-space: nowrap;
}

.badge-good {
    background: var(--green-bg);
    color: var(--green);
    border: 1px solid var(--green-border);
}

.badge-warning {
    background: var(--yellow-bg);
    color: var(--yellow);
    border: 1px solid var(--yellow-border);
}

.badge-critical {
    background: var(--red-bg);
    color: var(--red);
    border: 1px solid var(--red-border);
}

.badge-info {
    background: var(--blue-bg);
    color: var(--blue);
    border: 1px solid var(--blue-border);
}

/* ═══════════════════════════════════════
   ALERTS
   ═══════════════════════════════════════ */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.86rem;
    line-height: 1.6;
}

.alert-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.alert-good {
    background: var(--green-bg);
    border: 1px solid var(--green-border);
    color: var(--green);
}

.alert-warning {
    background: var(--yellow-bg);
    border: 1px solid var(--yellow-border);
    color: var(--yellow);
}

.alert-critical {
    background: var(--red-bg);
    border: 1px solid var(--red-border);
    color: var(--red);
}

/* ═══════════════════════════════════════
   TABS
   ═══════════════════════════════════════ */
.tabs {
    display: flex;
    gap: 3px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.tabs::-webkit-scrollbar {
    display: none;
}

.tab {
    padding: 11px 18px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    position: relative;
}

.tab:hover {
    color: var(--text-primary);
}

.tab.active {
    color: var(--accent-light);
    border-bottom-color: var(--accent);
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 20%;
    right: 20%;
    height: 2px;
    background: var(--accent);
    filter: blur(4px);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeSlideIn 0.35s ease;
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ═══════════════════════════════════════
   PROGRESS
   ═══════════════════════════════════════ */
.progress-container {
    display: none;
    margin: 20px 0;
}

.progress-container.active {
    display: block;
}

.progress-bar-track {
    width: 100%;
    height: 5px;
    background: var(--bg-secondary);
    border-radius: 5px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-light), var(--accent2));
    background-size: 200% 200%;
    border-radius: 5px;
    width: 0%;
    transition: width 0.5s ease;
    animation: gradient-shift 2s ease infinite;
}

.progress-text {
    text-align: center;
    margin-top: 10px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ─── Spinner ─── */
.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ═══════════════════════════════════════
   RAW CONTENT VIEWER
   ═══════════════════════════════════════ */
.raw-content {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 18px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 0.8rem;
    line-height: 1.9;
    color: var(--text-secondary);
    max-height: 320px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ═══════════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════════ */
.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-muted);
}

.empty-state .empty-icon {
    font-size: 3rem;
    margin-bottom: 14px;
    display: block;
    opacity: 0.4;
}

.empty-state h3 {
    font-size: 1.05rem;
    margin-bottom: 6px;
    color: var(--text-secondary);
}

.empty-state p {
    font-size: 0.85rem;
}

/* ═══════════════════════════════════════
   RESULTS SECTION
   ═══════════════════════════════════════ */
#results-section {
    display: none;
}

#results-section.active {
    display: block;
    animation: fadeSlideIn 0.5s ease;
}

/* ═══════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════ */
.footer {
    text-align: center;
    padding: 25px 0;
    border-top: 1px solid var(--border-color);
    margin-top: 30px;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.footer-sep {
    opacity: 0.3;
}

/* ═══════════════════════════════════════
   TOAST NOTIFICATIONS
   ═══════════════════════════════════════ */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

[dir="rtl"] .toast-container {
    right: auto;
    left: 20px;
}

.toast {
    padding: 14px 22px;
    border-radius: var(--radius-sm);
    font-size: 0.86rem;
    font-weight: 600;
    box-shadow: none;
    animation: slideInRight 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 380px;
    display: flex;
    align-items: center;
    gap: 8px;

}

[dir="rtl"] .toast {
    animation: slideInLeft 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast-success {
    background: rgba(16, 185, 129, 0.9);
    color: #fff;
}

.toast-error {
    background: rgba(239, 68, 68, 0.9);
    color: #fff;
}

.toast-info {
    background: rgba(99, 102, 241, 0.9);
    color: #fff;
}

@keyframes slideInRight {
    from {
        transform: translateX(110%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-110%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ═══════════════════════════════════════
   CHART CONTAINER
   ═══════════════════════════════════════ */
.chart-container {
    max-width: 400px;
    margin: 0 auto;
    padding: 20px;
}

/* ═══════════════════════════════════════
   SCROLLBAR
   ═══════════════════════════════════════ */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* ═══════════════════════════════════════
   RTL OVERRIDES
   ═══════════════════════════════════════ */
[dir="rtl"] .results-table thead th {
    text-align: right;
}

[dir="rtl"] .alert {
    flex-direction: row-reverse;
    text-align: right;
}

[dir="rtl"] .card-header {
    flex-direction: row-reverse;
}

[dir="rtl"] .card-title {
    flex-direction: row-reverse;
}

[dir="rtl"] .form-label {
    flex-direction: row-reverse;
}

[dir="rtl"] .hero-badge {
    flex-direction: row-reverse;
}

[dir="rtl"] .top-bar {
    flex-direction: row-reverse;
}

[dir="rtl"] .top-bar-left,
[dir="rtl"] .top-bar-right {
    flex-direction: row-reverse;
}

[dir="rtl"] .brand-chip {
    flex-direction: row-reverse;
}

[dir="rtl"] .pill {
    flex-direction: row-reverse;
    text-align: right;
}

[dir="rtl"] .btn-group {
    flex-direction: row-reverse;
}

[dir="rtl"] .lang-btn {
    flex-direction: row-reverse;
}

[dir="rtl"] .badge {
    flex-direction: row-reverse;
}

[dir="rtl"] .footer-inner {
    flex-direction: row-reverse;
}

/* ═══════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════ */
@media (max-width: 768px) {
    .container {
        padding: 0 8px 15px;
    }

    .hero {
        padding: 35px 10px 25px;
    }

    .hero h1 {
        font-size: 1.6rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .feature-pills {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .btn-group {
        flex-direction: column;
    }

    [dir="rtl"] .btn-group {
        flex-direction: column;
    }

    .tabs {
        gap: 1px;
    }

    .tab {
        padding: 9px 12px;
        font-size: 0.78rem;
    }

    .results-table {
        font-size: 0.78rem;
    }

    .results-table td,
    .results-table th {
        padding: 8px 10px;
    }

    .lang-name {
        display: none;
    }

    .lang-btn {
        padding: 6px 10px;
    }

    .toast-container {
        bottom: 10px;
        right: 10px;
        left: 10px;
    }

    .toast {
        max-width: none;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .card {
        padding: 18px 14px;
        border-radius: var(--radius-sm);
    }

    .stat-card {
        padding: 14px 10px;
    }

    .stat-number {
        font-size: 1.6rem;
    }

    .pill {
        padding: 12px;
    }
}

/* ═══════════════════════════════════════
   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;
    }

    .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;
    }
}