/* ============================================================
   ModsHub — Dark Gaming Theme for DLE
   MODS.EmpireG.RU
   ============================================================ */

/* ---------- CSS Variables ---------- */
:root {
    --bg-primary: #0a0e17;
    --bg-secondary: #111827;
    --bg-card: #1a2233;
    --bg-card-hover: #1f2a3e;
    --bg-surface: #151d2e;
    --bg-input: #0f1520;
    --accent: #00d4ff;
    --accent-glow: rgba(0,212,255,0.12);
    --accent-secondary: #7c3aed;
    --accent-warm: #f59e0b;
    --accent-green: #22c55e;
    --accent-red: #ef4444;
    --text-primary: #e8ecf4;
    --text-secondary: #8899b0;
    --text-muted: #556680;
    --border: rgba(255,255,255,0.06);
    --border-accent: rgba(0,212,255,0.2);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-xs: 6px;
    --shadow-card: 0 4px 24px rgba(0,0,0,0.3);
    --shadow-glow: 0 0 30px rgba(0,212,255,0.08);
    --font-main: 'Exo 2', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;
    --transition: 0.25s ease;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font-main);
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: #33dfff; }
img { max-width: 100%; height: auto; border: 0; }
h1,h2,h3,h4,h5,h6 { font-weight: 700; line-height: 1.3; color: var(--text-primary); }
h1 { font-size: 26px; } h2 { font-size: 22px; } h3 { font-size: 18px; }
h4 { font-size: 16px; } h5 { font-size: 15px; } h6 { font-size: 14px; }
p { margin-bottom: 1em; }
hr { border: none; border-top: 1px solid var(--border); margin: 20px 0; }
input, textarea, select, button { font-family: var(--font-main); }
::selection { background: rgba(0,212,255,0.3); color: #fff; }

/* ---------- Background Grid ---------- */
.bg-grid {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background-image:
        linear-gradient(rgba(0,212,255,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,212,255,0.025) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none; z-index: 0;
}
.page-wrapper { position: relative; z-index: 1; }

/* ---------- Container ---------- */
.container { max-width: 1340px; margin: 0 auto; padding: 0 20px; }

/* ---------- Top Bar ---------- */
.top-bar {
    background: rgba(10,14,23,0.85);
    -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 7px 0; font-size: 13px; color: var(--text-muted);
}
.top-bar .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.top-bar a { color: var(--text-secondary); transition: color var(--transition); }
.top-bar a:hover { color: var(--accent); }
.social-links { display: flex; gap: 14px; align-items: center; }
.social-links a { display: inline-flex; align-items: center; gap: 5px; font-weight: 500; }
.tg-color { color: #29b6f6 !important; }
.ds-color { color: #7c3aed !important; }
.max-color { color: #22c55e !important; }
.boosty-color { color: #f15f2c !important; }

/* ---------- Header / Navbar ---------- */
.header {
    background: rgba(17,24,39,0.92);
    -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 100;
    transition: box-shadow 0.3s;
}
.header.scrolled { box-shadow: 0 4px 30px rgba(0,0,0,0.4); }
.header .container { display: flex; align-items: center; justify-content: space-between; height: 64px; }

/* Logo */
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.logo-icon {
    width: 38px; height: 38px;
    background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
    border-radius: 10px; display: flex; align-items: center; justify-content: center;
    font-weight: 900; font-size: 18px; color: #fff;
    box-shadow: 0 0 20px rgba(0,212,255,0.25);
}
.logo-text { font-weight: 800; font-size: 20px; color: var(--text-primary); letter-spacing: -0.5px; }
.logo-text span { color: var(--accent); }

/* Navigation */
.nav-main { display: flex; align-items: center; gap: 2px; list-style: none; }
.nav-main > li { position: relative; }
.nav-main > li > a {
    color: var(--text-secondary); padding: 8px 13px; border-radius: var(--radius-sm);
    font-weight: 500; font-size: 14px; transition: all var(--transition);
    white-space: nowrap; display: block;
}
.nav-main > li > a:hover, .nav-main > li:hover > a { color: var(--text-primary); background: rgba(255,255,255,0.05); }
.nav-main > li > a.active { color: var(--accent); background: var(--accent-glow); }

/* Dropdown */
.sub-menu {
    position: absolute; top: 100%; left: 0;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 6px; min-width: 230px;
    opacity: 0; visibility: hidden; transform: translateY(8px);
    transition: all 0.25s ease; box-shadow: var(--shadow-card); z-index: 200;
}
.nav-main > li:hover > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.sub-menu a {
    display: flex; justify-content: space-between; align-items: center;
    padding: 9px 14px; border-radius: var(--radius-sm); font-size: 13.5px;
    color: var(--text-secondary);
}
.sub-menu a:hover { background: rgba(255,255,255,0.05); color: var(--text-primary); }
.sub-menu .count {
    font-size: 11px; background: rgba(255,255,255,0.06);
    padding: 2px 8px; border-radius: 20px; color: var(--text-muted);
    font-family: var(--font-mono);
}

/* Header Right */
.header-right { display: flex; align-items: center; gap: 12px; }
.search-box {
    display: flex; align-items: center;
    background: rgba(255,255,255,0.05); border: 1px solid var(--border);
    border-radius: 50px; padding: 0 16px; height: 38px;
    transition: all 0.3s; width: 200px;
}
.search-box:focus-within {
    border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow);
    width: 260px; background: rgba(0,212,255,0.04);
}
.search-box .search-icon { color: var(--text-muted); flex-shrink: 0; width: 16px; height: 16px; }
.search-box input {
    background: none; border: none; outline: none;
    color: var(--text-primary); font-family: inherit; font-size: 13px;
    padding: 0 10px; width: 100%;
}
.search-box input::placeholder { color: var(--text-muted); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 18px; border-radius: var(--radius-sm); font-family: inherit; font-weight: 600; font-size: 13px; cursor: pointer; transition: all var(--transition); border: 1px solid transparent; text-decoration: none; line-height: 1.4; }
.btn-primary { background: linear-gradient(135deg, var(--accent), #0099cc); color: #fff; border: none; box-shadow: 0 0 20px rgba(0,212,255,0.2); }
.btn-primary:hover { box-shadow: 0 0 30px rgba(0,212,255,0.35); transform: translateY(-1px); color: #fff; }
.btn-success { background: var(--accent-green); color: #fff; }
.btn-success:hover { background: #16a34a; color: #fff; }
.btn-warning { background: var(--accent-warm); color: #000; }
.btn-warning:hover { background: #d97706; }
.btn-danger { background: var(--accent-red); color: #fff; }
.btn-danger:hover { background: #dc2626; color: #fff; }
.btn-secondary { background: rgba(255,255,255,0.08); color: var(--text-secondary); border: 1px solid var(--border); }
.btn-secondary:hover { background: rgba(255,255,255,0.12); color: var(--text-primary); border-color: var(--border-accent); }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-lg { padding: 12px 28px; font-size: 15px; }
.btn-pill { border-radius: 50px; }
.btn-icon { width: 36px; height: 36px; padding: 0; border-radius: var(--radius-sm); }

/* ---------- Mobile Bottom Nav ---------- */
.mobile-nav {
    display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
    background: rgba(17,24,39,0.95);
    -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
}
.mobile-nav .container { display: flex; justify-content: space-around; }
.mobile-nav a {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    color: var(--text-muted); font-size: 10px; font-weight: 500; padding: 4px 8px;
    transition: color var(--transition);
}
.mobile-nav a:hover, .mobile-nav a.active { color: var(--accent); }
.mobile-nav svg { width: 22px; height: 22px; }

/* ---------- Slider / Carousel ---------- */
.hero-section { padding: 24px 0 8px; }
.swiper { overflow: hidden; border-radius: var(--radius); }
.swiper-slide { position: relative; height: 400px; overflow: hidden; }
.swiper-slide img { width: 100%; height: 100%; object-fit: cover; transition: transform 6s ease; }
.swiper-slide-active img { transform: scale(1.05); }
.swiper-slide::after {
    content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 70%;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 50%, transparent 100%);
    pointer-events: none;
}
.slide-content {
    position: absolute; bottom: 0; left: 0; right: 0;
    padding: 30px 32px; z-index: 2;
}
.slide-content .badge-cat {
    display: inline-block; background: var(--accent); color: #000;
    font-size: 11px; font-weight: 700; padding: 4px 12px;
    border-radius: 4px; margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.5px;
}
.slide-content h3 {
    font-size: 22px; font-weight: 800; line-height: 1.3;
    margin-bottom: 10px; color: #fff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}
.slide-content .meta { display: flex; gap: 16px; font-size: 13px; color: rgba(255,255,255,0.7); }
.slide-content .meta span { display: inline-flex; align-items: center; gap: 5px; }
.slide-content .desc { color: rgba(255,255,255,0.6); font-size: 13.5px; margin-top: 8px; max-width: 600px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.swiper-pagination-bullet { background: rgba(255,255,255,0.4); opacity: 1; width: 10px; height: 10px; }
.swiper-pagination-bullet-active { background: var(--accent); width: 28px; border-radius: 5px; }
.swiper-button-next, .swiper-button-prev {
    width: 42px; height: 42px; background: rgba(0,0,0,0.5);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    border-radius: 50%; color: #fff;
}
.swiper-button-next::after, .swiper-button-prev::after { font-size: 16px; font-weight: bold; }

/* Hero side cards */
.hero-grid { display: grid; grid-template-columns: 1fr 340px; gap: 16px; }
.hero-side { display: flex; flex-direction: column; gap: 16px; }
.hero-card {
    position: relative; border-radius: var(--radius); overflow: hidden;
    cursor: pointer; background: var(--bg-card); flex: 1;
}
.hero-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.hero-card:hover img { transform: scale(1.05); }
.hero-card::after {
    content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 75%;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
    pointer-events: none;
}
.hero-card-content {
    position: absolute; bottom: 0; left: 0; right: 0; padding: 18px; z-index: 2;
}
.hero-card-content .badge-cat {
    font-size: 10px; background: var(--accent); color: #000;
    padding: 3px 8px; border-radius: 4px; font-weight: 700;
    margin-bottom: 8px; display: inline-block; text-transform: uppercase;
}
.hero-card-content h4 { font-size: 14px; font-weight: 700; color: #fff; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hero-card-content .meta { font-size: 12px; color: rgba(255,255,255,0.5); margin-top: 6px; }

/* ---------- Promo Banner ---------- */
.promo-banner {
    margin: 20px 0 8px;
    background: linear-gradient(135deg, rgba(0,212,255,0.06) 0%, rgba(124,58,237,0.06) 100%);
    border: 1px solid rgba(0,212,255,0.12);
    border-radius: var(--radius); padding: 16px 24px;
    display: flex; align-items: center; gap: 16px; font-size: 14px;
    color: var(--text-secondary); line-height: 1.5;
}
.promo-banner .promo-icon { font-size: 28px; flex-shrink: 0; }
.promo-banner a { color: var(--accent); font-weight: 600; }
.promo-banner a:hover { text-decoration: underline; }

/* ---------- Section Headers ---------- */
.section-head { display: flex; align-items: center; justify-content: space-between; margin: 24px 0 18px; }
.section-head h2 { font-size: 19px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.section-head h2 .sh-icon {
    width: 32px; height: 32px; background: var(--accent-glow); border-radius: 8px;
    display: inline-flex; align-items: center; justify-content: center; color: var(--accent);
}
.section-head .view-all {
    color: var(--text-muted); font-size: 13px; font-weight: 500;
    display: inline-flex; align-items: center; gap: 4px; transition: color var(--transition);
}
.section-head .view-all:hover { color: var(--accent); }

/* ---------- Sort Tabs ---------- */
.sort-tabs, #sort {
    display: flex; gap: 4px; background: var(--bg-surface);
    border-radius: 50px; padding: 4px; margin-bottom: 18px;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
}
#sort a, .sort-tab {
    padding: 7px 16px; border-radius: 50px; font-size: 13px;
    font-weight: 500; color: var(--text-muted); cursor: pointer;
    transition: all var(--transition); border: none; background: none;
    font-family: inherit; white-space: nowrap; text-decoration: none;
}
#sort a:hover, .sort-tab:hover { color: var(--text-secondary); }
#sort a.active, .sort-tab.active { background: var(--accent); color: #000; font-weight: 600; }

/* ---------- Main Layout ---------- */
.main-layout { display: grid; grid-template-columns: 1fr 320px; gap: 28px; padding-bottom: 40px; }
.content-area { min-width: 0; }

/* ---------- Mod Cards (shortstory) ---------- */
.mod-card {
    display: flex; background: var(--bg-card); border-radius: var(--radius);
    overflow: hidden; border: 1px solid var(--border); transition: all 0.3s ease;
    margin-bottom: 16px;
}
.mod-card:hover {
    border-color: var(--border-accent); box-shadow: var(--shadow-glow);
    transform: translateY(-2px); background: var(--bg-card-hover);
}
.mod-card-img {
    width: 260px; min-height: 180px; flex-shrink: 0;
    position: relative; overflow: hidden;
}
.mod-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.mod-card:hover .mod-card-img img { transform: scale(1.08); }
.mod-card-img .size-badge {
    position: absolute; bottom: 10px; left: 10px;
    background: rgba(0,0,0,0.75);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    padding: 4px 10px; border-radius: 6px; font-size: 12px;
    font-weight: 600; color: var(--accent); font-family: var(--font-mono);
}
.mod-card-img .badge-fixed {
    position: absolute; top: 10px; left: 10px;
    background: var(--accent-red); color: #fff; font-size: 11px;
    font-weight: 700; padding: 3px 10px; border-radius: 4px;
}
.mod-card-body {
    padding: 18px 22px; display: flex; flex-direction: column; flex: 1; min-width: 0;
}
.mod-card-cats { display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.mod-card-cats a {
    font-size: 11px; font-weight: 600; color: var(--accent);
    background: var(--accent-glow); padding: 3px 10px; border-radius: 4px;
    text-transform: uppercase; letter-spacing: 0.3px; transition: background var(--transition);
}
.mod-card-cats a:hover { background: rgba(0,212,255,0.22); }
.mod-card h3 {
    font-size: 16px; font-weight: 700; line-height: 1.35; margin-bottom: 8px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.mod-card h3 a { color: var(--text-primary); }
.mod-card h3 a:hover { color: var(--accent); }
.mod-card .desc {
    font-size: 13px; color: var(--text-secondary); line-height: 1.55;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; margin-bottom: auto;
}
.mod-card-footer {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border);
    flex-wrap: wrap; gap: 8px;
}
.mod-card-stats { display: flex; gap: 14px; }
.mod-stat {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 12.5px; color: var(--text-muted); font-weight: 500;
}
.mod-stat i { color: var(--accent-warm); font-size: 14px; }
.mod-card-date { font-size: 12px; color: var(--text-muted); font-family: var(--font-mono); }
.mod-card-actions { display: flex; gap: 6px; }

/* ---------- Grid Card variant (homepage) ---------- */
.mod-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-card {
    background: var(--bg-card); border-radius: var(--radius);
    overflow: hidden; border: 1px solid var(--border);
    transition: all 0.3s ease; display: flex; flex-direction: column;
}
.grid-card:hover {
    border-color: var(--border-accent); box-shadow: var(--shadow-glow);
    transform: translateY(-3px);
}
.grid-card-img { position: relative; overflow: hidden; aspect-ratio: 16/10; }
.grid-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.grid-card:hover .grid-card-img img { transform: scale(1.06); }
.grid-card-img .overlay {
    position: absolute; bottom: 0; left: 0; right: 0; top: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 50%);
    opacity: 0; transition: opacity 0.3s;
}
.grid-card:hover .grid-card-img .overlay { opacity: 1; }
.grid-card-img .badge-cat {
    position: absolute; top: 10px; left: 10px;
    background: var(--accent-green); color: #fff; font-size: 10.5px;
    font-weight: 700; padding: 3px 8px; border-radius: 4px; z-index: 2;
}
.grid-card-img .size-badge {
    position: absolute; bottom: 10px; right: 10px;
    background: rgba(0,0,0,0.7); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    padding: 3px 8px; border-radius: 5px; font-size: 11px;
    font-weight: 600; color: var(--accent-warm); font-family: var(--font-mono); z-index: 2;
}
.grid-card-body { padding: 16px; display: flex; flex-direction: column; flex: 1; }
.grid-card-body h5 { font-size: 14.5px; margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.grid-card-body h5 a { color: var(--text-primary); }
.grid-card-body h5 a:hover { color: var(--accent); }
.grid-card-meta {
    display: flex; gap: 12px; font-size: 12px; color: var(--text-muted);
    margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border);
}
.grid-card-meta span { display: inline-flex; align-items: center; gap: 4px; }
.grid-card-meta i { color: var(--accent-warm); font-size: 13px; }

/* ---------- Sidebar ---------- */
.sidebar { display: flex; flex-direction: column; gap: 24px; }
.sb-block {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden;
}
.sb-block-head {
    padding: 14px 18px; border-bottom: 1px solid var(--border);
    font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px;
}
.sb-block-head i { color: var(--accent); }

/* Popular list */
.popular-item {
    display: flex; gap: 12px; padding: 12px 18px;
    border-bottom: 1px solid var(--border); transition: background var(--transition);
    cursor: pointer; align-items: center;
}
.popular-item:last-child { border-bottom: none; }
.popular-item:hover { background: var(--bg-card-hover); }
.popular-item .pi-img {
    width: 56px; height: 56px; border-radius: 8px;
    overflow: hidden; flex-shrink: 0;
}
.popular-item .pi-img img { width: 100%; height: 100%; object-fit: cover; }
.popular-info { flex: 1; min-width: 0; }
.popular-info h6 {
    font-size: 13px; font-weight: 600; line-height: 1.35; margin-bottom: 4px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.popular-info h6 a { color: var(--text-primary); }
.popular-info h6 a:hover { color: var(--accent); }
.popular-info .pi-meta { font-size: 11.5px; color: var(--text-muted); display: flex; gap: 10px; }
.popular-info .pi-meta i { color: var(--accent-warm); }

/* Random mod */
.random-mod { position: relative; overflow: hidden; }
.random-mod img { width: 100%; height: 220px; object-fit: cover; }
.random-mod::after {
    content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 75%;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
}
.random-mod-content { position: absolute; bottom: 0; left: 0; right: 0; padding: 16px; z-index: 2; }
.random-mod-content h4 { font-size: 15px; color: #fff; margin-top: 6px; }
.random-mod-content .meta { font-size: 12px; color: rgba(255,255,255,0.5); margin-top: 6px; }

/* Last comment sidebar */
.sb-comment { padding: 14px 18px; border-bottom: 1px solid var(--border); }
.sb-comment:last-child { border-bottom: none; }
.sb-comment .sc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.sb-comment .sc-head img { width: 32px; height: 32px; border-radius: 50%; }
.sb-comment .sc-head .sc-name { font-weight: 600; font-size: 13px; }
.sb-comment .sc-head .sc-date { font-size: 11px; color: var(--text-muted); margin-left: auto; }
.sb-comment .sc-text { font-size: 12.5px; color: var(--text-secondary); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sb-comment .sc-link { font-size: 12px; color: var(--accent); font-weight: 600; }
.sb-comment .sc-link:hover { text-decoration: underline; }

/* Tags Cloud */
.tags-cloud { padding: 16px 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.tags-cloud a, a.tag-item {
    font-size: 12px; padding: 5px 12px; border-radius: 50px;
    background: rgba(255,255,255,0.04); border: 1px solid var(--border);
    color: var(--text-secondary); transition: all var(--transition); font-weight: 500;
}
.tags-cloud a:hover, a.tag-item:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }

/* ---------- Fullstory ---------- */
.fullstory-header {
    position: relative; border-radius: var(--radius); overflow: hidden;
    background: var(--bg-card); margin-bottom: 20px;
}
.fullstory-header .fs-bg {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background-size: cover; background-position: top;
    filter: blur(3px); transform: scale(1.05);
}
.fullstory-header .fs-overlay {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(180deg, rgba(10,14,23,0.6) 0%, rgba(10,14,23,0.95) 100%);
}
.fullstory-header .fs-content { position: relative; z-index: 2; padding: 30px; display: flex; gap: 24px; }
.fullstory-header .fs-poster { width: 200px; flex-shrink: 0; }
.fullstory-header .fs-poster img { width: 100%; border-radius: var(--radius-sm); box-shadow: 0 4px 20px rgba(0,0,0,0.5); }
.fullstory-header .fs-info { flex: 1; }
.fullstory-header .fs-info h1 { font-size: 24px; margin-bottom: 14px; color: #fff; }
.fullstory-header .fs-meta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 16px; font-size: 13px; color: rgba(255,255,255,0.7); }
.fullstory-header .fs-meta span { display: inline-flex; align-items: center; gap: 5px; }
.fullstory-header .fs-meta i { color: var(--accent-warm); }
.fs-details { display: flex; flex-wrap: wrap; gap: 12px; }
.fs-detail-item {
    background: rgba(255,255,255,0.06); border-radius: var(--radius-sm);
    padding: 10px 16px; min-width: 120px;
}
.fs-detail-item dt { font-size: 11px; color: var(--accent); text-transform: uppercase; font-weight: 700; letter-spacing: 0.5px; margin-bottom: 3px; }
.fs-detail-item dd { font-size: 13px; color: var(--text-primary); margin: 0; }

/* Fullstory body */
.fullstory-body {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); margin-bottom: 20px;
}
.fullstory-body .card-body { padding: 24px; }
.fullstory-body .text { color: var(--text-secondary); line-height: 1.75; font-size: 14.5px; }
.fullstory-body .text img { border-radius: var(--radius-sm); margin: 8px 0; }
.fullstory-body .text a { color: var(--accent); }
.fullstory-body .text a:hover { text-decoration: underline; }
.fullstory-body h1 { font-size: 20px; text-align: center; margin-bottom: 16px; }

/* Spoiler */
.spoiler-wrap { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 12px; overflow: hidden; }
.spoiler-head {
    padding: 12px 18px; cursor: pointer; font-weight: 600; font-size: 14px;
    display: flex; align-items: center; gap: 8px; color: var(--text-primary);
    transition: background var(--transition);
}
.spoiler-head:hover { background: rgba(255,255,255,0.03); }
.spoiler-head::before { content: '▸'; color: var(--accent); font-size: 16px; transition: transform 0.2s; }
.spoiler-wrap.active .spoiler-head::before { transform: rotate(90deg); }
.spoiler-body { padding: 16px 18px; display: none; color: var(--text-secondary); line-height: 1.7; }
.spoiler-wrap.active .spoiler-body { display: block; }

/* Download buttons */
.download-section { text-align: center; padding: 16px 0; }
.download-section .btn { margin: 6px; min-width: 240px; justify-content: center; }
.download-info {
    background: var(--bg-surface); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 14px 20px; margin: 12px 0;
    text-align: center; color: var(--accent-warm); font-weight: 600;
}
.download-info a { color: var(--accent); }

/* Screenshots */
.screens_cash { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.screens_cash a img { border-radius: var(--radius-sm); transition: transform 0.3s; }
.screens_cash a:hover img { transform: scale(1.03); }

/* Fullstory footer */
.fullstory-footer {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 24px; border-top: 1px solid var(--border);
}
.fs-actions { display: flex; gap: 8px; }
.fs-actions .btn { color: var(--text-secondary); }
.fs-actions .btn:hover { color: var(--accent); }

/* Prev/Next */
.nextprev {
    display: flex; justify-content: space-between; gap: 16px;
    margin-bottom: 20px;
}
.nextprev a {
    display: flex; align-items: center; gap: 10px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 14px 20px;
    color: var(--text-secondary); font-size: 13px; font-weight: 500;
    transition: all var(--transition); flex: 1;
}
.nextprev a:hover { border-color: var(--border-accent); color: var(--text-primary); }
.nextprev a.next { justify-content: flex-end; text-align: right; }

/* Tags */
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.tags a {
    display: inline-block; font-size: 12px; padding: 4px 12px;
    border-radius: 50px; background: rgba(255,255,255,0.04);
    border: 1px solid var(--border); color: var(--text-secondary);
    transition: all var(--transition);
}
.tags a:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }

/* ---------- Comments ---------- */
.comment-block {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); margin-bottom: 14px; overflow: hidden;
}
.comment-block .cb-head {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 20px; border-bottom: 1px solid var(--border);
}
.comment-block .cb-head img { width: 40px; height: 40px; border-radius: 50%; }
.comment-block .cb-name { font-weight: 600; font-size: 14px; }
.comment-block .cb-date { font-size: 12px; color: var(--text-muted); }
.comment-block .cb-body { padding: 16px 20px; color: var(--text-secondary); line-height: 1.65; }
.comment-block .cb-actions {
    display: flex; gap: 8px; justify-content: flex-end;
    padding: 0 20px 14px;
}
.cb-actions .btn-sm { color: var(--text-muted); }
.cb-actions .btn-sm:hover { color: var(--accent); }

/* Add comment */
.addcomment-section .form-control {
    background: var(--bg-input); border: 1px solid var(--border);
    color: var(--text-primary); border-radius: var(--radius-sm);
    padding: 10px 14px; font-size: 14px; transition: border-color var(--transition);
}
.addcomment-section .form-control:focus {
    border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow);
    outline: none;
}
.addcomment-section label, .form-label { color: var(--text-secondary); font-size: 13px; margin-bottom: 6px; display: block; font-weight: 500; }

/* ---------- Forms ---------- */
.form-control {
    background: var(--bg-input); border: 1px solid var(--border);
    color: var(--text-primary); border-radius: var(--radius-sm);
    padding: 10px 14px; font-size: 14px; width: 100%;
    transition: border-color var(--transition), box-shadow var(--transition);
    font-family: inherit;
}
.form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); outline: none; }
.form-control::placeholder { color: var(--text-muted); }
textarea.form-control { min-height: 100px; resize: vertical; }
.form-group { margin-bottom: 16px; }
select.form-control { -webkit-appearance: none; appearance: none; }

/* ---------- Cards ---------- */
.card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden;
}
.card-header { padding: 14px 20px; border-bottom: 1px solid var(--border); font-weight: 700; }
.card-body { padding: 20px; }
.card-footer { padding: 14px 20px; border-top: 1px solid var(--border); }

/* Callout */
.callout {
    background: var(--bg-surface); border-left: 4px solid var(--accent-warm);
    border-radius: var(--radius-sm); padding: 16px 20px; margin-bottom: 16px;
}
.callout h5 { margin-bottom: 6px; }
.callout p { color: var(--text-secondary); margin: 0; }
.callout-warning { border-left-color: var(--accent-warm); }

/* Alert */
.alert {
    padding: 12px 18px; border-radius: var(--radius-sm); margin-bottom: 16px;
    font-size: 14px;
}
.alert-dark-danger { background: rgba(239,68,68,0.1); color: var(--accent-red); border: 1px solid rgba(239,68,68,0.2); }
.alert-dark-info { background: rgba(0,212,255,0.08); color: var(--accent); border: 1px solid rgba(0,212,255,0.15); }
.alert-dark-success { background: rgba(34,197,94,0.08); color: var(--accent-green); border: 1px solid rgba(34,197,94,0.15); }
.alert-primary { background: var(--accent-glow); color: var(--accent); border: 1px solid var(--border-accent); }

/* Badge */
.badge { display: inline-block; padding: 3px 10px; border-radius: 4px; font-size: 11.5px; font-weight: 600; }
.badge-primary { background: var(--accent); color: #000; }
.badge-success { background: var(--accent-green); color: #fff; }
.badge-warning { background: var(--accent-warm); color: #000; }
.badge-danger { background: var(--accent-red); color: #fff; }
.badge-info { background: #3b82f6; color: #fff; }
.badge-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; padding: 0; }

/* ---------- Pagination ---------- */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }
.pagination a, .pagination span {
    width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-sm); font-size: 14px; font-weight: 600;
    color: var(--text-secondary); background: var(--bg-card);
    border: 1px solid var(--border); transition: all var(--transition);
}
.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.pagination .active, .pagination span.nav_ext { background: var(--accent); color: #000; border-color: var(--accent); }
.pagination .prev, .pagination .next { background: var(--accent); color: #000 !important; border-color: var(--accent); font-weight: 800; }
.pages a, .pages span { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; padding: 0 12px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; color: var(--text-secondary); background: var(--bg-card); border: 1px solid var(--border); margin: 0 3px; transition: all var(--transition); text-decoration: none; }
.pages a:hover { border-color: var(--accent); color: var(--accent); }
.pages span.nav_ext { background: var(--accent); color: #000; border-color: var(--accent); }

/* ---------- Footer ---------- */
.footer {
    background: var(--bg-secondary); border-top: 1px solid var(--border); margin-top: 40px;
}
.footer-inner {
    padding: 36px 0; display: grid;
    grid-template-columns: 1fr auto auto; gap: 60px; align-items: start;
}
.footer-brand p { color: var(--text-muted); font-size: 13px; line-height: 1.6; margin-top: 12px; max-width: 340px; }
.footer-links h5 { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); margin-bottom: 14px; }
.footer-links a { display: block; color: var(--text-secondary); font-size: 14px; padding: 4px 0; transition: color var(--transition); }
.footer-links a:hover { color: var(--accent); }
.footer-bottom {
    padding: 16px 0; border-top: 1px solid var(--border);
    display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
    font-size: 13px; color: var(--text-muted);
}

/* ---------- Scroll Buttons ---------- */
.scroll-btns {
    position: fixed; left: 16px; bottom: 50%; transform: translateY(50%);
    display: flex; flex-direction: column; gap: 8px; z-index: 150;
}
.scroll-btn {
    width: 42px; height: 42px; border-radius: 50%;
    background: rgba(17,24,39,0.9);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border: 1px solid var(--border); color: var(--text-secondary);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all var(--transition); font-size: 18px;
}
.scroll-btn:hover { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 15px rgba(0,212,255,0.15); }

/* ---------- Login Modal ---------- */
.modal-overlay {
    display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
    z-index: 300; align-items: center; justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal-box {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 32px; width: 100%;
    max-width: 420px; margin: 20px; box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.modal-box h3 { text-align: center; margin-bottom: 24px; }
.modal-box .form-group { margin-bottom: 16px; }
.modal-box .modal-footer { text-align: center; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-muted); }

/* ---------- Profile ---------- */
.profile-header {
    position: relative; border-radius: var(--radius); overflow: hidden;
    background: var(--bg-card); margin-bottom: 20px;
}
.profile-header .ph-bg {
    height: 200px; background-size: cover; background-position: center;
    position: relative;
}
.profile-header .ph-bg::after {
    content: ''; position: absolute; bottom: 0; left: 0; right: 0;
    height: 100%; background: linear-gradient(to top, rgba(10,14,23,0.95), transparent);
}
.profile-header .ph-content {
    position: relative; padding: 0 24px 20px; margin-top: -60px; z-index: 2;
    display: flex; align-items: flex-end; gap: 20px;
}
.profile-header .ph-avatar { width: 100px; height: 100px; border-radius: 50%; border: 3px solid var(--bg-card); }
.profile-header .ph-info h2 { font-size: 22px; margin-bottom: 4px; }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }
.breadcrumbs a { color: var(--text-secondary); }
.breadcrumbs a:hover { color: var(--accent); }

/* ---------- Misc DLE ---------- */
.videoWrapper { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: var(--radius-sm); }
.videoWrapper iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.bg-light { background: var(--bg-surface) !important; }
.text-warning { color: var(--accent-warm) !important; }
.text-danger { color: var(--accent-red) !important; }
.text-success { color: var(--accent-green) !important; }
.text-body { color: var(--text-primary) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-white { color: #fff !important; }
.font-weight-bold { font-weight: 700 !important; }
.font-weight-semibold { font-weight: 600 !important; }
.mb-0 { margin-bottom: 0 !important; } .mb-1 { margin-bottom: 4px !important; }
.mb-2 { margin-bottom: 8px !important; } .mb-3 { margin-bottom: 16px !important; }
.mb-4 { margin-bottom: 24px !important; } .mt-3 { margin-top: 16px !important; }
.mt-4 { margin-top: 24px !important; } .mr-1 { margin-right: 4px !important; }
.mr-2 { margin-right: 8px !important; } .mr-3 { margin-right: 16px !important; }
.ml-1 { margin-left: 4px !important; } .ml-2 { margin-left: 8px !important; }
.p-2 { padding: 8px !important; } .p-3 { padding: 16px !important; }
.px-3 { padding-left: 16px !important; padding-right: 16px !important; }
.py-3 { padding-top: 16px !important; padding-bottom: 16px !important; }
.d-none { display: none !important; } .d-block { display: block !important; }
.d-inline-block { display: inline-block !important; } .d-flex { display: flex !important; }
.float-right { float: right !important; } .float-left { float: left !important; }
.text-center { text-align: center !important; } .text-right { text-align: right !important; }
.rounded { border-radius: var(--radius) !important; }
.rounded-circle { border-radius: 50% !important; }
.overflow-hidden { overflow: hidden !important; }
.w-100 { width: 100% !important; }
.small { font-size: 12.5px !important; }
.clearfix::after { content: ''; display: table; clear: both; }

/* DLE-specific UI elements */
.ui-w-40 { width: 40px !important; height: 40px !important; }
.ui-w-80 { width: 80px !important; height: 80px !important; }
.xfields td { padding: 6px 4px; color: var(--text-secondary); }
.xfields input, .xfields select, .xfields textarea { background: var(--bg-input); border: 1px solid var(--border); color: var(--text-primary); border-radius: var(--radius-sm); padding: 8px 12px; }
fieldset { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px; margin-bottom: 16px; }
legend { font-weight: 600; font-size: 14px; color: var(--text-primary); padding: 0 8px; }
#dle-content img { border-radius: var(--radius-sm); }

/* PM */
.pm-page .pmlist { color: var(--text-secondary); }
.pm-page .pmlist table { width: 100%; }
.pm-page .pmlist td, .pm-page .pmlist th { padding: 10px; border-bottom: 1px solid var(--border); }
.pm_status { background: var(--bg-surface); padding: 10px 14px; font-size: 13px; color: var(--text-secondary); margin-top: 12px; }

/* DLE editor */
#comment-editor { background: var(--bg-input); border-radius: var(--radius-sm); padding: 4px; }
#comment-editor textarea { background: var(--bg-input); color: var(--text-primary); border: 1px solid var(--border); }
.highslide img { cursor: zoom-in; }

/* Checkbox styling */
input[type="checkbox"] { accent-color: var(--accent); }

/* Fast search */
#dofullsearch, #dosearch, #doclear, #doreset { background: var(--accent) !important; color: #000 !important; border: none !important; padding: 8px 18px; border-radius: var(--radius-sm); cursor: pointer; font-weight: 600; }
.searchheading { display: block; font-weight: 600; color: var(--text-primary); }

/* DLE Mass action checkbox */
.mass-action input[type="checkbox"] { accent-color: var(--accent); }

/* Speedbar overrides */
.speedbar { font-size: 13px; color: var(--text-muted); }
.speedbar a { color: var(--text-secondary); }
.speedbar a:hover { color: var(--accent); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1200px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-side { display: none; }
    .main-layout { grid-template-columns: 1fr; }
    .mod-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 992px) {
    .nav-main { display: none; }
    .sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
    .scroll-btns { display: none; }
    .mobile-nav { display: block; }
    body { padding-bottom: 70px; }
    .fullstory-header .fs-content { flex-direction: column; }
    .fullstory-header .fs-poster { width: 100%; max-width: 200px; }
    .footer-inner { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 768px) {
    .container { padding: 0 12px; }
    .mod-card { flex-direction: column; }
    .mod-card-img { width: 100%; min-height: 200px; }
    .mod-grid { grid-template-columns: 1fr; }
    .sidebar { grid-template-columns: 1fr; }
    .swiper-slide { height: 280px; }
    .slide-content h3 { font-size: 17px; }
    .top-bar { display: none; }
    .search-box { width: 160px; }
    .search-box:focus-within { width: 200px; }
    .hero-section { padding: 16px 0 4px; }
    .promo-banner { flex-direction: column; text-align: center; gap: 10px; }
    .nextprev { flex-direction: column; }
    .fullstory-header .fs-poster { width: 140px; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .modal-box { margin: 10px; padding: 24px; }
}
@media (max-width: 480px) {
    .header .container { height: 56px; }
    .logo-text { font-size: 16px; }
    .logo-icon { width: 32px; height: 32px; font-size: 15px; }
    .search-box { width: 140px; padding: 0 12px; }
    h1 { font-size: 20px; }
    .section-head h2 { font-size: 16px; }
    .grid-card-body h5 { font-size: 13px; }
}

/* ---------- Print ---------- */
@media print {
    .header, .top-bar, .footer, .sidebar, .scroll-btns, .mobile-nav, .promo-banner { display: none !important; }
    body { background: #fff; color: #000; }
    .card, .fullstory-body { border: 1px solid #ddd; background: #fff; }
}
