/* ============================================================
   ModLabs — Main Stylesheet
   Dark purple theme inspired by ArzMods
   ============================================================ */

/* ── 1. CSS Variables & Reset ─────────────────────────────── */
:root {
  --bg:            #0d0d14;
  --bg-card:       #16162a;
  --bg-hover:      #1e1e35;
  --border:        #2a2a45;
  --primary:       #7c3aed;
  --primary-light: #8b5cf6;
  --accent:        #a78bfa;
  --text:          #e2e8f0;
  --text-muted:    #94a3b8;
  --success:       #10b981;
  --danger:        #ef4444;
  --warning:       #f59e0b;

  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  16px;
  --shadow:     0 4px 24px rgba(0,0,0,.45);
  --transition: .2s ease;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--primary-light); }

img { display: block; max-width: 100%; }

ul, ol { list-style: none; }

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* ── Custom Scrollbar ─────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: var(--primary-light); }


/* ── 2. Navbar ────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 32px;
  height: 64px;
  background: rgba(13, 13, 20, .92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

/* Logo */
.navbar__logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}
.navbar__logo img {
  height: 60px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  display: block;
}
.navbar__logo span { color: var(--accent); }

/* Nav links */
.navbar__links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: center;
}
.navbar__links a {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 500;
  transition: background var(--transition), color var(--transition);
}
.navbar__links a:hover,
.navbar__links a.active {
  background: var(--bg-hover);
  color: var(--text);
}

/* Right side */
.navbar__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Hamburger (mobile) */
.navbar__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.navbar__burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

/* Mobile nav drawer */
.navbar__mobile {
  display: none;
  flex-direction: column;
  gap: 4px;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  z-index: 999;
}
.navbar__mobile.open { display: flex; }
.navbar__mobile a {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 500;
}
.navbar__mobile a:hover { background: var(--bg-hover); color: var(--text); }


/* ── 3. Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .875rem;
  cursor: pointer;
  border: none;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }

.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-light);
  box-shadow: 0 0 18px rgba(124,58,237,.45);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  background: var(--bg-hover);
  border-color: var(--primary-light);
  color: var(--text);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: none;
}
.btn-ghost:hover { color: var(--text); background: var(--bg-hover); }

.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-danger:hover { background: #dc2626; color: #fff; }

.btn-sm { padding: 6px 14px; font-size: .8rem; }
.btn-lg { padding: 13px 28px; font-size: 1rem; }
.btn-icon {
  padding: 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-hover);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-icon:hover { color: var(--accent); border-color: var(--primary); }


/* ── 4. Hero Section ──────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  padding: 96px 32px 80px;
  text-align: center;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(124,58,237,.25) 0%, transparent 70%),
    var(--bg);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%237c3aed' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
  opacity: .6;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(124,58,237,.15);
  border: 1px solid rgba(124,58,237,.35);
  color: var(--accent);
  font-size: .8rem;
  font-weight: 600;
  margin-bottom: 20px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.hero__title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 18px;
  color: var(--text);
}
.hero__title span {
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 36px;
}

.hero__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.hero__stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  margin-top: 56px;
  flex-wrap: wrap;
}
.hero__stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--accent);
}
.hero__stat-label {
  font-size: .8rem;
  color: var(--text-muted);
  margin-top: 2px;
}


/* ── 5. Section Layout ────────────────────────────────────── */
.section {
  padding: 48px 32px;
  max-width: 1400px;
  margin: 0 auto;
}

.section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.section__title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}
.section__title::before {
  content: '';
  display: block;
  width: 4px;
  height: 22px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  border-radius: 2px;
}

/* ── 6. Toggle Скрипты / Сборки ───────────────────────────── */
.toggle-tabs {
  display: inline-flex;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 4px;
  gap: 4px;
}
.toggle-tabs__btn {
  padding: 7px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .875rem;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--text-muted);
  transition: background var(--transition), color var(--transition);
}
.toggle-tabs__btn.active,
.toggle-tabs__btn:hover {
  background: var(--primary);
  color: #fff;
}

/* ── 7. Filter Pills ──────────────────────────────────────── */
.filter-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  transition: all var(--transition);
}
.filter-pill:hover {
  border-color: var(--primary-light);
  color: var(--text);
  background: var(--bg-hover);
}
.filter-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.filter-pill svg, .filter-pill i { font-size: .9em; }


/* ── 8. Mods Grid ─────────────────────────────────────────── */
.mods-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* ── 9. Mod Card ──────────────────────────────────────────── */
.mod-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  cursor: pointer;
  position: relative;
}
.mod-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(124,58,237,.25);
  border-color: var(--primary-light);
}

/* Preview 16:9 */
.mod-card__preview {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  overflow: hidden;
  background: var(--bg-hover);
  flex-shrink: 0;
}
.mod-card__preview img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
.mod-card:hover .mod-card__preview img {
  transform: scale(1.06);
}

/* Badge "Закреплено" */
.mod-card__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
  z-index: 2;
}
.mod-card__badge--pinned {
  background: rgba(245,158,11,.2);
  border: 1px solid rgba(245,158,11,.5);
  color: var(--warning);
}
.mod-card__badge--new {
  background: rgba(16,185,129,.2);
  border: 1px solid rgba(16,185,129,.5);
  color: var(--success);
}
.mod-card__badge--hot {
  background: rgba(239,68,68,.2);
  border: 1px solid rgba(239,68,68,.5);
  color: var(--danger);
}

/* Heart / favourite */
.mod-card__heart {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(13,13,20,.7);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: .9rem;
  cursor: pointer;
  transition: all var(--transition);
  z-index: 2;
}
.mod-card__heart:hover,
.mod-card__heart.active {
  background: rgba(239,68,68,.2);
  border-color: var(--danger);
  color: var(--danger);
}

/* VIP overlay */
.mod-card__vip-overlay {
  position: absolute;
  inset: 0;
  background: rgba(13,13,20,.75);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  z-index: 3;
}
.mod-card__vip-overlay .vip-icon {
  font-size: 2rem;
  color: var(--warning);
}
.mod-card__vip-overlay .vip-text {
  font-size: .85rem;
  font-weight: 700;
  color: var(--warning);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.mod-card__vip-overlay .vip-sub {
  font-size: .75rem;
  color: var(--text-muted);
}

/* Card body */
.mod-card__body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

/* Rating stars */
.mod-card__rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: .8rem;
}
.mod-card__stars {
  display: flex;
  gap: 2px;
  color: var(--warning);
}
.mod-card__stars .star-empty { color: var(--border); }
.mod-card__rating-count { color: var(--text-muted); font-size: .75rem; }

/* Title */
.mod-card__title {
  font-size: .95rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Description */
.mod-card__desc {
  font-size: .8rem;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Tags */
.mod-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.mod-tag {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 600;
  background: rgba(124,58,237,.15);
  border: 1px solid rgba(124,58,237,.3);
  color: var(--accent);
  transition: background var(--transition);
}
.mod-tag:hover { background: rgba(124,58,237,.3); }

/* Footer counters */
.mod-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  font-size: .78rem;
  color: var(--text-muted);
  gap: 8px;
  flex-wrap: wrap;
}
.mod-card__counter {
  display: flex;
  align-items: center;
  gap: 4px;
}
.mod-card__size {
  margin-left: auto;
  font-size: .72rem;
  background: var(--bg-hover);
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
}


/* ── 10. Mod Detail Page ──────────────────────────────────── */
.mod-detail {
  max-width: 1100px;
  margin: 40px auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 32px;
  align-items: start;
}

.mod-detail__main {}

.mod-detail__cover {
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 24px;
  aspect-ratio: 16/9;
  background: var(--bg-hover);
}
.mod-detail__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mod-detail__title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 10px;
}

.mod-detail__meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  font-size: .85rem;
  color: var(--text-muted);
}
.mod-detail__meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.mod-detail__description {
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 24px;
}

.mod-detail__screenshots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}
.mod-detail__screenshots img {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  aspect-ratio: 16/9;
  object-fit: cover;
  cursor: pointer;
  transition: border-color var(--transition);
}
.mod-detail__screenshots img:hover { border-color: var(--primary-light); }

/* Sidebar */
.mod-detail__sidebar {}

.mod-detail__card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 80px;
}

.mod-detail__price {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent);
}
.mod-detail__price.free { color: var(--success); }

.mod-detail__info-row {
  display: flex;
  justify-content: space-between;
  font-size: .85rem;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}
.mod-detail__info-row:last-of-type { border-bottom: none; }
.mod-detail__info-row strong { color: var(--text); }

/* Comments */
.comments { margin-top: 40px; }
.comments__title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text);
}
.comment {
  display: flex;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.comment__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .9rem;
  color: #fff;
  flex-shrink: 0;
}
.comment__body {}
.comment__author {
  font-weight: 600;
  font-size: .9rem;
  color: var(--text);
}
.comment__date { font-size: .75rem; color: var(--text-muted); margin-left: 8px; }
.comment__text { font-size: .875rem; color: var(--text-muted); margin-top: 4px; }


/* ── 11. Forms ────────────────────────────────────────────── */
.form-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(124,58,237,.18) 0%, transparent 65%),
    var(--bg);
}

.form-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow);
}

.form-box__title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}
.form-box__subtitle {
  font-size: .875rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}
.form-group label {
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control::placeholder { color: var(--text-muted); opacity: .6; }
.form-control:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(124,58,237,.2);
}
.form-control.error { border-color: var(--danger); }

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2394a3b8' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.form-error {
  font-size: .78rem;
  color: var(--danger);
  margin-top: 2px;
}

.form-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--text-muted);
  font-size: .8rem;
}
.form-divider::before,
.form-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Upload area */
.upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  color: var(--text-muted);
}
.upload-area:hover,
.upload-area.dragover {
  border-color: var(--primary-light);
  background: rgba(124,58,237,.06);
  color: var(--text);
}
.upload-area__icon { font-size: 2rem; margin-bottom: 8px; color: var(--primary-light); }
.upload-area__text { font-size: .875rem; }
.upload-area__hint { font-size: .75rem; margin-top: 4px; }


/* ── 12. Toast Notifications ──────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
  min-width: 280px;
  max-width: 380px;
  pointer-events: all;
  animation: toastIn .3s ease forwards;
}
.toast.hide { animation: toastOut .3s ease forwards; }

.toast__icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }
.toast__body { flex: 1; }
.toast__title { font-weight: 700; font-size: .875rem; color: var(--text); }
.toast__msg { font-size: .8rem; color: var(--text-muted); margin-top: 2px; }
.toast__close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 0;
  flex-shrink: 0;
}
.toast__close:hover { color: var(--text); }

.toast--success { border-left: 3px solid var(--success); }
.toast--success .toast__icon { color: var(--success); }
.toast--danger  { border-left: 3px solid var(--danger); }
.toast--danger  .toast__icon { color: var(--danger); }
.toast--warning { border-left: 3px solid var(--warning); }
.toast--warning .toast__icon { color: var(--warning); }
.toast--info    { border-left: 3px solid var(--primary-light); }
.toast--info    .toast__icon { color: var(--primary-light); }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(40px); }
}

/* ── 13. User Dropdown ────────────────────────────────────── */
.user-menu {
  position: relative;
}
.user-menu__trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px 5px 5px;
  border-radius: var(--radius-md);
  background: var(--bg-hover);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color var(--transition);
}
.user-menu__trigger:hover { border-color: var(--primary-light); }
.user-menu__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .8rem;
  color: #fff;
  overflow: hidden;
  flex-shrink: 0;
}
.user-menu__avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-menu__name { font-size: .875rem; font-weight: 600; color: var(--text); }
.user-menu__caret { font-size: .7rem; color: var(--text-muted); transition: transform var(--transition); }
.user-menu.open .user-menu__caret { transform: rotate(180deg); }

.user-menu__dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  overflow: hidden;
  z-index: 500;
}
.user-menu.open .user-menu__dropdown { display: block; }

.user-menu__dropdown-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.user-menu__dropdown-name { font-weight: 700; font-size: .9rem; color: var(--text); }
.user-menu__dropdown-email { font-size: .75rem; color: var(--text-muted); }

.user-menu__dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  color: var(--text-muted);
  font-size: .875rem;
  transition: background var(--transition), color var(--transition);
  cursor: pointer;
}
.user-menu__dropdown-item:hover { background: var(--bg-hover); color: var(--text); }
.user-menu__dropdown-item.danger:hover { color: var(--danger); }
.user-menu__dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }


/* ── 14. Pagination ───────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 32px 0;
  flex-wrap: wrap;
}
.pagination__btn {
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.pagination__btn:hover { border-color: var(--primary-light); color: var(--text); }
.pagination__btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.pagination__btn:disabled { opacity: .4; cursor: not-allowed; }

/* ── 15. Profile Page ─────────────────────────────────────── */
.profile-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 40px 32px;
}
.profile-header__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.profile-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  border: 3px solid var(--primary-light);
  overflow: hidden;
  flex-shrink: 0;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-info__name { font-size: 1.5rem; font-weight: 800; color: var(--text); }
.profile-info__role {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-top: 4px;
}
.role-admin { background: rgba(239,68,68,.15); border: 1px solid rgba(239,68,68,.4); color: var(--danger); }
.role-vip   { background: rgba(245,158,11,.15); border: 1px solid rgba(245,158,11,.4); color: var(--warning); }
.role-user  { background: rgba(124,58,237,.15); border: 1px solid rgba(124,58,237,.4); color: var(--accent); }

.profile-stats {
  display: flex;
  gap: 32px;
  margin-left: auto;
  flex-wrap: wrap;
}
.profile-stat { text-align: center; }
.profile-stat__value { font-size: 1.4rem; font-weight: 800; color: var(--accent); }
.profile-stat__label { font-size: .75rem; color: var(--text-muted); }

/* ── 16. Admin Panel ──────────────────────────────────────── */
.admin-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: calc(100vh - 64px);
}
.admin-sidebar {
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  padding: 24px 0;
}
.admin-sidebar__title {
  padding: 0 20px 12px;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-muted);
}
.admin-sidebar__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  color: var(--text-muted);
  font-size: .875rem;
  font-weight: 500;
  transition: all var(--transition);
}
.admin-sidebar__link:hover,
.admin-sidebar__link.active {
  background: var(--bg-hover);
  color: var(--text);
  border-right: 2px solid var(--primary);
}
.admin-content { padding: 32px; }

/* Stats cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.stat-card__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.stat-card__icon--purple { background: rgba(124,58,237,.2); color: var(--primary-light); }
.stat-card__icon--green  { background: rgba(16,185,129,.2); color: var(--success); }
.stat-card__icon--yellow { background: rgba(245,158,11,.2); color: var(--warning); }
.stat-card__icon--red    { background: rgba(239,68,68,.2);  color: var(--danger); }
.stat-card__value { font-size: 1.5rem; font-weight: 800; color: var(--text); }
.stat-card__label { font-size: .8rem; color: var(--text-muted); }

/* Table */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}
.data-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  vertical-align: middle;
}
.data-table tr:hover td { background: var(--bg-hover); }
.data-table tr:last-child td { border-bottom: none; }


/* ── 17. Misc UI Components ───────────────────────────────── */

/* Badge inline */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
}
.badge-primary { background: rgba(124,58,237,.2); color: var(--accent); }
.badge-success { background: rgba(16,185,129,.2); color: var(--success); }
.badge-danger  { background: rgba(239,68,68,.2);  color: var(--danger); }
.badge-warning { background: rgba(245,158,11,.2); color: var(--warning); }

/* Divider */
.divider {
  height: 1px;
  background: var(--border);
  margin: 24px 0;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 64px 24px;
  color: var(--text-muted);
}
.empty-state__icon { font-size: 3rem; margin-bottom: 16px; opacity: .4; }
.empty-state__title { font-size: 1.1rem; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.empty-state__text  { font-size: .875rem; }

/* Spinner */
.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--primary-light);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 100%;
  max-width: 520px;
  box-shadow: var(--shadow);
  animation: modalIn .25s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(.95) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.modal__title { font-size: 1.15rem; font-weight: 700; color: var(--text); }
.modal__close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}
.modal__close:hover { color: var(--text); background: var(--bg-hover); }

/* Search bar */
.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0 14px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.search-bar:focus-within {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(124,58,237,.15);
}
.search-bar__icon { color: var(--text-muted); font-size: .95rem; flex-shrink: 0; }
.search-bar input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  padding: 10px 0;
  font-size: .9rem;
}
.search-bar input::placeholder { color: var(--text-muted); opacity: .7; }

/* Footer */
.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 40px 32px 24px;
  margin-top: 64px;
}
.footer__inner {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 40px;
}
.footer__brand-name { font-size: 1.1rem; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.footer__brand-desc { font-size: .85rem; color: var(--text-muted); line-height: 1.6; }
.footer__col-title {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.footer__col a {
  display: block;
  font-size: .875rem;
  color: var(--text-muted);
  padding: 4px 0;
  transition: color var(--transition);
}
.footer__col a:hover { color: var(--accent); }
.footer__bottom {
  max-width: 1400px;
  margin: 32px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .8rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 8px;
}


/* ── 18. Responsive ───────────────────────────────────────── */

/* Tablet — 1024px */
@media (max-width: 1024px) {
  .mods-grid { grid-template-columns: repeat(3, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer__inner { grid-template-columns: 1fr 1fr; gap: 28px; }
  .admin-layout { grid-template-columns: 200px 1fr; }
}

/* Tablet — 768px */
@media (max-width: 768px) {
  .navbar { padding: 0 20px; }
  .navbar__links { display: none; }
  .navbar__burger { display: flex; }

  .hero { padding: 64px 20px 56px; }

  .section { padding: 32px 20px; }

  .mods-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }

  .mod-detail {
    grid-template-columns: 1fr;
    padding: 0 20px;
    margin: 24px auto;
  }
  .mod-detail__sidebar { order: -1; }
  .mod-detail__card { position: static; }

  .mod-detail__screenshots { grid-template-columns: repeat(2, 1fr); }

  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { display: none; }

  .footer__inner { grid-template-columns: 1fr; gap: 24px; }
  .footer__bottom { flex-direction: column; text-align: center; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); }

  .profile-stats { gap: 20px; }
}

/* Mobile — 480px */
@media (max-width: 480px) {
  .navbar { padding: 0 16px; height: 56px; }
  .navbar__mobile { top: 56px; }

  .hero { padding: 48px 16px 40px; }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { justify-content: center; }
  .hero__stats { gap: 24px; }

  .section { padding: 24px 16px; }
  .section__header { flex-direction: column; align-items: flex-start; }

  .mods-grid { grid-template-columns: 1fr; gap: 12px; }

  .form-box { padding: 28px 20px; }

  .toggle-tabs { width: 100%; }
  .toggle-tabs__btn { flex: 1; text-align: center; }

  .filter-pills { gap: 6px; }
  .filter-pill { padding: 6px 12px; font-size: .78rem; }

  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }

  .mod-detail__screenshots { grid-template-columns: 1fr; }

  .toast-container { bottom: 16px; right: 16px; left: 16px; }
  .toast { min-width: unset; max-width: 100%; }

  .pagination__btn { min-width: 34px; height: 34px; font-size: .8rem; }

  .profile-header__inner { flex-direction: column; align-items: flex-start; }
  .profile-stats { margin-left: 0; }
}

/* ── 19. Utility Classes ──────────────────────────────────── */
.text-muted   { color: var(--text-muted); }
.text-accent  { color: var(--accent); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-center  { text-align: center; }
.text-right   { text-align: right; }

.d-flex       { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }

.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }

.w-full { width: 100%; }
.hidden { display: none !important; }

.truncate {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* Glow effect for primary elements */
.glow {
  box-shadow: 0 0 20px rgba(124,58,237,.4);
}

/* Gradient text */
.gradient-text {
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}



/* ── Roles & Awards ───────────────────────────────────────── */

.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Awards row */
.awards-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.award-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--bg-hover);
    border: 2px solid;
    font-size: 1rem;
    cursor: default;
    transition: transform .2s, box-shadow .2s;
    position: relative;
}
.award-badge:hover {
    transform: scale(1.25);
    box-shadow: 0 4px 16px rgba(0,0,0,.5);
    z-index: 10;
}

/* Tooltip on award hover */
.award-badge::after {
    content: attr(title);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: .72rem;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 6px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity .2s;
    z-index: 100;
    max-width: 200px;
    white-space: normal;
    text-align: center;
}
.award-badge:hover::after {
    opacity: 1;
}

/* Profile awards section */
.profile-awards {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    margin-top: 16px;
}
.profile-awards__title {
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--text-muted);
    margin-bottom: 12px;
}

/* Admin role selector */
.role-select {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.role-option {
    padding: 6px 14px;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 700;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all .2s;
    background: var(--bg-hover);
    color: var(--text-muted);
}
.role-option:hover { border-color: var(--primary-light); color: var(--text); }
.role-option.selected { border-color: currentColor; }
.role-option[data-role="user"]      { color: #94a3b8; }
.role-option[data-role="vip"]       { color: #a78bfa; }
.role-option[data-role="premium"]   { color: #f59e0b; }
.role-option[data-role="boss"]      { color: #ef4444; }
.role-option[data-role="moderator"] { color: #10b981; }
.role-option[data-role="admin"]     { color: #f97316; }

/* Award card in admin */
.award-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: border-color .2s;
}
.award-card:hover { border-color: var(--primary-light); }
.award-card__icon {
    font-size: 2rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-hover);
    border-radius: 50%;
    border: 2px solid;
    flex-shrink: 0;
}
.award-card__name { font-weight: 700; color: var(--text); }
.award-card__desc { font-size: .8rem; color: var(--text-muted); margin-top: 2px; }
