/* ── Reset & Base ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg:         #1a1a1d;
    --bg-2:       #222226;
    --bg-3:       #2a2a2e;
    --bg-4:       #323238;
    --border:     #3a3a42;
    --border-2:   #48484f;
    --accent:     #84cc16;
    --accent-2:   #a3e635;
    --accent-dim: rgba(132,204,22,.15);
    --text:       #e2e2e6;
    --text-2:     #a0a0ab;
    --text-3:     #6b6b78;
    --red:        #ef4444;
    --blue:       #3b82f6;
    --orange:     #f97316;
    --radius:     6px;
    --radius-lg:  10px;
    --shadow:     0 2px 8px rgba(0,0,0,.4);
    --shadow-lg:  0 8px 32px rgba(0,0,0,.6);
    --transition: .15s ease;
    --font:       'DM Sans', 'Segoe UI', sans-serif;
    --font-mono:  'JetBrains Mono', 'Consolas', monospace;
}

html { font-size: 15px; scroll-behavior: smooth; }
body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    line-height: 1.6;
    min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-2); }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: var(--font); }

/* ── Typography ─────────────────────────────────────────────────── */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.25; }
h1 { font-size: 1.8rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.15rem; }

/* ── Scrollbar ──────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: var(--bg-4); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-2); }

/* ── Layout ─────────────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.page-wrap { padding-top: 70px; }

/* ── Header / Nav ───────────────────────────────────────────────── */
.site-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: rgba(26,26,29,.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    height: 60px;
}
.header-inner {
    display: flex; align-items: center; gap: 24px;
    height: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px;
}
.site-logo {
    display: flex; align-items: center; gap: 10px;
    font-size: 1.2rem; font-weight: 800;
    color: var(--text); text-decoration: none;
    flex-shrink: 0;
}
.site-logo svg { width: 28px; height: 28px; flex-shrink: 0; }
.logo-accent { color: var(--accent); }
.header-nav { display: flex; gap: 4px; flex: 1; }
.header-nav a {
    padding: 5px 12px; border-radius: var(--radius);
    color: var(--text-2); font-size: .9rem; font-weight: 500;
    transition: background var(--transition), color var(--transition);
}
.header-nav a:hover, .header-nav a.active {
    background: var(--bg-3); color: var(--text);
}
.header-actions { display: flex; gap: 8px; margin-left: auto; }

/* ── Hero Banner ─────────────────────────────────────────────────── */
.hero {
    background: linear-gradient(135deg, var(--bg-2) 0%, var(--bg-3) 100%);
    border-bottom: 1px solid var(--border);
    padding: 40px 0 36px;
    position: relative; overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(ellipse 60% 80% at 80% 50%, rgba(132,204,22,.07), transparent);
    pointer-events: none;
}
.hero-inner { position: relative; }
.hero h1 { font-size: 2rem; margin-bottom: 6px; }
.hero p { color: var(--text-2); font-size: 1rem; }
.hero-stats {
    display: flex; gap: 28px; margin-top: 20px;
}
.hero-stat { text-align: center; }
.hero-stat .val {
    display: block; font-size: 1.5rem; font-weight: 800; color: var(--accent);
    line-height: 1;
}
.hero-stat .lbl { font-size: .75rem; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; margin-top: 2px; }

/* ── Search & Filter Bar ────────────────────────────────────────── */
.filter-bar {
    background: var(--bg-2);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
    position: sticky; top: 60px; z-index: 50;
}
.filter-inner {
    display: flex; gap: 10px; align-items: center;
    max-width: 1200px; margin: 0 auto; padding: 0 20px;
}
.search-wrap {
    flex: 1; position: relative;
}
.search-wrap input {
    width: 100%; background: var(--bg-3); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 8px 12px 8px 38px;
    color: var(--text); font-size: .9rem; outline: none;
    transition: border-color var(--transition);
}
.search-wrap input:focus { border-color: var(--accent); }
.search-wrap input::placeholder { color: var(--text-3); }
.search-icon {
    position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
    color: var(--text-3); pointer-events: none;
}
.filter-select {
    background: var(--bg-3); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 8px 12px;
    color: var(--text); font-size: .9rem; outline: none; cursor: pointer;
    transition: border-color var(--transition);
}
.filter-select:focus { border-color: var(--accent); }

/* ── Main Content Layout ────────────────────────────────────────── */
.main-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 24px;
    padding: 28px 0 60px;
    align-items: start;
}
.main-content { min-width: 0; }
.sidebar { }

/* ── Project Grid ───────────────────────────────────────────────── */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 14px;
}

.project-card {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
    cursor: pointer;
    display: flex; flex-direction: column;
}
.project-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(132,204,22,.12);
}
.project-card-link { display: contents; }

.card-icon-area {
    padding: 16px 16px 0;
    display: flex; align-items: flex-start; gap: 14px;
}
.card-icon {
    width: 56px; height: 56px; border-radius: 10px;
    background: var(--bg-4);
    flex-shrink: 0; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem;
    border: 1px solid var(--border);
}
.card-icon img { width: 100%; height: 100%; object-fit: cover; }
.card-meta { flex: 1; min-width: 0; }
.card-meta h3 {
    font-size: 1rem; font-weight: 700; color: var(--text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    margin-bottom: 2px;
}
.card-category {
    font-size: .72rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: .05em; color: var(--accent);
    background: var(--accent-dim); border-radius: 3px;
    padding: 1px 6px; display: inline-block;
}

.card-desc {
    padding: 10px 16px;
    font-size: .875rem; color: var(--text-2); line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; flex: 1;
}

.card-footer {
    padding: 10px 16px;
    border-top: 1px solid var(--border);
    display: flex; align-items: center; gap: 14px;
    font-size: .8rem; color: var(--text-3);
}
.card-footer-stat { display: flex; align-items: center; gap: 4px; }
.card-footer-stat svg { width: 13px; height: 13px; }
.card-version {
    margin-left: auto;
    background: var(--bg-4); border: 1px solid var(--border-2);
    border-radius: 4px; padding: 2px 8px;
    font-size: .75rem; font-family: var(--font-mono); color: var(--text-2);
}

.featured-badge {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: .7rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .06em; color: #fbbf24;
    background: rgba(251,191,36,.12);
    border-radius: 3px; padding: 1px 6px;
}

/* ── Sidebar Widgets ────────────────────────────────────────────── */
.widget {
    background: var(--bg-2); border: 1px solid var(--border);
    border-radius: var(--radius-lg); margin-bottom: 16px; overflow: hidden;
}
.widget-header {
    padding: 12px 16px; border-bottom: 1px solid var(--border);
    font-size: .8rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .06em; color: var(--text-2);
}
.widget-body { padding: 14px 16px; }
.widget-stat-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 7px 0; border-bottom: 1px solid var(--border);
    font-size: .875rem;
}
.widget-stat-row:last-child { border-bottom: none; }
.widget-stat-row .val { font-weight: 700; color: var(--accent); }
.recent-item {
    padding: 8px 0; border-bottom: 1px solid var(--border);
    font-size: .85rem;
}
.recent-item:last-child { border-bottom: none; }
.recent-item a { color: var(--text); font-weight: 600; }
.recent-item a:hover { color: var(--accent); }
.recent-item .ts { font-size: .75rem; color: var(--text-3); }

.cat-list { list-style: none; }
.cat-list li { }
.cat-list a {
    display: flex; justify-content: space-between; align-items: center;
    padding: 6px 0; color: var(--text-2); font-size: .875rem;
    border-bottom: 1px solid var(--border);
    transition: color var(--transition);
}
.cat-list a:hover { color: var(--accent); }
.cat-list li:last-child a { border-bottom: none; }
.cat-count {
    background: var(--bg-4); border-radius: 10px; padding: 1px 8px;
    font-size: .75rem; color: var(--text-3);
}

/* ── Project Detail Page ────────────────────────────────────────── */
.project-header {
    background: var(--bg-2); border-bottom: 1px solid var(--border);
    padding: 28px 0 24px;
}
.project-header-inner { display: flex; gap: 20px; align-items: flex-start; }
.project-icon-lg {
    width: 80px; height: 80px; border-radius: 14px;
    background: var(--bg-4); border: 1px solid var(--border);
    flex-shrink: 0; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    font-size: 2.2rem;
}
.project-icon-lg img { width: 100%; height: 100%; object-fit: cover; }
.project-header-info { flex: 1; }
.project-header-info h1 { font-size: 1.6rem; margin-bottom: 4px; }
.project-header-meta {
    display: flex; gap: 16px; flex-wrap: wrap; margin: 8px 0 14px;
    font-size: .85rem; color: var(--text-3);
}
.project-header-meta span { display: flex; align-items: center; gap: 5px; }
.project-header-meta svg { width: 14px; height: 14px; }
.project-header-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.detail-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 24px; padding: 28px 0 60px; align-items: start;
}
.detail-main { min-width: 0; }
.detail-sidebar { }

/* Tabs */
.tabs { display: flex; gap: 2px; margin-bottom: 20px; border-bottom: 1px solid var(--border); }
.tab-btn {
    background: none; border: none; color: var(--text-3);
    padding: 10px 18px; font-size: .9rem; font-weight: 600;
    border-bottom: 2px solid transparent; margin-bottom: -1px;
    transition: color var(--transition), border-color var(--transition);
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Screenshot gallery */
.screenshot-gallery { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.screenshot-main { border-radius: var(--radius-lg); overflow: hidden; background: var(--bg-3); }
.screenshot-main img { width: 100%; max-height: 420px; object-fit: cover; cursor: zoom-in; }
.screenshot-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.screenshot-thumb {
    width: 80px; height: 58px; border-radius: 6px; overflow: hidden;
    border: 2px solid var(--border); cursor: pointer;
    transition: border-color var(--transition);
}
.screenshot-thumb.active, .screenshot-thumb:hover { border-color: var(--accent); }
.screenshot-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Changelog */
.version-list { display: flex; flex-direction: column; gap: 14px; }
.version-entry {
    background: var(--bg-3); border: 1px solid var(--border);
    border-radius: var(--radius-lg); overflow: hidden;
}
.version-entry-header {
    padding: 12px 16px; display: flex; align-items: center;
    gap: 12px; border-bottom: 1px solid var(--border);
}
.version-tag {
    background: var(--accent-dim); color: var(--accent);
    border: 1px solid rgba(132,204,22,.3);
    border-radius: 5px; padding: 2px 10px;
    font-size: .82rem; font-weight: 700; font-family: var(--font-mono);
}
.version-date { font-size: .8rem; color: var(--text-3); margin-left: auto; }
.version-entry-body { padding: 14px 16px; }
.changelog-text {
    font-size: .875rem; line-height: 1.7; color: var(--text-2);
    white-space: pre-wrap;
}
.version-download-row {
    padding: 10px 16px; border-top: 1px solid var(--border);
    display: flex; align-items: center; gap: 14px;
    font-size: .8rem; color: var(--text-3);
}

/* Description prose */
.project-description {
    font-size: .9rem; line-height: 1.8; color: var(--text-2);
}
.project-description h2, .project-description h3 {
    color: var(--text); margin: 20px 0 8px;
}
.project-description p { margin-bottom: 12px; }

/* Detail sidebar */
.info-card {
    background: var(--bg-2); border: 1px solid var(--border);
    border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 16px;
}
.info-card-header {
    padding: 10px 14px; border-bottom: 1px solid var(--border);
    font-size: .78rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .06em; color: var(--text-3);
}
.info-row {
    padding: 9px 14px; display: flex; justify-content: space-between;
    align-items: center; border-bottom: 1px solid var(--border);
    font-size: .85rem;
}
.info-row:last-child { border-bottom: none; }
.info-row .label { color: var(--text-3); }
.info-row .value { color: var(--text); font-weight: 600; }

/* ── Buttons ─────────────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 8px 18px; border-radius: var(--radius);
    font-size: .875rem; font-weight: 600;
    border: 1px solid transparent; transition: all var(--transition);
    white-space: nowrap;
}
.btn-primary {
    background: var(--accent); color: #000; border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-2); color: #000; border-color: var(--accent-2); }
.btn-secondary {
    background: var(--bg-4); color: var(--text); border-color: var(--border-2);
}
.btn-secondary:hover { background: var(--bg-3); border-color: var(--accent); color: var(--accent); }
.btn-danger {
    background: transparent; color: var(--red); border-color: var(--red);
}
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-sm { padding: 5px 12px; font-size: .8rem; }
.btn svg { width: 15px; height: 15px; flex-shrink: 0; }

/* ── Lightbox ────────────────────────────────────────────────────── */
.lightbox {
    display: none; position: fixed; inset: 0; z-index: 1000;
    background: rgba(0,0,0,.85); backdrop-filter: blur(4px);
    align-items: center; justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 88vh; border-radius: var(--radius-lg); }
.lightbox-close {
    position: absolute; top: 16px; right: 20px;
    background: var(--bg-3); border: 1px solid var(--border);
    border-radius: 50%; width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: var(--text); font-size: 1.2rem;
    transition: background var(--transition);
}
.lightbox-close:hover { background: var(--bg-4); }

/* ── Forms ───────────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label {
    display: block; font-size: .85rem; font-weight: 600;
    color: var(--text-2); margin-bottom: 6px;
}
.form-control {
    width: 100%; background: var(--bg-3); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 9px 12px;
    color: var(--text); font-size: .9rem; outline: none;
    transition: border-color var(--transition);
    font-family: var(--font);
}
.form-control:focus { border-color: var(--accent); }
.form-control::placeholder { color: var(--text-3); }
textarea.form-control { resize: vertical; min-height: 100px; line-height: 1.6; }
.form-hint { font-size: .77rem; color: var(--text-3); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ── Admin Layout ────────────────────────────────────────────────── */
.admin-wrap { display: flex; min-height: 100vh; padding-top: 0; }
.admin-sidebar {
    width: 230px; background: var(--bg-2); border-right: 1px solid var(--border);
    flex-shrink: 0; position: sticky; top: 0; height: 100vh; overflow-y: auto;
    display: flex; flex-direction: column;
}
.admin-logo {
    padding: 20px 18px 16px; border-bottom: 1px solid var(--border);
    font-weight: 800; font-size: 1.05rem;
}
.admin-logo span { color: var(--accent); }
.admin-nav { padding: 10px 8px; flex: 1; }
.admin-nav a {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px; border-radius: var(--radius);
    color: var(--text-2); font-size: .875rem; font-weight: 500;
    transition: background var(--transition), color var(--transition);
    margin-bottom: 2px;
}
.admin-nav a:hover, .admin-nav a.active {
    background: var(--bg-3); color: var(--text);
}
.admin-nav a.active { color: var(--accent); }
.admin-nav svg { width: 16px; height: 16px; flex-shrink: 0; }
.admin-footer { padding: 14px; border-top: 1px solid var(--border); }
.admin-main { flex: 1; padding: 28px 32px; overflow: auto; }
.admin-topbar {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 24px;
}
.admin-topbar h1 { font-size: 1.4rem; }
.admin-card {
    background: var(--bg-2); border: 1px solid var(--border);
    border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 20px;
}
.admin-card-header {
    padding: 14px 18px; border-bottom: 1px solid var(--border);
    font-weight: 700; font-size: .95rem;
}
.admin-card-body { padding: 18px; }
.admin-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 24px; }
.stat-card {
    background: var(--bg-2); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 18px;
}
.stat-card .val { font-size: 2rem; font-weight: 800; color: var(--accent); }
.stat-card .lbl { font-size: .8rem; color: var(--text-3); margin-top: 4px; }

/* ── Data Table ──────────────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.data-table th {
    padding: 10px 14px; text-align: left; font-size: .75rem;
    font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
    color: var(--text-3); border-bottom: 1px solid var(--border);
    background: var(--bg-3);
}
.data-table td {
    padding: 11px 14px; border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(255,255,255,.02); }
.data-table .actions { display: flex; gap: 6px; }

/* ── Alerts ──────────────────────────────────────────────────────── */
.alert {
    padding: 12px 16px; border-radius: var(--radius);
    font-size: .875rem; margin-bottom: 16px;
    border: 1px solid transparent;
}
.alert-success { background: rgba(132,204,22,.1); border-color: rgba(132,204,22,.3); color: #a3e635; }
.alert-error   { background: rgba(239,68,68,.1);  border-color: rgba(239,68,68,.3);  color: #fca5a5; }

/* ── Empty State ─────────────────────────────────────────────────── */
.empty-state {
    text-align: center; padding: 60px 20px;
    color: var(--text-3);
}
.empty-state svg { width: 48px; height: 48px; margin: 0 auto 14px; opacity: .4; }
.empty-state h3 { color: var(--text-2); margin-bottom: 6px; }

/* ── Footer ──────────────────────────────────────────────────────── */
.site-footer {
    background: var(--bg-2); border-top: 1px solid var(--border);
    padding: 18px 0; text-align: center;
    font-size: .8rem; color: var(--text-3);
}

/* ── Login Page ──────────────────────────────────────────────────── */
.login-page {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: var(--bg);
}
.login-box {
    background: var(--bg-2); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 36px 32px;
    width: 100%; max-width: 380px;
}
.login-box h1 { font-size: 1.4rem; margin-bottom: 4px; }
.login-box p { color: var(--text-3); font-size: .875rem; margin-bottom: 24px; }

/* ── Breadcrumb ──────────────────────────────────────────────────── */
.breadcrumb {
    display: flex; align-items: center; gap: 6px;
    font-size: .82rem; color: var(--text-3); padding: 14px 0 0;
}
.breadcrumb a { color: var(--text-3); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { color: var(--text-2); }

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .main-layout { grid-template-columns: 1fr; }
    .detail-layout { grid-template-columns: 1fr; }
    .sidebar, .detail-sidebar { display: none; }
    .project-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .hero-stats { gap: 18px; }
    .admin-main { padding: 16px; }
    .form-row { grid-template-columns: 1fr; }
    .admin-stats { grid-template-columns: 1fr; }
}

/* ── Version Labels ──────────────────────────────────────────────── */
.version-label {
    font-size:.7rem; font-weight:700; text-transform:uppercase;
    letter-spacing:.06em; border-radius:3px; padding:1px 7px;
    display:inline-block;
}
.label-stabil       { color:var(--accent);  background:rgba(132,204,22,.12); }
.label-beta         { color:#60a5fa;        background:rgba(96,165,250,.12); }
.label-experimentell{ color:#f97316;        background:rgba(249,115,22,.12); }
.label-rc           { color:#a78bfa;        background:rgba(167,139,250,.12); }
.label-veraltet     { color:var(--text-3);  background:rgba(107,107,120,.15); }



/* ── Smooth Gallery (sg) ─────────────────────────────────────────── */
.sg-wrap { display: flex; flex-direction: column; gap: 10px; user-select: none; }

.sg-stage {
    position: relative;
    background: #0d0d0f;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    cursor: zoom-in;
    aspect-ratio: 16/9;
    display: flex; align-items: center; justify-content: center;
}

.sg-img {
    max-width: 100%; max-height: 100%;
    object-fit: contain;
    opacity: 1;
    transform: translateX(0);
    transition: opacity .3s ease, transform .3s ease;
    display: block;
}

/* Arrows */
.sg-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(0,0,0,.55);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 50%;
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; cursor: pointer;
    opacity: 0; transition: opacity .2s ease, background .15s ease;
    z-index: 2;
}
.sg-arrow svg { width: 18px; height: 18px; }
.sg-arrow:hover { background: rgba(0,0,0,.8); }
.sg-prev { left: 12px; }
.sg-next { right: 12px; }
.sg-stage:hover .sg-arrow { opacity: 1; }

/* Top bar */
.sg-topbar {
    position: absolute; top: 0; left: 0; right: 0;
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 14px;
    background: linear-gradient(to bottom, rgba(0,0,0,.6), transparent);
    opacity: 0; transition: opacity .2s ease;
}
.sg-stage:hover .sg-topbar { opacity: 1; }
.sg-counter {
    font-size: .75rem; color: rgba(255,255,255,.8);
    background: rgba(0,0,0,.4); border-radius: 20px;
    padding: 2px 10px; font-weight: 600;
}
.sg-expand {
    background: rgba(0,0,0,.4); border: none; border-radius: 6px;
    padding: 5px; color: rgba(255,255,255,.8);
    cursor: pointer; transition: background .15s;
    display: flex; align-items: center;
}
.sg-expand:hover { background: rgba(0,0,0,.7); color: #fff; }
.sg-expand svg { width: 15px; height: 15px; }

/* Caption */
.sg-caption {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,.75));
    color: rgba(255,255,255,.9); font-size: .82rem;
    padding: 28px 16px 12px;
    pointer-events: none; min-height: 20px;
    opacity: 0; transition: opacity .2s ease;
}
.sg-caption:not(:empty) { opacity: 1; }
.sg-stage:hover .sg-caption { opacity: 1; }

/* Thumbnail strip */
.sg-strip {
    display: flex; gap: 8px;
    overflow-x: auto; padding: 2px 0 6px;
    scrollbar-width: thin;
    scrollbar-color: var(--bg-4) transparent;
}
.sg-strip::-webkit-scrollbar { height: 4px; }
.sg-strip::-webkit-scrollbar-thumb { background: var(--bg-4); border-radius: 2px; }

.sg-thumb {
    position: relative;
    width: 100px; height: 68px;
    border-radius: 6px; overflow: hidden;
    border: 2px solid var(--border);
    cursor: pointer; flex-shrink: 0;
    transition: border-color .15s ease, transform .15s ease, opacity .15s ease;
    opacity: .65;
}
.sg-thumb:hover { opacity: 1; transform: translateY(-2px); border-color: var(--border-2); }
.sg-thumb-active { border-color: var(--accent) !important; opacity: 1; }
.sg-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sg-thumb-num {
    position: absolute; bottom: 3px; right: 5px;
    font-size: .65rem; color: rgba(255,255,255,.7);
    font-weight: 700; text-shadow: 0 1px 3px rgba(0,0,0,.8);
}

/* ── Structured Description ──────────────────────────────────────── */
.desc-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}
.desc-section {
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.desc-section-title {
    padding: 10px 14px;
    font-size: .78rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .06em;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 7px;
}
.desc-icon { font-size: .9rem; }
.desc-features .desc-section-title { color: #84cc16; background: rgba(132,204,22,.06); }
.desc-changes  .desc-section-title { color: #60a5fa; background: rgba(96,165,250,.06); }
.desc-fixes    .desc-section-title { color: #f87171; background: rgba(248,113,113,.06); }

.desc-section-body { padding: 10px 14px; display: flex; flex-direction: column; gap: 6px; }
.desc-item {
    display: flex; gap: 8px; align-items: baseline;
    font-size: .875rem; line-height: 1.5; color: var(--text-2);
}
.desc-bullet {
    flex-shrink: 0; font-size: .7rem; font-weight: 800;
    width: 16px; height: 16px;
    border-radius: 3px; display: flex; align-items: center; justify-content: center;
    background: rgba(132,204,22,.15); color: #84cc16;
    margin-top: 2px;
}
.desc-bullet-change { background: rgba(96,165,250,.15);  color: #60a5fa; }
.desc-bullet-fix    { background: rgba(248,113,113,.15); color: #f87171; }
