/* ============================================================
   Ark: Survival Evolved - Game Guide Global Stylesheet
   Dark Gaming Theme
   ============================================================ */

/* ------------------------------------------------------------
   1. CSS Variables
   ------------------------------------------------------------ */
:root {
  --bg-primary: #0a0e17;
  --bg-secondary: #131a2b;
  --bg-card: #1a2340;
  --bg-card-hover: #222d50;
  --text-primary: #e8eaf0;
  --text-secondary: #8892a8;
  --accent: #f0a030;
  --accent-hover: #ffc04d;
  --accent-glow: rgba(240, 160, 48, 0.3);
  --danger: #e74c3c;
  --success: #2ecc71;
  --info: #3498db;
  --border: #2a3555;
  --radius: 8px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  --transition: all 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
}

::selection {
  background-color: var(--accent);
  color: var(--bg-primary);
}

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

a {
  color: inherit;
}

ul, ol {
  list-style: none;
}

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

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

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

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

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border) var(--bg-primary);
}

/* ------------------------------------------------------------
   4. Navigation (.navbar)
   ------------------------------------------------------------ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 70px;
  background-color: rgba(19, 26, 43, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 5%;
  z-index: 100;
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  color: var(--accent);
  font-size: 1.5rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.5px;
  transition: var(--transition);
}

.nav-logo:hover {
  color: var(--accent-hover);
  text-shadow: 0 0 15px var(--accent-glow);
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  transition: var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent);
  transition: var(--transition);
}

.nav-links a:hover {
  color: var(--accent);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 5px;
}

.nav-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -6px);
}

.nav-menu {
  position: fixed;
  top: 70px;
  right: -100%;
  width: 280px;
  height: calc(100vh - 70px);
  background-color: var(--bg-secondary);
  border-left: 1px solid var(--border);
  transition: right 0.4s ease;
  padding: 2rem;
  z-index: 99;
}

.nav-menu.active {
  right: 0;
}

.nav-menu a {
  display: block;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.75rem 0;
  font-size: 1rem;
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.nav-menu a:hover {
  color: var(--accent);
  padding-left: 0.5rem;
}

/* ------------------------------------------------------------
   5. Hero Section (.hero)
   ------------------------------------------------------------ */
.hero {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem 5%;
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 50%, #1a2340 0%, #0f1525 40%, #0a0e17 70%);
}

.hero::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  opacity: 0.4;
  animation: pulse 4s ease-in-out infinite;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    radial-gradient(1px 1px at 10% 20%, rgba(240, 160, 48, 0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 30% 60%, rgba(240, 160, 48, 0.3) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 50% 10%, rgba(240, 160, 48, 0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 70% 40%, rgba(240, 160, 48, 0.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 90% 80%, rgba(240, 160, 48, 0.4) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 15% 85%, rgba(240, 160, 48, 0.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 45% 75%, rgba(240, 160, 48, 0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 80% 15%, rgba(240, 160, 48, 0.3) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 60% 90%, rgba(240, 160, 48, 0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 25% 35%, rgba(240, 160, 48, 0.3) 0%, transparent 100%);
  animation: float 6s ease-in-out infinite;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--text-primary);
  text-shadow:
    0 0 20px var(--accent-glow),
    0 0 40px rgba(240, 160, 48, 0.15);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero-title span {
  color: var(--accent);
}

.hero-subtitle {
  color: var(--text-secondary);
  font-size: 1.2rem;
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-block;
  padding: 14px 32px;
  background-color: var(--accent);
  color: var(--bg-primary);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  box-shadow: 0 0 25px var(--accent-glow), 0 4px 15px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

.btn-secondary {
  display: inline-block;
  padding: 14px 32px;
  background-color: transparent;
  color: var(--accent);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}

.btn-secondary:hover {
  background-color: rgba(240, 160, 48, 0.1);
  box-shadow: 0 0 20px var(--accent-glow);
  transform: translateY(-2px);
}

.hero-float {
  position: absolute;
  border-radius: 50%;
  opacity: 0.15;
  pointer-events: none;
  animation: float 5s ease-in-out infinite;
}

.hero-float:nth-child(1) {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  top: 10%;
  left: -5%;
  animation-delay: 0s;
}

.hero-float:nth-child(2) {
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, var(--info) 0%, transparent 70%);
  bottom: 15%;
  right: -3%;
  animation-delay: 1.5s;
}

.hero-float:nth-child(3) {
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, var(--success) 0%, transparent 70%);
  top: 20%;
  right: 10%;
  animation-delay: 3s;
}

/* ------------------------------------------------------------
   6. Section Layout
   ------------------------------------------------------------ */
.section {
  padding: 80px 5%;
  max-width: 1400px;
  margin: 0 auto;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background-color: var(--accent);
  margin: 0.75rem auto 0;
  border-radius: 2px;
}

.section-subtitle {
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 3rem;
  font-size: 1rem;
}

/* ------------------------------------------------------------
   7. Card Grid
   ------------------------------------------------------------ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.card {
  background-color: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: var(--transition);
  cursor: pointer;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}

.card-image {
  height: 200px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.card-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 12px;
  background-color: var(--accent);
  color: var(--bg-primary);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-content {
  padding: 1.5rem;
}

.card-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.card-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ------------------------------------------------------------
   8. Feature Cards
   ------------------------------------------------------------ */
.feature-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 30px var(--accent-glow), var(--shadow);
  border-color: var(--accent);
}

.feature-icon {
  width: 60px;
  height: 60px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  font-size: 1.5rem;
  color: var(--accent);
  transition: var(--transition);
}

.feature-card:hover .feature-icon {
  background-color: var(--accent);
  color: var(--bg-primary);
  box-shadow: 0 0 20px var(--accent-glow);
}

.feature-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.feature-card .feature-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
}

.feature-card .feature-link:hover {
  color: var(--accent-hover);
  text-shadow: 0 0 10px var(--accent-glow);
}

/* ------------------------------------------------------------
   9. Search & Filter Bar
   ------------------------------------------------------------ */
.search-bar {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.search-input {
  flex: 1;
  min-width: 250px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 20px;
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
}

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

.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
}

.filter-btn {
  padding: 10px 20px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.filter-btn.active {
  background-color: var(--accent);
  color: var(--bg-primary);
  border-color: var(--accent);
  font-weight: 600;
}

/* ------------------------------------------------------------
   10. Dino Card
   ------------------------------------------------------------ */
.dino-card {
  background-color: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: var(--transition);
  cursor: pointer;
}

.dino-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}

.dino-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  padding: 0 1.5rem 1.5rem;
}

.dino-stat {
  background-color: var(--bg-secondary);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
}

.dino-stat-label {
  color: var(--text-secondary);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dino-stat-value {
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 700;
}

.taming-difficulty {
  font-weight: 600;
  font-size: 0.85rem;
  padding: 2px 8px;
  border-radius: 4px;
}

.taming-difficulty.easy {
  color: var(--success);
  background-color: rgba(46, 204, 113, 0.1);
}

.taming-difficulty.medium {
  color: var(--accent);
  background-color: rgba(240, 160, 48, 0.1);
}

.taming-difficulty.hard {
  color: var(--danger);
  background-color: rgba(231, 76, 60, 0.1);
}

/* ------------------------------------------------------------
   11. Recipe Table
   ------------------------------------------------------------ */
.recipe-table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
}

.recipe-table th {
  background-color: var(--bg-secondary);
  color: var(--accent);
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--accent);
}

.recipe-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 0.9rem;
}

.recipe-table tr:hover td {
  background-color: var(--bg-card-hover);
}

.recipe-table tr:last-child td {
  border-bottom: none;
}

.material-tag {
  display: inline-block;
  background-color: var(--bg-secondary);
  color: var(--text-secondary);
  font-size: 0.8rem;
  padding: 2px 8px;
  margin: 2px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

/* ------------------------------------------------------------
   12. Map Section
   ------------------------------------------------------------ */
.map-container {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  aspect-ratio: 1;
  background-color: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}

.map-svg {
  width: 100%;
  height: 100%;
}

.map-marker {
  position: absolute;
  width: 20px;
  height: 20px;
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition: var(--transition);
  z-index: 2;
}

.map-marker::before {
  content: '';
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-color: var(--accent);
  border: 2px solid var(--bg-primary);
  box-shadow: 0 0 8px var(--accent-glow);
}

.map-marker:hover {
  transform: translate(-50%, -50%) scale(1.5);
  filter: drop-shadow(0 0 10px var(--accent-glow));
}

.map-legend {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.legend-dot.cave {
  background-color: var(--accent);
}

.legend-dot.resource {
  background-color: var(--success);
}

.legend-dot.obelisk {
  background-color: var(--info);
}

.legend-dot.danger {
  background-color: var(--danger);
}

.legend-dot.spawn {
  background-color: #9b59b6;
}

/* ------------------------------------------------------------
   13. Guide Section
   ------------------------------------------------------------ */
.guide-timeline {
  position: relative;
  padding-left: 40px;
}

.guide-timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 15px;
  width: 2px;
  height: 100%;
  background-color: var(--accent);
  opacity: 0.4;
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -48px;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: var(--accent);
  border: 3px solid var(--bg-primary);
  box-shadow: 0 0 8px var(--accent-glow);
}

.timeline-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.timeline-content {
  background-color: var(--bg-card);
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  color: var(--text-primary);
  line-height: 1.7;
}

.tip-box {
  background-color: rgba(240, 160, 48, 0.08);
  border-left: 3px solid var(--accent);
  padding: 1rem;
  margin: 1rem 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-primary);
  font-size: 0.9rem;
  line-height: 1.6;
}

.tip-box strong {
  color: var(--accent);
}

.warning-box {
  background-color: rgba(231, 76, 60, 0.08);
  border-left: 3px solid var(--danger);
  padding: 1rem;
  margin: 1rem 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-primary);
  font-size: 0.9rem;
  line-height: 1.6;
}

.warning-box strong {
  color: var(--danger);
}

/* ------------------------------------------------------------
   14. Modal
   ------------------------------------------------------------ */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  display: none;
  justify-content: center;
  align-items: center;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background-color: var(--bg-card);
  border-radius: 12px;
  max-width: 700px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  border: 1px solid var(--border);
  animation: modalSlideIn 0.3s ease;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  font-size: 1.3rem;
  color: var(--text-primary);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  transition: var(--transition);
  line-height: 1;
  padding: 0.25rem;
}

.modal-close:hover {
  color: var(--danger);
}

.modal-body {
  padding: 1.5rem;
  color: var(--text-primary);
  line-height: 1.7;
}

/* ------------------------------------------------------------
   15. Footer
   ------------------------------------------------------------ */
.footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 3rem 5% 1.5rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.footer-title {
  color: var(--accent);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-bottom {
  text-align: center;
  color: var(--text-secondary);
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
}

/* ------------------------------------------------------------
   16. Animations
   ------------------------------------------------------------ */
@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

@keyframes glow {
  0%,
  100% {
    box-shadow: 0 0 5px var(--accent-glow);
  }
  50% {
    box-shadow: 0 0 20px var(--accent-glow), 0 0 40px rgba(240, 160, 48, 0.15);
  }
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ------------------------------------------------------------
   17. Responsive
   ------------------------------------------------------------ */
@media (max-width: 1024px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .section {
    padding: 60px 4%;
  }

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

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

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
  }

  .nav-menu {
    right: -100%;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .section {
    padding: 60px 4%;
  }

  .section-title {
    font-size: 1.6rem;
  }

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

  .modal {
    width: 95%;
    max-height: 90vh;
  }

  .recipe-table {
    font-size: 0.85rem;
  }

  .recipe-table th,
  .recipe-table td {
    padding: 8px 10px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.5rem;
  }

  .hero-subtitle {
    font-size: 0.9rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    max-width: 280px;
    text-align: center;
  }

  .search-bar {
    flex-direction: column;
  }

  .search-input {
    min-width: 100%;
  }

  .filter-btn {
    width: 100%;
    text-align: center;
  }

  .section-title {
    font-size: 1.4rem;
  }

  .dino-stats {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    padding: 0 1rem 1rem;
  }

  .map-container {
    aspect-ratio: auto;
    height: 300px;
  }

  .guide-timeline {
    padding-left: 30px;
  }

  .timeline-dot {
    left: -38px;
    width: 12px;
    height: 12px;
  }

  .timeline-title {
    font-size: 1.1rem;
  }

  .timeline-content {
    padding: 1rem;
  }
}

/* ------------------------------------------------------------
   18. Utility Classes
   ------------------------------------------------------------ */
.text-accent {
  color: var(--accent);
}

.text-success {
  color: var(--success);
}

.text-danger {
  color: var(--danger);
}

.text-info {
  color: var(--info);
}

.mt-1 {
  margin-top: 0.5rem;
}

.mt-2 {
  margin-top: 1rem;
}

.mt-3 {
  margin-top: 1.5rem;
}

.mt-4 {
  margin-top: 2rem;
}

.mb-1 {
  margin-bottom: 0.5rem;
}

.mb-2 {
  margin-bottom: 1rem;
}

.mb-3 {
  margin-bottom: 1.5rem;
}

.mb-4 {
  margin-bottom: 2rem;
}

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

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.hidden {
  display: none !important;
}

.show {
  display: block !important;
}

/* ------------------------------------------------------------
   19. Image Loading Styles
   ------------------------------------------------------------ */
.creature-image-wrapper {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-secondary);
  flex-shrink: 0;
}

.creature-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: opacity 0.3s ease;
}

.image-loader {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
}

.loading-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.image-fallback {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
}

.creature-emoji {
  font-size: 2.5rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Modal Image Styles */
.modal-image-container {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--accent);
  flex-shrink: 0;
  position: relative;
  background: var(--bg-card);
}

.modal-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: opacity 0.3s ease;
}

.modal-image-fallback {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
}

.modal-emoji {
  font-size: 2rem;
}

/* ------------------------------------------------------------
   20. Enhanced Mobile Styles
   ------------------------------------------------------------ */

/* Mobile Card Grid */
@media (max-width: 768px) {
  /* Better card grid */
  .card-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  /* Touch-friendly filter buttons */
  .filter-btn {
    min-height: 44px;
    min-width: 44px;
    padding: 12px 20px;
    font-size: 0.95rem;
  }

  /* Collapsible filter section */
  .filter-section {
    position: relative;
    top: auto;
  }

  .filter-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    margin-bottom: 10px;
  }

  .filter-toggle::after {
    content: '▼';
    font-size: 0.8rem;
    transition: transform 0.3s ease;
  }

  .filter-toggle.active::after {
    transform: rotate(180deg);
  }

  .filter-groups {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .filter-groups.expanded {
    max-height: 1000px;
  }

  /* Bottom Navigation for Mobile */
  .mobile-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    z-index: 1000;
    justify-content: space-around;
    align-items: center;
    padding: 0 10px;
  }

  .mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    min-height: 44px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.7rem;
    gap: 4px;
    transition: var(--transition);
  }

  .mobile-nav-item.active,
  .mobile-nav-item:hover {
    color: var(--accent);
  }

  .mobile-nav-icon {
    font-size: 1.3rem;
  }

  /* Add padding to body for bottom nav */
  body {
    padding-bottom: 70px;
  }

  /* Hide desktop nav on mobile */
  .navbar {
    height: 60px;
  }

  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  /* Optimized font sizes */
  .hero-title {
    font-size: 1.8rem;
  }

  .hero-subtitle {
    font-size: 0.95rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .card-title {
    font-size: 1.1rem;
  }

  .card-desc {
    font-size: 0.85rem;
  }

  /* Better modal sizing */
  .modal {
    width: 95%;
    max-height: 85vh;
    margin: 10px;
  }

  .modal-header {
    padding: 15px;
  }

  .modal-body {
    padding: 15px;
  }

  .modal-title-text h2 {
    font-size: 1.2rem;
  }

  /* Touch-friendly pagination */
  .page-btn {
    min-width: 44px;
    min-height: 44px;
    font-size: 1rem;
  }

  /* Swipe hint for carousel */
  .swipe-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    padding: 10px;
    margin-top: 10px;
  }

  .swipe-hint::before,
  .swipe-hint::after {
    content: '◀';
    font-size: 0.7rem;
  }

  .swipe-hint::after {
    content: '▶';
  }

  /* Better search input */
  .search-input {
    min-height: 48px;
    font-size: 16px; /* Prevents zoom on iOS */
  }

  /* Touch-friendly cards */
  .creature-card {
    min-height: 44px;
  }

  .creature-card:active {
    transform: scale(0.98);
  }

  /* Better stat bars on mobile */
  .stat-bar {
    padding: 8px 0;
  }

  .stat-label {
    font-size: 0.85rem;
  }

  .stat-value {
    font-size: 0.9rem;
  }
}

/* Tablet Styles */
@media (min-width: 769px) and (max-width: 1024px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .mobile-nav {
    display: none;
  }
}

/* Desktop - Hide mobile elements */
@media (min-width: 769px) {
  .mobile-nav {
    display: none;
  }

  .filter-toggle {
    display: none;
  }

  .swipe-hint {
    display: none;
  }
}

/* Small phones */
@media (max-width: 360px) {
  .hero-title {
    font-size: 1.5rem;
  }

  .section-title {
    font-size: 1.3rem;
  }

  .mobile-nav-item {
    font-size: 0.65rem;
  }

  .mobile-nav-icon {
    font-size: 1.1rem;
  }

  .creature-image-wrapper {
    width: 60px;
    height: 60px;
  }

  .creature-emoji {
    font-size: 2rem;
  }
}

/* Landscape mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .mobile-nav {
    display: none;
  }

  body {
    padding-bottom: 0;
  }

  .modal {
    max-height: 95vh;
  }
}

/* ------------------------------------------------------------
   21. Language Switcher Styles
   ------------------------------------------------------------ */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 15px;
}

.lang-btn {
  padding: 6px 12px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
}

.lang-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.lang-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg-primary);
}

@media (max-width: 768px) {
  .lang-switcher {
    margin-left: auto;
    margin-right: 15px;
  }

  .lang-btn {
    padding: 8px 12px;
    min-height: 36px;
  }
}
