/* =====================================================
   KSEC CYBER FORUM — CYBERPUNK HIGH-TECH THEME
   ===================================================== */

/* ─── Google Fonts ─── */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;700;900&family=Share+Tech+Mono&family=Rajdhani:wght@300;400;500;600;700&display=swap');

/* ─── CSS Custom Properties ─── */
:root {
    /* Couleurs principales cyberpunk */
    --cyan: #00f5ff;
    --cyan-dim: #00aacc;
    --magenta: #ff00aa;
    --magenta-dim: #cc0077;
    --green: #39ff14;
    --green-dim: #00cc44;
    --yellow: #ffcc00;
    --red-neon: #ff1a1a;
    --blood-red: #cc0000;
    --dark-red: #660000;
    --purple: #8b00ff;

    /* Fonds */
    --bg-primary: #020a0f;
    --bg-secondary: #050f17;
    --darker-bg: #030c14;
    --card-bg: rgba(0, 20, 35, 0.85);
    --card-border: rgba(0, 245, 255, 0.25);
    --border-color: rgba(0, 245, 255, 0.2);

    /* Textes */
    --text-primary: #c8e6f0;
    --text-secondary: #7fa8b8;
    --text-accent: #00f5ff;

    /* Glassmorphism */
    --glass-bg: rgba(0, 20, 40, 0.7);
    --glass-border: 1px solid rgba(0, 245, 255, 0.15);

    /* Shadows neon */
    --shadow-cyan: 0 0 10px rgba(0, 245, 255, 0.4), 0 0 30px rgba(0, 245, 255, 0.15);
    --shadow-magenta: 0 0 10px rgba(255, 0, 170, 0.4), 0 0 30px rgba(255, 0, 170, 0.15);
    --shadow-green: 0 0 10px rgba(57, 255, 20, 0.4), 0 0 30px rgba(57, 255, 20, 0.1);
    --shadow-red: 0 0 10px rgba(255, 26, 26, 0.5), 0 0 30px rgba(255, 26, 26, 0.2);

    /* Typography */
    --font-logo: 'Orbitron', monospace;
    --font-mono: 'Share Tech Mono', monospace;
    --font-body: 'Rajdhani', sans-serif;

    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Reset & Base ─── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
    font-size: 16px;
    position: relative;
}

/* ─── Animated Background Grid ─── */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 245, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 245, 255, 0.04) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
    pointer-events: none;
    z-index: 0;
}

/* Scanline effect */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(0deg,
            transparent,
            transparent 2px,
            rgba(0, 0, 0, 0.05) 2px,
            rgba(0, 0, 0, 0.05) 4px);
    pointer-events: none;
    z-index: 1;
}

body>* {
    position: relative;
    z-index: 2;
}

/* ─── Keyframe Animations ─── */
@keyframes gridMove {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(50px);
    }
}

@keyframes neonPulse {

    0%,
    100% {
        text-shadow: 0 0 5px currentColor, 0 0 10px currentColor, 0 0 20px currentColor;
    }

    50% {
        text-shadow: 0 0 10px currentColor, 0 0 25px currentColor, 0 0 50px currentColor;
    }
}

@keyframes glitch {
    0% {
        clip-path: inset(0 0 98% 0);
        transform: translate(-3px, 0);
    }

    10% {
        clip-path: inset(20% 0 60% 0);
        transform: translate(3px, 0);
    }

    20% {
        clip-path: inset(50% 0 30% 0);
        transform: translate(-3px, 0);
    }

    30% {
        clip-path: inset(80% 0 5% 0);
        transform: translate(3px, 0);
    }

    40%,
    100% {
        clip-path: inset(0 0 0 0);
        transform: translate(0, 0);
    }
}

@keyframes borderScan {
    0% {
        box-shadow: inset 0 0 0 1px rgba(0, 245, 255, 0);
        border-color: rgba(0, 245, 255, 0.2);
    }

    50% {
        box-shadow: inset 0 0 20px rgba(0, 245, 255, 0.1);
        border-color: rgba(0, 245, 255, 0.7);
    }

    100% {
        box-shadow: inset 0 0 0 1px rgba(0, 245, 255, 0);
        border-color: rgba(0, 245, 255, 0.2);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scanLine {
    0% {
        top: -5%;
    }

    100% {
        top: 105%;
    }
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

@keyframes dataBlink {

    0%,
    80%,
    100% {
        opacity: 1;
    }

    40% {
        opacity: 0.3;
    }
}

/* ─── Typography ─── */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-logo);
    letter-spacing: 2px;
    line-height: 1.2;
}

h1 {
    font-size: clamp(1.5rem, 4vw, 2.8rem);
    color: var(--cyan);
    text-shadow: var(--shadow-cyan);
    animation: neonPulse 3s ease-in-out infinite;
}

h2 {
    font-size: clamp(1.2rem, 3vw, 2rem);
    color: var(--cyan);
}

a {
    color: var(--cyan);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--magenta);
    text-shadow: var(--shadow-magenta);
}

/* ─── Navigation Bar ─── */
nav {
    background: rgba(2, 10, 20, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 30px rgba(0, 245, 255, 0.08);
}

.nav-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
    gap: 20px;
}

.nav-logo {
    font-family: var(--font-logo);
    font-size: clamp(0.9rem, 2.5vw, 1.2rem);
    color: var(--cyan);
    text-shadow: var(--shadow-cyan);
    white-space: nowrap;
    font-weight: 900;
    letter-spacing: 3px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-logo::before {
    content: '▸';
    color: var(--magenta);
    animation: blink 1.5s step-end infinite;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.nav-links a {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
    padding: 6px 14px;
    border: 1px solid transparent;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.nav-links a::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(0, 245, 255, 0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.3s;
}

.nav-links a:hover::before {
    transform: translateX(100%);
}

.nav-links a:hover {
    color: var(--cyan);
    border-color: var(--border-color);
    text-shadow: 0 0 8px var(--cyan);
    background: rgba(0, 245, 255, 0.05);
}

.nav-user {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--green);
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.nav-user::before {
    content: '●';
    color: var(--green);
    animation: dataBlink 2s ease-in-out infinite;
}

/* Hamburger menu (mobile) */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
    background: none;
    border: none;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--cyan);
    transition: var(--transition);
    display: block;
}

/* ─── Container ─── */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    animation: fadeInUp 0.6s ease-out;
}

.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
    animation: fadeInUp 0.6s ease-out;
}

/* ─── Page Header ─── */
.page-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 0 20px;
    position: relative;
}

.page-header::after {
    content: '';
    display: block;
    width: 200px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--cyan), transparent);
    margin: 15px auto 0;
}

.page-header h1 {
    position: relative;
}

/* ─── Article Cards ─── */
.article-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 4px;
    padding: 28px;
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    animation: borderScan 4s ease-in-out infinite;
}

.article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--cyan), var(--magenta), var(--cyan));
    opacity: 0.7;
}

.article-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at center, rgba(0, 245, 255, 0.03) 0%, transparent 70%);
    pointer-events: none;
}

.article-card:hover {
    border-color: rgba(0, 245, 255, 0.5);
    box-shadow: var(--shadow-cyan);
    transform: translateX(4px);
}

.article-title {
    font-family: var(--font-logo);
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.article-title a {
    color: var(--text-primary);
    transition: var(--transition);
}

.article-title a:hover {
    color: var(--cyan);
    text-shadow: 0 0 10px var(--cyan);
}

.article-meta {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-bottom: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.article-meta::before {
    content: '[';
    color: var(--cyan);
}

.article-meta::after {
    content: ']';
    color: var(--cyan);
}

.article-card p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 18px;
}

/* ─── Buttons ─── */
.btn,
button[type="submit"],
button[type="button"] {
    display: inline-block;
    font-family: var(--font-logo);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 10px 24px;
    background: transparent;
    color: var(--cyan);
    border: 1px solid var(--cyan);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
    text-decoration: none;
}

.btn::before,
button[type="submit"]::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, var(--cyan), var(--magenta));
    opacity: 0;
    transition: opacity 0.3s;
}

.btn:hover,
button[type="submit"]:hover {
    color: var(--bg-primary);
    box-shadow: var(--shadow-cyan);
    text-shadow: none;
    border-color: transparent;
}

.btn:hover::before,
button[type="submit"]:hover::before {
    opacity: 1;
}

.btn span,
button[type="submit"] span {
    position: relative;
    z-index: 1;
}

.btn:hover,
button[type="submit"]:hover {
    color: var(--bg-primary) !important;
    background: var(--cyan);
}

.btn-danger {
    color: var(--red-neon);
    border-color: var(--red-neon);
}

.btn-danger:hover {
    background: var(--red-neon);
    color: var(--bg-primary);
    box-shadow: var(--shadow-red);
}

.btn-success {
    color: var(--green);
    border-color: var(--green);
}

.btn-success:hover {
    background: var(--green);
    color: var(--bg-primary);
    box-shadow: var(--shadow-green);
}

.btn-small {
    padding: 5px 12px;
    font-size: 0.7rem;
    letter-spacing: 1px;
    clip-path: polygon(4px 0%, 100% 0%, calc(100% - 4px) 100%, 0% 100%);
}

/* ─── Forms ─── */
.form-container {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 4px;
    padding: clamp(25px, 5vw, 50px);
    max-width: 550px;
    margin: 40px auto;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    position: relative;
    overflow: hidden;
}

.form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--cyan), var(--magenta), transparent);
    animation: neonPulse 3s ease-in-out infinite;
}

.form-container h1 {
    text-align: center;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--cyan);
    margin-bottom: 8px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    background: rgba(0, 245, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 2px;
    color: var(--text-primary);
    padding: 12px 16px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    transition: var(--transition);
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(0, 245, 255, 0.1), var(--shadow-cyan);
    background: rgba(0, 245, 255, 0.06);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(0, 245, 255, 0.3);
    font-style: italic;
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
    font-family: var(--font-mono);
}

.form-group small {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 5px;
    display: block;
}

button[type="submit"] {
    width: 100%;
    padding: 14px;
    margin-top: 10px;
    font-size: 0.85rem;
}

/* ─── Alerts / Messages ─── */
.alert {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    padding: 14px 18px;
    border-radius: 2px;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.alert::before {
    content: '> ';
    color: inherit;
    opacity: 0.6;
}

.alert-error {
    background: rgba(255, 26, 26, 0.1);
    border: 1px solid rgba(255, 26, 26, 0.4);
    color: #ff6e6e;
    box-shadow: inset 0 0 20px rgba(255, 26, 26, 0.05);
}

.alert-success {
    background: rgba(57, 255, 20, 0.08);
    border: 1px solid rgba(57, 255, 20, 0.35);
    color: var(--green);
    box-shadow: inset 0 0 20px rgba(57, 255, 20, 0.05);
}

.alert-info {
    background: rgba(0, 245, 255, 0.07);
    border: 1px solid var(--border-color);
    color: var(--cyan);
}

/* ─── Password Requirements ─── */
.password-requirements {
    list-style: none;
    margin-top: 12px;
    padding: 14px 18px;
    background: rgba(0, 10, 20, 0.6);
    border: 1px solid rgba(0, 245, 255, 0.1);
    border-radius: 2px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

.password-requirements li {
    margin-bottom: 6px;
    color: var(--text-secondary);
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.password-requirements li::before {
    content: '○';
    color: var(--text-secondary);
}

.password-requirements li.valid {
    color: var(--green);
}

.password-requirements li.valid::before {
    content: '●';
    color: var(--green);
}

.security-badge {
    background: rgba(0, 245, 255, 0.05);
    border: 1px solid rgba(0, 245, 255, 0.3);
    color: var(--cyan);
    padding: 12px 18px;
    text-align: center;
    margin-bottom: 24px;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    letter-spacing: 1px;
    position: relative;
}

.security-badge::before {
    content: '■ ';
    animation: blink 1s step-end infinite;
}

/* ─── Admin Dashboard Stats ─── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 28px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.stat-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 245, 255, 0.05) 0%, transparent 60%);
    pointer-events: none;
}

.stat-card:hover {
    transform: translateY(-6px);
    border-color: var(--cyan);
    box-shadow: var(--shadow-cyan);
}

.stat-number {
    font-family: var(--font-logo);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    color: var(--cyan);
    text-shadow: var(--shadow-cyan);
    margin-bottom: 8px;
    animation: neonPulse 3s ease-in-out infinite;
}

.stat-number.red {
    color: var(--red-neon);
    text-shadow: var(--shadow-red);
}

.stat-number.green {
    color: var(--green);
    text-shadow: var(--shadow-green);
}

.stat-number.mgnt {
    color: var(--magenta);
    text-shadow: var(--shadow-magenta);
}

.stat-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.stat-card small {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--green);
    display: block;
    margin-top: 6px;
}

/* ─── Admin Navbar ─── */
.admin-nav {
    background: rgba(0, 10, 20, 0.9);
    border: 1px solid var(--border-color);
    padding: 12px 16px;
    margin-bottom: 30px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    backdrop-filter: blur(10px);
    border-radius: 2px;
}

.admin-nav a {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-secondary);
    padding: 8px 16px;
    border: 1px solid transparent;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    border-radius: 2px;
}

.admin-nav a:hover {
    color: var(--cyan);
    border-color: var(--border-color);
    background: rgba(0, 245, 255, 0.05);
    text-shadow: 0 0 8px var(--cyan);
}

.admin-nav a.active {
    color: var(--cyan);
    border-color: var(--cyan);
    background: rgba(0, 245, 255, 0.08);
    text-shadow: 0 0 8px var(--cyan);
}

/* ─── Section Titles ─── */
.section-title {
    font-family: var(--font-logo);
    color: var(--cyan);
    font-size: clamp(1rem, 2.5vw, 1.6rem);
    margin: 35px 0 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
    letter-spacing: 3px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title::before {
    content: '//';
    color: var(--magenta);
    opacity: 0.7;
}

/* ─── Tables ─── */
.table-wrapper {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: 2px;
    margin-bottom: 30px;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    background: rgba(0, 15, 30, 0.8);
    border-collapse: collapse;
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

thead th {
    background: rgba(0, 245, 255, 0.08);
    color: var(--cyan);
    padding: 14px 16px;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(0, 245, 255, 0.05);
    color: var(--text-primary);
    vertical-align: middle;
}

tbody tr {
    transition: var(--transition);
}

tbody tr:hover {
    background: rgba(0, 245, 255, 0.04);
}

tbody tr:last-child td {
    border-bottom: none;
}

/* ─── Quick Actions Grid ─── */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin: 24px 0 36px;
}

.quick-action {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 24px 16px;
    text-align: center;
    color: var(--text-primary);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(10px);
}

.quick-action::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--cyan), var(--magenta));
    transform: scaleX(0);
    transition: transform 0.3s;
}

.quick-action:hover::before {
    transform: scaleX(1);
}

.quick-action:hover {
    border-color: rgba(0, 245, 255, 0.4);
    box-shadow: var(--shadow-cyan);
    transform: scale(1.03);
    color: var(--cyan);
}

.quick-action i {
    font-size: 2rem;
    color: var(--cyan);
    filter: drop-shadow(0 0 8px var(--cyan));
}

.quick-action div {
    font-family: var(--font-logo);
    font-size: 0.75rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ─── Role Badges ─── */
.role-admin {
    color: var(--red-neon);
    font-weight: bold;
    text-shadow: var(--shadow-red);
}

.role-user {
    color: var(--text-secondary);
}

/* ─── Terminal / Cyber Decorations ─── */
.cyber-line {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--cyan), var(--magenta), transparent);
    margin: 30px 0;
    opacity: 0.4;
}

.data-tag {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-secondary);
    letter-spacing: 1px;
}

/* ─── Neon corner decoration ─── */
.neon-corner {
    position: relative;
}

.neon-corner::before,
.neon-corner::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    border-color: var(--cyan);
    border-style: solid;
}

.neon-corner::before {
    top: -1px;
    left: -1px;
    border-width: 2px 0 0 2px;
}

.neon-corner::after {
    bottom: -1px;
    right: -1px;
    border-width: 0 2px 2px 0;
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 245, 255, 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 245, 255, 0.6);
}

/* ─── Password match feedback ─── */
#passwordMatch {
    font-family: var(--font-mono);
    font-size: 0.78rem;
}

/* ─── Login page specific ─── */
.login-logo {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo .logo-text {
    font-family: var(--font-logo);
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    font-weight: 900;
    background: linear-gradient(135deg, var(--cyan), var(--magenta));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 4px;
}

.login-logo .logo-sub {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-secondary);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-top: 4px;
}

/* ─── Admin header title ─── */
.admin-title {
    text-align: center;
    margin-bottom: 30px;
    font-family: var(--font-logo);
    font-size: clamp(1.4rem, 3.5vw, 2.2rem);
    color: var(--cyan);
    text-shadow: var(--shadow-cyan);
    letter-spacing: 4px;
}

/* ─── Footer cyber ─── */
.cyber-footer {
    text-align: center;
    padding: 30px 20px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
    margin-top: 60px;
    letter-spacing: 1px;
}

.cyber-footer span {
    color: var(--cyan);
}

/* ─── Canvas / Particles Background ─── */
#cyber-canvas {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.4;
}

/* ─── Responsive Media Queries ─── */

/* ── Large screens (1200px+) ── */
@media (min-width: 1200px) {
    .container {
        padding: 40px 30px;
    }

    .admin-container {
        padding: 40px 30px;
    }
}

/* ── Medium screens (tablet, 768px–1199px) ── */
@media (max-width: 1199px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ── Small tablet (600px–767px) ── */
@media (max-width: 767px) {
    body {
        font-size: 15px;
    }

    .nav-inner {
        flex-wrap: wrap;
        height: auto;
        padding: 12px 0;
        gap: 10px;
    }

    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 4px;
        padding: 8px 0;
        border-top: 1px solid var(--border-color);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        padding: 10px 12px;
        width: 100%;
        border-bottom: 1px solid rgba(0, 245, 255, 0.05);
    }

    .nav-toggle {
        display: flex;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-container {
        margin: 20px auto;
        padding: 25px 18px;
    }

    .article-card {
        padding: 20px 18px;
    }

    .admin-nav {
        flex-direction: column;
        gap: 6px;
    }

    .admin-nav a {
        width: 100%;
        text-align: center;
    }

    table {
        font-size: 0.78rem;
    }

    thead th,
    tbody td {
        padding: 10px 12px;
    }
}

/* ── Mobile (max 480px) ── */
@media (max-width: 480px) {

    .container,
    .admin-container {
        padding: 20px 14px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .stat-card {
        padding: 18px 12px;
    }

    .stat-number {
        font-size: 2rem;
    }

    .quick-actions {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .quick-action {
        padding: 16px 10px;
    }

    .nav-logo {
        font-size: 0.85rem;
    }

    h1 {
        font-size: 1.3rem;
    }

    .form-container {
        padding: 20px 14px;
    }

    .btn,
    button[type="submit"] {
        font-size: 0.72rem;
        padding: 9px 16px;
    }

    .article-meta {
        font-size: 0.7rem;
    }

    .section-title {
        font-size: 0.95rem;
    }
}

/* ── Extra small (max 360px) ── */
@media (max-width: 360px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .quick-actions {
        grid-template-columns: 1fr;
    }
}

/* ─── Selection Colors ─── */
::selection {
    background: rgba(0, 245, 255, 0.25);
    color: var(--cyan);
}

/* ─── Focus outline accessibility ─── */
:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 3px;
}