/* ============================================
   Heartopia Game Website - Main Stylesheet
   heartopiagame.org
   Feminine Design with Light/Dark Theme Support
   ============================================ */

/* CSS Custom Properties (Design Tokens) - Dark Theme (Default) */
:root {
  /* Colors - Feminine Heartopia Theme */
  --primary: #FF8FAB;
  --primary-dark: #FF6B8A;
  --primary-light: #FFB6C8;
  --secondary: #7DD3C0;
  --secondary-dark: #5CBBA8;
  --accent: #FFE066;
  --accent-purple: #DDA0DD;
  --accent-lavender: #E6B3FF;

  /* Background Colors - Dark Theme */
  --bg-dark: #1a1625;
  --bg-darker: #120f1a;
  --bg-card: rgba(255, 255, 255, 0.06);
  --bg-card-hover: rgba(255, 255, 255, 0.1);
  --bg-navbar: rgba(26, 22, 37, 0.92);

  /* Text Colors */
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.75);
  --text-muted: rgba(255, 255, 255, 0.5);

  /* Gradients - Feminine & Dreamy */
  --gradient-hero: linear-gradient(135deg, #2d1f3d 0%, #1a1625 50%, #251d2e 100%);
  --gradient-card: linear-gradient(135deg, rgba(255, 143, 171, 0.08) 0%, rgba(125, 211, 192, 0.08) 100%);
  --gradient-primary: linear-gradient(135deg, #FF8FAB 0%, #DDA0DD 100%);
  --gradient-accent: linear-gradient(135deg, #FFB6C8 0%, #E6B3FF 100%);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 30px rgba(255, 143, 171, 0.35);
  --shadow-glow-soft: 0 0 20px rgba(221, 160, 221, 0.25);

  /* Typography */
  --font-main: 'Outfit', sans-serif;
  --font-display: 'Outfit', sans-serif;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-2xl: 5rem;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 50px;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
  --transition-theme: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

  /* Container */
  --container-max: 1200px;
  --container-padding: 1.5rem;
}

/* Light Theme */
[data-theme="light"] {
  --primary: #E85A7B;
  --primary-dark: #D44A6B;
  --primary-light: #FF8FAB;
  --secondary: #4DBBA8;
  --secondary-dark: #3DAA97;
  --accent: #FFD633;
  --accent-purple: #C68FE6;
  --accent-lavender: #D49EFF;

  /* Background Colors - Light Theme */
  --bg-dark: #FFF5F7;
  --bg-darker: #FFEEF2;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-hover: rgba(255, 255, 255, 0.95);
  --bg-navbar: rgba(255, 245, 247, 0.92);

  /* Text Colors */
  --text-primary: #2D2438;
  --text-secondary: rgba(45, 36, 56, 0.75);
  --text-muted: rgba(45, 36, 56, 0.55);

  /* Gradients - Light Theme */
  --gradient-hero: linear-gradient(135deg, #FFF5F7 0%, #FFE8ED 50%, #FFF0F5 100%);
  --gradient-card: linear-gradient(135deg, rgba(232, 90, 123, 0.06) 0%, rgba(77, 187, 168, 0.06) 100%);
  --gradient-primary: linear-gradient(135deg, #E85A7B 0%, #C68FE6 100%);
  --gradient-accent: linear-gradient(135deg, #FF8FAB 0%, #D49EFF 100%);

  /* Shadows - Light Theme */
  --shadow-sm: 0 2px 8px rgba(45, 36, 56, 0.08);
  --shadow-md: 0 4px 20px rgba(45, 36, 56, 0.12);
  --shadow-lg: 0 8px 40px rgba(45, 36, 56, 0.16);
  --shadow-glow: 0 0 30px rgba(232, 90, 123, 0.25);
  --shadow-glow-soft: 0 0 20px rgba(198, 143, 230, 0.2);
}

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

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

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

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--spacing-sm);
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
}

h3 {
  font-size: clamp(1.25rem, 2vw, 1.75rem);
}

h4 {
  font-size: 1.25rem;
}

p {
  color: var(--text-secondary);
  margin-bottom: var(--spacing-sm);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--secondary);
}

/* Container */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* ============================================
   Navigation
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--bg-navbar);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: var(--spacing-sm) 0;
  transition: background var(--transition-theme);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.logo-icon {
  font-size: 1.75rem;
}

.logo span {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: var(--spacing-md);
}

.nav-links a {
  color: var(--text-secondary);
  font-weight: 500;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  background: var(--bg-card);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-hero);
  position: relative;
  overflow: hidden;
  padding-top: 80px;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(255, 107, 107, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(78, 205, 196, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(168, 85, 247, 0.1) 0%, transparent 60%);
  pointer-events: none;
}

.hero-content {
  text-align: center;
  z-index: 1;
  max-width: 800px;
  padding: var(--spacing-lg);
}

.hero-badge {
  display: inline-block;
  background: var(--gradient-primary);
  color: white;
  padding: var(--spacing-xs) var(--spacing-md);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: var(--spacing-lg);
  animation: pulse 2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.4);
  }

  50% {
    box-shadow: 0 0 0 15px rgba(255, 107, 107, 0);
  }
}

.hero h1 {
  margin-bottom: var(--spacing-md);
}

.hero h1 .highlight {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-xl);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: var(--spacing-sm) var(--spacing-lg);
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition-normal);
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 40px rgba(255, 107, 107, 0.5);
  color: white;
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary);
  color: var(--text-primary);
}

.btn-group {
  display: flex;
  gap: var(--spacing-sm);
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================
   Section Styles
   ============================================ */
.section {
  padding: var(--spacing-2xl) 0;
}

.section-header {
  text-align: center;
  margin-bottom: var(--spacing-xl);
}

.section-header h2 {
  margin-bottom: var(--spacing-xs);
}

.section-header p {
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ============================================
   Cards
   ============================================ */
.card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  transition: all var(--transition-normal);
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 107, 107, 0.3);
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.card-icon {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-sm);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-lg);
}

/* Feature Cards */
.feature-card {
  text-align: center;
}

.feature-card h3 {
  margin-bottom: var(--spacing-xs);
}

/* ============================================
   Codes Section
   ============================================ */
.codes-section {
  background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-darker) 100%);
}

.codes-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.code-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  transition: all var(--transition-fast);
}

.code-item:hover {
  border-color: var(--primary);
  background: var(--bg-card-hover);
}

.code-info {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.code-text {
  font-family: 'Courier New', monospace;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--primary);
  background: rgba(255, 107, 107, 0.1);
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-sm);
}

.code-reward {
  color: var(--text-secondary);
}

.code-reward span {
  color: var(--accent);
  font-weight: 600;
}

.btn-copy {
  background: var(--secondary);
  color: var(--bg-dark);
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
}

.btn-copy:hover {
  background: var(--secondary-dark);
  transform: scale(1.05);
}

.btn-copy.copied {
  background: #22c55e;
}

/* ============================================
   Database Cards
   ============================================ */
.database-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-md);
}

.database-card {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  background: var(--gradient-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: var(--spacing-md);
  text-decoration: none;
  transition: all var(--transition-normal);
}

.database-card:hover {
  border-color: var(--primary);
  transform: translateX(10px);
  box-shadow: var(--shadow-md);
}

.database-card .icon {
  font-size: 2.5rem;
}

.database-card .info h4 {
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.database-card .info p {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin: 0;
}

/* ============================================
   Tables
   ============================================ */
.table-container {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

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

thead {
  background: rgba(255, 107, 107, 0.1);
}

th,
td {
  padding: var(--spacing-sm) var(--spacing-md);
  text-align: left;
}

th {
  color: var(--text-primary);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
}

tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background var(--transition-fast);
}

tbody tr:hover {
  background: var(--bg-card);
}

td {
  color: var(--text-secondary);
}

.rarity-common {
  color: #9ca3af;
}

.rarity-uncommon {
  color: #22c55e;
}

.rarity-rare {
  color: #3b82f6;
}

.rarity-epic {
  color: #a855f7;
}

.rarity-legendary {
  color: #f59e0b;
}

/* ============================================
   Search & Filters
   ============================================ */
.search-box {
  display: flex;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-lg);
}

.search-input {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: var(--spacing-sm) var(--spacing-md);
  color: var(--text-primary);
  font-size: 1rem;
  transition: all var(--transition-fast);
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.2);
}

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

.filter-group {
  display: flex;
  gap: var(--spacing-xs);
  flex-wrap: wrap;
  margin-bottom: var(--spacing-lg);
}

.filter-btn {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  padding: var(--spacing-xs) var(--spacing-md);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* ============================================
   Download Section
   ============================================ */
.download-section {
  background: var(--gradient-card);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.download-buttons {
  display: flex;
  justify-content: center;
  gap: var(--spacing-md);
  flex-wrap: wrap;
}

.download-btn {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg);
  padding: var(--spacing-sm) var(--spacing-lg);
  color: var(--text-primary);
  text-decoration: none;
  transition: all var(--transition-normal);
}

.download-btn:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  color: var(--text-primary);
}

.download-btn .icon {
  font-size: 1.5rem;
}

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

.download-btn .text small {
  display: block;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.download-btn .text span {
  font-weight: 600;
}

/* ============================================
   Footer
   ============================================ */
.footer {
  background: var(--bg-darker);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: var(--spacing-xl) 0 var(--spacing-lg);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
}

.footer-section h4 {
  color: var(--text-primary);
  margin-bottom: var(--spacing-md);
}

.footer-section ul {
  list-style: none;
}

.footer-section li {
  margin-bottom: var(--spacing-xs);
}

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

.footer-section a:hover {
  color: var(--primary);
}

.social-links {
  display: flex;
  gap: var(--spacing-sm);
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--bg-card);
  border-radius: 50%;
  color: var(--text-secondary);
  font-size: 1.25rem;
  transition: all var(--transition-fast);
}

.social-link:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-3px);
}

.footer-bottom {
  text-align: center;
  padding-top: var(--spacing-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* ============================================
   Page Headers
   ============================================ */
.page-header {
  background: var(--gradient-hero);
  padding: calc(80px + var(--spacing-2xl)) 0 var(--spacing-xl);
  text-align: center;
  position: relative;
}

.page-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 50% 100%, rgba(255, 107, 107, 0.15) 0%, transparent 60%);
  pointer-events: none;
}

.page-header h1 {
  margin-bottom: var(--spacing-xs);
}

.breadcrumb {
  display: flex;
  justify-content: center;
  gap: var(--spacing-xs);
  color: var(--text-muted);
  font-size: 0.875rem;
}

.breadcrumb a {
  color: var(--text-secondary);
}

.breadcrumb span {
  color: var(--primary);
}

/* ============================================
   Stats
   ============================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-xl);
}

.stat-item {
  text-align: center;
  padding: var(--spacing-md);
  background: var(--bg-card);
  border-radius: var(--radius-md);
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
  :root {
    --container-padding: 1rem;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-navbar);
    flex-direction: column;
    padding: var(--spacing-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .nav-links.active {
    display: flex;
  }

  .mobile-menu-btn {
    display: block;
  }

  .hero-content {
    padding: var(--spacing-md);
  }

  .btn-group {
    flex-direction: column;
    align-items: center;
  }

  .code-item {
    flex-direction: column;
    gap: var(--spacing-sm);
    text-align: center;
  }

  .code-info {
    flex-direction: column;
  }

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

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

  .social-links {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .hero {
    min-height: auto;
    padding: calc(80px + var(--spacing-xl)) 0 var(--spacing-xl);
  }

  .section {
    padding: var(--spacing-xl) 0;
  }
}

/* ============================================
   Utilities
   ============================================ */
.text-center {
  text-align: center;
}

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

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

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

.mt-1 {
  margin-top: var(--spacing-sm);
}

.mt-2 {
  margin-top: var(--spacing-md);
}

.mt-3 {
  margin-top: var(--spacing-lg);
}

.mb-1 {
  margin-bottom: var(--spacing-sm);
}

.mb-2 {
  margin-bottom: var(--spacing-md);
}

.mb-3 {
  margin-bottom: var(--spacing-lg);
}

.hidden {
  display: none;
}

/* Animation Classes */
.fade-in {
  animation: fadeIn 0.5s ease forwards;
}

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

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

/* ============================================
   Guide Cards
   ============================================ */
.guide-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  text-decoration: none;
  transition: all var(--transition-normal);
}

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

.guide-card h3 {
  color: var(--text-primary);
  margin-bottom: var(--spacing-xs);
}

.guide-card p {
  margin: 0;
}

.guide-tag {
  display: inline-block;
  background: rgba(255, 107, 107, 0.2);
  color: var(--primary);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
}

/* ============================================
   Theme Toggle Button
   ============================================ */
.theme-toggle {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.1rem;
  color: var(--text-primary);
  transition: all var(--transition-normal);
  margin-left: var(--spacing-sm);
}

.theme-toggle:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary);
  transform: scale(1.05);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  transition: opacity var(--transition-fast);
}

[data-theme="light"] .theme-toggle .icon-sun {
  display: none;
}

[data-theme="light"] .theme-toggle .icon-moon {
  display: inline;
}

:root .theme-toggle .icon-sun {
  display: inline;
}

:root .theme-toggle .icon-moon {
  display: none;
}

/* ============================================
   Logo Image Styles
   ============================================ */
.logo-img {
  height: 36px;
  width: auto;
  object-fit: contain;
}

.logo-icon-img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
}

/* ============================================
   Hero with Image Background
   ============================================ */
.hero-image-bg {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 100px;
  padding-bottom: 280px;
  overflow: hidden;
}

.hero-image-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom,
      rgba(26, 22, 37, 0.5) 0%,
      rgba(26, 22, 37, 0.4) 40%,
      rgba(26, 22, 37, 0.2) 70%,
      rgba(26, 22, 37, 0.6) 100%);
  z-index: 1;
}

[data-theme="light"] .hero-image-bg::before {
  background: linear-gradient(to bottom,
      rgba(255, 245, 247, 0.4) 0%,
      rgba(255, 245, 247, 0.3) 40%,
      rgba(255, 245, 247, 0.1) 70%,
      rgba(255, 245, 247, 0.5) 100%);
}

.hero-bg-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-overlay-image {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: auto;
  height: 55%;
  max-height: 500px;
  min-height: 300px;
  object-fit: contain;
  z-index: 3;
  pointer-events: none;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));
}

.hero-image-bg .hero-content {
  z-index: 2;
  text-align: center;
  max-width: 900px;
  padding: var(--spacing-lg);
  margin-top: var(--spacing-lg);
}

/* Download Buttons in Hero */
.hero-download-buttons {
  display: flex;
  justify-content: center;
  gap: var(--spacing-md);
  flex-wrap: wrap;
  margin-top: var(--spacing-lg);
}

.hero-download-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--gradient-primary);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-glow);
}

.hero-download-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 40px rgba(255, 143, 171, 0.5);
  color: white;
}

.hero-download-btn.secondary {
  background: rgba(45, 36, 56, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: none;
  color: white;
}

.hero-download-btn.secondary:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  background: rgba(45, 36, 56, 0.95);
  color: white;
}

[data-theme="light"] .hero-download-btn.secondary {
  background: rgba(45, 36, 56, 0.85);
  border: 1px solid rgba(45, 36, 56, 0.3);
  color: white;
}

[data-theme="light"] .hero-download-btn.secondary:hover {
  background: rgba(45, 36, 56, 1);
}

/* ============================================
   Community Section
   ============================================ */
.community-section {
  background: var(--gradient-card);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.community-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--spacing-md);
}

.community-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: var(--spacing-md);
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: all var(--transition-normal);
}

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

.community-card .icon {
  font-size: 2rem;
}

.community-card .name {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.9rem;
}

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

/* ============================================
   Code Validity Badge
   ============================================ */
.code-validity {
  display: inline-block;
  background: rgba(125, 211, 192, 0.2);
  color: var(--secondary);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 500;
  margin-left: 0.5rem;
}

.code-validity.expiring-soon {
  background: rgba(255, 224, 102, 0.2);
  color: var(--accent);
}

.code-new {
  display: inline-block;
  background: var(--gradient-primary);
  color: white;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-left: 0.5rem;
}

/* Light theme adjustments for cards */
[data-theme="light"] .card,
[data-theme="light"] .code-item,
[data-theme="light"] .database-card,
[data-theme="light"] .community-card {
  border-color: rgba(45, 36, 56, 0.1);
  box-shadow: var(--shadow-sm);
}

[data-theme="light"] .navbar {
  border-bottom-color: rgba(45, 36, 56, 0.1);
}

/* ============================================
   Enhanced Page Header with Background Image
   ============================================ */
.page-header-enhanced {
  position: relative;
  padding: calc(80px + var(--spacing-2xl)) 0 var(--spacing-xl);
  text-align: center;
  overflow: hidden;
  min-height: 350px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.page-header-enhanced::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom,
      rgba(26, 22, 37, 0.6) 0%,
      rgba(26, 22, 37, 0.75) 50%,
      rgba(26, 22, 37, 0.95) 100%);
  z-index: 1;
}

[data-theme="light"] .page-header-enhanced::before {
  background: linear-gradient(to bottom,
      rgba(255, 245, 247, 0.5) 0%,
      rgba(255, 245, 247, 0.7) 50%,
      rgba(255, 245, 247, 0.95) 100%);
}

.page-header-enhanced .header-bg-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.page-header-enhanced .container {
  position: relative;
  z-index: 2;
}

.page-header-enhanced h1 {
  margin-bottom: var(--spacing-xs);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.page-header-enhanced .text-secondary {
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.15);
}

/* Video Section in Page Header */
.page-header-video {
  margin-top: var(--spacing-lg);
  display: flex;
  justify-content: center;
}

.video-embed-container {
  position: relative;
  width: 100%;
  max-width: 560px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 2px solid rgba(255, 255, 255, 0.15);
}

.video-embed-container::before {
  content: '';
  display: block;
  padding-top: 56.25%;
  /* 16:9 Aspect Ratio */
}

.video-embed-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ============================================
   Hero Section Responsive Adjustments
   ============================================ */
@media (max-width: 768px) {
  .hero-image-bg {
    padding-bottom: 200px;
    min-height: 90vh;
  }

  .hero-overlay-image {
    height: 40%;
    min-height: 200px;
    max-height: 280px;
  }

  .hero-download-buttons {
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
  }

  .hero-download-btn {
    width: 100%;
    max-width: 250px;
    justify-content: center;
  }

  .page-header-enhanced {
    min-height: 280px;
    padding: calc(80px + var(--spacing-xl)) 0 var(--spacing-md);
  }

  .video-embed-container {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .hero-image-bg {
    padding-bottom: 160px;
    min-height: 85vh;
  }

  .hero-overlay-image {
    height: 35%;
    min-height: 150px;
    max-height: 220px;
  }

  .page-header-enhanced {
    min-height: 240px;
  }
}