/* ============================================================
   FivemSoluciones — Premium Design System v2.0
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  --green:       #00ff87;
  --green-dim:   #00cc6a;
  --green-glow:  rgba(0,255,135,0.15);
  --blue:        #5865f2;
  --orange:      #ff6b2b;
  --yellow:      #ffb800;
  --red:         #ff4444;
  --purple:      #9b59b6;

  --font-display: 'Rajdhani', sans-serif;
  --font-body:    'Inter', sans-serif;

  --radius:    10px;
  --radius-sm: 6px;
  --radius-lg: 16px;
  --trans:     0.2s ease;

  /* Dark theme */
  --bg:         #080b10;
  --bg2:        #0d1117;
  --bg3:        #161b22;
  --bg4:        #1c2230;
  --card:       #161b22;
  --card-hover: #1c2230;
  --border:     #30363d;
  --border2:    #21262d;
  --text:       #e6edf3;
  --text2:      #8b949e;
  --text3:      #6e7681;
  --header-bg:  rgba(8,11,16,0.95);
  --sidebar-bg: #0d1117;
}

[data-theme="light"] {
  --bg:         #f0f2f5;
  --bg2:        #ffffff;
  --bg3:        #f6f8fa;
  --bg4:        #eef0f3;
  --card:       #ffffff;
  --card-hover: #f6f8fa;
  --border:     #d0d7de;
  --border2:    #e8ecf0;
  --text:       #1c2128;
  --text2:      #57606a;
  --text3:      #8c959f;
  --header-bg:  rgba(255,255,255,0.95);
  --sidebar-bg: #ffffff;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font-family: var(--font-body); cursor: pointer; }
img { display: block; max-width: 100%; }

/* ── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--green); }

/* ── Snow Canvas ───────────────────────────────────────────── */
#snow-canvas {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none; z-index: 0;
  opacity: 0.35;
}

/* ── Header ────────────────────────────────────────────────── */
.header {
  position: fixed; top: 0; left: 210px; right: 0; height: 64px;
  background: var(--header-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border2);
  display: flex; align-items: center; gap: 12px;
  padding: 0 20px; z-index: 500;
}

.header-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-size: 1.3rem;
  font-weight: 700; color: var(--text); white-space: nowrap;
}
.logo-icon {
  width: 36px; height: 36px; background: var(--green);
  border-radius: 8px; display: flex; align-items: center;
  justify-content: center; font-weight: 900; color: #000;
  font-size: 0.9rem; font-family: var(--font-display);
  box-shadow: 0 0 16px var(--green-glow);
}
.logo-text .green { color: var(--green); }

.search-wrap { flex: 1; max-width: 380px; position: relative; }
.search-box {
  width: 100%; background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px; padding: 9px 14px 9px 38px;
  color: var(--text); font-size: 0.875rem;
  outline: none; transition: all var(--trans);
}
.search-box:focus { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-glow); }
.search-wrap svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text2); pointer-events: none; }
.search-results {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius); z-index: 600; overflow: hidden;
  box-shadow: 0 16px 40px rgba(0,0,0,0.4);
}
.search-result-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; transition: background var(--trans);
}
.search-result-item:hover { background: var(--bg4); }
.search-result-item img { width: 40px; height: 28px; object-fit: cover; border-radius: 4px; background: var(--bg4); }
.search-result-title { font-size: 0.85rem; font-weight: 500; }
.search-result-meta { font-size: 0.75rem; color: var(--text2); }

.header-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }

.btn-icon {
  width: 38px; height: 38px; border-radius: 8px;
  background: var(--bg3); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text2); position: relative;
  transition: all var(--trans);
}
.btn-icon:hover { border-color: var(--green); color: var(--green); background: var(--green-glow); }

.notif-badge {
  position: absolute; top: -4px; right: -4px;
  min-width: 16px; height: 16px; background: var(--red);
  color: #fff; border-radius: 99px; font-size: 9px;
  font-weight: 700; display: flex; align-items: center;
  justify-content: center; padding: 0 3px;
  border: 2px solid var(--bg);
}

.lang-btn {
  display: flex; align-items: center; gap: 5px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 8px; padding: 6px 10px; color: var(--text);
  font-size: 0.85rem; transition: all var(--trans);
}
.lang-btn:hover { border-color: var(--green); color: var(--green); }

.btn-login {
  display: flex; align-items: center; gap: 8px;
  background: var(--blue); color: #fff;
  border: none; border-radius: 8px;
  padding: 8px 16px; font-size: 0.875rem;
  font-weight: 600; transition: all var(--trans);
}
.btn-login:hover { background: #4752c4; transform: translateY(-1px); }

.btn-upload {
  display: flex; align-items: center; gap: 6px;
  background: var(--green); color: #000;
  border: none; border-radius: 8px;
  padding: 8px 16px; font-size: 0.875rem; font-weight: 700;
  transition: all var(--trans); box-shadow: 0 0 20px var(--green-glow);
}
.btn-upload:hover { transform: translateY(-1px); box-shadow: 0 0 30px rgba(0,255,135,0.4); }

.user-trigger {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 8px; padding: 5px 10px 5px 5px;
  cursor: pointer; transition: all var(--trans);
}
.user-trigger:hover { border-color: var(--green); }
.user-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; border: 2px solid var(--green); }
.user-name { font-size: 0.85rem; font-weight: 600; max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Dropdowns / Popups ────────────────────────────────────── */
.relative { position: relative; }
.popup {
  position: absolute; right: 0; top: calc(100% + 8px);
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius-lg); z-index: 600; min-width: 280px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  animation: fadeSlideDown 0.15s ease;
}
@keyframes fadeSlideDown { from { opacity:0; transform:translateY(-8px); } to { opacity:1; transform:translateY(0); } }
.popup-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
}
.popup-title { font-weight: 700; font-size: 0.9rem; display: flex; align-items: center; gap: 8px; }
.popup-close { background: none; border: none; color: var(--text2); font-size: 1rem; line-height: 1; padding: 2px; }
.popup-close:hover { color: var(--red); }
.popup-footer { padding: 10px 16px; border-top: 1px solid var(--border); font-size: 0.78rem; color: var(--text2); text-align: center; }
.hidden { display: none !important; }

/* Notifications popup */
.notif-list { max-height: 340px; overflow-y: auto; }
.notif-item { display: flex; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border2); font-size: 0.82rem; color: var(--text2); transition: background var(--trans); }
.notif-item:hover { background: var(--bg4); }
.notif-empty { padding: 24px; text-align: center; color: var(--text2); font-size: 0.85rem; }
.online-dot { width: 8px; height: 8px; background: var(--green); border-radius: 50%; display: inline-block; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{box-shadow:0 0 0 0 rgba(0,255,135,0.4)} 50%{box-shadow:0 0 0 6px rgba(0,255,135,0)} }

/* Community popup */
.popup-community { min-width: 300px; }
.community-tabs { display: flex; gap: 4px; padding: 10px 12px; }
.com-tab { flex: 1; padding: 6px; border-radius: 6px; background: none; border: 1px solid var(--border); color: var(--text2); font-size: 0.8rem; font-weight: 600; transition: all var(--trans); }
.com-tab.active { background: var(--green); color: #000; border-color: var(--green); }
.community-search { padding: 0 12px 10px; }
.community-search input { width: 100%; background: var(--bg4); border: 1px solid var(--border); border-radius: 6px; padding: 7px 10px; color: var(--text); font-size: 0.82rem; outline: none; }
.community-search input:focus { border-color: var(--green); }
.member-list { max-height: 260px; overflow-y: auto; }
.member-item { display: flex; align-items: center; gap: 10px; padding: 8px 14px; transition: background var(--trans); }
.member-item:hover { background: var(--bg4); }
.member-avatar { position: relative; width: 34px; height: 34px; flex-shrink: 0; }
.member-avatar img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.m-online { position: absolute; bottom: 1px; right: 1px; width: 9px; height: 9px; background: var(--green); border-radius: 50%; border: 2px solid var(--bg3); }
.member-info { flex: 1; min-width: 0; }
.member-name { font-size: 0.83rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-time { font-size: 0.72rem; color: var(--text2); margin-top: 1px; }

/* Role badges */
.role-badge { font-size: 0.65rem; font-weight: 800; padding: 2px 7px; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.role-badge.free { background: rgba(139,148,158,0.15); color: #8b949e; }
.role-badge.vip  { background: rgba(255,184,0,0.2); color: var(--yellow); }
.role-badge.admin{ background: rgba(0,255,135,0.15); color: var(--green); }

/* User dropdown */
.user-dropdown { min-width: 200px; overflow: hidden; }
.user-dropdown a, .user-dropdown button {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; color: var(--text2); font-size: 0.875rem;
  background: none; border: none; width: 100%; text-align: left;
  transition: background var(--trans);
}
.user-dropdown a:hover, .user-dropdown button:hover { background: var(--bg4); color: var(--text); }
.user-dropdown hr { border: none; border-top: 1px solid var(--border); margin: 4px 0; }

/* Lang dropdown */
.lang-dropdown { min-width: 160px; overflow: hidden; border-radius: var(--radius); }
.lang-option { display: flex; align-items: center; gap: 8px; padding: 10px 14px; color: var(--text); font-size: 0.875rem; cursor: pointer; transition: background var(--trans); }
.lang-option:hover { background: var(--bg4); color: var(--green); }

/* ── Sidebar ────────────────────────────────────────────────── */
.sidebar {
  position: fixed; top: 0; left: 0;
  width: 210px; height: 100vh;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border2);
  overflow-y: auto; z-index: 100;
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.sidebar-logo {
  padding: 16px;
  text-align: center;
  border-bottom: 1px solid var(--border2);
}

.sidebar-logo .header-logo {
    justify-content: center;
}

.sidebar-logo img {
  height: 50px;
  width: auto;
}

.sidebar-nav {
    flex: 1;
    padding: 12px 8px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  color: var(--text2); font-size: 0.85rem;
  transition: all var(--trans); position: relative;
  margin-bottom: 2px;
}
.nav-item:hover { background: var(--bg3); color: var(--text); }
.nav-item.active { background: var(--green-glow); color: var(--green); font-weight: 600; }
.nav-item.active::before { content: ''; position: absolute; left: 0; top: 20%; bottom: 20%; width: 3px; background: var(--green); border-radius: 2px; }
.nav-dot { width: 6px; height: 6px; background: var(--green); border-radius: 50%; margin-left: auto; animation: pulse 2s infinite; }
.nav-section { padding: 14px 12px 6px; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text3); font-weight: 600; }

.overlay-sidebar { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 99; }
.hamburger { display: none; width: 38px; height: 38px; flex-direction: column; justify-content: center; gap: 5px; background: none; border: none; padding: 6px; }
.hamburger span { display: block; height: 2px; background: var(--text); border-radius: 2px; transition: all 0.3s; }

/* ── Main Content ───────────────────────────────────────────── */
.main-content { padding-top: 64px; margin-left: 210px; flex: 1; }

/* ── HERO SLIDER ────────────────────────────────────────────── */
.slider-section {
  position: relative; overflow: hidden;
  height: 460px; background: var(--bg2);
}
.slider-track { display: flex; height: 100%; transition: transform 0.6s cubic-bezier(0.25,0.46,0.45,0.94); }
.slide {
  min-width: 100%; height: 100%; position: relative;
  display: flex; align-items: center; overflow: hidden;
}
.slide-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transition: transform 6s ease;
}
.slide:hover .slide-bg { transform: scale(1.05); }
.slide-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(8,11,16,0.92) 0%, rgba(8,11,16,0.7) 50%, rgba(8,11,16,0.2) 100%);
}
.slide-content {
  position: relative; z-index: 2;
  padding: 0 60px; max-width: 620px;
}
.slide-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--green-glow); border: 1px solid rgba(0,255,135,0.3);
  color: var(--green); font-size: 0.75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px;
  padding: 5px 12px; border-radius: 99px; margin-bottom: 18px;
}
.slide-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800; color: #fff; line-height: 1.1;
  margin-bottom: 16px; text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}
.slide-title .accent { color: var(--green); }
.slide-desc {
  color: rgba(255,255,255,0.75); font-size: 1rem;
  line-height: 1.6; margin-bottom: 28px; max-width: 480px;
}
.slide-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.slide-btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--green); color: #000; border: none;
  border-radius: 8px; padding: 12px 24px; font-size: 0.95rem;
  font-weight: 700; transition: all 0.3s;
  box-shadow: 0 0 24px var(--green-glow);
}
.slide-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 40px rgba(0,255,135,0.5); }
.slide-btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.1); color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px; padding: 12px 24px; font-size: 0.95rem;
  font-weight: 600; transition: all 0.3s; backdrop-filter: blur(4px);
}
.slide-btn-secondary:hover { background: rgba(255,255,255,0.2); border-color: rgba(255,255,255,0.4); }
.slide-stats {
  display: flex; gap: 24px; margin-top: 28px;
}
.slide-stat { text-align: left; }
.slide-stat-n { font-family: var(--font-display); font-size: 1.6rem; font-weight: 800; color: var(--green); line-height: 1; }
.slide-stat-l { font-size: 0.75rem; color: rgba(255,255,255,0.6); margin-top: 2px; }

.slider-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.15);
  color: #fff; display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 10; transition: all var(--trans);
  backdrop-filter: blur(4px);
}
.slider-nav:hover { background: var(--green); color: #000; border-color: var(--green); }
.slider-nav.prev { left: 20px; }
.slider-nav.next { right: 20px; }
.slider-dots { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; z-index: 10; }
.slider-dot { width: 8px; height: 8px; border-radius: 4px; background: rgba(255,255,255,0.3); border: none; cursor: pointer; transition: all 0.3s; }
.slider-dot.active { background: var(--green); width: 22px; box-shadow: 0 0 10px var(--green-glow); }

/* ── Section ────────────────────────────────────────────────── */
.section { padding: 28px 28px 0; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.section-title { font-family: var(--font-display); font-size: 1.4rem; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.section-count { font-family: var(--font-body); font-size: 0.9rem; font-weight: 400; color: var(--text2); }
.inline-search { display: flex; }
.inline-search input { background: var(--bg3); border: 1px solid var(--border); border-right: none; border-radius: 6px 0 0 6px; padding: 7px 12px; color: var(--text); font-size: 0.83rem; outline: none; width: 200px; }
.inline-search input:focus { border-color: var(--green); }
.inline-search button { background: var(--green); border: none; border-radius: 0 6px 6px 0; padding: 7px 12px; cursor: pointer; color: #000; display: flex; align-items: center; }

/* Stats Bar - Premium */
.stats-strip {
  display: grid; grid-template-columns: repeat(4,1fr);
  gap: 20px; padding: 20px 28px;
  background: var(--bg2);
  border-top: 1px solid var(--border2); border-bottom: 1px solid var(--border2);
}
.stat-strip-item {
  background: linear-gradient(145deg, var(--bg3), var(--bg2));
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex; align-items: center; gap: 16px;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 5px 5px 15px rgba(0,0,0,0.2), -5px -5px 15px rgba(255,255,255,0.05);
  border: 1px solid var(--border);
}
.stat-strip-item:hover {
  transform: scale(1.03);
  box-shadow: 0 0 30px rgba(0,0,0,0.2);
}
.stat-strip-item:active {
  transform: scale(0.98);
  box-shadow: inset 5px 5px 15px rgba(0,0,0,0.2), inset -5px -5px 15px rgba(255,255,255,0.05);
}
.stat-strip-icon {
  width: 52px; height: 52px; flex-shrink: 0;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 2px 2px 5px rgba(0,0,0,0.3), inset -2px -2px 5px rgba(255,255,255,0.05);
  transition: all 0.3s ease;
}
.stat-strip-item:hover .stat-strip-icon {
  transform: translateY(-4px) scale(1.05);
}
.stat-strip-icon.g { color: var(--green); background: var(--green-glow); }
.stat-strip-icon.b { color: #8b98ff; background: rgba(88,101,242,0.15); }
.stat-strip-icon.o { color: var(--orange); background: rgba(255,107,43,0.15); }
.stat-strip-icon.y { color: var(--yellow); background: rgba(255,184,0,0.15); }

.stat-strip-n { font-family: var(--font-display); font-size: 1.8rem; font-weight: 800; line-height: 1; }
.stat-strip-l { font-size: 0.8rem; color: var(--text2); margin-top: 3px; }

/* ── Scripts Grid ───────────────────────────────────────────── */
.scripts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }

.script-card {
  position: relative;
  background: var(--bg3);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  z-index: 1;
  border: 1px solid var(--border);
}

.script-card::before, .script-card::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-lg);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
}

/* Spotlight effect */
.script-card::before {
  background: radial-gradient(
    400px circle at var(--mouse-x) var(--mouse-y),
    rgba(0, 255, 135, 0.2),
    transparent 40%
  );
}

/* Border glow effect */
.script-card::after {
  border: 1px solid transparent;
  background: radial-gradient(
    200px circle at var(--mouse-x) var(--mouse-y),
    rgba(0, 255, 135, 0.4),
    transparent 40%
  ) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
}

.script-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 25px 50px rgba(0,0,0,0.4);
  border-color: rgba(255, 255, 255, 0.1);
}

.script-card:hover::before, .script-card:hover::after {
  opacity: 1;
}

.card-thumb { position: relative; aspect-ratio: 16/9; overflow: hidden; background: var(--bg4); }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.script-card:hover .card-thumb img { transform: scale(1.08); }
.card-thumb video { width: 100%; height: 100%; object-fit: cover; }
.thumb-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 2.5rem; background: linear-gradient(135deg,var(--bg3),var(--bg4)); }

.badge-hot {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  background: linear-gradient(135deg, #ff4444, #ff8800);
  color: #fff; font-size: 0.68rem; font-weight: 800;
  padding: 3px 8px; border-radius: 4px; letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(255,68,68,0.4);
}
.badge-vip {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  background: linear-gradient(135deg, #f0a500, #ff6b2b);
  color: #fff; font-size: 0.68rem; font-weight: 800;
  padding: 3px 8px; border-radius: 4px;
  box-shadow: 0 2px 8px rgba(255,107,43,0.4);
}
.badge-free {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: rgba(0,255,135,0.2); border: 1px solid rgba(0,255,135,0.4);
  color: var(--green); font-size: 0.65rem; font-weight: 700;
  padding: 2px 7px; border-radius: 4px;
}

.card-lock-overlay {
  position: absolute; inset: 0; background: rgba(8,11,16,0.85);
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 8px; z-index: 3;
  backdrop-filter: blur(2px); opacity: 0; transition: opacity 0.2s;
}
.script-card:hover .card-lock-overlay { opacity: 1; }
.card-lock-overlay .lock-icon { font-size: 2rem; }
.card-lock-overlay .lock-text { font-size: 0.8rem; color: rgba(255,255,255,0.8); text-align: center; }
.card-lock-overlay .lock-btn {
  background: var(--blue); color: #fff; border: none;
  border-radius: 6px; padding: 7px 16px; font-size: 0.8rem;
  font-weight: 600; margin-top: 4px;
}

.card-body { padding: 14px; display: flex; flex-direction: column; flex: 1; gap: 8px; }
.card-title { font-family: var(--font-display); font-size: 1rem; font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--text); }
.card-desc { font-size: 0.8rem; color: var(--text2); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { display: flex; gap: 10px; font-size: 0.75rem; color: var(--text2); }
.card-meta span { display: flex; align-items: center; gap: 3px; }
.card-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.card-tag { font-size: 0.65rem; background: var(--bg4); border: 1px solid var(--border); padding: 2px 6px; border-radius: 4px; color: var(--text2); }

.card-footer { margin-top: auto; display: flex; gap: 8px; }
.btn-download {
  flex: 1; display: flex; align-items: center; justify-content: center;
  gap: 6px; background: var(--green); color: #000;
  border: none; border-radius: 6px; padding: 9px 12px;
  font-size: 0.82rem; font-weight: 700; transition: all var(--trans);
}
.btn-download:hover { background: var(--green-dim); transform: translateY(-1px); }
.btn-locked {
  flex: 1; display: flex; align-items: center; justify-content: center;
  gap: 6px; background: var(--bg4); color: var(--text2);
  border: 1px solid var(--border); border-radius: 6px;
  padding: 9px 12px; font-size: 0.82rem; font-weight: 600;
  transition: all var(--trans);
}
.btn-locked:hover { border-color: var(--blue); color: var(--blue); }
.btn-vip-req {
  flex: 1; display: flex; align-items: center; justify-content: center;
  gap: 6px; background: linear-gradient(135deg,rgba(240,165,0,0.2),rgba(255,107,43,0.2));
  color: var(--yellow); border: 1px solid rgba(240,165,0,0.3);
  border-radius: 6px; padding: 9px 12px; font-size: 0.82rem; font-weight: 600;
}
.btn-save-card {
  width: 36px; flex-shrink: 0; background: var(--bg4);
  border: 1px solid var(--border); border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text2); transition: all var(--trans);
}
.btn-save-card:hover, .btn-save-card.saved { border-color: var(--green); color: var(--green); }

/* ── Detail Page ────────────────────────────────────────────── */
.detail-layout { display: grid; grid-template-columns: 1fr 340px; gap: 24px; padding: 28px; align-items: start; }
.detail-main { display: flex; flex-direction: column; gap: 20px; }
.detail-sidebar { display: flex; flex-direction: column; gap: 16px; }

.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 0.82rem; color: var(--text2); flex-wrap: wrap; padding: 16px 28px 0; }
.breadcrumb a:hover { color: var(--green); }
.breadcrumb span.sep { color: var(--text3); }

.detail-media { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); background: var(--bg3); }
.detail-media img, .detail-media video { width: 100%; max-height: 420px; object-fit: cover; display: block; }

.detail-header-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.detail-title { font-family: var(--font-display); font-size: clamp(1.5rem,3vw,2rem); font-weight: 800; line-height: 1.2; }
.detail-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.tag { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 99px; font-size: 0.75rem; font-weight: 600; background: var(--bg3); color: var(--text2); border: 1px solid var(--border); }
.tag.free  { background: rgba(0,255,135,0.1); color: var(--green); border-color: rgba(0,255,135,0.3); }
.tag.vip   { background: rgba(255,184,0,0.1); color: var(--yellow); border-color: rgba(255,184,0,0.3); }
.tag.cat   { background: rgba(88,101,242,0.1); color: #8b98ff; border-color: rgba(88,101,242,0.3); }
.tag-sm    { font-size: 0.7rem; padding: 2px 8px; }

.stats-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; }
.stat-box { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; text-align: center; }
.stat-box .num { font-family: var(--font-display); font-size: 1.6rem; font-weight: 800; color: var(--text); }
.stat-box .lbl { font-size: 0.72rem; color: var(--text2); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 2px; }

.reaction-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; }
.reaction-btns { display: flex; gap: 8px; }
.reaction-btn { display: flex; align-items: center; gap: 6px; padding: 7px 14px; background: var(--bg4); border: 1px solid var(--border); border-radius: 99px; font-size: 0.85rem; color: var(--text2); cursor: pointer; transition: all var(--trans); }
.reaction-btn:hover, .reaction-btn.active { border-color: var(--green); color: var(--green); background: var(--green-glow); }
.save-btn { display: flex; align-items: center; gap: 8px; padding: 8px 16px; background: var(--bg4); border: 1px solid var(--border); border-radius: 8px; color: var(--text2); font-size: 0.85rem; cursor: pointer; transition: all var(--trans); }
.save-btn:hover, .save-btn.saved { border-color: var(--green); color: var(--green); background: var(--green-glow); }

.detail-description { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; line-height: 1.8; font-size: 0.9rem; color: var(--text2); white-space: pre-wrap; }

/* Sidebar panels */
.sidebar-panel {
  background: linear-gradient(145deg, var(--bg3), var(--bg2));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.panel-title {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 10px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0,0,0,0.1);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text2);
}

.download-panel { padding: 16px; }
.btn-download-main {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; background: var(--green); color: #000;
  border: none; border-radius: 8px; padding: 14px;
  font-size: 1rem; font-weight: 800; font-family: var(--font-display);
  transition: all 0.3s; box-shadow: 0 0 24px var(--green-glow);
  margin-bottom: 12px;
}
.btn-download-main:hover { transform: translateY(-2px); box-shadow: 0 0 40px rgba(0,255,135,0.4); }
.download-provider { font-size: 0.8rem; color: var(--text2); text-align: center; }

.locked-panel { text-align: center; padding: 20px; }
.locked-panel .lock-big { font-size: 2.5rem; margin-bottom: 10px; }
.locked-panel h4 { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; margin-bottom: 6px; }
.locked-panel p { font-size: 0.82rem; color: var(--text2); line-height: 1.5; margin-bottom: 14px; }

.countdown {
  background: var(--bg4);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
  margin-top: 10px;
}
.countdown p {
  font-size: 0.75rem !important;
  margin-bottom: 4px !important;
  color: var(--text2) !important;
}
.countdown strong {
  font-size: 1.2rem;
  color: var(--green);
  font-family: var(--font-display);
  font-weight: 700;
}

.detail-rows { display: flex; flex-direction: column; padding: 8px 0; }
.detail-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border2);
  font-size: 0.875rem;
  transition: background .2s ease;
}
.detail-row:last-child { border-bottom: none; }
.detail-row:hover { background: var(--green-glow); }
.detail-row span:first-child { color: var(--text2); }
.detail-row .tag { font-weight: 700; }
.author-link { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.author-link:hover { color: var(--green); }
.author-link img { width: 22px; height: 22px; border-radius: 50%; }

.related-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border2); text-decoration: none; color: var(--text); transition: color var(--trans); }
.related-item:last-child { border-bottom: none; }
.related-item:hover { color: var(--green); }
.related-thumb { width: 56px; height: 38px; border-radius: 5px; overflow: hidden; flex-shrink: 0; background: var(--bg4); }
.related-thumb img { width: 100%; height: 100%; object-fit: cover; }
.related-title { font-size: 0.83rem; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.related-meta { font-size: 0.72rem; color: var(--text2); margin-top: 2px; }

/* Comments */
.comments-section {
  background: linear-gradient(145deg, var(--bg3), var(--bg2));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.comments-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0,0,0,0.1);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text);
}
.comment-form-wrap {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}
.comment-form { display: flex; gap: 12px; align-items: flex-start; }
.comment-avatar-sm {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--green);
  padding: 2px;
  background: var(--bg);
}
.comment-textarea {
  flex: 1;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--text);
  font-size: 0.9rem;
  font-family: var(--font-body);
  resize: vertical;
  min-height: 80px;
  outline: none;
  transition: all var(--trans);
}
.comment-textarea:focus {
  border-color: var(--green);
  background: var(--bg2);
  box-shadow: 0 0 15px var(--green-glow);
}
.comment-submit {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.comment-item {
  display: flex;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border2);
  transition: background .2s ease;
}
.comment-item:last-child { border-bottom: none; }
.comment-item:hover { background: var(--bg3); }
.comment-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.comment-body { flex: 1; }
.comment-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.comment-user { font-weight: 700; font-size: 0.9rem; color: var(--text); }
.comment-time { font-size: 0.78rem; color: var(--text3); }
.comment-text { font-size: 0.9rem; color: var(--text2); line-height: 1.6; }
.btn-del-comment {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text3);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 4px 8px;
  border-radius: 6px;
  line-height: 1;
}
.btn-del-comment:hover { background: rgba(255,68,68,0.15); color: var(--red); }

.login-prompt {
  text-align: center;
  padding: 24px;
  color: var(--text2);
  font-size: 0.9rem;
}
.login-prompt a { color: var(--blue); font-weight: 600; }

.empty-comments {
  padding: 40px 20px;
  text-align: center;
  color: var(--text2);
}
.empty-comments h3 { font-family: var(--font-display); font-size: 1.3rem; color: var(--text); margin-bottom: 8px; }
.empty-comments p { font-size: 0.9rem; }

/* ── Generic Buttons ────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 18px; border-radius: 8px; font-weight: 600; font-size: 0.875rem; border: none; cursor: pointer; transition: all var(--trans); text-decoration: none; }
.btn-primary { background: var(--green); color: #000; box-shadow: 0 0 16px var(--green-glow); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 0 28px rgba(0,255,135,0.4); }
.btn-secondary { background: var(--bg3); border: 1px solid var(--border); color: var(--text); }
.btn-secondary:hover { border-color: var(--green); color: var(--green); }
.btn-discord { background: var(--blue); color: #fff; }
.btn-discord:hover { background: #4752c4; }
.btn-sm { padding: 6px 12px; font-size: 0.8rem; }
.btn-full { width: 100%; }

/* ── Pages: Profile, Search, etc. ──────────────────────────── */
.page-wrap { padding: 28px; max-width: 900px; }
.page-header-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; gap: 12px; }
.page-header-bar h1 { font-family: var(--font-display); font-size: 1.6rem; font-weight: 800; }

.empty-state-box { text-align: center; padding: 80px 20px; color: var(--text2); }
.empty-state-box .empty-icon { font-size: 4rem; margin-bottom: 16px; }
.empty-state-box h3 { font-family: var(--font-display); font-size: 1.3rem; color: var(--text); margin-bottom: 8px; }
.empty-state-box p { font-size: 0.9rem; margin-bottom: 20px; }

.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; }
.text-green { color: var(--green); }
.text-muted { color: var(--text2); font-size: 0.85rem; }

/* Profile */
.profile-header { display: flex; align-items: center; gap: 24px; padding: 24px; }
.profile-avatar-lg { width: 80px; height: 80px; border-radius: 50%; border: 3px solid var(--green); box-shadow: 0 0 20px var(--green-glow); }
.profile-info h1 { font-family: var(--font-display); font-size: 1.6rem; font-weight: 800; }
.profile-joined { font-size: 0.8rem; color: var(--text2); margin-top: 4px; }
.profile-tabs { display: flex; gap: 4px; background: var(--bg3); border: 1px solid var(--border); border-radius: 10px; padding: 4px; margin-bottom: 16px; }
.tab-btn { flex: 1; padding: 8px; border-radius: 6px; background: none; border: none; color: var(--text2); font-size: 0.875rem; font-weight: 600; cursor: pointer; transition: all var(--trans); }
.tab-btn.active { background: var(--green); color: #000; }
.tab-content { display: none; }
.tab-content.active { display: block; }
.profile-list { display: flex; flex-direction: column; }
.profile-list-item { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border2); font-size: 0.875rem; }
.profile-list-item:last-child { border-bottom: none; }
.profile-list-item a:hover { color: var(--green); }

/* Search */
.search-page-form { margin-bottom: 24px; }
.search-input-wrap { display: flex; align-items: center; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 0 16px; }
.search-input-wrap svg { color: var(--text2); flex-shrink: 0; }
.search-input-wrap input { flex: 1; background: none; border: none; padding: 14px 12px; color: var(--text); font-size: 1rem; outline: none; }
.search-input-wrap button { background: var(--green); color: #000; border: none; border-radius: 6px; padding: 8px 20px; font-weight: 700; cursor: pointer; white-space: nowrap; }

/* Static pages */
.static-page { max-width: 780px; margin: 0 auto; padding: 32px; }
.static-page h1 { font-family: var(--font-display); font-size: 2rem; font-weight: 800; margin-bottom: 8px; }
.static-page h2 { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; margin: 28px 0 10px; color: var(--green); }
.static-page p { color: var(--text2); line-height: 1.7; margin-bottom: 12px; font-size: 0.9rem; }

/* ── Login Page ─────────────────────────────────────────────── */
.login-page { min-height: calc(100vh - 64px); display: flex; align-items: center; justify-content: center; padding: 20px; background: radial-gradient(ellipse at 20% 50%, rgba(0,255,135,0.06) 0%, transparent 60%), radial-gradient(ellipse at 80% 20%, rgba(88,101,242,0.06) 0%, transparent 60%); }
.login-card { background: var(--card); border: 1px solid var(--border); border-radius: 20px; padding: 48px 40px; max-width: 440px; width: 100%; text-align: center; box-shadow: 0 24px 60px rgba(0,0,0,0.4); }
.login-logo { width: 64px; height: 64px; background: var(--green); border-radius: 16px; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 900; font-size: 1.5rem; color: #000; margin: 0 auto 20px; box-shadow: 0 0 30px var(--green-glow); }
.login-title { font-family: var(--font-display); font-size: 1.8rem; font-weight: 800; margin-bottom: 8px; }
.login-subtitle { color: var(--text2); font-size: 0.9rem; margin-bottom: 32px; line-height: 1.6; }
.login-features { text-align: left; margin-bottom: 28px; display: flex; flex-direction: column; gap: 10px; }
.login-feature { display: flex; align-items: center; gap: 10px; font-size: 0.875rem; color: var(--text2); }
.login-feature .icon { width: 28px; height: 28px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 0.9rem; background: var(--bg3); flex-shrink: 0; }
.btn-discord-big { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; background: #5865f2; color: #fff; border: none; border-radius: 10px; padding: 14px; font-size: 1rem; font-weight: 700; transition: all 0.3s; }
.btn-discord-big:hover { background: #4752c4; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(88,101,242,0.4); }

/* ── Upload Modal ───────────────────────────────────────────── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 900; display: flex; align-items: center; justify-content: center; padding: 20px; backdrop-filter: blur(4px); }
.modal { background: var(--bg2); border: 1px solid var(--border); border-radius: 20px; width: 100%; max-width: 600px; max-height: 90vh; overflow-y: auto; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--border); }
.modal-title { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; }
.modal-close { background: none; border: none; color: var(--text2); font-size: 1.2rem; cursor: pointer; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 6px; }
.modal-close:hover { background: var(--bg4); color: var(--red); }
.modal-body { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-label { font-size: 0.82rem; font-weight: 600; color: var(--text2); }
.form-input, .form-select, .form-textarea {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 8px; padding: 9px 12px; color: var(--text);
  font-size: 0.875rem; outline: none; font-family: var(--font-body);
  transition: border-color var(--trans);
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--green); }
.form-select option { background: var(--bg3); }
.form-textarea { resize: vertical; min-height: 90px; }
.file-drop {
  border: 2px dashed var(--border); border-radius: 10px;
  padding: 30px; text-align: center; cursor: pointer;
  transition: all var(--trans);
}
.file-drop:hover { border-color: var(--green); background: var(--green-glow); }
.file-drop svg { color: var(--text2); margin: 0 auto 8px; }
.file-drop p { font-size: 0.85rem; color: var(--text2); }
.file-preview { border-radius: 8px; overflow: hidden; max-height: 160px; background: var(--bg4); }
.file-preview img { width: 100%; max-height: 160px; object-fit: cover; }
.btn-cancel { background: var(--bg4); border: 1px solid var(--border); color: var(--text); border-radius: 8px; padding: 9px 20px; font-size: 0.875rem; font-weight: 600; }
.btn-submit { background: var(--green); border: none; color: #000; border-radius: 8px; padding: 9px 24px; font-size: 0.875rem; font-weight: 700; }

/* ── PWA Banner ─────────────────────────────────────────────── */
.pwa-banner {
  position: fixed; bottom: 20px; right: 20px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 14px; padding: 14px 18px;
  display: flex; align-items: center; gap: 14px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.4); z-index: 400;
  max-width: 340px; animation: slideUp 0.4s ease;
}
@keyframes slideUp { from { opacity:0; transform:translateY(20px); } }
.pwa-icon { width: 44px; height: 44px; border-radius: 10px; flex-shrink: 0; }
.pwa-text h4 { font-size: 0.875rem; font-weight: 700; margin-bottom: 3px; }
.pwa-text p { font-size: 0.78rem; color: var(--text2); }
.pwa-actions { display: flex; gap: 6px; flex-direction: column; }
.pwa-install { background: var(--green); color: #000; border: none; border-radius: 6px; padding: 6px 12px; font-size: 0.78rem; font-weight: 700; cursor: pointer; }
.pwa-dismiss { background: none; border: 1px solid var(--border); color: var(--text2); border-radius: 6px; padding: 5px 10px; font-size: 0.75rem; cursor: pointer; }

/* ── Pagination ─────────────────────────────────────────────── */
.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 28px; }
.page-btn { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 8px; background: var(--bg3); border: 1px solid var(--border); color: var(--text2); font-size: 0.875rem; font-weight: 600; transition: all var(--trans); }
.page-btn:hover { border-color: var(--green); color: var(--green); }
.page-btn.active { background: var(--green); color: #000; border-color: var(--green); }

/* ── Script Detail Modal ────────────────────────────────────── */
.modal-overlay#script-modal {
  align-items: flex-start;
  padding: 5vh 4vw;
}
.modal-container {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 20px;
  width: 100%;
  max-width: 1300px;
  height: 90vh;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.7);
  animation: fadeSlideDown 0.4s ease-out;
  position: relative;
  display: flex;
}
.modal-content { height: 100%; padding: 28px; width: 100%; }
.modal-grid { display: grid; grid-template-columns: 3fr 2fr; gap: 28px; height: 100%; }
.modal-left, .modal-right { height: 100%; overflow-y: auto; }
.modal-left { display: flex; flex-direction: column; background: var(--bg3); border-radius: var(--radius-lg); padding: 12px; }
.modal-right { padding-right: 12px; }
.modal-right::-webkit-scrollbar { width: 5px; }
.modal-right::-webkit-scrollbar-track { background: transparent; }
.modal-right::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.modal-media, .modal-media-youtube {
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
}
.modal-media img, .modal-media video, .modal-media-youtube iframe { width: 100%; height: 100%; object-fit: cover; }
.modal-media-placeholder { display: flex; align-items: center; justify-content: center; font-size: 4rem; background: var(--bg2); width: 100%; aspect-ratio: 16/9; border-radius: var(--radius); }

.modal-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 10px;
}
.modal-gallery img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: all var(--trans);
}
.modal-gallery a:hover img { transform: scale(1.05); border-color: var(--green); }

.modal-title { font-family: var(--font-display); font-size: 1.8rem; font-weight: 700; line-height: 1.2; margin-bottom: 12px; }
.modal-author { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; position: relative; }
.author-avatar { width: 36px; height: 36px; border-radius: 50%; }
.modal-author span { font-weight: 600; }
.modal-author small { color: var(--text2); font-size: 0.8rem; }
.modal-views { margin-left: auto; font-size: 0.85rem; color: var(--text2); display: flex; align-items: center; gap: 5px; }

.modal-description { font-size: 0.9rem; line-height: 1.7; color: var(--text2); margin-bottom: 24px; padding: 16px; background: var(--bg3); border-radius: var(--radius); border: 1px solid var(--border); }

.modal-actions { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.btn-download-modal { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; background: var(--green); color: #000; border: none; border-radius: 8px; padding: 14px; font-size: 1rem; font-weight: 800; font-family: var(--font-display); transition: all 0.3s; box-shadow: 0 0 24px var(--green-glow); }
.btn-download-modal:hover { transform: translateY(-2px); box-shadow: 0 0 40px rgba(0,255,135,0.4); }
.btn-vip-modal, .btn-locked-modal { display: block; text-align: center; width: 100%; padding: 14px; border-radius: 8px; font-weight: 700; background: var(--bg4); border: 1px solid var(--border); color: var(--text); }
.btn-vip-modal { color: var(--yellow); border-color: var(--yellow); }
.btn-locked-modal { color: var(--blue); border-color: var(--blue); }

.modal-secondary-actions { display: flex; gap: 10px; }
.save-btn-modal, .report-btn-modal { flex: 1; padding: 10px; border-radius: 8px; background: var(--bg3); border: 1px solid var(--border); color: var(--text2); font-weight: 600; font-size: 0.85rem; display: flex; align-items: center; justify-content: center; gap: 6px; }
.save-btn-modal:hover, .report-btn-modal:hover { border-color: var(--green); color: var(--green); }
.save-btn-modal.saved { border-color: var(--green); color: var(--green); background: var(--green-glow); }

.reaction-bar-modal { display: flex; gap: 8px; margin-bottom: 24px; }

.comments-section-modal h4 { font-family: var(--font-display); font-size: 1.1rem; margin-bottom: 12px; border-top: 1px solid var(--border); padding-top: 20px; }

/* Loading Spinner */
.modal-loading { display: flex; align-items: center; justify-content: center; height: 100%; gap: 10px; }
.modal-loading > div { width: 16px; height: 16px; background: var(--green); border-radius: 50%; animation: bounce 1.4s infinite ease-in-out both; }
.modal-loading div:nth-child(1) { animation-delay: -0.32s; }
.modal-loading div:nth-child(2) { animation-delay: -0.16s; }
@keyframes bounce { 0%, 80%, 100% { transform: scale(0); } 40% { transform: scale(1.0); } }
.modal-error { text-align: center; color: var(--red); padding: 40px; }

/* ── Toast ──────────────────────────────────────────────────── */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--bg3); border: 1px solid var(--border); border-radius: 10px; padding: 12px 20px; font-size: 0.875rem; box-shadow: 0 8px 24px rgba(0,0,0,0.3); z-index: 999; animation: fadeSlideDown 0.3s ease; }
.toast.success { border-color: var(--green); color: var(--green); }
.toast.error { border-color: var(--red); color: var(--red); }

/* ── Admin Panel ────────────────────────────────────────────── */
.admin-wrap { padding: 24px; }
.admin-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(200px,1fr)); gap: 16px; margin-bottom: 28px; }
.admin-stat-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; display: flex; align-items: center; gap: 16px; }
.admin-stat-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; flex-shrink: 0; }
.admin-stat-n { font-family: var(--font-display); font-size: 1.8rem; font-weight: 800; line-height: 1; }
.admin-stat-l { font-size: 0.8rem; color: var(--text2); margin-top: 4px; }
.admin-tabs { display: flex; gap: 2px; background: var(--bg3); border: 1px solid var(--border); border-radius: 10px; padding: 4px; margin-bottom: 20px; flex-wrap: wrap; }
.admin-tab { flex: 1; min-width: 80px; padding: 8px 12px; border-radius: 6px; background: none; border: none; color: var(--text2); font-size: 0.82rem; font-weight: 600; cursor: pointer; transition: all var(--trans); white-space: nowrap; }
.admin-tab.active { background: var(--green); color: #000; }
.admin-section { display: none; }
.admin-section.active { display: block; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.data-table th { background: var(--bg3); padding: 10px 14px; text-align: left; font-weight: 600; color: var(--text2); border-bottom: 1px solid var(--border); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.5px; }
.data-table td { padding: 11px 14px; border-bottom: 1px solid var(--border2); vertical-align: middle; }
.data-table tr:hover td { background: var(--bg3); }
.action-btn { padding: 5px 10px; border-radius: 5px; border: none; font-size: 0.75rem; font-weight: 600; cursor: pointer; transition: all var(--trans); }
.action-btn.del { background: rgba(255,68,68,0.15); color: var(--red); }
.action-btn.del:hover { background: var(--red); color: #fff; }
.action-btn.edit { background: rgba(88,101,242,0.15); color: var(--blue); }
.action-btn.edit:hover { background: var(--blue); color: #fff; }
.action-btn.toggle { background: rgba(0,255,135,0.15); color: var(--green); }

/* ── Footer ─────────────────────────────────────────────────── */
.footer { background: var(--bg2); border-top: 1px solid var(--border2); padding: 48px 28px 24px; margin-left: 210px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 32px; }
.footer-col h4 { font-family: var(--font-display); font-weight: 700; font-size: 0.9rem; margin-bottom: 14px; color: var(--text); letter-spacing: 0.5px; text-transform: uppercase; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { color: var(--text2); font-size: 0.875rem; transition: color var(--trans); }
.footer-col ul li a:hover { color: var(--green); }
.footer-bottom { border-top: 1px solid var(--border2); padding-top: 20px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 0.8rem; color: var(--text2); }

/* ── Script Detail Modal ────────────────────────────────────── */
.modal-overlay#script-modal {
  align-items: flex-start;
  padding: 5vh 4vw;
}
.modal-container {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 20px;
  width: 100%;
  max-width: 1300px;
  height: 90vh;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.7);
  animation: fadeSlideDown 0.4s ease-out;
  position: relative;
  display: flex;
}
.modal-content { height: 100%; padding: 28px; width: 100%; }
.modal-grid { display: grid; grid-template-columns: 3fr 2fr; gap: 28px; height: 100%; }
.modal-left, .modal-right { height: 100%; overflow-y: auto; }
.modal-left { display: flex; flex-direction: column; background: var(--bg3); border-radius: var(--radius-lg); padding: 12px; }
.modal-right { padding-right: 12px; }
.modal-right::-webkit-scrollbar { width: 5px; }
.modal-right::-webkit-scrollbar-track { background: transparent; }
.modal-right::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.modal-media, .modal-media-youtube {
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
}
.modal-media img, .modal-media video, .modal-media-youtube iframe { width: 100%; height: 100%; object-fit: cover; }
.modal-media-placeholder { display: flex; align-items: center; justify-content: center; font-size: 4rem; background: var(--bg2); width: 100%; aspect-ratio: 16/9; border-radius: var(--radius); }

.modal-title { font-family: var(--font-display); font-size: 1.8rem; font-weight: 700; line-height: 1.2; margin-bottom: 12px; }
.modal-author { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; position: relative; }
.author-avatar { width: 36px; height: 36px; border-radius: 50%; }
.modal-author span { font-weight: 600; }
.modal-author small { color: var(--text2); font-size: 0.8rem; }
.modal-views { margin-left: auto; font-size: 0.85rem; color: var(--text2); display: flex; align-items: center; gap: 5px; }

.modal-description { font-size: 0.9rem; line-height: 1.7; color: var(--text2); margin-bottom: 24px; padding: 16px; background: var(--bg3); border-radius: var(--radius); border: 1px solid var(--border); }

.modal-actions { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.btn-download-modal { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; background: var(--green); color: #000; border: none; border-radius: 8px; padding: 14px; font-size: 1rem; font-weight: 800; font-family: var(--font-display); transition: all 0.3s; box-shadow: 0 0 24px var(--green-glow); }
.btn-download-modal:hover { transform: translateY(-2px); box-shadow: 0 0 40px rgba(0,255,135,0.4); }
.btn-vip-modal, .btn-locked-modal { display: block; text-align: center; width: 100%; padding: 14px; border-radius: 8px; font-weight: 700; background: var(--bg4); border: 1px solid var(--border); color: var(--text); }
.btn-vip-modal { color: var(--yellow); border-color: var(--yellow); }
.btn-locked-modal { color: var(--blue); border-color: var(--blue); }

.modal-secondary-actions { display: flex; gap: 10px; }
.save-btn-modal, .report-btn-modal { flex: 1; padding: 10px; border-radius: 8px; background: var(--bg3); border: 1px solid var(--border); color: var(--text2); font-weight: 600; font-size: 0.85rem; display: flex; align-items: center; justify-content: center; gap: 6px; }
.save-btn-modal:hover, .report-btn-modal:hover { border-color: var(--green); color: var(--green); }
.save-btn-modal.saved { border-color: var(--green); color: var(--green); background: var(--green-glow); }

.reaction-bar-modal { display: flex; gap: 8px; margin-bottom: 24px; }

.comments-section-modal h4 { font-family: var(--font-display); font-size: 1.1rem; margin-bottom: 12px; border-top: 1px solid var(--border); padding-top: 20px; }

/* Loading Spinner */
.modal-loading { display: flex; align-items: center; justify-content: center; height: 100%; gap: 10px; }
.modal-loading > div { width: 16px; height: 16px; background: var(--green); border-radius: 50%; animation: bounce 1.4s infinite ease-in-out both; }
.modal-loading div:nth-child(1) { animation-delay: -0.32s; }
.modal-loading div:nth-child(2) { animation-delay: -0.16s; }
@keyframes bounce { 0%, 80%, 100% { transform: scale(0); } 40% { transform: scale(1.0); } }
.modal-error { text-align: center; color: var(--red); padding: 40px; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .stats-strip { grid-template-columns: repeat(2,1fr); }
  .scripts-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  .detail-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .overlay-sidebar.active { display: block; }
  .main-content { margin-left: 0; }
  .header { left: 0; }
  .footer { margin-left: 0; }
  .hamburger { display: flex; }
  .slider-section { height: 360px; }
  .slide-content { padding: 0 28px; }
  .slide-title { font-size: 1.6rem; }
  .slide-stats { display: none; }
}
@media (max-width: 600px) {
  .stats-strip { grid-template-columns: 1fr 1fr; }
  .section { padding: 16px 16px 0; }
  .detail-layout { padding: 16px; }
  .scripts-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .footer-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: repeat(2,1fr); }
  .form-row { grid-template-columns: 1fr; }
  .slide-btns { flex-direction: column; }
  .slider-section { height: 300px; }
  .profile-header { flex-direction: column; text-align: center; }
  .header-logo .logo-text { display: none; }
}
