/* =========================================================
   IT-Blog — dark / neon-futuristic theme
   ========================================================= */

:root{
    --bg:#05070d;
    --bg-soft:#0a0e18;
    --card: rgba(255,255,255,.035);
    --card-solid:#0d1220;
    --text:#e7eaf6;
    --muted:#8d93ac;
    --line: rgba(255,255,255,.10);
    --line-strong: rgba(255,255,255,.18);

    --cyan:#22d3ee;
    --violet:#8b5cf6;
    --pink:#f472d0;
    --brand: linear-gradient(90deg, var(--cyan), var(--violet) 55%, var(--pink));
    --brand2:#7dd3fc;

    --danger:#fb5470;
    --ok:#34e7b6;
    --warn:#fbbf6b;

    --shadow: 0 20px 50px rgba(0,0,0,.55);
    --glow: 0 0 0 1px rgba(139,92,246,.25), 0 0 30px rgba(34,211,238,.12);
    --radius:16px;
}

*{ box-sizing: border-box; }

html{ color-scheme: dark; }

body{
    margin:0;
    font-family: 'Inter', system-ui, Arial, sans-serif;
    background:
        radial-gradient(900px 500px at 12% -10%, rgba(139,92,246,.20), transparent 60%),
        radial-gradient(800px 500px at 110% 10%, rgba(34,211,238,.14), transparent 55%),
        radial-gradient(700px 600px at 50% 120%, rgba(244,114,208,.10), transparent 55%),
        var(--bg);
    background-attachment: fixed;
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

h1,h2,h3,.logo a,.tile h3{
    font-family: 'Space Grotesk', 'Inter', system-ui, sans-serif;
}

::selection{ background: rgba(139,92,246,.4); color:#fff; }

::-webkit-scrollbar{ width:10px; height:10px; }
::-webkit-scrollbar-track{ background: var(--bg); }
::-webkit-scrollbar-thumb{ background: rgba(139,92,246,.35); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover{ background: rgba(139,92,246,.55); }

a{ color: var(--brand2); text-decoration:none; }
a:hover{ color:#fff; }

hr{ border:0; border-top:1px solid var(--line); margin:20px 0; }

p{ color: var(--muted); line-height:1.65; }

small{ color: var(--muted); }

label{ display:block; font-weight:600; margin: 10px 0 6px; color: var(--text); }

/* ===== Layout ===== */
.page{
    max-width: 980px;
    margin: 0 auto;
    padding: 24px 18px 60px;
}

.container{ background:transparent; border:0; padding:0; margin-top:18px; }

.card{
    background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.02)), var(--card-solid);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.card-pad{ padding: 26px; }

h1{
    margin: 0 0 12px;
    font-size: 38px;
    letter-spacing: -.02em;
    font-weight: 700;
    background: var(--brand);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display:inline-block;
}

h2{ margin: 22px 0 12px; font-size: 21px; font-weight:700; color: var(--text); }

/* ===== Header ===== */
.header, .top{
    position: sticky;
    top:0;
    z-index: 100;
    background: rgba(5,7,13,.72);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 1px 0 rgba(139,92,246,.15);
}

.top{ display:flex; gap:14px; padding:12px 16px; align-items:center; }
.top a{ color: var(--text); }
.top a:hover{ color: var(--cyan); }
.spacer{ flex:1; }

.header-inner{
    max-width: 1100px;
    margin: 0 auto;
    padding: 16px 20px;
    display:flex;
    align-items:center;
    justify-content: space-between;
}

.logo a{
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -.02em;
    background: var(--brand);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-decoration:none;
}

.main-nav{ display:flex; gap:26px; }
.main-nav a{
    text-decoration:none;
    color: var(--muted);
    font-weight:600;
    position: relative;
    padding-bottom: 4px;
}
.main-nav a::after{
    content:"";
    position:absolute; left:0; right:100%; bottom:0;
    height:2px; border-radius:2px;
    background: var(--brand);
    transition: right .25s ease;
}
.main-nav a:hover{ color: var(--text); }
.main-nav a:hover::after{ right:0; }

.user-menu{ display:flex; align-items:center; gap:10px; }
.user-name{ font-size:14px; color: var(--muted); }

/* ===== Buttons / inputs ===== */
.btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,.04);
    color: var(--text);
    text-decoration:none;
    cursor:pointer;
    font-weight:600;
    font-size: 14px;
    transition: border-color .2s ease, box-shadow .2s ease, transform .15s ease, opacity .2s ease;
}
.btn:hover{ border-color: var(--line-strong); transform: translateY(-1px); }

.btn-primary{
    border-color: transparent;
    background: var(--brand);
    color:#05070d;
    font-weight:700;
    box-shadow: 0 8px 24px rgba(139,92,246,.35);
}
.btn-primary:hover{ box-shadow: 0 10px 30px rgba(139,92,246,.55), 0 0 20px rgba(34,211,238,.35); opacity:1; }

.btn-danger{
    border-color: transparent;
    background: linear-gradient(90deg, #fb5470, #f472d0);
    color:#1a0510;
    font-weight:700;
}

.btn-ghost{ background: transparent; }
.btn-ghost:hover{ border-color: var(--cyan); color:#fff; }

.input, select, textarea,
input[type], textarea{
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px 12px;
    outline:none;
    width: 100%;
    background: rgba(255,255,255,.035);
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.input::placeholder, textarea::placeholder{ color: var(--muted); }
.input:focus, select:focus, textarea:focus, input[type]:focus{
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(34,211,238,.18);
}
textarea{ min-height: 140px; }

/* ===== Topbar-style search ===== */
.search{ display:flex; gap:10px; align-items:center; margin: 14px 0 12px; flex-wrap:wrap; }
.search input{
    padding:10px 14px; border:1px solid var(--line); border-radius:999px;
    min-width: 260px; background: rgba(255,255,255,.035); color: var(--text);
}
.search input:focus{ outline:none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34,211,238,.18); }
.search button{
    padding:10px 18px; border:0; border-radius:999px;
    background: var(--brand); color:#05070d; font-weight:700; cursor:pointer;
}
.search button:hover{ box-shadow: 0 8px 24px rgba(139,92,246,.4); }
.search .reset{ color: var(--muted); text-decoration:none; padding:8px 12px; border:1px solid var(--line); border-radius:999px; }
.search .reset:hover{ border-color: var(--line-strong); color:#fff; }

/* ===== Topics ===== */
.topics{ display:flex; gap:10px; flex-wrap:wrap; margin: 14px 0 8px; }
.topic{
    padding:7px 14px;
    border:1px solid var(--line);
    border-radius: 999px;
    background: rgba(255,255,255,.03);
    text-decoration:none;
    color: var(--muted);
    font-weight:600;
    font-size: 14px;
    transition: all .2s ease;
}
.topic:hover{ border-color: var(--cyan); color:#fff; }
.topic.active{
    border-color: transparent;
    background: var(--brand);
    color:#05070d;
}

/* ===== Post cards ===== */
.post-card{
    padding: 18px 20px;
    margin: 14px 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255,255,255,.025);
    transition: border-color .2s ease, transform .15s ease, box-shadow .2s ease;
}
.post-card:hover{
    border-color: rgba(139,92,246,.45);
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(0,0,0,.45), 0 0 0 1px rgba(34,211,238,.10);
}
.post-card h2{ margin: 0 0 8px; font-size: 20px; }
.post-card h2 a{ color: var(--text); background:none; -webkit-text-fill-color:initial; }
.post-card h2 a:hover{ color: var(--cyan); }
.post-card p{ margin: 8px 0; }

/* ===== Badges ===== */
.badge{
    display:inline-flex; align-items:center;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight:700;
    border: 1px solid var(--line);
    background: rgba(255,255,255,.04);
    color: var(--muted);
}
.badge a{ color: var(--cyan); text-decoration:none; }
.badge a:hover{ color:#fff; }
.badge-ok{ border-color: rgba(52,231,182,.35); background: rgba(52,231,182,.10); color:#7CF3CE; }
.badge-warn{ border-color: rgba(251,191,107,.35); background: rgba(251,191,107,.10); color:#FBD59A; }
.badge-danger{ border-color: rgba(251,84,112,.35); background: rgba(251,84,112,.10); color:#FCA9B8; }

/* ===== Alert ===== */
.alert{
    background: rgba(251,84,112,.08);
    border:1px solid rgba(251,84,112,.35);
    color:#FCA9B8;
    padding:12px 16px;
    border-radius: 12px;
}

/* ===== Back link ===== */
.back{ margin-bottom: 18px; }
.back a{
    text-decoration: none;
    padding: 9px 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255,255,255,.03);
    color: var(--text);
    font-size: 14px;
}
.back a:hover{ border-color: var(--cyan); color:#fff; }

/* ===== Article content ===== */
.content{ margin-top: 16px; font-size: 16px; line-height: 1.8; color: var(--text); }
.content h1, .content h2, .content h3{ line-height: 1.25; margin: 24px 0 12px; }
.content p{ margin: 12px 0; color: var(--text); opacity:.92; }
.content a{ text-decoration: underline; }
.content ul, .content ol{ padding-left: 22px; margin: 12px 0; color: var(--text); }
.content blockquote{
    margin: 16px 0;
    padding: 12px 16px;
    border-left: 3px solid var(--violet);
    background: rgba(139,92,246,.08);
    border-radius: 0 12px 12px 0;
    color: var(--muted);
}
.content img{
    max-width: 100%; height:auto;
    border-radius: 14px;
    border: 1px solid var(--line);
}
.content pre{ border-radius: 14px; overflow:auto; }
.content code{
    font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 14px;
}
.content :not(pre) > code{
    padding: 2px 7px;
    border-radius: 8px;
    background: rgba(139,92,246,.14);
    color: #C9BAFF;
}

pre[class*="language-"]{
    border-radius: 14px;
    border: 1px solid var(--line);
    box-shadow: 0 12px 30px rgba(0,0,0,.4);
    overflow:auto;
}
code[class*="language-"]{ font-size: 14px; }

/* ===== Admin dashboard ===== */
.grid{ display:grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 900px){ .grid{ grid-template-columns: 1fr; } }

.tile{
    display:block;
    padding: 20px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: rgba(255,255,255,.03);
    box-shadow: var(--shadow);
    text-decoration:none;
    color: var(--text);
    transition: border-color .2s ease, transform .15s ease;
}
.tile:hover{ transform: translateY(-3px); border-color: rgba(34,211,238,.4); }
.tile h3{ margin:0 0 6px; font-size: 18px; color: var(--text); }
.tile p{ margin:0; }

.stats{ display:grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 900px){ .stats{ grid-template-columns: 1fr 1fr; } }
.stat{
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255,255,255,.03);
}
.stat .n{
    font-size: 26px; font-weight:800;
    background: var(--brand); -webkit-background-clip:text; background-clip:text; color:transparent;
}
.stat .t{ color: var(--muted); font-size: 13px; margin-top: 4px; }

/* ===== Tables ===== */
.table{
    width:100%;
    border-collapse: collapse;
    background: rgba(255,255,255,.02);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow:hidden;
    box-shadow: var(--shadow);
}
.table th, .table td{
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    text-align:left;
    vertical-align: top;
    color: var(--text);
}
.table th{ font-size: 12px; text-transform: uppercase; letter-spacing:.04em; color: var(--muted); background: rgba(255,255,255,.03); }
.table tr:last-child td{ border-bottom: 0; }
.table tr:hover td{ background: rgba(139,92,246,.05); }

/* ===== Footer ===== */
.footer{
    margin-top: 60px;
    border-top: 1px solid var(--line);
    color: #9aa1bd;
    position: relative;
}
.footer::before{
    content:"";
    position:absolute; top:-1px; left:0; right:0; height:1px;
    background: var(--brand);
    opacity:.6;
}
.footer-inner{
    max-width: 1100px;
    margin: 0 auto;
    padding: 30px 20px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}
.footer-links{ display:flex; gap:18px; }
.footer-links a{ color:#c7cbe0; text-decoration:none; }
.footer-links a:hover{ color:#fff; }
.footer-copy{ align-self:flex-end; font-size:14px; color:#6f7591; }

/* ===== Hero (home page) ===== */
.hero{ padding: 12px 0 8px; }
.hero .eyebrow{
    display:inline-flex; align-items:center; gap:8px;
    font-size: 12px; font-weight:700; letter-spacing:.08em; text-transform:uppercase;
    color: var(--cyan);
    padding: 6px 12px;
    border:1px solid rgba(34,211,238,.35);
    border-radius: 999px;
    background: rgba(34,211,238,.06);
    margin-bottom: 16px;
}
.hero .eyebrow .dot{ width:6px; height:6px; border-radius:50%; background: var(--brand); box-shadow: 0 0 12px rgba(34,211,238,.9); }
.hero h1{ font-size: 46px; margin-bottom: 14px; }
.hero p.lead{ font-size: 17px; max-width: 620px; color: var(--muted); }
.hero .cta{ display:flex; gap:12px; margin-top: 22px; flex-wrap:wrap; }

.section-head{ display:flex; align-items:baseline; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.section-head h2{ margin:0; }
.section-head a{ font-size: 14px; font-weight:600; }

/* ===== Responsive ===== */
@media (max-width: 768px){
    .header-inner{ flex-direction: column; gap: 12px; }
    .main-nav{ order: 3; }
    .user-menu{ order: 2; }
    .footer-inner{ flex-direction: column; }
    h1{ font-size: 30px; }
    .hero h1{ font-size: 34px; }
}
