/* =====================================================
   GHOLDENGONZAA TOOLS — Design System
   Palette: Gold #D4A017 | Violet #6B21A8 | Black #0A0A0A
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:wght@400;500;600;700&family=Oswald:wght@400;500;600;700&display=swap');

/* === CSS Variables === */
:root {
  --gold: #D4A017;
  --gold-light: #F5D76E;
  --gold-dark: #A67C00;
  --violet: #6B21A8;
  --violet-light: #8B5CF6;
  --violet-dark: #4A0080;
  --black: #0A0A0A;
  --surface: #141414;
  --surface-2: #1E1E1E;
  --surface-3: #2A2A2A;
  --border: #333;
  --text: #F5F5F5;
  --text-muted: #999;
  --emerald: #10B981;
  --red: #EF4444;
  --font-display: 'Bebas Neue', 'Oswald', sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,0.5);
  --shadow-gold: 0 0 20px rgba(212,160,23,0.15);
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

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

a { color: var(--gold); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold-light); }

img { max-width: 100%; display: block; }

/* === Layout === */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* === Header / Navbar === */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,10,10,0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
}
.navbar-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.navbar-logo {
  font-family: var(--font-display);
  font-size: 1.6rem; letter-spacing: 2px;
  color: var(--gold);
  display: flex; align-items: center; gap: 10px;
}
.navbar-logo span { color: var(--text); font-size: 1rem; letter-spacing: 0; font-family: var(--font-body); opacity: 0.6; }
.nav-links { display: flex; gap: 8px; list-style: none; }
.nav-links a {
  padding: 8px 16px; border-radius: var(--radius-sm);
  color: var(--text-muted); font-weight: 500; font-size: 0.9rem;
  transition: all var(--transition);
}
.nav-links a:hover, .nav-links a.active {
  color: var(--gold); background: rgba(212,160,23,0.1);
}
.nav-social { display: flex; gap: 12px; }
.nav-social a { color: var(--text-muted); font-size: 1.2rem; }
.nav-social a:hover { color: var(--gold); }

/* === Hero Section === */
.hero {
  text-align: center; padding: 80px 20px 60px;
  background: radial-gradient(ellipse at center top, rgba(107,33,168,0.15) 0%, transparent 60%);
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  letter-spacing: 4px;
  background: linear-gradient(135deg, var(--gold-light), var(--gold), var(--gold-dark));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
}
.hero p { color: var(--text-muted); font-size: 1.15rem; max-width: 600px; margin: 0 auto 32px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 8px 20px; border-radius: 50px;
  font-size: 0.85rem; color: var(--text-muted);
}
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--emerald); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

/* === Section Titles === */
.section-title {
  font-family: var(--font-display);
  font-size: 2rem; letter-spacing: 2px;
  color: var(--gold);
  margin-bottom: 32px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--surface-3);
}

/* === Tier List === */
.tier-container { display: flex; flex-direction: column; gap: 4px; margin-bottom: 40px; }
.tier-row {
  display: flex; align-items: stretch; min-height: 80px;
  border-radius: var(--radius-sm); overflow: hidden;
  background: var(--surface);
}
.tier-label {
  width: 80px; min-width: 80px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 2rem; letter-spacing: 2px;
  color: var(--black); font-weight: 700;
}
.tier-label.tier-s { background: #FF7F7F; }
.tier-label.tier-a { background: #FFBF7F; }
.tier-label.tier-b { background: #FFDF7F; }
.tier-label.tier-c { background: #FFFF7F; }
.tier-label.tier-d { background: #BFFF7F; }
.tier-label.tier-e { background: #7FFF7F; }

.tier-pokemon {
  flex: 1; display: flex; flex-wrap: wrap; align-items: center;
  padding: 8px; gap: 4px;
  min-height: 80px;
  border-left: 2px solid var(--surface-3);
}

/* === Pokémon Card (in tier list & roster) === */
.poke-card {
  width: 64px; height: 64px;
  background: var(--surface-2);
  border: 2px solid var(--surface-3);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  cursor: grab; position: relative;
  transition: all var(--transition);
}
.poke-card:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow-gold);
  transform: scale(1.1);
  z-index: 10;
}
.poke-card img { width: 48px; height: 48px; image-rendering: pixelated; }
.poke-card.mega { border-color: var(--violet-light); }
.poke-card.mega:hover { border-color: var(--violet); box-shadow: 0 0 20px rgba(139,92,246,0.3); }

/* Tooltip */
.poke-tooltip {
  display: none; position: absolute; bottom: calc(100% + 8px); left: 50%;
  transform: translateX(-50%);
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 8px 12px;
  white-space: nowrap; z-index: 100;
  font-size: 0.8rem; pointer-events: none;
  box-shadow: var(--shadow);
}
.poke-card:hover .poke-tooltip { display: block; }
.poke-tooltip .name { font-weight: 700; color: var(--gold); }

/* === Roster (untiered pool) === */
.roster-pool {
  background: var(--surface);
  border: 2px dashed var(--surface-3);
  border-radius: var(--radius);
  padding: 16px; min-height: 120px;
  display: flex; flex-wrap: wrap; gap: 4px;
  align-items: flex-start; align-content: flex-start;
}
.roster-pool-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px;
}

/* === Filters / Search === */
.filters-bar {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 24px; align-items: center;
}
.search-input {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 16px;
  color: var(--text); font-size: 0.9rem;
  flex: 1; min-width: 200px;
  transition: border-color var(--transition);
}
.search-input:focus { outline: none; border-color: var(--gold); }
.search-input::placeholder { color: var(--text-muted); }

.filter-btn {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 8px 16px;
  color: var(--text-muted); cursor: pointer; font-size: 0.85rem;
  transition: all var(--transition);
}
.filter-btn:hover { border-color: var(--gold); color: var(--gold); }
.filter-btn.active { background: var(--gold); color: var(--black); border-color: var(--gold); font-weight: 600; }

/* === Type Badges === */
.type-badge {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.5px; color: #fff;
}
.type-normal { background: #A8A878; } .type-fire { background: #F08030; }
.type-water { background: #6890F0; } .type-electric { background: #F8D030; color: #333; }
.type-grass { background: #78C850; } .type-ice { background: #98D8D8; color: #333; }
.type-fighting { background: #C03028; } .type-poison { background: #A040A0; }
.type-ground { background: #E0C068; color: #333; } .type-flying { background: #A890F0; }
.type-psychic { background: #F85888; } .type-bug { background: #A8B820; }
.type-rock { background: #B8A038; } .type-ghost { background: #705898; }
.type-dragon { background: #7038F8; } .type-dark { background: #705848; }
.type-steel { background: #B8B8D0; color: #333; } .type-fairy { background: #EE99AC; }

/* === Buttons === */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 24px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 0.9rem; cursor: pointer;
  border: none; transition: all var(--transition);
}
.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--black);
}
.btn-gold:hover { box-shadow: var(--shadow-gold); transform: translateY(-1px); }
.btn-outline {
  background: transparent; border: 1px solid var(--border);
  color: var(--text-muted);
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }

/* === Footer === */
.footer {
  margin-top: 80px; padding: 40px 20px;
  border-top: 1px solid var(--border);
  text-align: center; color: var(--text-muted); font-size: 0.85rem;
}
.footer a { color: var(--gold); }
.footer-links { display: flex; justify-content: center; gap: 24px; margin-bottom: 16px; }

/* === Responsive === */
@media (max-width: 768px) {
  .navbar-inner { flex-wrap: wrap; height: auto; padding: 12px 0; gap: 8px; }
  .nav-links { width: 100%; justify-content: center; }
  .nav-social { display: none; }
  .tier-label { width: 50px; min-width: 50px; font-size: 1.5rem; }
  .poke-card { width: 48px; height: 48px; }
  .poke-card img { width: 36px; height: 36px; }
  .filters-bar { flex-direction: row; justify-content: center; }
}

/* === Animations === */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn 0.4s ease-out; }

/* === Scrollbar === */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--black); }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-dark); }

/* === Mega Toggle Button === */
.mega-btn {
  position: absolute;
  top: 4px;
  left: 4px;
  background: var(--violet);
  border: 1px solid var(--violet-light);
  border-radius: 12px;
  width: auto;
  padding: 2px 6px;
  height: 24px;
  cursor: pointer;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 5px rgba(139,92,246,0.8);
  font-size: 12px;
  z-index: 5;
  transition: all 0.2s;
}
.mega-btn:hover {
  transform: scale(1.2);
  background: var(--gold);
  border-color: white;
}
.team-slot.mega-active {
  border-color: var(--violet);
  box-shadow: inset 0 0 10px rgba(139,92,246,0.2);
}

/* === Scroll to Top Button === */
.scroll-top-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--gold);
  color: var(--black);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
  z-index: 1000;
  transition: all 0.3s;
  opacity: 0;
  pointer-events: none;
}
.scroll-top-btn.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.scroll-top-btn:hover {
  background: white;
  transform: scale(1.1);
}
