@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Roboto:wght@300;400;500;700&display=swap');

:root {
  --bg-primary: #1a1a2e;
  --bg-secondary: #16213e;
  --bg-card: #0f3460;
  --accent-red: #e94560;
  --accent-yellow: #ffd369;
  --accent-blue: #29b6f6;
  --accent-green: #4caf50;
  --text-primary: #e8eaf6;
  --text-secondary: #b0bec5;
  --text-muted: #78909c;
  --border-color: #1e3a5f;
  --shadow: 0 4px 20px rgba(0,0,0,0.5);
  --pixel-font: 'Press Start 2P', monospace;
  --body-font: 'Roboto', sans-serif;
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --radius: 8px;
  --radius-lg: 12px;
}

[data-theme="light"] {
  --bg-primary: #f5f5f5;
  --bg-secondary: #ffffff;
  --bg-card: #e8eaf6;
  --text-primary: #1a1a2e;
  --text-secondary: #455a64;
  --text-muted: #78909c;
  --border-color: #c5cae9;
  --shadow: 0 4px 20px rgba(0,0,0,0.15);
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--body-font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background 0.3s, color 0.3s;
}

/* ===================== SCROLLBAR ===================== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--accent-red); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-yellow); }

/* ===================== TYPOGRAPHY ===================== */
h1, h2, h3, h4, .pixel-text {
  font-family: var(--pixel-font);
  line-height: 1.4;
}

h1 { font-size: clamp(1rem, 3vw, 1.8rem); color: var(--accent-yellow); }
h2 { font-size: clamp(0.8rem, 2vw, 1.3rem); color: var(--accent-red); }
h3 { font-size: clamp(0.6rem, 1.5vw, 1rem); color: var(--text-primary); }

a { color: var(--accent-yellow); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent-red); }

/* ===================== HEADER ===================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(22, 33, 62, 0.97);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--accent-red);
  padding: 0 2rem;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 20px rgba(233,69,96,0.3);
}

.logo-wrap { display: flex; align-items: center; gap: 1rem; text-decoration: none; }
.logo-svg { width: 44px; height: 44px; flex-shrink: 0; }
.logo-text {
  font-family: var(--pixel-font);
  font-size: 0.85rem;
  color: var(--accent-yellow);
  text-shadow: 2px 2px 0 var(--accent-red);
  letter-spacing: 1px;
}
.logo-text span { color: var(--accent-red); }

.site-nav { display: flex; align-items: center; gap: 0.2rem; }
.site-nav a {
  font-family: var(--pixel-font);
  font-size: 0.55rem;
  padding: 0.5rem 0.7rem;
  border-radius: var(--radius);
  color: var(--text-secondary);
  transition: var(--transition);
  white-space: nowrap;
  border: 1px solid transparent;
}
.site-nav a:hover,
.site-nav a.active {
  color: var(--accent-yellow);
  background: rgba(233,69,96,0.15);
  border-color: var(--accent-red);
}

.header-actions { display: flex; align-items: center; gap: 0.75rem; }

.theme-toggle {
  background: none;
  border: 2px solid var(--accent-red);
  color: var(--accent-yellow);
  width: 38px; height: 38px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  transition: var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.theme-toggle:hover { background: var(--accent-red); }

.search-trigger {
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: var(--transition);
  display: flex; align-items: center; gap: 0.5rem;
}
.search-trigger:hover { border-color: var(--accent-yellow); color: var(--accent-yellow); }

.burger-btn {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px; height: 20px;
  background: none; border: none; cursor: pointer;
}
.burger-btn span {
  display: block; height: 2px;
  background: var(--accent-yellow);
  border-radius: 2px;
  transition: var(--transition);
}

/* ===================== HERO / BANNER ===================== */
.hero {
  position: relative;
  min-height: 80vh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(233,69,96,0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 50%, rgba(255,211,105,0.1) 0%, transparent 60%),
    radial-gradient(ellipse at 50% 100%, rgba(41,182,246,0.1) 0%, transparent 60%);
  pointer-events: none;
}

.hero-particles {
  position: absolute; inset: 0; overflow: hidden; pointer-events: none;
}

.hero-content {
  position: relative; z-index: 2;
  text-align: center;
  padding: 2rem;
  max-width: 900px;
}

.hero-badge {
  display: inline-block;
  font-family: var(--pixel-font);
  font-size: 0.55rem;
  padding: 0.4rem 1rem;
  background: rgba(233,69,96,0.2);
  border: 1px solid var(--accent-red);
  border-radius: 20px;
  color: var(--accent-red);
  margin-bottom: 1.5rem;
  animation: fadeInDown 0.6s ease;
}

.hero-title {
  font-family: var(--pixel-font);
  font-size: clamp(1.4rem, 5vw, 3rem);
  color: var(--accent-yellow);
  text-shadow: 4px 4px 0 var(--accent-red), 6px 6px 0 rgba(0,0,0,0.3);
  line-height: 1.2;
  margin-bottom: 1.5rem;
  animation: fadeInDown 0.8s ease;
}
.hero-title .highlight { color: var(--accent-red); }

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 2.5rem;
  animation: fadeInUp 1s ease;
}

.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; animation: fadeInUp 1.2s ease; }

/* ===================== BUTTONS ===================== */
.btn {
  font-family: var(--pixel-font);
  font-size: 0.6rem;
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius);
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
  display: inline-flex; align-items: center; gap: 0.5rem;
  text-decoration: none;
  letter-spacing: 0.5px;
}

.btn-primary {
  background: var(--accent-red);
  color: #fff;
  border-color: var(--accent-red);
  box-shadow: 0 4px 15px rgba(233,69,96,0.4);
}
.btn-primary:hover {
  background: #c73652;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(233,69,96,0.5);
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--accent-yellow);
  border-color: var(--accent-yellow);
}
.btn-secondary:hover {
  background: var(--accent-yellow);
  color: var(--bg-primary);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-color);
}
.btn-outline:hover { border-color: var(--accent-red); color: var(--accent-red); }

/* ===================== SECTIONS ===================== */
.section { padding: 5rem 2rem; }
.section-title {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}
.section-title::after {
  content: '';
  display: block;
  width: 80px; height: 3px;
  background: linear-gradient(90deg, var(--accent-red), var(--accent-yellow));
  margin: 1rem auto 0;
  border-radius: 2px;
}

.container { max-width: 1400px; margin: 0 auto; padding: 0 1rem; }

/* ===================== CARDS ===================== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.cards-grid-sm {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent-red), var(--accent-yellow));
  transform: scaleX(0);
  transition: transform 0.3s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--accent-red); }
.card:hover::before { transform: scaleX(1); }

.card-icon {
  width: 64px; height: 64px;
  margin-bottom: 1rem;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  background: rgba(255,255,255,0.05);
  border: 2px solid var(--border-color);
}
.card-title {
  font-family: var(--pixel-font);
  font-size: 0.65rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}
.card-desc { font-size: 0.85rem; color: var(--text-secondary); }
.card-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  margin-top: 0.5rem;
}

/* ===================== PIXEL ICONS (CSS art) ===================== */
.pixel-icon {
  image-rendering: pixelated;
  width: 48px; height: 48px;
  display: block;
}

/* NPC Icons using box-shadow pixel art */
.npc-icon, .boss-icon, .item-icon {
  width: 32px; height: 32px;
  position: relative;
  image-rendering: pixelated;
}

/* ===================== FILTERS ===================== */
.filters-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

.filter-btn {
  font-family: var(--pixel-font);
  font-size: 0.5rem;
  padding: 0.4rem 0.8rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  border-radius: 20px;
  cursor: pointer;
  transition: var(--transition);
}
.filter-btn:hover, .filter-btn.active {
  background: var(--accent-red);
  border-color: var(--accent-red);
  color: #fff;
}

/* ===================== SEARCH MODAL ===================== */
.search-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 10000;
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 10vh;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
  backdrop-filter: blur(6px);
}
.search-overlay.open { opacity: 1; pointer-events: all; }

.search-box {
  background: var(--bg-secondary);
  border: 2px solid var(--accent-red);
  border-radius: var(--radius-lg);
  width: 90%; max-width: 680px;
  overflow: hidden;
  transform: translateY(-20px);
  transition: transform 0.3s;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.search-overlay.open .search-box { transform: translateY(0); }

.search-input-wrap {
  display: flex; align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  gap: 1rem;
}
.search-input-wrap svg { color: var(--text-muted); flex-shrink: 0; }
.search-input {
  flex: 1;
  background: none; border: none; outline: none;
  font-size: 1.2rem;
  color: var(--text-primary);
  font-family: var(--body-font);
}
.search-close-btn {
  background: none; border: none;
  color: var(--text-muted); cursor: pointer; font-size: 1.5rem;
  padding: 0.2rem 0.5rem;
  transition: var(--transition);
}
.search-close-btn:hover { color: var(--accent-red); }

.search-results {
  max-height: 60vh; overflow-y: auto;
  padding: 1rem;
}
.search-result-item {
  display: flex; align-items: center; gap: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none; color: var(--text-primary);
}
.search-result-item:hover { background: var(--bg-card); }
.search-result-icon { font-size: 1.5rem; }
.search-result-text strong { display: block; font-size: 0.9rem; }
.search-result-text span { font-size: 0.8rem; color: var(--text-muted); }
.search-empty { text-align: center; padding: 2rem; color: var(--text-muted); font-size: 0.9rem; }
.search-hint { padding: 1rem; font-size: 0.75rem; color: var(--text-muted); border-top: 1px solid var(--border-color); }
.search-hint kbd {
  background: var(--bg-card);
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  border: 1px solid var(--border-color);
  font-family: monospace;
}

/* ===================== MODAL ===================== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.8);
  z-index: 9000;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
  backdrop-filter: blur(4px);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
  background: var(--bg-secondary);
  border: 2px solid var(--accent-red);
  border-radius: var(--radius-lg);
  max-width: 700px; width: 100%;
  max-height: 90vh; overflow-y: auto;
  transform: scale(0.95);
  transition: transform 0.3s;
  box-shadow: 0 20px 60px rgba(0,0,0,0.7);
}
.modal-overlay.open .modal { transform: scale(1); }

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-card);
}
.modal-title { font-family: var(--pixel-font); font-size: 0.9rem; color: var(--accent-yellow); }
.modal-close {
  background: none; border: none;
  color: var(--text-muted); cursor: pointer;
  font-size: 1.5rem; transition: var(--transition);
  line-height: 1;
}
.modal-close:hover { color: var(--accent-red); transform: rotate(90deg); }
.modal-body { padding: 1.5rem; }

.modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1rem; }

.stat-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
}
.stat-row:last-child { border-bottom: none; }
.stat-label { color: var(--text-muted); }
.stat-value { color: var(--accent-yellow); font-weight: 700; }

/* ===================== TABLE ===================== */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border-color); }
table { width: 100%; border-collapse: collapse; }
th {
  background: var(--bg-card);
  padding: 0.8rem 1rem;
  text-align: left;
  font-family: var(--pixel-font);
  font-size: 0.55rem;
  color: var(--accent-yellow);
  border-bottom: 2px solid var(--accent-red);
  white-space: nowrap;
}
td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.85rem;
  transition: background 0.2s;
}
tr:hover td { background: rgba(255,255,255,0.03); }
tr:last-child td { border-bottom: none; }

/* ===================== TABS ===================== */
.tabs-nav {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.5rem;
}
.tab-btn {
  font-family: var(--pixel-font);
  font-size: 0.55rem;
  padding: 0.6rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  border-radius: var(--radius) var(--radius) 0 0;
  cursor: pointer;
  transition: var(--transition);
  position: relative; bottom: -2px;
}
.tab-btn.active, .tab-btn:hover {
  background: var(--accent-red);
  border-color: var(--accent-red);
  color: #fff;
}

.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn 0.3s ease; }

/* ===================== CALCULATOR ===================== */
.calc-form {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 2rem;
  border: 1px solid var(--border-color);
}
.calc-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-label { font-family: var(--pixel-font); font-size: 0.5rem; color: var(--text-muted); }
.form-input, .form-select {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-family: var(--body-font);
  transition: border-color 0.2s;
}
.form-input:focus, .form-select:focus {
  outline: none; border-color: var(--accent-yellow);
}
.form-select option { background: var(--bg-secondary); }
.calc-result {
  background: var(--bg-secondary);
  border: 2px solid var(--accent-yellow);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  margin-top: 1.5rem;
}
.calc-result-num {
  font-family: var(--pixel-font);
  font-size: 2rem;
  color: var(--accent-yellow);
  display: block;
  text-shadow: 2px 2px 0 var(--accent-red);
}
.calc-result-label { color: var(--text-muted); font-size: 0.85rem; }

/* ===================== STATS BARS ===================== */
.stat-bar-wrap { margin-bottom: 0.75rem; }
.stat-bar-label { display: flex; justify-content: space-between; font-size: 0.8rem; margin-bottom: 0.3rem; color: var(--text-muted); }
.stat-bar-track {
  height: 8px; background: var(--bg-primary);
  border-radius: 4px; overflow: hidden;
}
.stat-bar-fill {
  height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, var(--accent-red), var(--accent-yellow));
  transition: width 0.6s ease;
}

/* ===================== FOOTER ===================== */
.site-footer {
  background: var(--bg-secondary);
  border-top: 2px solid var(--accent-red);
  padding: 3rem 2rem 1.5rem;
  margin-top: auto;
}
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; max-width: 1200px; margin: 0 auto 2rem; }
.footer-col-title {
  font-family: var(--pixel-font);
  font-size: 0.6rem;
  color: var(--accent-yellow);
  margin-bottom: 1rem;
}
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.footer-links a { color: var(--text-secondary); font-size: 0.85rem; }
.footer-links a:hover { color: var(--accent-yellow); padding-left: 0.3rem; }
.footer-bottom {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
}
.footer-bottom span { color: var(--accent-red); }

/* ===================== BREADCRUMBS ===================== */
.breadcrumbs {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.8rem; color: var(--text-muted);
  margin-bottom: 2rem;
}
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--accent-yellow); }
.breadcrumbs .sep { color: var(--accent-red); }

/* ===================== PAGE HERO ===================== */
.page-hero {
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-primary));
  border-bottom: 2px solid var(--accent-red);
  padding: 3rem 2rem;
  position: relative; overflow: hidden;
}
.page-hero::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 80% 50%, rgba(233,69,96,0.1), transparent 70%);
  pointer-events: none;
}
.page-hero-content { position: relative; z-index: 1; max-width: 1400px; margin: 0 auto; }
.page-hero-title { margin-bottom: 0.75rem; }
.page-hero-desc { color: var(--text-secondary); max-width: 600px; }

/* ===================== FAVORITES ===================== */
.fav-btn {
  background: none; border: none;
  color: var(--text-muted); cursor: pointer;
  font-size: 1.2rem; transition: var(--transition);
  padding: 0.2rem;
}
.fav-btn:hover, .fav-btn.active { color: var(--accent-yellow); }
.fav-btn.active { text-shadow: 0 0 10px var(--accent-yellow); }

/* ===================== TAGS ===================== */
.tag {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  margin: 0.1rem;
}
.tag-red { background: rgba(233,69,96,0.2); color: var(--accent-red); border: 1px solid var(--accent-red); }
.tag-yellow { background: rgba(255,211,105,0.2); color: var(--accent-yellow); border: 1px solid var(--accent-yellow); }
.tag-blue { background: rgba(41,182,246,0.2); color: var(--accent-blue); border: 1px solid var(--accent-blue); }
.tag-green { background: rgba(76,175,80,0.2); color: var(--accent-green); border: 1px solid var(--accent-green); }
.tag-gray { background: rgba(120,144,156,0.2); color: var(--text-muted); border: 1px solid var(--text-muted); }

/* ===================== PROGRESS PATH ===================== */
.progress-path { position: relative; padding-left: 2rem; }
.progress-path::before {
  content: ''; position: absolute; left: 0.6rem; top: 0; bottom: 0;
  width: 2px; background: linear-gradient(180deg, var(--accent-red), var(--accent-yellow));
}
.path-step {
  position: relative; margin-bottom: 1.5rem;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.25rem 1.25rem 1.5rem;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}
.path-step::before {
  content: ''; position: absolute;
  left: -1.7rem; top: 50%; transform: translateY(-50%);
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent-red);
  border: 2px solid var(--bg-primary);
  box-shadow: 0 0 10px var(--accent-red);
}
.path-step:hover { border-color: var(--accent-red); transform: translateX(4px); }
.path-step-num {
  font-family: var(--pixel-font);
  font-size: 0.5rem;
  color: var(--accent-red);
  margin-bottom: 0.4rem;
}
.path-step-title { font-family: var(--pixel-font); font-size: 0.7rem; margin-bottom: 0.5rem; }
.path-step-desc { font-size: 0.85rem; color: var(--text-secondary); }

/* ===================== COMPARISON TABLE ===================== */
.compare-table th, .compare-table td { text-align: center; }
.compare-table td:first-child { text-align: left; font-weight: 600; }
.compare-winner { color: var(--accent-green); font-weight: 700; }

/* ===================== NOTIFICATION ===================== */
.toast-container { position: fixed; bottom: 2rem; right: 2rem; z-index: 20000; display: flex; flex-direction: column; gap: 0.5rem; }
.toast {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--accent-yellow);
  padding: 0.8rem 1.2rem;
  border-radius: var(--radius);
  font-size: 0.85rem;
  box-shadow: var(--shadow);
  animation: slideInRight 0.3s ease;
  min-width: 250px;
}
.toast.success { border-left-color: var(--accent-green); }
.toast.error { border-left-color: var(--accent-red); }

/* ===================== ANIMATIONS ===================== */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes float { 0%,100% { transform: translateY(0px); } 50% { transform: translateY(-15px); } }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes shimmer {
  0% { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}

.animate-float { animation: float 3s ease-in-out infinite; }
.animate-pulse { animation: pulse 2s ease-in-out infinite; }
.animate-spin { animation: spin 10s linear infinite; }

/* ===================== LAZY LOAD ===================== */
img.lazy { opacity: 0; transition: opacity 0.4s; }
img.lazy.loaded { opacity: 1; }
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-secondary) 50%, var(--bg-card) 75%);
  background-size: 1000px 100%;
  animation: shimmer 2s infinite;
  border-radius: var(--radius);
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 900px) {
  .site-nav { display: none; position: fixed; top: 70px; left: 0; right: 0; background: var(--bg-secondary); border-bottom: 2px solid var(--accent-red); flex-direction: column; padding: 1rem; gap: 0.5rem; z-index: 999; }
  .site-nav.open { display: flex; }
  .site-nav a { font-size: 0.6rem; text-align: center; }
  .burger-btn { display: flex; }
  .logo-text { font-size: 0.65rem; }
}

@media (max-width: 600px) {
  .section { padding: 3rem 1rem; }
  .hero { min-height: 60vh; }
  .hero-title { font-size: 1.2rem; }
  .modal-grid { grid-template-columns: 1fr; }
  .cards-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .calc-row { grid-template-columns: 1fr; }
  .site-header { padding: 0 1rem; }
  .header-actions .search-trigger span { display: none; }
}

/* ===================== NAV DROPDOWN ===================== */
.nav-dropdown { position: relative; display: inline-block; }
.nav-dropdown-toggle {
  font-family: var(--pixel-font);
  font-size: 0.55rem;
  padding: 0.5rem 0.7rem;
  border-radius: var(--radius);
  color: var(--text-secondary);
  transition: var(--transition);
  cursor: pointer;
  border: 1px solid transparent;
}
.nav-dropdown-toggle:hover { color: var(--accent-yellow); background: rgba(233,69,96,0.15); border-color: var(--accent-red); }
.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + .3rem);
  left: 0;
  background: var(--bg-secondary);
  border: 2px solid var(--accent-red);
  border-radius: var(--radius-lg);
  min-width: 240px;
  box-shadow: 0 12px 35px rgba(0,0,0,0.5);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
  transition: all .25s;
  z-index: 1001;
  padding: .4rem;
}
.nav-dropdown.open .nav-dropdown-menu {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}
.nav-dropdown-menu a {
  display: block;
  padding: .6rem .8rem;
  font-family: var(--body-font);
  font-size: 0.85rem;
  border-radius: var(--radius);
  color: var(--text-secondary);
  text-decoration: none;
  white-space: nowrap;
  transition: var(--transition);
}
.nav-dropdown-menu a:hover {
  background: var(--bg-card);
  color: var(--accent-yellow);
  padding-left: 1rem;
}

@media (max-width: 900px) {
  .nav-dropdown { width: 100%; }
  .nav-dropdown-menu {
    position: static;
    width: 100%;
    border: 1px solid var(--border-color);
    opacity: 1;
    pointer-events: all;
    transform: none;
    box-shadow: none;
    margin-top: .3rem;
    display: none;
  }
  .nav-dropdown.open .nav-dropdown-menu { display: block; }
}

/* ===================== ICON IMAGES ===================== */
.icon-wrap img {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
.icon-emoji {
  user-select: none;
}

/* ===================== SEARCH GROUPS ===================== */
.search-group { margin-bottom: .5rem; }
.search-group:last-child { margin-bottom: 0; }
.search-group-header {
  position: sticky;
  top: 0;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  z-index: 1;
}
.search-result-item:hover .icon-wrap { transform: scale(1.1); transition: transform .15s; }

/* ===================== BOSS DEFEATED ===================== */
.boss-defeated {
  border-color: var(--accent-green) !important;
  position: relative;
}
.boss-defeated::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(76,175,80,0.05), transparent);
  border-radius: var(--radius-lg);
  pointer-events: none;
}

/* ===================== TRACKER ===================== */
.tracker-card-done { opacity: 0.7; }

/* ===================== UTILITY ===================== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
