/* ==========================================================================
   PawsomeDay 🐾 – Ultra-Rounded, Modern & Playful Stylesheet
   ========================================================================== */

:root {
  /* Color Palette - Light Mode */
  --bg-main: #FBF9F5;
  --bg-surface: #FFFFFF;
  --bg-surface-elevated: #FFFFFF;
  --bg-subtle: #F3EFEA;
  --bg-glass: rgba(255, 255, 255, 0.78);
  --border-subtle: rgba(45, 49, 66, 0.08);
  --border-focus: rgba(255, 107, 132, 0.4);

  --text-main: #232733;
  --text-muted: #6B7280;
  --text-light: #9CA3AF;

  --primary: #FF6584;
  --primary-hover: #F84E72;
  --primary-glow: rgba(255, 101, 132, 0.35);
  --primary-soft: #FFE8ED;

  --accent-teal: #2EC4B6;
  --accent-teal-soft: #E2F9F6;
  --accent-amber: #FFB703;
  --accent-amber-soft: #FFF4D9;
  --accent-purple: #8338EC;
  --accent-purple-soft: #EFE7FC;

  /* Dynamic Theme Accent (Overridden by app.js per daily animal) */
  --theme-accent: #FF6584;
  --theme-accent-soft: #FFE8ED;
  --theme-glow: rgba(255, 101, 132, 0.2);

  /* Rounded Corner Tokens */
  --radius-xs: 8px;
  --radius-sm: 14px;
  --radius-md: 22px;
  --radius-lg: 32px;
  --radius-xl: 44px;
  --radius-pill: 9999px;

  /* Shadows */
  --shadow-sm: 0 4px 12px rgba(35, 39, 51, 0.04);
  --shadow-md: 0 12px 32px -6px rgba(35, 39, 51, 0.08);
  --shadow-lg: 0 24px 60px -12px rgba(35, 39, 51, 0.12);
  --shadow-glow: 0 12px 36px -6px var(--primary-glow);

  /* Transitions */
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 0.2s var(--ease-smooth);
  --transition-bouncy: 0.35s var(--ease-spring);
}

[data-theme="dark"] {
  --bg-main: #0E131F;
  --bg-surface: #171E2D;
  --bg-surface-elevated: #20293D;
  --bg-subtle: #232C40;
  --bg-glass: rgba(23, 30, 45, 0.82);
  --border-subtle: rgba(255, 255, 255, 0.09);
  --border-focus: rgba(255, 117, 143, 0.5);

  --text-main: #F3F4F6;
  --text-muted: #9CA3AF;
  --text-light: #6B7280;

  --primary: #FF758F;
  --primary-hover: #FF8DA4;
  --primary-glow: rgba(255, 117, 143, 0.45);
  --primary-soft: rgba(255, 117, 143, 0.15);

  --accent-teal: #48CAE4;
  --accent-teal-soft: rgba(72, 202, 228, 0.15);
  --accent-amber: #FFD166;
  --accent-amber-soft: rgba(255, 209, 102, 0.15);
  --accent-purple: #B588F7;
  --accent-purple-soft: rgba(181, 136, 247, 0.15);

  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 12px 36px -6px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 24px 64px -12px rgba(0, 0, 0, 0.55);
}

/* ==========================================================================
   Base & Reset
   ========================================================================== */

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

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  transition: background-color 0.4s ease, color 0.4s ease;
  position: relative;
}

h1, h2, h3, h4, h5, h6, .brand-name {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  line-height: 1.25;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  outline: none;
}

input, select {
  font-family: inherit;
  outline: none;
}

/* ==========================================================================
   Ambient Floating Blobs (Modern Backdrop Blur)
   ========================================================================== */

.ambient-blobs {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  opacity: 0.65;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  animation: floatSlow 22s infinite alternate ease-in-out;
}

.blob-1 {
  width: 480px;
  height: 480px;
  top: -120px;
  right: -80px;
  background: radial-gradient(circle, var(--theme-accent-soft) 0%, rgba(255, 182, 193, 0.05) 70%);
}

.blob-2 {
  width: 520px;
  height: 520px;
  bottom: 10%;
  left: -150px;
  background: radial-gradient(circle, var(--accent-teal-soft) 0%, rgba(72, 202, 228, 0.05) 70%);
  animation-delay: -7s;
}

.blob-3 {
  width: 400px;
  height: 400px;
  top: 45%;
  right: 15%;
  background: radial-gradient(circle, var(--accent-amber-soft) 0%, rgba(255, 209, 102, 0.04) 70%);
  animation-delay: -14s;
}

@keyframes floatSlow {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -40px) scale(1.08); }
  100% { transform: translate(-25px, 25px) scale(0.95); }
}

/* ==========================================================================
   App Wrapper Layout
   ========================================================================== */

.app-wrapper {
  position: relative;
  z-index: 1;
  max-width: 1320px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 3.5rem;
}

/* ==========================================================================
   Top Floating Pill Navigation
   ========================================================================== */

.navbar-container {
  position: sticky;
  top: 1rem;
  z-index: 100;
  margin-bottom: 2rem;
}

.navbar-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1.25rem;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-fast);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-icon-wrapper {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, var(--primary) 0%, #FF8DA4 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-glow);
  transition: transform var(--transition-bouncy);
}

.brand-icon-wrapper:hover {
  transform: rotate(-10deg) scale(1.1);
}

.brand-emoji {
  font-size: 1.4rem;
}

.brand-text {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
}

.brand-name {
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.brand-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--theme-accent-soft);
  color: var(--theme-accent);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
}

.nav-center {
  display: flex;
  align-items: center;
}

.date-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1rem;
  background: var(--bg-subtle);
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.date-chip .icon {
  width: 15px;
  height: 15px;
  stroke: var(--theme-accent);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* ==========================================================================
   Pill Buttons & Bubbly Interaction Styles
   ========================================================================== */

.pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-pill);
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-bouncy);
  user-select: none;
}

.pill-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-focus);
}

.pill-btn:active {
  transform: scale(0.95);
}

.icon-only-btn {
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: var(--radius-pill);
  font-size: 1.15rem;
}

.count-badge {
  background: var(--primary);
  color: #FFFFFF;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
  min-width: 20px;
  text-align: center;
}

.bubbly-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.8rem 1.6rem;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.95rem;
  transition: all var(--transition-bouncy);
  text-decoration: none;
}

.primary-bubbly {
  background: linear-gradient(135deg, var(--theme-accent) 0%, #FF8DA4 100%);
  color: #FFFFFF;
  box-shadow: 0 10px 24px -4px var(--theme-glow);
  border: none;
}

.primary-bubbly:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 14px 28px -4px var(--theme-glow);
}

.primary-bubbly:active {
  transform: scale(0.96);
}

.secondary-bubbly {
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

.secondary-bubbly:hover {
  background: var(--bg-subtle);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.secondary-bubbly:active {
  transform: scale(0.96);
}

.like-bubble-count {
  background: rgba(255, 255, 255, 0.28);
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 800;
}

/* ==========================================================================
   Hero Section (Rounded Banner Card)
   ========================================================================== */

.hero-section {
  margin-bottom: 2.5rem;
}

.hero-card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--theme-accent) 0%, var(--accent-amber) 50%, var(--accent-teal) 100%);
}

.hero-badge-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.pill-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.95rem;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 600;
}

.tag-theme {
  background: var(--theme-accent-soft);
  color: var(--theme-accent);
}

.tag-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--theme-accent);
  box-shadow: 0 0 0 0 var(--theme-accent);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(255, 101, 132, 0.6); }
  70% { box-shadow: 0 0 0 8px rgba(255, 101, 132, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 101, 132, 0); }
}

.tag-countdown {
  background: var(--accent-amber-soft);
  color: #B45309;
}

[data-theme="dark"] .tag-countdown {
  color: #FBBF24;
}

.tag-archive {
  background: var(--bg-subtle);
  color: var(--text-muted);
}

.archive-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-teal);
}

.hero-content {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.5rem;
  align-items: center;
}

.hero-emoji-bubble {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  background: var(--theme-accent-soft);
  font-size: 2.2rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
  animation: bounceSlow 3s infinite ease-in-out;
}

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

.hero-title {
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
  color: var(--text-main);
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
  max-width: 580px;
  line-height: 1.55;
}

/* Fun Fact Card */
.fun-fact-box {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.1rem 1.4rem;
  background: var(--bg-subtle);
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--theme-accent);
  margin-bottom: 2rem;
  backdrop-filter: blur(8px);
}

.fact-icon {
  font-size: 1.6rem;
  line-height: 1;
}

.fact-text-wrap {
  flex: 1;
}

.fact-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--theme-accent);
  margin-bottom: 0.25rem;
}

.fact-text {
  font-size: 0.95rem;
  color: var(--text-main);
  font-weight: 500;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

/* Hero Featured Image Column */
.hero-featured-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3.2;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--bg-subtle);
}

.hero-featured-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-smooth);
}

.hero-featured-wrapper:hover .hero-featured-img {
  transform: scale(1.05);
}

.hero-img-skeleton {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--bg-subtle) 0%, rgba(255, 255, 255, 0.2) 50%, var(--bg-subtle) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  z-index: 1;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.hero-img-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: 0.4rem 0.9rem;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #FFFFFF;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 700;
  z-index: 2;
}

.hero-img-attribution {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.2rem 1rem 0.8rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, transparent 100%);
  color: #FFFFFF;
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 2;
}

/* ==========================================================================
   Theme Bar Carousel / Day Selector
   ========================================================================== */

.theme-bar-section {
  margin-bottom: 2.5rem;
}

.section-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.section-subtitle {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--theme-accent);
  margin-bottom: 0.2rem;
}

.section-title {
  font-size: 1.7rem;
  letter-spacing: -0.02em;
}

.carousel-nav-arrows {
  display: flex;
  gap: 0.5rem;
}

.arrow-btn {
  width: 38px;
  height: 38px;
  padding: 0;
  font-size: 1.4rem;
  line-height: 1;
}

.theme-scroll-container {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding: 0.5rem 0.25rem 1rem;
  scrollbar-width: thin;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.theme-scroll-container::-webkit-scrollbar {
  height: 6px;
}

.theme-scroll-container::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: var(--radius-pill);
}

/* Individual Theme Pill Card */
.theme-pill-card {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1.35rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all var(--transition-bouncy);
  user-select: none;
}

.theme-pill-card:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: var(--shadow-md);
  border-color: var(--border-focus);
}

.theme-pill-card.active {
  background: linear-gradient(135deg, var(--theme-accent) 0%, #FF8DA4 100%);
  color: #FFFFFF;
  border-color: transparent;
  box-shadow: 0 10px 24px -4px var(--theme-glow);
}

.theme-pill-card.active .theme-pill-day,
.theme-pill-card.active .theme-pill-name {
  color: #FFFFFF;
}

.theme-pill-card.active .theme-pill-today-badge {
  background: #FFFFFF;
  color: var(--theme-accent);
}

.theme-pill-emoji {
  font-size: 1.7rem;
  line-height: 1;
}

.theme-pill-info {
  display: flex;
  flex-direction: column;
}

.theme-pill-day {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.theme-pill-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
}

.theme-pill-today-badge {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--theme-accent);
  color: #FFFFFF;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-pill);
  margin-left: 0.25rem;
}

/* ==========================================================================
   Gallery Controls (Rounded Toolbar)
   ========================================================================== */

.gallery-controls-section {
  margin-bottom: 2rem;
}

.controls-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  background: var(--bg-surface);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1rem;
}

.search-input-pill {
  flex: 1 1 300px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1.25rem;
  background: var(--bg-subtle);
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  transition: all var(--transition-fast);
}

.search-input-pill:focus-within {
  border-color: var(--theme-accent);
  background: var(--bg-surface);
  box-shadow: 0 0 0 4px var(--theme-glow);
}

.search-icon {
  width: 18px;
  height: 18px;
  stroke: var(--text-muted);
  flex-shrink: 0;
}

.search-input-pill input {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text-main);
  font-size: 0.95rem;
  font-weight: 500;
}

.clear-search-btn {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 0.2rem;
}

.clear-search-btn:hover {
  color: var(--text-main);
}

.archive-select-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.archive-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.pill-select {
  padding: 0.65rem 1.1rem;
  background: var(--bg-subtle);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color var(--transition-fast);
}

.pill-select:focus {
  border-color: var(--theme-accent);
}

.refresh-btn {
  padding: 0.65rem 1.2rem;
}

.refresh-icon {
  width: 16px;
  height: 16px;
  stroke: currentColor;
}

.refreshing .refresh-icon {
  animation: spin 1s infinite linear;
}

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

.gallery-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.status-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-teal);
}

.pill-badge-soft {
  background: var(--bg-subtle);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  color: var(--text-main);
}

/* ==========================================================================
   Animal Image Gallery (Rounded Responsive Grid)
   ========================================================================== */

.gallery-section {
  margin-bottom: 3.5rem;
}

.animal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.75rem;
}

/* Rounded Animal Card */
.animal-card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-bouncy);
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.animal-card:hover {
  transform: translateY(-8px) scale(1.015);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-focus);
}

.card-media-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg-subtle);
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease-smooth);
}

.animal-card:hover .card-img {
  transform: scale(1.08);
}

.card-fav-btn {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all var(--transition-bouncy);
  z-index: 5;
}

[data-theme="dark"] .card-fav-btn {
  background: rgba(23, 30, 45, 0.85);
}

.card-fav-btn:hover {
  transform: scale(1.2);
}

.card-fav-btn.is-fav {
  color: var(--primary);
  animation: heartPop 0.4s var(--ease-spring);
}

@keyframes heartPop {
  0% { transform: scale(0.8); }
  50% { transform: scale(1.35); }
  100% { transform: scale(1); }
}

.card-license-tag {
  position: absolute;
  bottom: 0.75rem;
  left: 0.75rem;
  padding: 0.25rem 0.65rem;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #FFFFFF;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 600;
}

.card-body {
  padding: 1.15rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.35rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.35;
}

.card-author {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--border-subtle);
}

/* Skeleton Placeholder Cards */
.card-skeleton {
  pointer-events: none;
}

.skeleton-box {
  background: linear-gradient(90deg, var(--bg-subtle) 0%, rgba(255, 255, 255, 0.3) 50%, var(--bg-subtle) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 1.5rem;
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  border: 2px dashed var(--border-subtle);
}

.empty-emoji {
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

.empty-title {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.empty-desc {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  max-width: 460px;
  margin-left: auto;
  margin-right: auto;
}

/* ==========================================================================
   Cute Trivia Section
   ========================================================================== */

.trivia-section {
  margin-bottom: 3.5rem;
}

.trivia-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 2.75rem 2.25rem;
  box-shadow: var(--shadow-md);
}

.trivia-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.trivia-pill {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--accent-teal-soft);
  color: var(--accent-teal);
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-pill);
  margin-bottom: 0.75rem;
}

.trivia-header h2 {
  font-size: 2rem;
  letter-spacing: -0.02em;
}

.trivia-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.75rem;
}

.trivia-item {
  background: var(--bg-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: transform var(--transition-bouncy);
}

.trivia-item:hover {
  transform: translateY(-4px);
}

.trivia-icon-bubble {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-pill);
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 1.15rem;
  box-shadow: var(--shadow-sm);
}

.trivia-item h4 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.trivia-item p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow-sm);
}

.footer-logo {
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  display: block;
  margin-bottom: 0.25rem;
}

.footer-tagline {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.footer-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.footer-pill {
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--bg-subtle);
  color: var(--text-muted);
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-pill);
}

/* ==========================================================================
   Modals (Rounded Glass Lightbox & Drawer)
   ========================================================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(14, 19, 31, 0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  max-width: 960px;
  width: 100%;
  max-height: 90vh;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transform: scale(0.92) translateY(20px);
  transition: transform 0.35s var(--ease-spring);
}

.modal-overlay.active .modal-card {
  transform: scale(1) translateY(0);
}

.modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  z-index: 20;
  transition: all var(--transition-fast);
}

.modal-close-btn:hover {
  background: var(--primary);
  transform: rotate(90deg) scale(1.1);
}

.modal-media-col {
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 380px;
}

.modal-img-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
}

.modal-info-col {
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.modal-theme-chip {
  display: inline-block;
  background: var(--theme-accent-soft);
  color: var(--theme-accent);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  width: fit-content;
}

.modal-title {
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.modal-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
  max-height: 150px;
  overflow-y: auto;
}

.modal-meta-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  background: var(--bg-subtle);
  padding: 1.15rem;
  border-radius: var(--radius-md);
  margin-bottom: 2rem;
}

.meta-item {
  display: flex;
  flex-direction: column;
  font-size: 0.85rem;
}

.meta-label {
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
}

.meta-value {
  color: var(--text-main);
  font-weight: 600;
  word-break: break-word;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: auto;
}

/* Favorites Modal Adjustments */
.favorites-modal-card {
  display: flex;
  flex-direction: column;
  max-width: 820px;
  max-height: 85vh;
  padding: 2rem;
}

.fav-modal-header {
  margin-bottom: 1.5rem;
}

.fav-header-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.3rem;
}

.fav-header-title h3 {
  font-size: 1.6rem;
}

.fav-emoji {
  font-size: 1.8rem;
}

.fav-header-sub {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.fav-modal-content {
  flex: 1;
  overflow-y: auto;
  margin-bottom: 1.5rem;
  padding-right: 0.5rem;
}

.fav-grid {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}

.fav-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.danger-btn {
  color: #EF4444;
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.2);
}

.danger-btn:hover {
  background: #EF4444;
  color: #FFFFFF;
}

/* ==========================================================================
   Toast Notification Pill
   ========================================================================== */

.toast-pill {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.92rem;
  font-weight: 600;
  z-index: 2000;
  opacity: 0;
  transition: all 0.35s var(--ease-spring);
  pointer-events: none;
}

.toast-pill.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Floating Heart Animation */
.floating-heart {
  position: fixed;
  pointer-events: none;
  font-size: 1.8rem;
  z-index: 3000;
  animation: floatHeart 1.6s forwards ease-out;
}

@keyframes floatHeart {
  0% {
    opacity: 1;
    transform: translateY(0) scale(0.6) rotate(0deg);
  }
  50% {
    transform: translateY(-80px) scale(1.3) rotate(-15deg);
  }
  100% {
    opacity: 0;
    transform: translateY(-160px) scale(0.9) rotate(15deg);
  }
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */

@media (max-width: 980px) {
  .hero-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .hero-title {
    font-size: 2.3rem;
  }
  .modal-card {
    grid-template-columns: 1fr;
    max-height: 92vh;
  }
  .modal-media-col {
    min-height: 260px;
    max-height: 340px;
  }
  .modal-close-btn {
    top: 0.75rem;
    right: 0.75rem;
  }
}

@media (max-width: 680px) {
  .app-wrapper {
    padding: 1rem 0.85rem 3rem;
  }
  .navbar-pill {
    padding: 0.5rem 0.85rem;
  }
  .nav-btn-text {
    display: none;
  }
  .nav-center {
    display: none;
  }
  .hero-card {
    padding: 1.5rem;
    border-radius: var(--radius-lg);
  }
  .hero-title {
    font-size: 1.85rem;
  }
  .hero-subtitle {
    font-size: 1rem;
  }
  .controls-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .archive-select-wrap {
    flex-direction: column;
    align-items: flex-start;
  }
  .pill-select {
    width: 100%;
  }
  .animal-grid {
    grid-template-columns: 1fr;
  }
  .games-hub-grid {
    grid-template-columns: 1fr !important;
  }
  .memory-board-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

/* ==========================================================================
   Ambient Audio Player Pill (Navbar)
   ========================================================================== */

.ambient-pill-wrapper {
  display: flex;
  align-items: center;
  background: var(--bg-subtle);
  border-radius: var(--radius-pill);
  padding: 2px 4px 2px 2px;
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
}

.ambient-pill-wrapper.is-playing {
  border-color: var(--accent-teal);
  box-shadow: 0 0 0 3px var(--accent-teal-soft);
  animation: ambientGlow 2.5s infinite alternate ease-in-out;
}

@keyframes ambientGlow {
  0% { box-shadow: 0 0 0 2px var(--accent-teal-soft); }
  100% { box-shadow: 0 0 12px 3px rgba(46, 196, 182, 0.4); }
}

.ambient-btn {
  padding: 0.4rem 0.75rem;
  background: transparent;
  border: none;
  box-shadow: none;
  font-size: 0.82rem;
  color: var(--text-main);
  gap: 0.35rem;
}

.ambient-btn:hover {
  transform: none;
  box-shadow: none;
  background: rgba(0, 0, 0, 0.04);
}

.ambient-select-pill {
  border: none;
  background: transparent;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.35rem 0.5rem;
  outline: none;
  border-radius: var(--radius-pill);
}

.ambient-select-pill:focus {
  color: var(--accent-teal);
}

/* ==========================================================================
   Games Hub Section (Tägliches Tier-Quiz & Flausch-Memory)
   ========================================================================== */

.games-hub-section {
  margin-bottom: 2.75rem;
}

.games-hub-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.75rem;
}

.game-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 1.85rem 2rem;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-bouncy);
}

.game-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--border-focus);
}

.game-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

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

.game-icon {
  font-size: 1.8rem;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
}

.game-heading {
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  color: var(--text-main);
  line-height: 1.2;
}

.game-subheading {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Streak Pill */
.quiz-streak-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  background: var(--accent-amber-soft);
  color: #D97706;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 800;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

[data-theme="dark"] .quiz-streak-pill {
  color: #FBBF24;
}

.streak-flame {
  animation: flicker 1.2s infinite alternate ease-in-out;
}

@keyframes flicker {
  0% { transform: scale(1) rotate(-3deg); }
  100% { transform: scale(1.2) rotate(3deg); }
}

/* Quiz Content */
.quiz-question {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 1.25rem;
  line-height: 1.45;
}

.quiz-options-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.quiz-option-btn {
  display: flex;
  align-items: center;
  text-align: left;
  padding: 0.85rem 1.25rem;
  background: var(--bg-subtle);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-bouncy);
}

.quiz-option-btn:hover:not(:disabled) {
  background: var(--bg-surface);
  border-color: var(--theme-accent);
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}

.quiz-option-btn.correct {
  background: #10B981 !important;
  color: #FFFFFF !important;
  border-color: #059669 !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.quiz-option-btn.incorrect {
  background: #EF4444 !important;
  color: #FFFFFF !important;
  border-color: #DC2626 !important;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}

.quiz-feedback-box {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem 1.25rem;
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--accent-teal);
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.feedback-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.feedback-text-wrap strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}

.feedback-text-wrap p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ==========================================================================
   Flausch-Memory Grid
   ========================================================================== */

.memory-stats-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.memory-stat-pill {
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--bg-subtle);
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-pill);
  color: var(--text-main);
}

.memory-restart-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  font-size: 0.9rem;
}

.memory-board-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.65rem;
  margin-top: 0.5rem;
}

.memory-card-item {
  aspect-ratio: 1 / 1;
  perspective: 800px;
  cursor: pointer;
  user-select: none;
}

.memory-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.45s var(--ease-spring);
  transform-style: preserve-3d;
  border-radius: var(--radius-md);
}

.memory-card-item.flipped .memory-card-inner {
  transform: rotateY(180deg);
}

.memory-card-item.matched .memory-card-inner {
  transform: rotateY(180deg) scale(0.96);
}

.memory-card-item.matched {
  cursor: default;
  opacity: 0.85;
}

.memory-card-front, .memory-card-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  border: 2px solid var(--border-subtle);
}

.memory-card-front {
  background: linear-gradient(135deg, var(--bg-subtle) 0%, var(--bg-surface) 100%);
  color: var(--theme-accent);
  font-size: 1.5rem;
}

.memory-card-back {
  background: var(--bg-surface);
  transform: rotateY(180deg);
  overflow: hidden;
  padding: 4px;
}

.memory-card-back img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: calc(var(--radius-md) - 4px);
}

.memory-win-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--accent-teal-soft);
  color: #0F766E;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-lg);
  margin-top: 1rem;
  border: 1px solid rgba(46, 196, 182, 0.3);
  animation: fadeIn 0.35s ease-out;
}

[data-theme="dark"] .memory-win-banner {
  color: #5EEAD4;
}

.btn-sm {
  padding: 0.45rem 1rem;
  font-size: 0.82rem;
}

/* ==========================================================================
   Paw Rating Widget (Cute-O-Meter) on Gallery Cards
   ========================================================================== */

.card-rating-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.55rem;
  margin-top: 0.55rem;
  border-top: 1px dashed var(--border-subtle);
}

.rating-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
}

.paw-rating {
  display: flex;
  gap: 3px;
}

.paw {
  font-size: 0.95rem;
  cursor: pointer;
  opacity: 0.28;
  transition: all 0.2s var(--ease-spring);
  line-height: 1;
}

.paw:hover, .paw.active {
  opacity: 1;
  transform: scale(1.3);
  filter: drop-shadow(0 2px 4px var(--primary-glow));
}

/* ==========================================================================
   Confetti Canvas
   ========================================================================== */

.confetti-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 99999;
}
