:root {
  --bg-primary: #0d1117;
  --bg-secondary: #141a24;
  --bg-tertiary: #1b2432;

  --surface: #151c28;
  --surface-hover: #1d2738;
  --surface-elevated: #1b2636;
  --surface-soft: #121824;
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-shine: rgba(255, 255, 255, 0.02);

  --text-primary: #e8edf5;
  --text-secondary: #a5afc2;
  --text-muted: #7a879e;

  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-medium: rgba(255, 255, 255, 0.12);

  --accent-primary: #f6c752;
  --accent-secondary: #4fb3ff;
  --accent-tertiary: #ff6b6b;
  --accent-glow: rgba(246, 199, 82, 0.18);

  --success: #3ddc97;
  --warning: #f0b429;
  --error: #ff5f73;

  --gradient-primary: linear-gradient(135deg, #f6c752 0%, #ffd37a 100%);
  --gradient-secondary: linear-gradient(to right, #4fb3ff, #5d8dff);
  --gradient-dark: linear-gradient(180deg, rgba(13, 17, 23, 0) 0%, #0d1117 100%);
  --gradient-bg: radial-gradient(circle at 18% 22%, rgba(79, 179, 255, 0.08), transparent 42%),
    radial-gradient(circle at 82% 76%, rgba(246, 199, 82, 0.06), transparent 48%);

  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 6px 16px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 18px var(--accent-glow);
  --shadow-card: 0 0 0 1px var(--glass-border), 0 8px 20px -12px rgba(0, 0, 0, 0.4);

  --transition-fast: 150ms ease-out;
  --transition-base: 250ms ease;
  --transition-bounce: 450ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
  scroll-behavior: smooth;
}

html,
body {
  height: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary);
  background-image: var(--gradient-bg);
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Noise Overlay */
.noise-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.012;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Loading Screen */
.loading-screen {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  transition: opacity var(--transition-slow), visibility var(--transition-slow);
}

.loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
}

.loading-content {
  text-align: center;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border-medium);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto var(--space-md);
}

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

.loading-text {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
}

/* Layout */
.app-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
  background: var(--bg-primary);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: linear-gradient(180deg, #151c28 0%, #101521 100%);
  border-right: 1px solid var(--border-medium);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.03);
  z-index: 100;
  overflow-y: auto;
}

.main-content {
  position: relative;
}

@media (max-width: 768px) {
  .app-layout {
    grid-template-columns: 1fr !important;
  }

  .sidebar {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    border-right: none !important;
    border-bottom: 1px solid var(--border-medium) !important;
    display: block !important;
  }
}

/* Sidebar Inner */
.sidebar-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: var(--space-lg) var(--space-lg) var(--space-xl);
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  text-decoration: none;
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  color: var(--text-primary);
  font-size: 18px;
}

.sidebar-logo img {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}

.sidebar-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-medium);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.dex-sprite img {
  width: min(260px, 100%);
  height: auto;
  display: block;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.35));
}

.dex-info {
  display: grid;
  gap: 10px;
  background: rgba(9, 13, 20, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: var(--space-md);
}

.dex-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-sm);
}

.dex-info-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  font-weight: 700;
}

.dex-info-value {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 14px;
}

.sidebar-toggle:hover {
  color: var(--text-primary);
  border-color: var(--accent-secondary);
  background: var(--surface-hover);
}

.sidebar-toggle i {
  width: 20px;
  height: 20px;
}

.sidebar-nav {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.nav-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.section-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 1.5px;
  margin-bottom: 6px;
  padding-left: 12px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}

.nav-item i {
  width: 20px;
  height: 20px;
  opacity: 0.7;
}

.nav-item:hover {
  background: var(--surface-elevated);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

.nav-item.active {
  background: var(--surface-elevated);
  color: var(--accent-primary);
  border-color: rgba(246, 199, 82, 0.35);
  box-shadow: inset 3px 0 0 var(--accent-primary);
}

.nav-item.active i {
  opacity: 1;
  color: var(--accent-primary);
}

.sidebar-footer {
  margin-top: auto;
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border-subtle);
}

.player-count {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.sidebar-credit {
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-muted);
}

.status-dot {
  width: 6px;
  height: 6px;
  background: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--success);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(90deg, rgba(20, 26, 36, 0.98) 0%, rgba(18, 24, 34, 0.95) 100%);
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  padding: var(--space-sm) var(--space-lg);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--text-primary);
  text-decoration: none;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.5px;
  transition: transform var(--transition-fast);
}

.brand:hover {
  transform: scale(1.02);
}

.brand-icon {
  font-size: 24px;
  filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.5));
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  position: relative;
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--surface);
}

.nav-link.active {
  color: var(--accent-primary);
  background: var(--surface);
}

.nav-icon {
  font-size: 16px;
}

/* Typography */
h1,
h2,
h3,
h4 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.5px;
}

h1 {
  font-size: 36px;
}

h2 {
  font-size: 26px;
}

h3 {
  font-size: 20px;
}

h4 {
  font-size: 16px;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: var(--space-sm) var(--space-md);
  margin-bottom: var(--space-md);
  border-bottom: 1px solid var(--border-subtle);
  background: var(--surface-soft);
  border-radius: var(--radius-sm);
}

.section-header h2 {
  margin: 0;
}

.section-header i {
  width: 18px;
  height: 18px;
  color: var(--accent-secondary);
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 10px 20px;
  background: var(--accent-primary);
  color: #11131a;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  border: 1px solid rgba(246, 199, 82, 0.6);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 6px 16px rgba(246, 199, 82, 0.18);
  position: relative;
  overflow: hidden;
}

.button::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 100%);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.button:hover {
  background: #ffd97a;
  transform: none;
  box-shadow: 0 8px 18px rgba(246, 199, 82, 0.22);
}

.button:hover::before {
  opacity: 1;
}

.button:active {
  transform: translateY(0);
}

.button-secondary {
  background: var(--surface);
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
}

.button-secondary:hover {
  background: var(--surface-hover);
  box-shadow: var(--shadow-md);
}

/* Hero Section */
.hero {
  text-align: left;
  padding: var(--space-xl) 0;
  max-width: 900px;
  margin: 0;
}

.hero h1 {
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  animation: none;
}

/* Wiki Home Page */
.wiki-home {
  max-width: 1100px;
  margin: 0 auto;
}

.wiki-header {
  text-align: left;
  padding: var(--space-xl) 0 var(--space-lg);
  border-bottom: 1px solid var(--border-medium);
  margin-bottom: var(--space-lg);
}

.wiki-logo {
  width: 120px;
  height: 120px;
  margin: 0 0 var(--space-md);
  background: linear-gradient(160deg, #1d2738 0%, #101521 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  box-shadow: var(--shadow-md);
}

.wiki-title {
  font-size: 34px;
  margin: 0 0 var(--space-sm);
  color: var(--text-primary);
}

.wiki-subtitle {
  color: var(--text-secondary);
  font-size: 15px;
  margin: 0;
}

.wiki-menu {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.menu-card {
  background: linear-gradient(180deg, var(--surface-elevated) 0%, var(--surface-soft) 100%);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  text-align: left;
  text-decoration: none;
  color: var(--text-primary);
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.menu-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-primary);
  opacity: 1;
}

.menu-card:hover {
  transform: none;
  border-color: var(--accent-secondary);
  box-shadow: var(--shadow-md);
}

.menu-card:hover::before {
  opacity: 1;
}

.menu-card-icon {
  font-size: 40px;
  margin-bottom: var(--space-sm);
  display: block;
}

.menu-card-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 var(--space-xs);
}

.menu-card-description {
  color: var(--text-secondary);
  font-size: 13px;
  margin: 0;
}

.hero p {
  color: var(--text-secondary);
  font-size: 18px;
  margin-bottom: var(--space-xl);
  animation: fadeInUp 0.6s ease-out 0.1s backwards;
}

.hero .button {
  animation: fadeInUp 0.6s ease-out 0.2s backwards;
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Toolbar */
.toolbar {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: var(--space-md);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
  box-shadow: var(--shadow-sm);
}

.pokedex-maps {
  background: linear-gradient(180deg, rgba(20, 26, 36, 0.95) 0%, rgba(16, 21, 30, 0.9) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
  box-shadow: var(--shadow-md);
}

.pokedex-maps h3 {
  margin: 0 0 12px;
}

.pokedex-maps p {
  margin: 0 0 12px;
  line-height: 1.7;
}

.pokedex-maps ul {
  margin: 10px 0 0;
  padding-left: 0;
  display: grid;
  gap: 10px;
  list-style: none;
}

.pokedex-maps li {
  line-height: 1.6;
  background: rgba(9, 13, 20, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 10px 12px;
}

.guide-hero {
  text-align: left;
  padding: 24px 0;
  max-width: 980px;
  margin: 0;
}

.guide-section {
  background: linear-gradient(180deg, rgba(20, 26, 36, 0.92) 0%, rgba(16, 21, 30, 0.9) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
  box-shadow: var(--shadow-sm);
}

.guide-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.guide-header-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: rgba(79, 179, 255, 0.12);
  border: 1px solid rgba(79, 179, 255, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-secondary);
}

.guide-header h3 {
  margin: 0 0 4px;
  font-size: 20px;
}

.guide-header p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-md);
  align-items: start;
}

.guide-grid-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.guide-option-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: var(--space-md);
  align-items: stretch;
}

.guide-option-main,
.guide-option-side {
  display: grid;
  gap: var(--space-md);
}

.guide-card {
  background: rgba(9, 13, 20, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  display: grid;
  gap: var(--space-sm);
  align-content: start;
}

.guide-option-layout > .guide-card:not(.guide-card-span) {
  height: 100%;
}

.guide-card.guide-media {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.guide-card h4 {
  margin: 0;
  font-size: 16px;
  color: var(--text-primary);
}

.guide-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.guide-list li {
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  line-height: 1.5;
  color: var(--text-secondary);
  font-size: 14px;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}

.guide-media {
  display: grid;
  gap: var(--space-sm);
}

.commands-section .guide-header-icon {
  background: rgba(246, 199, 82, 0.12);
  border-color: rgba(246, 199, 82, 0.35);
  color: var(--accent-primary);
}

.command-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-md);
}

.command-card {
  background: rgba(9, 13, 20, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  display: grid;
  gap: var(--space-sm);
}

.command-card h4 {
  margin: 0;
  font-size: 15px;
  color: var(--text-primary);
}

.command-keys {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.command-code {
  background: rgba(246, 199, 82, 0.12);
  border: 1px solid rgba(246, 199, 82, 0.35);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-weight: 700;
  font-size: 12px;
  color: var(--accent-primary);
}

.command-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 14px;
}

.command-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}

.guide-credits {
  padding: var(--space-md) var(--space-lg);
}

.map-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.map-button {
  padding: 12px 22px;
  background: rgba(255, 215, 0, 0.08);
  border: 1px solid rgba(255, 215, 0, 0.25);
  color: var(--accent-primary);
  border-radius: var(--radius-full);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 0 16px rgba(255, 215, 0, 0.12);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.map-button::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 100%);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.map-button:hover {
  transform: translateY(-2px);
  background: rgba(255, 215, 0, 0.18);
  border-color: var(--accent-primary);
  box-shadow: 0 0 24px rgba(255, 215, 0, 0.35);
}

.map-button:hover::before {
  opacity: 1;
}

.map-button:active {
  transform: translateY(0);
}

.toolbar input,
.toolbar select {
  width: 100%;
  padding: 12px var(--space-md);
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  transition: all var(--transition-fast);
}

.toolbar input:focus,
.toolbar select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

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

/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-lg);
  animation: fadeIn 0.4s ease-out;
  box-sizing: border-box;
}

.grid > * {
  min-width: 0;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Card */
.card {
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--surface-elevated) 0%, var(--surface-soft) 100%);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
  min-height: 280px;
  box-shadow: var(--shadow-sm);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-primary);
  opacity: 1;
}

.card:hover {
  transform: none;
  border-color: rgba(79, 179, 255, 0.4);
  box-shadow: var(--shadow-md);
}

.card:hover::before {
  opacity: 1;
}

.card-media {
  width: 100%;
  height: 200px;
  background: #0f1624;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: var(--space-md);
  position: relative;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform var(--transition-slow);
}

.card:hover .card-media img {
  transform: scale(1.05);
}

.badge-id {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  background: rgba(10, 14, 26, 0.9);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-medium);
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: var(--radius-full);
}

.shiny-toggle {
  position: absolute;
  top: var(--space-sm);
  left: var(--space-sm);
  background: rgba(10, 14, 26, 0.9);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-medium);
  color: var(--text-secondary);
  font-size: 16px;
  padding: 6px 10px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
  z-index: 10;
}

.shiny-toggle:hover {
  transform: scale(1.1);
  border-color: var(--accent-primary);
}

.shiny-toggle.active {
  color: #a78bfa;
  border-color: #a78bfa;
  box-shadow: 0 0 12px rgba(167, 139, 250, 0.3);
}

.card-header {
  margin-bottom: var(--space-sm);
}

.card-header h3 {
  margin: 0;
  font-size: 20px;
  color: var(--text-primary);
}

.card-body {
  flex: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

/* Types */
.types {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.type {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid;
}

.type-grass {
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.3);
}

.type-poison {
  background: rgba(168, 85, 247, 0.15);
  color: #d8b4fe;
  border-color: rgba(168, 85, 247, 0.3);
}

.type-fire {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.3);
}

.type-flying {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
  border-color: rgba(59, 130, 246, 0.3);
}

.type-water {
  background: rgba(14, 165, 233, 0.15);
  color: #7dd3fc;
  border-color: rgba(14, 165, 233, 0.3);
}

.type-electric {
  background: rgba(234, 179, 8, 0.15);
  color: #fde047;
  border-color: rgba(234, 179, 8, 0.3);
}

.type-ice {
  background: rgba(103, 232, 249, 0.15);
  color: #a5f3fc;
  border-color: rgba(103, 232, 249, 0.3);
}

.type-rock {
  background: rgba(120, 113, 108, 0.15);
  color: #d6d3d1;
  border-color: rgba(120, 113, 108, 0.3);
}

.type-ground {
  background: rgba(161, 98, 7, 0.15);
  color: #fcd34d;
  border-color: rgba(161, 98, 7, 0.3);
}

.type-psychic {
  background: rgba(236, 72, 153, 0.15);
  color: #f9a8d4;
  border-color: rgba(236, 72, 153, 0.3);
}

/* Chips */
.chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
}

.categories {
  display: flex;
  gap: var(--space-xs);
  flex-wrap: wrap;
}

/* Meta Info */
.meta {
  display: grid;
  gap: var(--space-sm);
  font-size: 13px;
  color: var(--text-muted);
}

.meta strong {
  color: var(--text-secondary);
  font-weight: 600;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 8, 0.9);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5000;
  /* High z-index to cover sidebar */
  padding: var(--space-md);
  animation: fadeIn 0.2s ease-out;
}

.dex-window {
  width: min(1100px, 100%);
  max-height: 90vh;
  background: linear-gradient(180deg, #141a24 0%, #0f141d 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg), 0 0 60px rgba(79, 179, 255, 0.18);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dex-header {
  background: linear-gradient(90deg, rgba(18, 24, 34, 0.96) 0%, rgba(20, 26, 36, 0.98) 100%);
  color: var(--text-primary);
  padding: var(--space-md) var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  letter-spacing: 0.2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.dex-header .back {
  color: var(--text-primary);
  text-decoration: none;
  padding: var(--space-sm) var(--space-md);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
}

.dex-header .back:hover {
  background: rgba(255, 255, 255, 0.12);
}

.dex-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-lg);
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: var(--space-xl);
}

.dex-left-panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  background: linear-gradient(180deg, var(--surface-elevated) 0%, #121824 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
}

.dex-right-panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  background: linear-gradient(180deg, rgba(20, 26, 36, 0.9) 0%, rgba(16, 21, 30, 0.92) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
}

.dex-sprite {
  width: 100%;
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.12), transparent 55%), #0f1624;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.shiny-toggle-large:hover {
  background: var(--surface-hover);
  border-color: var(--accent-primary);
}

.shiny-toggle-large.active {
  color: #a78bfa;
  border-color: #a78bfa;
  background: rgba(167, 139, 250, 0.1);
}

/* Tabs */
.dex-tabs {
  display: flex;
  gap: var(--space-sm);
  border-bottom: 1px solid var(--border-medium);
  padding: 6px;
  background: rgba(9, 13, 20, 0.35);
  border-radius: var(--radius-lg);
}

.dex-tab {
  padding: 10px var(--space-lg);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  background: transparent;
}

.dex-tab:hover {
  color: var(--text-primary);
  background: rgba(79, 179, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.08);
}

.dex-tab.active {
  color: var(--accent-primary);
  border-color: rgba(246, 199, 82, 0.4);
  background: rgba(246, 199, 82, 0.12);
}

.dex-panel {
  display: none;
  padding: var(--space-md) 0 0;
  background: transparent;
  border: none;
  border-radius: 0;
}

.dex-panel.active {
  display: block;
  animation: fadeIn 0.3s ease-out;
}

.drops-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-lg);
}

.drops-panel {
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.drops-title {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.drops-list {
  display: grid;
  gap: var(--space-sm);
}

.drop-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-md);
  padding: 12px 14px;
  background: rgba(9, 13, 20, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
}

.drop-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.drop-item {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 15px;
  letter-spacing: 0.2px;
}

.drop-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.drop-stat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(10, 10, 16, 0.55);
  min-width: 90px;
  justify-content: space-between;
}

.drop-stat-label {
  font-size: 10px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.drop-stat-value {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}

.drop-meta {
  font-size: 12px;
  color: var(--text-secondary);
}

.drop-empty {
  padding: 10px 12px;
  border: 1px dashed var(--border-medium);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 2fr;
  gap: var(--space-xl);
}

.admin-grid-single {
  grid-template-columns: 1fr;
}

.admin-tabs {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}

.admin-tab {
  padding: 8px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-medium);
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 600;
  background: rgba(15, 23, 42, 0.4);
}

.admin-tab.active {
  color: var(--text-primary);
  border-color: var(--accent-primary);
  background: rgba(139, 92, 246, 0.15);
}

.admin-panel {
  background: var(--surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.admin-panel-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.admin-panel input,
.admin-panel select {
  width: 100%;
  padding: 10px 12px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
}

.admin-panel textarea {
  width: 100%;
  padding: 10px 12px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  min-height: 90px;
  resize: vertical;
}

.admin-textarea-lg {
  min-height: 200px;
}

.admin-form {
  display: flex;
  gap: var(--space-sm);
}

.admin-form-column {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.admin-block-title {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: var(--space-sm);
}

.admin-helper {
  color: var(--text-secondary);
  font-size: 13px;
}

.admin-sync-actions {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.admin-sync-actions input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.admin-bonus-row,
.admin-meta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
}

.admin-list {
  display: grid;
  gap: var(--space-sm);
}

.admin-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: 10px 12px;
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.admin-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.admin-drops-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-lg);
}

.admin-drop-panel {
  background: rgba(15, 23, 42, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.admin-drop-title {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-drop-form {
  display: grid;
  grid-template-columns: 1fr 80px 90px auto;
  gap: var(--space-sm);
}

.admin-drop-list {
  display: grid;
  gap: var(--space-sm);
}

.admin-drop-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: 8px 10px;
  background: rgba(10, 14, 26, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.admin-drop-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-drop-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 14px;
}

.admin-drop-meta {
  font-size: 12px;
  color: var(--text-secondary);
}

.admin-remove {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  border-radius: var(--radius-full);
  padding: 6px 12px;
  cursor: pointer;
  font-weight: 600;
  font-size: 12px;
}

.admin-empty {
  padding: 10px 12px;
  border: 1px dashed var(--border-medium);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
}

.admin-auth {
  max-width: 480px;
  margin: 0 auto;
}

.admin-auth-error {
  color: #fca5a5;
  font-weight: 600;
  min-height: 20px;
}

@media (max-width: 900px) {
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .admin-drop-form {
    grid-template-columns: 1fr 1fr;
  }

  .admin-drop-form button {
    grid-column: span 2;
  }
}

/* Combat Tab Sections */
.combat-section {
  margin-bottom: var(--space-xl);
}

.combat-section:last-child {
  margin-bottom: 0;
}

.combat-section h4 {
  margin: 0 0 var(--space-md);
  color: var(--text-primary);
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.weakness-section {
  padding: var(--space-md);
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-md);
}

.resistance-section {
  padding: var(--space-md);
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: var(--radius-md);
}

/* Areas */
.areas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-md);
}

.area-card {
  display: grid;
  gap: var(--space-sm);
}

.area-image {
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 2 / 1;
}

.area-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.area-meta {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
  font-size: 13px;
  color: var(--text-secondary);
}

.cat-section {
  margin-bottom: var(--space-lg);
}

.cat-header h4 {
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}

.sub-header {
  margin: var(--space-md) 0 var(--space-sm);
  font-weight: 600;
  font-size: 14px;
  color: var(--text-muted);
}

/* Evolution Chain */
.evo-chain {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.evo-item {
  text-align: center;
}

.evo-item a {
  text-decoration: none;
  display: block;
}

.evo-item img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.4);
  transition: all var(--transition-base);
}

.evo-item a:hover img {
  transform: scale(1.05);
  border-color: var(--accent-primary);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
}

.evo-name {
  margin-top: var(--space-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.evo-arrow {
  color: var(--text-muted);
  font-size: 24px;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: var(--space-lg);
  right: var(--space-lg);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.toast {
  background: var(--surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  box-shadow: var(--shadow-lg);
  min-width: 300px;
  animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100%);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.toast.success {
  border-left: 4px solid var(--success);
}

.toast.error {
  border-left: 4px solid var(--error);
}

.toast.warning {
  border-left: 4px solid var(--warning);
}

/* Empty State */
.empty {
  text-align: center;
  padding: var(--space-2xl);
  color: var(--text-muted);
  font-size: 16px;
}

/* Responsive */
@media (max-width: 768px) {
  .toolbar {
    grid-template-columns: 1fr;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .nav {
    gap: 0;
  }

  .nav-link {
    padding: var(--space-sm);
    font-size: 12px;
  }

  .nav-icon {
    display: none;
  }

  h1 {
    font-size: 32px;
  }

  h2 {
    font-size: 28px;
  }

  .hero {
    padding: var(--space-lg) 0;
  }

  .dex-window {
    max-height: 95vh;
  }

  .evo-chain {
    justify-content: center;
  }
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--surface);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--surface-hover);
}

.area-card.no-image {
  grid-template-rows: auto;
  min-height: auto;
}

.area-card.no-image .area-meta {
  background: var(--surface);
  border-top: none;
}


/* Main Content Area */
.main-content {
  width: 100%;
  overflow-y: auto;
  padding: 0;
  position: relative;
  scroll-behavior: smooth;
  height: 100vh;
}

.content-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-xl);
}

/* ==========================================================================
   BENTO GRID SYSTEM
   ========================================================================== */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 180px;
  gap: var(--space-lg);
  margin-top: var(--space-2xl);
}

/* ==========================================================================
   PORTAL 2.0 DESIGN SYSTEM
   ========================================================================== */

/* Hub Hero Section */
.hub-hero {
  background: linear-gradient(180deg, #1d2839 0%, #141b28 100%);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  margin-bottom: 40px;
  border: 1px solid var(--border-medium);
  box-shadow: var(--shadow-md);
}

.hero-brand {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  max-width: 900px;
}

.hero-logo {
  width: 120px;
  height: auto;
  filter: none;
}

.hero-title {
  font-size: 36px;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}

.hero-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-top: 10px;
  max-width: 620px;
}

/* Portal Grid Layout */
.portal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: minmax(220px, auto);
  gap: 20px;
  margin-bottom: 60px;
  padding: 0;
}

/* Portal Card Core */
.portal-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  text-decoration: none;
  background: linear-gradient(180deg, var(--surface-elevated) 0%, #121a27 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}

.portal-card:hover {
  transform: none;
  border-color: rgba(79, 179, 255, 0.45);
  box-shadow: var(--shadow-md);
}

.card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(9, 13, 20, 0.25) 0%, rgba(9, 13, 20, 0.9) 80%);
  z-index: 1;
  transition: opacity var(--transition-fast);
}

.portal-card:hover .card-overlay {
  background: linear-gradient(180deg, rgba(9, 13, 20, 0.2) 0%, rgba(9, 13, 20, 0.92) 85%);
}

.card-content {
  position: relative;
  z-index: 2;
  height: 100%;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}


.card-tag {
  background: var(--accent-secondary);
  color: #0b121a;
  font-size: 10px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  align-self: flex-start;
  margin-bottom: var(--space-md);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  box-shadow: 0 6px 12px rgba(79, 179, 255, 0.2);
}

.card-icon {
  font-size: 40px;
  margin-bottom: 16px;
  filter: none;
}

.card-body h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 6px 0;
  line-height: 1.3;
}

.card-body p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}

.card-action {
  margin-top: var(--space-md);
  font-weight: 600;
  color: var(--accent-primary);
  font-size: 13px;
  opacity: 0.9;
  letter-spacing: 0.2px;
  transition: opacity var(--transition-fast);
}

.portal-card:hover .card-action {
  opacity: 1;
  transform: none;
}

.secondary-card {
  background: linear-gradient(180deg, #1b2432 0%, #141a24 100%);
}

/* Specific Card Themes with Images */
.pokedex-card {
  grid-column: span 2;
  grid-row: span 2;
  background-image: url('imgs/hub/pokedex_bg.png');
  background-size: cover;
  background-position: center;
}

.pokedex-card .card-icon {
  font-size: 80px;
}

.hunt-card {
  grid-column: span 2;
  background-image: url('imgs/hub/hunts_bg.png');
  background-size: cover;
  background-position: center;
}

.talents-card {
  background-image: url('imgs/hub/talents_bg.png');
  background-size: cover;
  background-position: center;
}

.secondary-card .card-icon {
  font-size: 32px;
}

/* Group & Mini Cards */
.portal-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.mini-card {
  background: linear-gradient(180deg, var(--surface-elevated) 0%, #121a27 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: var(--space-md);
  text-decoration: none;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.mini-card:hover {
  background: linear-gradient(180deg, #22304a 0%, #141b28 100%);
  border-color: rgba(79, 179, 255, 0.45);
  transform: none;
  box-shadow: var(--shadow-md);
}

.mini-icon {
  font-size: 18px;
}

.mini-label {
  font-weight: 600;
  color: var(--text-secondary);
}

.mini-card:hover .mini-label {
  color: #fff;
}

/* Social Portal Dock */
.social-portal {
  grid-column: span 3;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  margin-top: var(--space-lg);
}

/* ==========================================================================
   APP FOOTER
   ========================================================================== */
.app-footer {
  margin-top: 60px;
  padding: 40px 32px 24px;
  border-top: 1px solid var(--border-medium);
  background: linear-gradient(180deg, #141a24 0%, #0f141d 100%);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-xl);
  margin-bottom: 60px;
  flex-wrap: wrap;
}

.footer-brand {
  max-width: 450px;
}

.brand-name {
  font-size: 32px;
  font-weight: 800;
  font-family: 'Poppins', sans-serif;
  background: var(--gradient-primary);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: block;
  margin-bottom: var(--space-sm);
}

.brand-disclaimer {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
}

.footer-social {
  display: flex;
  gap: var(--space-lg);
}

.social-icon {
  width: 54px;
  height: 54px;
  background: var(--surface);
  border: 1px solid var(--border-medium);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.social-icon i {
  width: 24px;
  height: 24px;
}

.social-icon:hover {
  color: var(--accent-primary);
  border-color: var(--accent-primary);
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
  background: rgba(99, 102, 241, 0.05);
}

.footer-bottom {
  padding-top: 30px;
  border-top: 1px solid var(--border-medium);
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

/* Home Grid refinements */
.portal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  margin-bottom: 60px;
}

/* Make Pokedex card span full width to look more organized as HERO */
.pokedex-card {
  grid-column: span 2;
  min-height: 280px;
}

@media (max-width: 900px) {
  .portal-grid {
    grid-template-columns: 1fr;
  }

  .pokedex-card {
    grid-column: span 1;
  }

  .footer-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

/* Talents Grid */
.talents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: var(--space-xl);
  margin-top: var(--space-xl);
}

.talent-card {
  background: var(--surface);
  border: 1px solid var(--border-medium);
  border-radius: 24px;
  overflow: hidden;
  transition: var(--transition-base);
}

.talent-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.talent-header {
  padding: 32px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.03), transparent);
  border-bottom: 1px solid var(--glass-border);
}

.talent-category {
  display: inline-block;
  padding: 4px 12px;
  background: var(--bg-tertiary);
  color: var(--accent-primary);
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.talent-buff {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  line-height: 1.4;
}

.talent-requirements {
  padding: 32px;
}

.req-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: 16px;
  letter-spacing: 0.5px;
}

.req-grid {
  display: grid;
  gap: 12px;
}

.req-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
}

.req-qty {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  color: var(--accent-primary);
  font-size: 15px;
  min-width: 50px;
}

.req-meta {
  display: flex;
  flex-direction: column;
}

.req-name {
  font-weight: 600;
  color: #fff;
  font-size: 14px;
}

.req-source {
  font-size: 11px;
  color: var(--text-muted);
}

.social-link {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding: 32px 48px;
  /* Larger padding for social cards */
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  border-radius: 32px;
  /* Rounder social cards */
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-link:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
}

.social-link .icon {
  font-size: 32px;
}

.social-link .text strong {
  display: block;
  font-size: 18px;
  color: #fff;
}

.social-link .text span {
  font-size: 13px;
  color: var(--text-secondary);
}



@keyframes scrollTopSlide {
  from {
    transform: translateY(16px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.scroll-top {
  position: fixed;
  right: var(--space-xl);
  bottom: var(--space-xl);
  z-index: 1000;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  border: 1px solid rgba(246, 199, 82, 0.28);
  background: linear-gradient(145deg, rgba(246, 199, 82, 0.18), rgba(79, 179, 255, 0.12));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  color: #0b121a;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.5), 0 0 22px rgba(246, 199, 82, 0.2);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  animation: scrollTopSlide 0.4s ease-out;
}

.scroll-top:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 38px rgba(0, 0, 0, 0.6), 0 0 28px rgba(246, 199, 82, 0.35);
  background: linear-gradient(145deg, rgba(246, 199, 82, 0.28), rgba(79, 179, 255, 0.2));
  border-color: rgba(246, 199, 82, 0.45);
}

.scroll-top:active {
  transform: translateY(-1px);
}

.scroll-top svg {
  width: 22px;
  height: 22px;
}

.scroll-top-icon {
  font-size: 24px;
  line-height: 1;
  font-weight: 800;
}

@media (max-width: 768px) {
  .scroll-top {
    right: 16px;
    bottom: 16px;
    width: 50px;
    height: 50px;
    border-radius: 14px;
  }

  .scroll-top-icon {
    font-size: 22px;
  }
}






/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--glass-border);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}





.content-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-xl);
}

/* Banner Component */
.welcome-banner {
  background-image: url('https://imgur.com/a/M50ZSem');
  /* Placeholder or gradient */
  background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), var(--gradient-bg);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  margin-bottom: var(--space-xl);
  border: 1px solid var(--border-medium);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.banner-content {
  position: relative;
  z-index: 2;
}

.banner-title {
  font-size: 32px;
  margin-bottom: var(--space-sm);
  color: white;
}

.banner-subtitle {
  color: var(--text-secondary);
  font-size: 16px;
  max-width: 600px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
  font-size: 18px;
  color: var(--text-primary);
  background: rgba(9, 13, 20, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 10px 12px;
}

.section-title i {
  color: var(--accent-secondary);
}

.zoomable-map {
  display: block;
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow-sm);
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(5px);
}

.lightbox-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: zoom 0.3s;
}

.lightbox-content {
  margin: auto;
  display: block;
  /* Remove constraints to show original size as requested */
  width: auto;
  height: auto;
  max-width: 95vw;
  max-height: 95vh;
  user-select: none;
  cursor: grab;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  touch-action: none;
}

.lightbox-content.dragging {
  cursor: grabbing;
}

@keyframes zoom {
  from {
    transform: scale(0)
  }

  to {
    transform: scale(1)
  }
}

.lightbox-close {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
  cursor: pointer;
  z-index: 1;
}

.lightbox-close:hover,
.lightbox-close:focus {
  color: var(--accent-primary);
  text-decoration: none;
  cursor: pointer;
}

/* Refined Area Card */

/* Large Area Cards Redesign */
.areas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-sm);
}

.area-card {
  background: linear-gradient(180deg, rgba(20, 26, 36, 0.9) 0%, rgba(16, 21, 30, 0.9) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition-base);
  cursor: default;
  box-shadow: var(--shadow-sm);
}

.area-image {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16/9;
  background: #0f1624;
}



.sidebar-logo-img:hover {
  transform: scale(1.05);
}

/* Area Image Zoom */
.area-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* Transition only transform (scale), not transform-origin (pan) for instant response */
  transition: transform 0.3s ease;
  cursor: crosshair;
  pointer-events: auto;
}

.area-image:hover img {
  transform: scale(2);
  /* Increased zoom level for better detail */
}

/* Remove overlay interaction */
.area-image::after {
  display: none;
}


.area-meta {
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.area-meta span:not(.chip) {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
}

.area-card.no-image .area-meta {
  border-top: none;
  padding: var(--space-md);
  font-size: 15px;
  /* Slightly larger for text-only */
}

/* Shiny Toggle Redesign */
.shiny-toggle,
.shiny-toggle-large {
  background: rgba(255, 215, 0, 0.1);
  border: 1px solid rgba(255, 215, 0, 0.3);
  color: var(--accent-primary);
  padding: 8px 20px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.1);
  backdrop-filter: blur(4px);
}

.shiny-toggle-large {
  width: 100%;
  padding: 14px;
  font-size: 15px;
  margin: var(--space-md) 0;
}

.shiny-toggle:hover,
.shiny-toggle-large:hover {
  background: rgba(255, 215, 0, 0.2);
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.3), inset 0 0 10px rgba(255, 215, 0, 0.1);
  transform: translateY(-3px) scale(1.02);
  border-color: var(--accent-primary);
}

.shiny-toggle.active,
.shiny-toggle-large.active {
  background: var(--accent-primary);
  color: #000;
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
  border-color: var(--accent-primary);
  text-shadow: none;
}

.shiny-icon {
  font-size: 18px;
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.5));
}
/* ==========================================================================
   DASHBOARD 3.0 - MODULAR WIDGETS
   ========================================================================== */

.home-dashboard {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

/* Bonus Grid */
.bonus-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  margin-top: var(--space-md);
  margin-bottom: var(--space-lg);
}

.bonus-card {
  background: linear-gradient(180deg, var(--surface-elevated) 0%, #121a27 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  text-align: center;
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.bonus-card:hover {
  background: linear-gradient(180deg, #22304a 0%, #141b28 100%);
  transform: none;
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-md);
}

.bonus-value {
  display: block;
  font-size: 20px;
  font-weight: 800;
  color: var(--accent-primary);
  margin-bottom: 2px;
}

.bonus-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-secondary);
  font-weight: 700;
}

/* Leafeon Highlight Card */
.content-highlight {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  background: linear-gradient(180deg, #1c2636 0%, #141b28 100%);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  margin-top: var(--space-lg);
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.content-highlight-single {
  grid-template-columns: 1fr;
}

.content-highlight:hover {
  border-color: rgba(79, 179, 255, 0.3);
  box-shadow: var(--shadow-md);
}

.highlight-image {
  height: 100%;
  min-height: 220px;
  background-size: cover;
  background-position: center;
  position: relative;
  filter: saturate(1.05) contrast(1.02);
}

.highlight-info {
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-sm);
  background: rgba(9, 13, 20, 0.22);
}

.highlight-tag {
  background: var(--accent-secondary);
  color: #0b121a;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 800;
  width: fit-content;
  text-transform: uppercase;
}

.highlight-title {
  font-size: 22px;
  font-weight: 800;
  margin: 0;
}

.highlight-desc {
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 14px;
}

.changelog-line {
  margin: 0 0 var(--space-sm);
}

.changelog-section {
  margin-bottom: var(--space-md);
}

.changelog-section-title {
  font-size: 20px;
  font-weight: 800;
  margin: 0 0 var(--space-sm);
  color: var(--text-primary);
}

.changelog-subtitle {
  margin: var(--space-sm) 0 var(--space-xs);
  font-weight: 700;
  color: var(--text-primary);
}

.changelog-list {
  margin: 0 0 var(--space-sm);
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.changelog-list li {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
}

.highlight-meta {
  display: flex;
  gap: var(--space-lg);
  margin-top: var(--space-sm);
  flex-wrap: wrap;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.meta-item i {
  color: var(--accent-primary);
}

@media (max-width: 900px) {
  .bonus-grid {
    grid-template-columns: 1fr 1fr;
  }
  .content-highlight {
    grid-template-columns: 1fr;
  }
}


/* Layout Adjustments for Home 3.1 */
.home-main-grid {
  display: block; /* Remove grid to occupy full width */
  width: 100%;
}

.news-feed {
  width: 100%;
}

.spotlight-banner {
  min-height: 320px;
}


/* ==========================================================================
   SPOTLIGHT BANNER SYSTEM
   ========================================================================== */
.spotlight-banner {
  position: relative;
  width: 100%;
  min-height: 340px;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: var(--space-lg);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--bg-tertiary);
  box-shadow: var(--shadow-md);
}

.spotlight-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  transition: transform 0.5s ease;
  filter: saturate(1.08) contrast(1.05);
}

.spotlight-banner:hover .spotlight-bg {
  transform: none;
}

.spotlight-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    rgba(9, 13, 20, 0.95) 0%,
    rgba(9, 13, 20, 0.75) 55%,
    rgba(9, 13, 20, 0.35) 100%
  );
  display: flex;
  align-items: center;
  padding: 0 44px;
  backdrop-filter: blur(6px);
}

.spotlight-content {
  max-width: 620px;
  position: relative;
  z-index: 2;
}

.spotlight-tag {
  display: inline-block;
  background: var(--accent-secondary);
  color: #0b121a;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
  box-shadow: none;
}

.spotlight-title {
  font-size: clamp(24px, 4vw, 34px);
  font-weight: 800;
  margin-bottom: var(--space-sm);
  line-height: 1.2;
  font-family: 'Poppins', sans-serif;
}

.spotlight-desc {
  font-size: clamp(14px, 2vw, 16px);
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-lg);
}

@media (max-width: 1200px) {
  .app-layout {
    grid-template-columns: 240px 1fr;
  }

  .bento-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .portal-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .dex-body {
    grid-template-columns: 280px 1fr;
  }
}

@media (max-width: 1024px) {
  .hub-hero {
    padding: 56px 40px;
    margin-bottom: 60px;
  }

  .hero-brand {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-lg);
  }

  .hero-logo {
    width: 110px;
  }

  .hero-title {
    font-size: 42px;
  }

  .portal-grid {
    padding: 0 var(--space-lg);
  }

  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .spotlight-banner {
    min-height: 380px;
  }

  .spotlight-overlay {
    padding: 0 32px;
  }

  .talents-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }

  .admin-drop-form {
    grid-template-columns: 1fr 1fr;
  }

  .grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }

  .card {
    min-height: 300px;
  }

  .card-media {
    height: 180px;
  }
}

@media (max-width: 900px) {
  .dex-body {
    grid-template-columns: 1fr;
  }

  .dex-header {
    flex-wrap: wrap;
    gap: var(--space-sm);
  }

  .dex-tabs {
    flex-wrap: wrap;
  }

  .dex-right-panel {
    padding: var(--space-md);
  }

  .guide-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .guide-header-icon {
    width: 36px;
    height: 36px;
  }

  .guide-grid,
  .command-grid {
    grid-template-columns: 1fr;
  }

  .guide-option-layout {
    grid-template-columns: 1fr;
  }

  .command-list li {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .main-content {
    height: auto;
    overflow-y: visible;
  }

  .content-container {
    padding: var(--space-xl) var(--space-md);
  }

  .header-inner {
    flex-wrap: wrap;
    gap: var(--space-md);
  }

  .nav {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .sidebar-inner {
    padding: var(--space-lg) var(--space-md);
  }

  .sidebar-header {
    margin-bottom: var(--space-lg);
  }

  .sidebar-toggle {
    display: inline-flex;
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }

  .sidebar-logo {
    font-size: 16px;
    gap: var(--space-sm);
  }

  .sidebar-logo img {
    width: 32px;
    height: 32px;
    border-radius: 10px;
  }

  .sidebar-nav {
    gap: var(--space-lg);
  }

  .nav-section {
    gap: 4px;
  }

  .section-label {
    font-size: 10px;
    padding-left: 8px;
    margin-bottom: 6px;
  }

  .nav-item {
    padding: 8px 10px;
    gap: 10px;
    font-size: 12px;
    border-radius: 12px;
  }

  .nav-item i {
    width: 18px;
    height: 18px;
  }

  .sidebar-footer {
    padding-top: var(--space-lg);
  }

  .sidebar-nav,
  .sidebar-footer {
    display: none;
  }

  .sidebar.open .sidebar-nav {
    display: flex;
  }

  .sidebar.open .sidebar-footer {
    display: block;
  }

  .portal-grid {
    padding: 0 var(--space-md);
  }

  .bento-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }

  .bonus-grid {
    grid-template-columns: 1fr;
  }

  .spotlight-banner {
    min-height: auto;
  }

  .spotlight-overlay {
    position: relative;
    padding: 24px 20px 32px;
    align-items: flex-start;
    background: linear-gradient(180deg, rgba(5, 5, 8, 0.95) 0%, rgba(5, 5, 8, 0.7) 60%, rgba(5, 5, 8, 0.2) 100%);
  }

  .spotlight-content {
    max-width: 100%;
    width: 100%;
  }

  .bonus-grid {
    width: 100%;
  }

  .social-portal {
    grid-template-columns: 1fr;
  }

  .social-link {
    padding: 24px 28px;
  }

  .talent-header,
  .talent-requirements {
    padding: 24px;
  }

  .dex-body {
    padding: var(--space-md);
    grid-template-columns: 1fr;
  }

  .guide-section {
    padding: var(--space-md);
  }

  .guide-hero {
    padding: 20px 0;
  }

  .drops-grid {
    grid-template-columns: 1fr;
  }

  .drop-row {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }

  .drop-stats {
    justify-content: flex-start;
  }

  .drop-stat {
    min-width: 0;
  }

  .admin-drop-form {
    grid-template-columns: 1fr;
  }

  .grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }

  #pokedex-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .card {
    min-height: 260px;
    padding: var(--space-sm);
  }

  .card-media {
    height: 160px;
  }

  .card-header h3 {
    font-size: 18px;
  }
}

@media (max-width: 600px) {
  .hub-hero {
    padding: 40px 24px;
    margin-bottom: 40px;
  }

  .hero-title {
    font-size: 34px;
  }

  .hero-subtitle {
    font-size: 15px;
  }

  .spotlight-banner {
    min-height: auto;
  }

  .spotlight-overlay {
    padding: 20px 16px 28px;
  }

  .spotlight-title {
    font-size: 28px;
  }

  .spotlight-desc {
    font-size: 15px;
  }

  .dex-header {
    padding: var(--space-sm) var(--space-md);
    flex-direction: column;
    align-items: flex-start;
  }

  .dex-header > div {
    width: 100%;
    font-size: 14px;
    line-height: 1.3;
  }

  .dex-header .back {
    padding: 6px 10px;
    font-size: 12px;
    white-space: nowrap;
  }

  .dex-sprite {
    display: flex;
  }

  .portal-card {
    border-radius: 22px;
  }

  .pokedex-card {
    min-height: 220px;
  }

  .mini-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 24px;
  }

  .sidebar-inner {
    padding: var(--space-md);
  }

  .nav-item {
    font-size: 11px;
    padding: 7px 9px;
  }

  .nav-item i {
    width: 16px;
    height: 16px;
  }

  .nav-link {
    padding: 8px 10px;
    font-size: 12px;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  #pokedex-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .card {
    min-height: auto;
  }

  .card-media {
    height: 150px;
  }
}
