/* ══════════════════════════════════════════════════════════════
   SPECX DEVS — Global Stylesheet
   Premium Black & White Theme
   ══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ── CSS Custom Properties ──────────────────────────────────── */
:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-tertiary: #1a1a1a;
  --bg-card: rgba(17, 17, 17, 0.9);
  --bg-glass: rgba(26, 26, 26, 0.7);
  --bg-elevated: #1e1e1e;

  --accent-primary: #ffffff;
  --accent-secondary: #e0e0e0;
  --accent-gradient: linear-gradient(135deg, #ffffff 0%, #b0b0b0 100%);
  --accent-glow: rgba(255, 255, 255, 0.1);

  --text-primary: #f5f5f5;
  --text-secondary: #999999;
  --text-muted: #555555;

  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.2);

  --success: #22c55e;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #60a5fa;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 30px rgba(255, 255, 255, 0.05);

  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;

  --navbar-height: 80px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-primary);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #555; }

/* ── Background ─────────────────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background:
    radial-gradient(ellipse 600px 600px at 15% 15%, rgba(255,255,255,0.02) 0%, transparent 70%),
    radial-gradient(ellipse 500px 500px at 85% 85%, rgba(255,255,255,0.015) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ── Floating Particles ─────────────────────────────────────── */
.particles-container {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none; z-index: 0; overflow: hidden;
}

.particle {
  position: absolute; width: 2px; height: 2px;
  background: rgba(255,255,255,0.3);
  border-radius: 50%; opacity: 0;
  animation: particleFloat 14s infinite;
}

.particle:nth-child(1) { left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { left: 25%; animation-delay: 2s; animation-duration: 16s; }
.particle:nth-child(3) { left: 40%; animation-delay: 4s; animation-duration: 12s; }
.particle:nth-child(4) { left: 55%; animation-delay: 1s; animation-duration: 15s; }
.particle:nth-child(5) { left: 70%; animation-delay: 3s; animation-duration: 11s; }
.particle:nth-child(6) { left: 85%; animation-delay: 5s; animation-duration: 13s; }

@keyframes particleFloat {
  0% { transform: translateY(100vh) scale(0); opacity: 0; }
  10% { opacity: 0.4; }
  90% { opacity: 0.4; }
  100% { transform: translateY(-10vh) scale(1); opacity: 0; }
}

/* ══════════════════════════════════════════════════════════════
   NAVBAR
   ══════════════════════════════════════════════════════════════ */
.navbar {
  position: fixed; top: 0; left: 0;
  width: 100%; height: var(--navbar-height);
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  transition: var(--transition-normal);
}

.navbar.scrolled {
  background: rgba(10, 10, 10, 0.97);
  box-shadow: var(--shadow-md);
}

.nav-container {
  max-width: 1280px; margin: 0 auto;
  padding: 0 24px; height: 100%;
  display: flex; align-items: center; justify-content: space-between;
}

.nav-brand { display: flex; align-items: center; gap: 12px; }

.nav-logo {
  width: 42px; height: 42px;
  border-radius: 50%; object-fit: cover;
  border: 2px solid rgba(255,255,255,0.2);
  transition: var(--transition-normal);
}

.nav-logo:hover {
  transform: scale(1.1);
  border-color: rgba(255,255,255,0.5);
}

.nav-title {
  font-size: 1.25rem; font-weight: 800;
  color: #fff; letter-spacing: -0.5px;
}

.nav-links { display: flex; align-items: center; gap: 4px; }

.nav-link {
  padding: 8px 16px; border-radius: var(--radius-sm);
  font-size: 0.85rem; font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition-normal);
  position: relative;
}

.nav-link:hover, .nav-link.active {
  color: #fff; background: rgba(255,255,255,0.06);
}

.nav-link.active::after {
  content: ''; position: absolute;
  bottom: 0; left: 50%; transform: translateX(-50%);
  width: 16px; height: 2px;
  background: #fff; border-radius: 1px;
}

.nav-actions { display: flex; align-items: center; gap: 12px; }

.nav-user-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.2);
}

/* Notification */
.notification-btn {
  position: relative; background: none;
  color: var(--text-secondary); font-size: 1.1rem;
  padding: 8px; border-radius: var(--radius-sm);
  transition: var(--transition-normal);
}

.notification-btn:hover { color: #fff; background: rgba(255,255,255,0.06); }

.notification-badge {
  position: absolute; top: 2px; right: 2px;
  width: 16px; height: 16px;
  background: var(--danger); border-radius: 50%;
  font-size: 0.6rem; font-weight: 700; color: white;
  display: flex; align-items: center; justify-content: center;
}

.notification-badge.hidden { display: none; }

/* Mobile Menu */
.mobile-menu-btn {
  display: none; background: none;
  color: #fff; font-size: 1.4rem; padding: 8px;
}

.mobile-menu {
  display: none; position: fixed;
  top: var(--navbar-height); left: 0; width: 100%;
  background: rgba(10, 10, 10, 0.98);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 16px; z-index: 999;
  animation: slideDown 0.3s ease;
}

.mobile-menu.open { display: block; }
.mobile-menu .nav-link { display: block; padding: 12px 16px; width: 100%; }

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 10px 24px; border-radius: var(--radius-sm);
  font-size: 0.85rem; font-weight: 600;
  transition: var(--transition-normal);
  position: relative; overflow: hidden;
}

.btn::before {
  content: ''; position: absolute; top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
  transition: 0.5s;
}

.btn:hover::before { left: 100%; }

.btn-primary {
  background: #fff; color: #000;
}

.btn-primary:hover {
  background: #e0e0e0;
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(255,255,255,0.1);
}

.btn-secondary {
  background: transparent; color: #fff;
  border: 1px solid var(--border-hover);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.06);
  transform: translateY(-2px);
}

.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #dc2626; transform: translateY(-2px); }

.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #16a34a; transform: translateY(-2px); }

.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-lg { padding: 14px 32px; font-size: 0.95rem; }

/* ══════════════════════════════════════════════════════════════
   HERO
   ══════════════════════════════════════════════════════════════ */
.hero {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  padding: calc(var(--navbar-height) + 40px) 24px 60px;
  overflow: hidden;
}

.hero-content {
  text-align: center; max-width: 800px;
  position: relative; z-index: 1;
  animation: heroFadeIn 1s ease;
}

@keyframes heroFadeIn {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.8rem; color: var(--text-secondary);
  margin-bottom: 24px;
  animation: fadeInUp 0.8s ease 0.2s forwards; opacity: 0;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900; line-height: 1.1;
  margin-bottom: 20px;
  animation: fadeInUp 0.8s ease 0.4s forwards; opacity: 0;
  letter-spacing: -2px;
}

.hero-title .gradient-text {
  background: linear-gradient(135deg, #fff 0%, #666 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-secondary);
  max-width: 550px; margin: 0 auto 32px;
  animation: fadeInUp 0.8s ease 0.6s forwards; opacity: 0;
}

.hero-actions {
  display: flex; gap: 16px; justify-content: center; flex-wrap: wrap;
  animation: fadeInUp 0.8s ease 0.8s forwards; opacity: 0;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hero Orbs */
.hero-orb {
  position: absolute; border-radius: 50%;
  filter: blur(80px);
  animation: orbFloat 8s ease-in-out infinite alternate;
}

.hero-orb-1 {
  width: 400px; height: 400px;
  background: rgba(255,255,255,0.03);
  top: 10%; left: -10%;
}

.hero-orb-2 {
  width: 300px; height: 300px;
  background: rgba(255,255,255,0.02);
  bottom: 10%; right: -5%;
  animation-delay: 4s;
}

@keyframes orbFloat {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(30px, -30px) scale(1.1); }
}

/* ══════════════════════════════════════════════════════════════
   SECTIONS
   ══════════════════════════════════════════════════════════════ */
.section {
  padding: 80px 24px; position: relative; z-index: 1;
}

.section-header {
  text-align: center; margin-bottom: 48px;
}

.section-subtitle {
  font-size: 0.75rem; color: var(--text-muted);
  font-weight: 600; text-transform: uppercase;
  letter-spacing: 3px; margin-bottom: 8px;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800; margin-bottom: 12px;
  letter-spacing: -1px;
}

.section-desc {
  color: var(--text-secondary); max-width: 550px; margin: 0 auto;
  font-size: 0.95rem;
}

.container { max-width: 1280px; margin: 0 auto; }

/* ══════════════════════════════════════════════════════════════
   CODE CARDS
   ══════════════════════════════════════════════════════════════ */
.codes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.code-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: var(--transition-normal);
  position: relative; overflow: hidden;
  cursor: pointer;
  animation: cardFadeIn 0.5s ease forwards; opacity: 0;
}

.code-card::before {
  content: ''; position: absolute; top: 0; left: 0;
  width: 100%; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.4s ease;
}

.code-card:hover::before { transform: scaleX(1); }

.code-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
}

@keyframes cardFadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.code-card:nth-child(1) { animation-delay: 0.05s; }
.code-card:nth-child(2) { animation-delay: 0.1s; }
.code-card:nth-child(3) { animation-delay: 0.15s; }
.code-card:nth-child(4) { animation-delay: 0.2s; }

.code-card-category {
  display: inline-block; padding: 3px 10px;
  background: rgba(255,255,255,0.06);
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  font-size: 0.7rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 12px;
}

.code-card-name {
  font-size: 1.15rem; font-weight: 700; margin-bottom: 8px;
  letter-spacing: -0.3px;
}

.code-card-desc {
  color: var(--text-secondary); font-size: 0.85rem;
  margin-bottom: 16px;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
  line-height: 1.5;
}

.code-card-footer {
  display: flex; align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}

.code-card-downloads {
  font-size: 0.75rem; color: var(--text-muted);
}

.code-card-actions { display: flex; gap: 8px; }

/* ══════════════════════════════════════════════════════════════
   SEARCH & FILTERS
   ══════════════════════════════════════════════════════════════ */
.search-container {
  max-width: 560px; margin: 0 auto 28px;
  position: relative;
}

.search-input {
  width: 100%; padding: 14px 24px 14px 48px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-size: 0.9rem; outline: none;
  transition: var(--transition-normal);
}

.search-input:focus {
  border-color: rgba(255,255,255,0.3);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.05);
}

.search-input::placeholder { color: var(--text-muted); }

.search-icon {
  position: absolute; left: 18px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted); font-size: 1rem;
}

.filter-tabs {
  display: flex; gap: 6px; justify-content: center;
  flex-wrap: wrap; margin-bottom: 28px;
}

.filter-tab {
  padding: 7px 18px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-muted); font-size: 0.8rem;
  font-weight: 500; cursor: pointer;
  transition: var(--transition-normal);
}

.filter-tab:hover, .filter-tab.active {
  background: #fff; color: #000;
  border-color: #fff;
}

/* ══════════════════════════════════════════════════════════════
   CODE DETAIL (FIXED / DIRECT)
   ══════════════════════════════════════════════════════════════ */
.detail-page {
  padding-top: calc(var(--navbar-height) + 40px);
  min-height: 100vh;
  max-width: 900px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
  padding-bottom: 60px;
}

.detail-category {
  display: inline-block; padding: 4px 14px;
  background: rgba(255,255,255,0.06);
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  font-size: 0.75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 16px;
}

.detail-name {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 900; margin-bottom: 8px;
  letter-spacing: -1.5px; line-height: 1.1;
}

.detail-meta {
  display: flex; flex-wrap: wrap; gap: 24px;
  margin: 24px 0; padding: 24px 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.detail-meta-item { display: flex; flex-direction: column; gap: 4px; }

.detail-meta-label {
  font-size: 0.7rem; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 1.5px; font-weight: 600;
}

.detail-meta-value {
  font-size: 0.95rem; font-weight: 600; color: var(--text-primary);
}

.detail-desc {
  color: var(--text-secondary);
  font-size: 1rem; line-height: 1.8;
  margin: 24px 0 32px;
}

.detail-download-btn {
  display: block; width: 100%;
  padding: 16px; text-align: center;
  background: #fff; color: #000;
  border-radius: var(--radius-md);
  font-size: 1rem; font-weight: 700;
  transition: var(--transition-normal);
  border: none; cursor: pointer;
}

.detail-download-btn:hover {
  background: #e0e0e0;
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(255,255,255,0.1);
}

/* ══════════════════════════════════════════════════════════════
   EMPTY STATE
   ══════════════════════════════════════════════════════════════ */
.empty-state {
  text-align: center; padding: 60px 24px;
  animation: fadeInUp 0.5s ease;
}

.empty-state-icon { font-size: 3.5rem; margin-bottom: 16px; opacity: 0.4; }

.empty-state-text {
  font-size: 1.1rem; color: var(--text-muted); font-weight: 500;
}

/* ══════════════════════════════════════════════════════════════
   ADMIN PANEL
   ══════════════════════════════════════════════════════════════ */
.admin-page {
  padding-top: calc(var(--navbar-height) + 40px);
  min-height: 100vh;
}

.admin-container {
  max-width: 1100px; margin: 0 auto; padding: 0 24px 40px;
}

/* Login */
.admin-login {
  max-width: 420px;
  margin: 80px auto 0; padding: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  text-align: center;
  animation: fadeInUp 0.6s ease;
}

.admin-login h2 { font-size: 1.4rem; font-weight: 800; margin-bottom: 8px; }
.admin-login p { color: var(--text-secondary); font-size: 0.85rem; margin-bottom: 24px; }

/* Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px; margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px; text-align: center;
}

.stat-value {
  font-size: 2rem; font-weight: 900;
  color: #fff; letter-spacing: -1px;
}

.stat-label {
  font-size: 0.7rem; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 1.5px;
  margin-top: 4px; font-weight: 600;
}

/* Form Elements */
.form-group { margin-bottom: 16px; text-align: left; }

.form-label {
  display: block; font-size: 0.8rem; font-weight: 600;
  color: var(--text-secondary); margin-bottom: 6px;
}

.form-input {
  width: 100%; padding: 12px 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.9rem; outline: none;
  transition: var(--transition-normal);
}

.form-input:focus {
  border-color: rgba(255,255,255,0.3);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.05);
}

.form-input::placeholder { color: var(--text-muted); }

select.form-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23999' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

textarea.form-input { resize: vertical; min-height: 80px; }

/* Admin Tabs */
.admin-tabs {
  display: flex; gap: 4px; margin-bottom: 28px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md); padding: 4px;
  overflow-x: auto;
}

.admin-tab {
  padding: 10px 20px; border-radius: var(--radius-sm);
  font-size: 0.8rem; font-weight: 600;
  color: var(--text-muted); cursor: pointer;
  transition: var(--transition-normal);
  white-space: nowrap; background: none;
}

.admin-tab:hover { color: var(--text-primary); }
.admin-tab.active { background: #fff; color: #000; }

.admin-section { display: none; }
.admin-section.active { display: block; }

.admin-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; flex-wrap: wrap; gap: 12px;
}

.admin-header h3 { font-size: 1.2rem; font-weight: 700; }

/* Table */
.admin-table-wrapper {
  overflow-x: auto; border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.admin-table { width: 100%; border-collapse: collapse; }

.admin-table th, .admin-table td {
  padding: 12px 16px; text-align: left;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.8rem;
}

.admin-table th {
  background: var(--bg-tertiary);
  color: var(--text-muted); font-weight: 600;
  text-transform: uppercase; letter-spacing: 1px;
  font-size: 0.7rem;
}

.admin-table td { color: var(--text-secondary); }
.admin-table tr:hover td { background: rgba(255,255,255,0.02); }
.admin-table tr:last-child td { border-bottom: none; }

/* Status Badges */
.status-badge {
  display: inline-block; padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.7rem; font-weight: 600;
}

.status-badge.pending { background: rgba(245,158,11,0.15); color: var(--warning); }
.status-badge.accepted { background: rgba(34,197,94,0.15); color: var(--success); }
.status-badge.rejected { background: rgba(239,68,68,0.15); color: var(--danger); }

/* ══════════════════════════════════════════════════════════════
   MODAL
   ══════════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  z-index: 2000; padding: 24px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active { opacity: 1; pointer-events: all; }

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 32px; max-width: 520px; width: 100%;
  max-height: 90vh; overflow-y: auto;
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal { transform: scale(1); }

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}

.modal-header h3 { font-size: 1.15rem; font-weight: 700; }

.modal-close {
  background: none; color: var(--text-muted);
  font-size: 1.5rem; padding: 4px;
  transition: var(--transition-fast);
}

.modal-close:hover { color: #fff; }

.modal-actions {
  display: flex; gap: 12px; justify-content: flex-end; margin-top: 24px;
}

/* ══════════════════════════════════════════════════════════════
   NOTIFICATION PANEL
   ══════════════════════════════════════════════════════════════ */
.notification-panel {
  position: fixed; top: var(--navbar-height); right: 0;
  width: 360px; max-width: 100vw;
  max-height: calc(100vh - var(--navbar-height));
  background: var(--bg-secondary);
  border-left: 1px solid var(--border-color);
  z-index: 1500; overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  box-shadow: var(--shadow-lg);
}

.notification-panel.open { transform: translateX(0); }

.notification-panel-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex; align-items: center; justify-content: space-between;
}

.notification-panel-header h4 { font-weight: 700; font-size: 0.95rem; }

.notification-item {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-color);
}

.notification-item.unread {
  background: rgba(255,255,255,0.02);
  border-left: 3px solid #fff;
}

.notification-item-type {
  font-size: 0.7rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 4px;
}

.notification-item-type.code_approved,
.notification-item-type.dev_accepted { color: var(--success); }
.notification-item-type.code_rejected,
.notification-item-type.dev_rejected { color: var(--danger); }

.notification-item-message {
  font-size: 0.85rem; color: var(--text-secondary); line-height: 1.5;
}

.notification-item-time {
  font-size: 0.7rem; color: var(--text-muted); margin-top: 4px;
}

/* ══════════════════════════════════════════════════════════════
   FOOTER (Enhanced)
   ══════════════════════════════════════════════════════════════ */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 60px 24px 30px;
  position: relative; z-index: 1;
}

.footer-inner {
  max-width: 1100px; margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}

.footer-brand-section .footer-logo {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 12px;
}

.footer-brand-section .footer-logo img {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.15);
}

.footer-brand-section .footer-logo span {
  font-size: 1.1rem; font-weight: 800; color: #fff;
}

.footer-brand-section p {
  color: var(--text-muted); font-size: 0.85rem;
  line-height: 1.6; max-width: 280px;
}

.footer-col h4 {
  font-size: 0.75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 2px;
  color: var(--text-secondary); margin-bottom: 16px;
}

.footer-col a {
  display: block; color: var(--text-muted);
  font-size: 0.85rem; padding: 4px 0;
  transition: var(--transition-fast);
}

.footer-col a:hover { color: #fff; }

.footer-bottom {
  max-width: 1100px; margin: 0 auto;
  border-top: 1px solid var(--border-color);
  margin-top: 40px; padding-top: 20px;
  display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: 12px;
}

.footer-bottom p {
  color: var(--text-muted); font-size: 0.8rem;
}

.footer-bottom a {
  color: var(--text-secondary);
  transition: var(--transition-fast);
}

.footer-bottom a:hover { color: #fff; }

/* ══════════════════════════════════════════════════════════════
   TOAST
   ══════════════════════════════════════════════════════════════ */
.toast-container {
  position: fixed; top: calc(var(--navbar-height) + 12px);
  right: 16px; z-index: 3000;
  display: flex; flex-direction: column; gap: 8px;
}

.toast {
  padding: 12px 18px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.85rem; color: var(--text-primary);
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease; max-width: 360px;
  display: flex; align-items: center; gap: 10px;
}

.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--danger); }
.toast.info { border-left: 3px solid var(--info); }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
  from { opacity: 1; } to { opacity: 0; transform: translateX(30px); }
}

/* ══════════════════════════════════════════════════════════════
   DEV FORM (Be a Dev / Upload)
   ══════════════════════════════════════════════════════════════ */
.dev-form-page {
  padding-top: calc(var(--navbar-height) + 40px);
  min-height: 100vh;
}

.dev-form-container {
  max-width: 560px; margin: 0 auto; padding: 0 24px 40px;
}

.dev-form-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 36px; animation: fadeInUp 0.6s ease;
}

.dev-form-card h2 { font-size: 1.4rem; font-weight: 800; margin-bottom: 8px; }
.dev-form-card p { color: var(--text-secondary); font-size: 0.85rem; margin-bottom: 24px; }

.warning-banner {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.2);
  border-radius: var(--radius-sm);
  color: var(--warning); font-size: 0.8rem; margin-bottom: 12px;
}

/* Multi-select checkboxes */
.checkbox-group { display: flex; flex-wrap: wrap; gap: 8px; }

.checkbox-item {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full); cursor: pointer;
  transition: var(--transition-normal);
  font-size: 0.8rem; color: var(--text-muted);
}

.checkbox-item input { display: none; }

.checkbox-item.checked,
.checkbox-item:has(input:checked) {
  background: #fff; color: #000;
  border-color: #fff;
}

/* ══════════════════════════════════════════════════════════════
   LEADERBOARD
   ══════════════════════════════════════════════════════════════ */
.leaderboard-list {
  max-width: 700px; margin: 0 auto;
}

.leaderboard-item {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  cursor: pointer;
  transition: var(--transition-normal);
}

.leaderboard-item:hover {
  border-color: var(--border-hover);
  transform: translateX(4px);
}

.leaderboard-rank {
  font-size: 1.4rem; font-weight: 900;
  color: var(--text-muted); min-width: 36px;
  text-align: center;
}

.leaderboard-rank.top-1 { color: #fbbf24; }
.leaderboard-rank.top-2 { color: #d1d5db; }
.leaderboard-rank.top-3 { color: #d97706; }

.leaderboard-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  border: 2px solid var(--border-color);
  object-fit: cover;
}

.leaderboard-info { flex: 1; }

.leaderboard-name {
  font-weight: 700; font-size: 0.95rem;
}

.leaderboard-stats {
  font-size: 0.75rem; color: var(--text-muted);
}

.leaderboard-downloads {
  font-size: 0.85rem; font-weight: 700; color: var(--text-secondary);
}

/* ══════════════════════════════════════════════════════════════
   DEV PROFILE
   ══════════════════════════════════════════════════════════════ */
.profile-header {
  text-align: center; padding-top: calc(var(--navbar-height) + 60px);
  margin-bottom: 40px;
}

.profile-avatar {
  width: 100px; height: 100px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.15);
  margin: 0 auto 16px; object-fit: cover;
}

.profile-name {
  font-size: 1.8rem; font-weight: 900;
  letter-spacing: -1px;
}

.profile-username {
  font-size: 0.85rem; color: var(--text-muted);
  margin-top: 4px;
}

.profile-bio {
  color: var(--text-secondary);
  font-size: 0.9rem; max-width: 500px;
  margin: 12px auto 0; line-height: 1.6;
}

.profile-stats {
  display: flex; gap: 32px; justify-content: center;
  margin: 24px 0;
}

.profile-stat-item { text-align: center; }

.profile-stat-value {
  font-size: 1.5rem; font-weight: 900; color: #fff;
}

.profile-stat-label {
  font-size: 0.7rem; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 1.5px;
}

/* ══════════════════════════════════════════════════════════════
   LEGAL PAGES
   ══════════════════════════════════════════════════════════════ */
.legal-page {
  padding-top: calc(var(--navbar-height) + 40px);
  min-height: 100vh;
  max-width: 800px; margin: 0 auto;
  padding-left: 24px; padding-right: 24px;
  padding-bottom: 60px;
}

.legal-page h1 {
  font-size: 2rem; font-weight: 900;
  margin-bottom: 8px; letter-spacing: -1px;
}

.legal-page .last-updated {
  font-size: 0.8rem; color: var(--text-muted); margin-bottom: 32px;
}

.legal-page h2 {
  font-size: 1.2rem; font-weight: 700;
  margin: 28px 0 12px; color: var(--text-primary);
}

.legal-page p, .legal-page li {
  color: var(--text-secondary); font-size: 0.9rem;
  line-height: 1.7; margin-bottom: 10px;
}

.legal-page ul { padding-left: 20px; }
.legal-page ul li { list-style: disc; }

/* ══════════════════════════════════════════════════════════════
   LOADING
   ══════════════════════════════════════════════════════════════ */
.spinner {
  width: 36px; height: 36px;
  border: 2px solid var(--border-color);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 40px auto;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-container {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 60px 24px;
}

.loading-text {
  color: var(--text-muted); margin-top: 12px; font-size: 0.85rem;
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  :root { --navbar-height: 60px; }
  .nav-links { display: none; }
  .mobile-menu-btn { display: block; }
  .nav-title { font-size: 0.95rem; }
  .nav-logo { width: 32px; height: 32px; }
  .nav-brand { gap: 8px; }
  .codes-grid { grid-template-columns: 1fr; gap: 12px; }
  .detail-name { font-size: 1.5rem; }
  .admin-login { margin-top: 40px; padding: 24px; }
  .admin-table th, .admin-table td { padding: 8px 10px; font-size: 0.75rem; }
  .modal { padding: 24px; }
  .notification-panel { width: 100%; }
  .section { padding: 50px 16px; }
  .dev-form-card { padding: 24px; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .leaderboard-item { padding: 12px 14px; }
  .profile-stats { gap: 20px; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .codes-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; align-items: center; }
  .admin-tabs { flex-direction: column; }
  .filter-tabs { gap: 4px; }
  .filter-tab { padding: 5px 12px; font-size: 0.75rem; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

/* ══════════════════════════════════════════════════════════════
   MAINTENANCE MODE OVERLAY
   ══════════════════════════════════════════════════════════════ */
.maintenance-overlay {
  position: fixed; inset: 0;
  background: var(--bg-primary);
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}

.maintenance-content {
  text-align: center; max-width: 500px;
  animation: fadeInUp 0.5s ease;
}

.maintenance-icon {
  font-size: 4rem; margin-bottom: 20px; opacity: 0.5;
}

.maintenance-title {
  font-size: 2rem; font-weight: 900;
  margin-bottom: 12px; letter-spacing: -1px;
}

.maintenance-reason {
  color: var(--text-secondary); font-size: 0.95rem;
  line-height: 1.6; margin-bottom: 24px;
}

/* ══════════════════════════════════════════════════════════════
   404 PAGE
   ══════════════════════════════════════════════════════════════ */
.page-404 {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px; text-align: center;
}

.page-404 h1 {
  font-size: 6rem; font-weight: 900;
  color: rgba(255,255,255,0.1); letter-spacing: -4px;
  line-height: 1;
}

.page-404 h2 {
  font-size: 1.5rem; font-weight: 700;
  margin: 8px 0 16px;
}

.page-404 p {
  color: var(--text-muted); margin-bottom: 24px;
}

/* ══════════════════════════════════════════════════════════════
   CODE DETAIL INFO GRID
   ══════════════════════════════════════════════════════════════ */
.detail-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 24px 0 32px;
}

.detail-info-item {
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.detail-info-label {
  font-size: 0.7rem; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 1.5px;
  font-weight: 600; margin-bottom: 6px;
}

.detail-info-value {
  font-size: 0.95rem; font-weight: 600;
  color: var(--text-primary);
}

.detail-info-value.desc {
  font-weight: 400; color: var(--text-secondary);
  line-height: 1.7;
}

@media (max-width: 480px) {
  .detail-info-grid { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════════════════════
   PROFILE DROPDOWN MENU
   ══════════════════════════════════════════════════════════════ */
.nav-profile-wrap {
  position: relative;
}

.nav-user-avatar {
  width: 34px; height: 34px; border-radius: 50%; cursor: pointer;
  border: 2px solid var(--border-color);
  transition: border-color 0.2s;
}
.nav-user-avatar:hover { border-color: rgba(255,255,255,0.4); }

.profile-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  width: 240px; background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
  opacity: 0; visibility: hidden;
  transform: translateY(-8px); transition: all 0.2s ease;
  z-index: 1000; overflow: hidden;
}
.profile-dropdown.open {
  opacity: 1; visibility: visible; transform: translateY(0);
}

.profile-dropdown-header {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
}
.profile-dropdown-avatar {
  width: 36px; height: 36px; border-radius: 50%;
}
.profile-dropdown-name {
  font-size: 0.85rem; font-weight: 700; color: var(--text-primary);
}
.profile-dropdown-username {
  font-size: 0.7rem; color: var(--text-muted);
}
.profile-dropdown-divider {
  height: 1px; background: var(--border-color); margin: 0 12px;
}
.profile-dropdown-item {
  padding: 10px 16px; font-size: 0.8rem; color: var(--text-secondary);
  cursor: pointer; transition: background 0.15s;
  display: flex; align-items: center; justify-content: space-between;
}
.profile-dropdown-item:hover {
  background: rgba(255,255,255,0.04); color: var(--text-primary);
}
.profile-dropdown-logout {
  color: var(--danger);
}
.profile-dropdown-logout:hover {
  background: rgba(239,68,68,0.06);
}

/* ── Wallet Page ────────────────────────────────────────────── */
.wallet-profile {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
}
.wallet-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.15);
  box-shadow: 0 0 24px rgba(255,255,255,0.08);
}
.wallet-profile-info { flex: 1; }
.wallet-name {
  font-size: 1.3rem; font-weight: 800; color: var(--text-primary); margin: 0 0 4px;
}
.wallet-username {
  font-size: 0.85rem; color: var(--text-muted); margin: 0;
}
.wallet-stats {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 24px;
}
.wallet-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px 16px;
  text-align: center;
  transition: border-color 0.3s;
}
.wallet-stat-card:hover { border-color: var(--border-hover); }
.wallet-stat-balance { border-color: rgba(34,197,94,0.25); }
.wallet-stat-balance:hover { border-color: rgba(34,197,94,0.5); }
.wallet-stat-icon { font-size: 1.5rem; margin-bottom: 8px; }
.wallet-stat-value {
  font-size: 1.3rem; font-weight: 800; color: var(--text-primary); margin-bottom: 4px;
}
.wallet-stat-label {
  font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em;
}
.wallet-section {
  margin-bottom: 24px;
}
.wallet-section-title {
  font-size: 1.05rem; font-weight: 700; color: var(--text-primary); margin: 0 0 14px;
}
.wallet-withdraw-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
}
.wallet-withdraw-rate {
  display: flex; justify-content: space-between; font-size: 0.78rem;
  color: var(--text-muted); margin-bottom: 16px; padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}
.wallet-disclaimer {
  font-size: 0.7rem; color: var(--text-muted); margin: -4px 0 14px; line-height: 1.6;
}
@media (max-width: 480px) {
  .wallet-stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .wallet-stat-card { padding: 14px 10px; }
  .wallet-stat-value { font-size: 1.1rem; }
  .wallet-profile { padding: 20px; gap: 14px; }
  .wallet-avatar { width: 56px; height: 56px; }
  .wallet-name { font-size: 1.1rem; }
}
