/* ================================
   CARD COMMONS - COSMIC DESIGN SYSTEM
   Based on design mockups
   ================================ */

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

:root {
  /* Brand Colors */
  --navy-deep: #1a1f3a;
  --cosmic-blue: #2d3561;
  --stellar-purple: #4a3b6e;
  --aurora-aqua: #64d8cb;
  --moonlight-teal: #4ecdc4;
  --starlight-blue: #a8dadc;
  --sunrise-yellow: #ffd93d;
  --soft-peach: #ffb347;
  --cloud-white: #f8f9fa;
  --mist-gray: #e0e1e6;
  --shadow-gray: #6b7280;
  --void-black: #0f1419;

  /* Typography */
  --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Spacing (8px base) */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Transitions */
  --transition-fast: 150ms ease-out;
  --transition-base: 200ms ease-out;
  --transition-slow: 300ms ease-out;
}

/* Dark Mode (Space) - DEFAULT */
body {
  font-family: var(--font-body);
  background: var(--navy-deep);
  color: var(--cloud-white);
  overflow-x: hidden;
  line-height: 1.6;
  transition: background 0.3s ease, color 0.3s ease;
}

/* Light Mode (Heavens) */
[data-theme="light"] body {
  background: var(--cloud-white);
  color: var(--navy-deep);
}

[data-theme="light"] .cosmic-background {
  background: linear-gradient(135deg, #ffd93d 0%, #ffb347 25%, #a8dadc 75%, #64d8cb 100%);
}

[data-theme="light"] .card {
  background: #ffffff;
  border-color: var(--mist-gray);
  color: var(--navy-deep);
}

[data-theme="light"] .main-nav {
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--mist-gray);
}

[data-theme="light"] .logo-text,
[data-theme="light"] .nav-links a {
  color: var(--navy-deep);
}

[data-theme="light"] .button-primary {
  background: var(--sunrise-yellow);
  color: var(--navy-deep);
}

[data-theme="light"] .button-secondary {
  color: var(--navy-deep);
  border-color: var(--navy-deep);
}

[data-theme="light"] .form-input,
[data-theme="light"] .form-textarea,
[data-theme="light"] .form-select {
  background: #ffffff;
  color: var(--navy-deep);
  border-color: var(--mist-gray);
}

[data-theme="light"] .star {
  background: var(--sunrise-yellow);
  opacity: 0.5;
}

[data-theme="light"] .floating-orb {
  display: none;
}

/* Homepage specific styles */
.card-of-day-container {
  background: linear-gradient(135deg, var(--cosmic-blue) 0%, var(--stellar-purple) 100%);
}

.card-of-day-image {
  background: linear-gradient(135deg, var(--aurora-aqua) 0%, var(--moonlight-teal) 100%);
}

.local-shops-card {
  background: linear-gradient(135deg, var(--cosmic-blue) 0%, var(--stellar-purple) 100%);
}

.deck-card-image {
  background: linear-gradient(135deg, var(--stellar-purple) 0%, var(--aurora-aqua) 100%);
}

/* Homepage specific light mode styles */
[data-theme="light"] .card-of-day-container {
  background: linear-gradient(135deg, #ffd93d 0%, #ffb347 100%) !important;
}

[data-theme="light"] .card-of-day-image {
  background: linear-gradient(135deg, #64d8cb 0%, #4ecdc4 100%) !important;
}

[data-theme="light"] .local-shops-card {
  background: linear-gradient(135deg, #a8dadc 0%, #64d8cb 100%) !important;
}

[data-theme="light"] .deck-card-image {
  background: linear-gradient(135deg, #a8dadc 0%, #64d8cb 100%) !important;
}

/* ================================
   COSMIC BACKGROUND EFFECTS
   ================================ */

.cosmic-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  background: linear-gradient(180deg, var(--navy-deep) 0%, var(--void-black) 100%);
  pointer-events: none;
}

/* Twinkling Stars */
.stars {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: var(--cloud-white);
  border-radius: 50%;
  opacity: 0.3;
  animation: twinkle 3s ease-in-out infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* Floating Orbs (for ambient magic) */
.floating-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
  animation: float 20s ease-in-out infinite;
  pointer-events: none;
}

.orb-1 {
  width: 300px;
  height: 300px;
  background: var(--aurora-aqua);
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.orb-2 {
  width: 250px;
  height: 250px;
  background: var(--stellar-purple);
  bottom: 15%;
  right: 15%;
  animation-delay: 5s;
}

.orb-3 {
  width: 200px;
  height: 200px;
  background: var(--moonlight-teal);
  top: 40%;
  right: 20%;
  animation-delay: 10s;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(30px, -20px) scale(1.1);
  }
  50% {
    transform: translate(-20px, 30px) scale(0.9);
  }
  75% {
    transform: translate(20px, 20px) scale(1.05);
  }
}

/* ================================
   LAYOUT & CONTAINERS
   ================================ */

.container {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container-wide {
  max-width: 1440px;
}

.container-narrow {
  max-width: 720px;
}

/* ================================
   NAVIGATION
   ================================ */

.main-nav {
  position: relative;
  z-index: 1000;
  padding: var(--space-lg) 0;
}

.nav-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--aurora-aqua);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: transform var(--transition-base);
}

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

.logo-icon {
  font-size: 28px;
}

.logo-text {
  font-family: var(--font-display);
}

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

.nav-links a {
  color: var(--cloud-white);
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  transition: color var(--transition-base);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--aurora-aqua);
}

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

/* Theme Toggle */
.theme-toggle {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-base);
  color: var(--cloud-white);
  font-size: 20px;
}

.theme-toggle:hover {
  background: rgba(100, 216, 203, 0.1);
  border-color: var(--aurora-aqua);
  transform: rotate(20deg);
}

/* Profile Avatar */
.profile-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--aurora-aqua) 0%, var(--moonlight-teal) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 20px;
  transition: all var(--transition-base);
  border: 2px solid transparent;
}

.profile-avatar:hover {
  border-color: var(--aurora-aqua);
  box-shadow: 0 0 12px rgba(100, 216, 203, 0.3);
}

/* Dropdown Menu */
.dropdown-menu {
  position: absolute;
  top: 52px;
  right: 0;
  background: var(--cosmic-blue);
  border: 1px solid var(--navy-deep);
  border-radius: 8px;
  padding: var(--space-sm);
  min-width: 200px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all var(--transition-base);
  z-index: 100;
}

.dropdown-menu.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a {
  display: block;
  padding: var(--space-sm) var(--space-md);
  color: var(--cloud-white);
  text-decoration: none;
  border-radius: 6px;
  transition: background var(--transition-base);
  font-size: 14px;
}

.dropdown-menu a:hover {
  background: var(--navy-deep);
  color: var(--aurora-aqua);
}

.dropdown-divider {
  height: 1px;
  background: var(--navy-deep);
  margin: var(--space-sm) 0;
}

/* ================================
   APP CONTAINER
   ================================ */

.app-container {
  position: relative;
  z-index: 1;
  max-width: 1440px;
  margin: 0 auto;
  padding: var(--space-lg);
  min-height: calc(100vh - 100px);
}

/* ================================
   BUTTONS
   ================================ */

.button {
  padding: 12px 24px;
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

.button-primary {
  background: var(--sunrise-yellow);
  color: var(--navy-deep);
}

.button-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(255, 217, 61, 0.3);
}

.button-secondary {
  background: transparent;
  border: 2px solid var(--aurora-aqua);
  color: var(--aurora-aqua);
}

.button-secondary:hover {
  background: rgba(100, 216, 203, 0.1);
}

.button-tertiary {
  background: transparent;
  color: var(--aurora-aqua);
  padding: 8px 16px;
}

.button-tertiary:hover {
  background: rgba(100, 216, 203, 0.05);
}

/* Small button variant */
.button-sm {
  padding: 8px 16px;
  font-size: 14px;
}

/* ================================
   CARDS
   ================================ */

.card {
  background: var(--cosmic-blue);
  border-radius: 12px;
  padding: var(--space-lg);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all var(--transition-slow);
  border: 1px solid rgba(100, 216, 203, 0.1);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.card-hoverable {
  cursor: pointer;
}

.card-hoverable:hover {
  border-color: var(--aurora-aqua);
}

/* ================================
   FORM ELEMENTS
   ================================ */

.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  margin-bottom: var(--space-sm);
  font-weight: 500;
  color: var(--starlight-blue);
  font-size: 14px;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 12px 16px;
  font-size: 16px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--cloud-white);
  font-family: var(--font-body);
  transition: all var(--transition-base);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--aurora-aqua);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 4px rgba(100, 216, 203, 0.2);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--shadow-gray);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.form-helper {
  font-size: 12px;
  color: var(--shadow-gray);
  margin-top: 4px;
}

/* ================================
   GRIDS
   ================================ */

.grid {
  display: grid;
  gap: var(--space-lg);
}

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

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

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

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

/* ================================
   SECTION HEADERS
   ================================ */

.section-header {
  margin-bottom: var(--space-xl);
}

.section-header h1,
.section-header h2 {
  font-family: var(--font-display);
  font-weight: 600;
  margin-bottom: var(--space-md);
}

.section-header h1 {
  font-size: 32px;
}

.section-header h2 {
  font-size: 28px;
}

.section-header p {
  color: var(--starlight-blue);
  font-size: 16px;
}

/* ================================
   EMPTY STATES
   ================================ */

.empty-state {
  text-align: center;
  padding: var(--space-3xl) var(--space-lg);
}

.empty-state-icon {
  font-size: 64px;
  margin-bottom: var(--space-lg);
  opacity: 0.3;
}

.empty-state h3 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  margin-bottom: var(--space-md);
}

.empty-state p {
  color: var(--shadow-gray);
  margin-bottom: var(--space-lg);
}

/* ================================
   LOADING SPINNER
   ================================ */

.loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 15, 30, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(4px);
}

.loading.hidden {
  display: none;
}

.loading-spinner {
  font-size: 48px;
  animation: spin 2s linear infinite;
}

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

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ================================
   UTILITY CLASSES
   ================================ */

.hidden {
  display: none !important;
}

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

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

.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

/* ================================
   MOBILE RESPONSIVE
   ================================ */

@media (max-width: 768px) {
  .nav-container {
    padding: 0 var(--space-md);
  }

  .nav-links {
    display: none;
  }

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

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .section-header h1 {
    font-size: 28px;
  }

  .section-header h2 {
    font-size: 24px;
  }
}

/* ================================
   MOBILE BOTTOM NAVIGATION
   ================================ */

.nav-mobile {
  display: none;
}

@media (max-width: 768px) {
  .nav-mobile {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--cosmic-blue);
    border-top: 1px solid var(--navy-deep);
    padding: var(--space-md);
    justify-content: space-around;
    z-index: 100;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.3);
  }

  .nav-mobile a {
    color: var(--cloud-white);
    text-decoration: none;
    font-size: 24px;
    transition: color var(--transition-base);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
  }

  .nav-mobile a:hover,
  .nav-mobile a.active {
    color: var(--aurora-aqua);
  }

  .app-container {
    margin-bottom: 80px; /* Space for mobile nav */
  }
}

/* ================================
   PAGE-SPECIFIC STYLES
   ================================ */

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

.hero h1 {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--space-lg);
  background: linear-gradient(135deg, var(--cloud-white) 0%, var(--aurora-aqua) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 18px;
  line-height: 1.6;
  color: var(--starlight-blue);
  margin-bottom: var(--space-xl);
}

/* Search Bar */
.search-container {
  max-width: 600px;
  margin: 0 auto var(--space-2xl);
}

.search-bar {
  position: relative;
}

.search-bar input {
  width: 100%;
  padding: 16px 24px;
  padding-left: 52px;
  font-size: 16px;
  border: 2px solid var(--cosmic-blue);
  border-radius: 12px;
  background: var(--cosmic-blue);
  color: var(--cloud-white);
  font-family: var(--font-body);
  transition: all var(--transition-base);
}

.search-bar input:focus {
  outline: none;
  border-color: var(--aurora-aqua);
  box-shadow: 0 0 0 4px rgba(100, 216, 203, 0.2);
}

.search-bar input::placeholder {
  color: var(--shadow-gray);
}

.search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--shadow-gray);
  font-size: 20px;
}

/* Stats */
.stats {
  display: flex;
  gap: var(--space-lg);
  font-size: 14px;
  color: var(--shadow-gray);
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: rgba(100, 216, 203, 0.2);
  border-radius: 20px;
  font-size: 12px;
  color: var(--aurora-aqua);
  font-weight: 500;
}

/* Personality Tag */
.personality-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(100, 216, 203, 0.2);
  border-radius: 20px;
  font-size: 14px;
  color: var(--aurora-aqua);
  font-weight: 500;
}

/* Avatar sizes */
.avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--aurora-aqua) 0%, var(--moonlight-teal) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.avatar-md {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--aurora-aqua) 0%, var(--moonlight-teal) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.avatar-lg {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--aurora-aqua) 0%, var(--moonlight-teal) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
}

.avatar-xl {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--aurora-aqua) 0%, var(--moonlight-teal) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  box-shadow: 0 4px 12px rgba(100, 216, 203, 0.3);
}

/* ================================
   FOOTER COMPONENT
   ================================ */

.main-footer {
  background: linear-gradient(180deg, var(--navy-deep) 0%, var(--void-black) 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
  margin-top: var(--space-3xl);
  padding-bottom: 80px; /* Space for mobile nav */
}

@media (min-width: 769px) {
  .main-footer {
    padding-bottom: 0;
  }
}

/* Constellation Background */
.constellation-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.15;
  pointer-events: none;
}

.constellation-line {
  stroke: var(--aurora-aqua);
  stroke-width: 1;
  stroke-dasharray: 5, 5;
  opacity: 0.5;
}

.constellation-star {
  fill: var(--cloud-white);
  opacity: 0.6;
  animation: twinkle 3s ease-in-out infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* Footer Content */
.footer-content {
  max-width: 1440px;
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-lg) var(--space-lg);
  position: relative;
  z-index: 1;
}

/* Fortune Cookie */
.fortune-cookie {
  background: linear-gradient(135deg, var(--cosmic-blue) 0%, var(--stellar-purple) 100%);
  border: 2px solid rgba(100, 216, 203, 0.3);
  border-radius: 16px;
  padding: var(--space-xl);
  margin-bottom: var(--space-2xl);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-base);
}

.fortune-cookie:hover {
  border-color: var(--aurora-aqua);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(100, 216, 203, 0.2);
}

.fortune-cookie-icon {
  font-size: 48px;
  margin-bottom: var(--space-md);
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.fortune-text {
  font-size: 20px;
  font-weight: 500;
  color: var(--cloud-white);
  margin-bottom: var(--space-sm);
  font-style: italic;
  transition: opacity var(--transition-base);
}

.fortune-card {
  color: var(--aurora-aqua);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: var(--space-md);
  transition: opacity var(--transition-base);
}

.fortune-refresh {
  color: var(--starlight-blue);
  font-size: 14px;
  opacity: 0.7;
}

/* Footer Grid */
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

.footer-section h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--aurora-aqua);
  margin-bottom: var(--space-md);
}

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

.footer-section li {
  margin-bottom: var(--space-sm);
}

.footer-section a {
  color: var(--cloud-white);
  text-decoration: none;
  font-size: 14px;
  transition: color var(--transition-base);
  display: block;
  padding: var(--space-xs) 0;
}

.footer-section a:hover {
  color: var(--aurora-aqua);
  padding-left: var(--space-sm);
}

/* Footer Bottom */
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--space-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.footer-copyright {
  color: var(--starlight-blue);
  font-size: 14px;
}

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

.social-link {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--cosmic-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cloud-white);
  text-decoration: none;
  font-size: 18px;
  transition: all var(--transition-base);
}

.social-link:hover {
  background: var(--aurora-aqua);
  color: var(--navy-deep);
  transform: translateY(-2px);
}

/* Mobile Footer */
@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

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

  .fortune-text {
    font-size: 18px;
  }

  .fortune-cookie {
    padding: var(--space-lg);
  }
}

/* Light Mode Overrides for Footer */
[data-theme="light"] .main-footer {
  background: linear-gradient(180deg, #f8f9fa 0%, #e0e1e6 100%);
  border-top: 1px solid var(--mist-gray);
}

[data-theme="light"] .fortune-cookie {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border-color: var(--aurora-aqua);
}

[data-theme="light"] .fortune-text,
[data-theme="light"] .footer-section a {
  color: var(--navy-deep);
}

[data-theme="light"] .footer-section h3 {
  color: var(--cosmic-blue);
}

[data-theme="light"] .footer-copyright {
  color: var(--shadow-gray);
}

[data-theme="light"] .social-link {
  background: var(--cloud-white);
  border: 1px solid var(--mist-gray);
  color: var(--cosmic-blue);
}

[data-theme="light"] .social-link:hover {
  background: var(--aurora-aqua);
  color: var(--navy-deep);
}

[data-theme="light"] .constellation-line {
  stroke: var(--cosmic-blue);
}

[data-theme="light"] .constellation-star {
  fill: var(--cosmic-blue);
}

/* ================================
   LIGHT MODE CONTRAST IMPROVEMENTS
   Based on LIGHT-MODE-FIXES.md
   ================================ */

/* Hero Section - Better contrast for headlines */
[data-theme="light"] .hero h1,
[data-theme="light"] .page-header h1 {
  color: var(--navy-deep);
  text-shadow: 0 2px 8px rgba(255, 255, 255, 0.8);
  font-weight: 700;
}

[data-theme="light"] .hero .subtitle,
[data-theme="light"] .page-header .text-muted {
  color: var(--cosmic-blue);
  font-weight: 500;
}

/* Search Bar - White background with proper borders */
[data-theme="light"] .search-input,
[data-theme="light"] .search-bar {
  background: #ffffff;
  border: 2px solid var(--mist-gray);
  color: var(--navy-deep);
}

[data-theme="light"] .search-input::placeholder,
[data-theme="light"] .search-bar::placeholder {
  color: var(--shadow-gray);
}

[data-theme="light"] .search-input:focus,
[data-theme="light"] .search-bar:focus {
  border-color: var(--aurora-aqua);
  box-shadow: 0 0 0 3px rgba(100, 216, 203, 0.1);
}

/* Labels and Badges - Navy text instead of yellow */
[data-theme="light"] .card-label,
[data-theme="light"] .section-label {
  color: var(--navy-deep);
  font-weight: 700;
}

[data-theme="light"] .badge,
[data-theme="light"] .recommended-badge {
  background: rgba(100, 216, 203, 0.15);
  border: 1px solid var(--aurora-aqua);
  color: var(--navy-deep);
}

/* Section Subtitles - Dark text with shadow */
[data-theme="light"] .section-subtitle {
  color: var(--navy-deep);
  text-shadow: 0 1px 3px rgba(255, 255, 255, 0.6);
  font-weight: 500;
}

/* Buttons - High contrast for light mode */
[data-theme="light"] .button,
[data-theme="light"] .card-action-button {
  background: #ffffff;
  border: 2px solid var(--mist-gray);
  color: var(--navy-deep);
  font-weight: 600;
}

[data-theme="light"] .button:hover,
[data-theme="light"] .card-action-button:hover {
  border-color: var(--aurora-aqua);
  background: rgba(100, 216, 203, 0.1);
}

[data-theme="light"] .button-primary,
[data-theme="light"] .card-action-button.primary {
  background: var(--aurora-aqua);
  color: var(--navy-deep);
  border-color: var(--aurora-aqua);
}

[data-theme="light"] .button-primary:hover,
[data-theme="light"] .card-action-button.primary:hover {
  background: var(--moonlight-teal);
  border-color: var(--moonlight-teal);
}

/* Text Colors - Ensure high contrast */
[data-theme="light"] .text-primary {
  color: var(--navy-deep);
}

[data-theme="light"] .text-secondary {
  color: var(--cosmic-blue);
}

[data-theme="light"] .text-muted {
  color: var(--shadow-gray);
}

/* Cards - White background with proper borders */
[data-theme="light"] .deck-card,
[data-theme="light"] .shop-card,
[data-theme="light"] .card-item {
  background: #ffffff;
  border: 1px solid var(--mist-gray);
  color: var(--navy-deep);
}

[data-theme="light"] .deck-card:hover,
[data-theme="light"] .shop-card:hover,
[data-theme="light"] .card-item:hover {
  border-color: var(--aurora-aqua);
  box-shadow: 0 4px 12px rgba(100, 216, 203, 0.2);
}

/* Filter Selects - Better styling */
[data-theme="light"] .filter-select,
[data-theme="light"] select {
  background: #ffffff;
  border: 2px solid var(--mist-gray);
  color: var(--navy-deep);
}

/* Empty States */
[data-theme="light"] .empty-state {
  color: var(--navy-deep);
}

[data-theme="light"] .empty-icon {
  opacity: 0.3;
}

/* Links - Aurora aqua with navy hover */
[data-theme="light"] a {
  color: var(--aurora-aqua);
}

[data-theme="light"] a:hover {
  color: var(--moonlight-teal);
}

/* Icons - Use navy or teal, not yellow */
[data-theme="light"] .icon {
  color: var(--cosmic-blue);
}

[data-theme="light"] .icon-accent {
  color: var(--aurora-aqua);
}

/* ================================
   FEATHER MODE - Optional Edge Fading
   ================================ */

[data-feather-mode="true"] .card,
[data-feather-mode="true"] .deck-card,
[data-feather-mode="true"] .shop-card,
[data-feather-mode="true"] .card-item {
  /* Radial gradient mask for feathered edges */
  mask-image: radial-gradient(ellipse 95% 90% at center, 
                               black 60%, 
                               rgba(0,0,0,0.7) 80%, 
                               transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 95% 90% at center, 
                                      black 60%, 
                                      rgba(0,0,0,0.7) 80%, 
                                      transparent 100%);
  
  /* Soft inset shadow for additional depth */
  box-shadow: inset 0 0 30px 10px rgba(0, 0, 0, 0.2);
}

[data-feather-mode="true"] .hero-section,
[data-feather-mode="true"] .section-featured {
  mask-image: radial-gradient(ellipse 92% 88% at center, 
                               black 50%, 
                               rgba(0,0,0,0.8) 70%, 
                               transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 92% 88% at center, 
                                      black 50%, 
                                      rgba(0,0,0,0.8) 70%, 
                                      transparent 100%);
  box-shadow: inset 0 0 60px 20px rgba(0, 0, 0, 0.3);
}

/* Feather Mode - Light Theme */
[data-theme="light"][data-feather-mode="true"] .card,
[data-theme="light"][data-feather-mode="true"] .deck-card,
[data-theme="light"][data-feather-mode="true"] .shop-card,
[data-theme="light"][data-feather-mode="true"] .card-item {
  /* Softer feathering for light mode */
  box-shadow: inset 0 0 30px 10px rgba(255, 255, 255, 0.4);
}

[data-theme="light"][data-feather-mode="true"] .hero-section,
[data-theme="light"][data-feather-mode="true"] .section-featured {
  box-shadow: inset 0 0 60px 20px rgba(255, 255, 255, 0.5);
}

/* Page Container Feathering */
[data-feather-mode="true"] .page-container {
  mask-image: radial-gradient(ellipse 97% 95% at center, 
                               black 70%, 
                               rgba(0,0,0,0.9) 85%, 
                               transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 97% 95% at center, 
                                      black 70%, 
                                      rgba(0,0,0,0.9) 85%, 
                                      transparent 100%);
}

/* ================================
   TOGGLE SLIDER - For Settings
   ================================ */

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--cosmic-blue);
  border-radius: 28px;
  transition: 0.3s;
  display: flex;
  align-items: center;
  padding: 0 4px;
}

.toggle-slider::before {
  content: "";
  position: absolute;
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 4px;
  background: var(--cloud-white);
  border-radius: 50%;
  transition: 0.3s;
}

input:checked + .toggle-slider {
  background: var(--aurora-aqua);
}

input:checked + .toggle-slider::before {
  transform: translateX(24px);
}

/* Light mode toggle slider */
[data-theme="light"] .toggle-slider {
  background: var(--mist-gray);
}

[data-theme="light"] .toggle-slider::before {
  background: var(--navy-deep);
}

[data-theme="light"] input:checked + .toggle-slider {
  background: var(--aurora-aqua);
}
