/* Verriq - Main Stylesheet */

:root {
  /* Default theme: Bordeaux (dark red) */
  --theme-bg-1: #1a0a0f;
  --theme-bg-2: #2d1118;
  --theme-bg-3: #3d0a16;
  --theme-accent: 203, 40, 91;
  --theme-accent-hex: #cb285b;
  --theme-text: #ffffff;
  --theme-text-muted: rgba(255,255,255,0.85);
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
}

/* Red wines - dark themes */
[data-theme="bordeaux"] {
  --theme-bg-1: #1a0a0f;
  --theme-bg-2: #2d1118;
  --theme-bg-3: #3d0a16;
  --theme-accent: 203, 40, 91;
  --theme-accent-hex: #cb285b;
  --theme-text: #ffffff;
  --theme-text-muted: rgba(255,255,255,0.85);
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
}

[data-theme="rose"] {
  --theme-bg-1: #F5EDE9;
  --theme-bg-2: #EBDFD9;
  --theme-bg-3: #E0D2CA;
  --theme-accent: 114, 47, 55;
  --theme-accent-hex: #722F37;
  --theme-text: #2C2420;
  --theme-text-muted: rgba(44,36,32,0.7);
  --glass-bg: rgba(255, 255, 255, 0.9);
  --glass-border: rgba(114, 47, 55, 0.15);
  --wine-800: 114, 47, 55;
  --wine-900: 90, 35, 42;
}

/* White wines - light themes */
[data-theme="chardonnay"] {
  --theme-bg-1: #f9f6ed;
  --theme-bg-2: #f0ead8;
  --theme-bg-3: #e6ddc2;
  --theme-accent: 140, 100, 40;
  --theme-accent-hex: #8c6428;
  --theme-text: #2a2418;
  --theme-text-muted: rgba(42,36,24,0.75);
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(140, 100, 40, 0.25);
  --wine-800: 80, 60, 30;
  --wine-900: 60, 45, 20;
}

/* Light theme specific overrides for better contrast */
[data-theme="rose"] .text-theme,
[data-theme="chardonnay"] .text-theme {
  color: var(--theme-text) !important;
}

[data-theme="rose"] .text-theme-muted,
[data-theme="chardonnay"] .text-theme-muted {
  color: var(--theme-text-muted) !important;
}

[data-theme="rose"] .text-accent,
[data-theme="chardonnay"] .text-accent {
  color: var(--theme-accent-hex) !important;
}

/* Fix glass cards in light themes */
[data-theme="rose"] .glass,
[data-theme="chardonnay"] .glass {
  background: var(--glass-bg);
  border-color: var(--glass-border);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

/* Fix button colors in light themes */
[data-theme="rose"] .bg-wine-800\/30,
[data-theme="rose"] .bg-wine-800\/40,
[data-theme="rose"] .bg-wine-800\/50,
[data-theme="chardonnay"] .bg-wine-800\/30,
[data-theme="chardonnay"] .bg-wine-800\/40,
[data-theme="chardonnay"] .bg-wine-800\/50 {
  background: rgba(var(--theme-accent), 0.15) !important;
}

[data-theme="rose"] .bg-wine-900\/30,
[data-theme="chardonnay"] .bg-wine-900\/30 {
  background: rgba(var(--theme-accent), 0.1) !important;
}

/* Fix wine-700 borders */
[data-theme="rose"] .border-wine-700\/20,
[data-theme="rose"] .border-wine-700\/30,
[data-theme="chardonnay"] .border-wine-700\/20,
[data-theme="chardonnay"] .border-wine-700\/30 {
  border-color: rgba(var(--theme-accent), 0.2) !important;
}

/* Fix category tag colors in light themes */
[data-theme="rose"] .bg-amber-900\/30,
[data-theme="chardonnay"] .bg-amber-900\/30 {
  background: rgba(180, 120, 40, 0.2) !important;
}

[data-theme="rose"] .text-amber-200\/80,
[data-theme="chardonnay"] .text-amber-200\/80 {
  color: rgba(120, 80, 20, 0.9) !important;
}

[data-theme="rose"] .bg-emerald-900\/30,
[data-theme="chardonnay"] .bg-emerald-900\/30 {
  background: rgba(16, 120, 80, 0.15) !important;
}

[data-theme="rose"] .text-emerald-200\/80,
[data-theme="chardonnay"] .text-emerald-200\/80 {
  color: rgba(16, 100, 70, 0.9) !important;
}

[data-theme="rose"] .bg-cyan-900\/30,
[data-theme="chardonnay"] .bg-cyan-900\/30 {
  background: rgba(6, 140, 160, 0.15) !important;
}

[data-theme="rose"] .text-cyan-200\/80,
[data-theme="chardonnay"] .text-cyan-200\/80 {
  color: rgba(6, 110, 130, 0.9) !important;
}

/* Fix SVG icons in light themes */
[data-theme="rose"] svg path[stroke="rgba(255,255,255,0.5)"],
[data-theme="chardonnay"] svg path[stroke="rgba(255,255,255,0.5)"] {
  stroke: rgba(var(--theme-accent), 0.5);
}

/* Fix gradient text in light themes */
[data-theme="rose"] .text-gradient,
[data-theme="chardonnay"] .text-gradient {
  background: linear-gradient(135deg, var(--theme-accent-hex) 0%, rgba(var(--theme-accent), 0.7) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

/* Improve accordion headers in light themes */
[data-theme="rose"] details summary:hover,
[data-theme="chardonnay"] details summary:hover {
  background: rgba(var(--theme-accent), 0.1);
}

/* Fix blue/purple/red tags in light themes */
[data-theme="rose"] .bg-blue-500\/20,
[data-theme="chardonnay"] .bg-blue-500\/20 {
  background: rgba(59, 130, 246, 0.2) !important;
}

[data-theme="rose"] .text-blue-300,
[data-theme="chardonnay"] .text-blue-300 {
  color: rgb(37, 99, 235) !important;
}

[data-theme="rose"] .bg-purple-500\/20,
[data-theme="chardonnay"] .bg-purple-500\/20 {
  background: rgba(147, 51, 234, 0.2) !important;
}

[data-theme="rose"] .text-purple-300,
[data-theme="chardonnay"] .text-purple-300 {
  color: rgb(126, 34, 206) !important;
}

[data-theme="rose"] .bg-rose-500\/10,
[data-theme="chardonnay"] .bg-rose-500\/10 {
  background: rgba(244, 63, 94, 0.15) !important;
}

[data-theme="rose"] .text-rose-300,
[data-theme="chardonnay"] .text-rose-300 {
  color: rgb(190, 18, 60) !important;
}

[data-theme="rose"] .bg-amber-500\/10,
[data-theme="rose"] .bg-amber-500\/20,
[data-theme="chardonnay"] .bg-amber-500\/10,
[data-theme="chardonnay"] .bg-amber-500\/20 {
  background: rgba(180, 120, 40, 0.2) !important;
}

[data-theme="rose"] .text-amber-300,
[data-theme="rose"] .text-amber-400,
[data-theme="chardonnay"] .text-amber-300,
[data-theme="chardonnay"] .text-amber-400 {
  color: rgb(146, 100, 30) !important;
}

[data-theme="rose"] .bg-green-500\/10,
[data-theme="chardonnay"] .bg-green-500\/10 {
  background: rgba(34, 197, 94, 0.15) !important;
}

[data-theme="rose"] .text-green-300,
[data-theme="rose"] .text-green-400,
[data-theme="chardonnay"] .text-green-300,
[data-theme="chardonnay"] .text-green-400 {
  color: rgb(22, 128, 61) !important;
}

[data-theme="rose"] .bg-red-500\/10,
[data-theme="rose"] .bg-red-500\/20,
[data-theme="chardonnay"] .bg-red-500\/10,
[data-theme="chardonnay"] .bg-red-500\/20 {
  background: rgba(220, 38, 38, 0.15) !important;
}

[data-theme="rose"] .text-red-300,
[data-theme="rose"] .text-red-400,
[data-theme="chardonnay"] .text-red-300,
[data-theme="chardonnay"] .text-red-400 {
  color: rgb(185, 28, 28) !important;
}

[data-theme="rose"] .bg-cyan-500\/10,
[data-theme="chardonnay"] .bg-cyan-500\/10 {
  background: rgba(6, 182, 212, 0.15) !important;
}

[data-theme="rose"] .text-cyan-300,
[data-theme="rose"] .text-cyan-400,
[data-theme="chardonnay"] .text-cyan-300,
[data-theme="chardonnay"] .text-cyan-400 {
  color: rgb(8, 126, 164) !important;
}

[data-theme="rose"] .bg-purple-500\/10,
[data-theme="chardonnay"] .bg-purple-500\/10 {
  background: rgba(168, 85, 247, 0.15) !important;
}

[data-theme="rose"] .text-purple-400,
[data-theme="chardonnay"] .text-purple-400 {
  color: rgb(126, 34, 206) !important;
}

[data-theme="rose"] .bg-yellow-400,
[data-theme="chardonnay"] .bg-yellow-400 {
  background: rgb(234, 179, 8) !important;
}

[data-theme="rose"] .bg-orange-400,
[data-theme="chardonnay"] .bg-orange-400 {
  background: rgb(234, 88, 12) !important;
}

[data-theme="rose"] .text-yellow-400,
[data-theme="chardonnay"] .text-yellow-400 {
  color: rgb(180, 130, 8) !important;
}

[data-theme="rose"] .text-orange-400,
[data-theme="chardonnay"] .text-orange-400 {
  color: rgb(180, 68, 8) !important;
}

/* Fix white text in light themes */
[data-theme="rose"] .text-white,
[data-theme="chardonnay"] .text-white {
  color: var(--theme-text) !important;
}

/* Except in buttons with colored backgrounds */
[data-theme="rose"] button.bg-wine-700 .text-white,
[data-theme="rose"] button.bg-accent .text-white,
[data-theme="rose"] button.bg-emerald-600 .text-white,
[data-theme="rose"] button.bg-amber-600 .text-white,
[data-theme="rose"] a.bg-emerald-600 .text-white,
[data-theme="rose"] .bg-gradient-to-r .text-white,
[data-theme="chardonnay"] button.bg-wine-700 .text-white,
[data-theme="chardonnay"] button.bg-accent .text-white,
[data-theme="chardonnay"] button.bg-emerald-600 .text-white,
[data-theme="chardonnay"] button.bg-amber-600 .text-white,
[data-theme="chardonnay"] a.bg-emerald-600 .text-white,
[data-theme="chardonnay"] .bg-gradient-to-r .text-white {
  color: white !important;
}

/* Actually, be more specific - buttons should keep white text */
[data-theme="rose"] button.text-white,
[data-theme="rose"] a.text-white:not(.text-theme),
[data-theme="chardonnay"] button.text-white,
[data-theme="chardonnay"] a.text-white:not(.text-theme) {
  color: white !important;
}

/* Fix pink/yellow label colors in light themes */
[data-theme="rose"] .text-pink-400,
[data-theme="rose"] .text-pink-300,
[data-theme="chardonnay"] .text-pink-400,
[data-theme="chardonnay"] .text-pink-300 {
  color: rgb(157, 23, 77) !important;
}

[data-theme="rose"] .text-yellow-200,
[data-theme="chardonnay"] .text-yellow-200 {
  color: rgb(146, 110, 20) !important;
}

[data-theme="rose"] .text-red-200,
[data-theme="chardonnay"] .text-red-200 {
  color: rgb(153, 27, 27) !important;
}

[data-theme="rose"] .text-pink-200,
[data-theme="chardonnay"] .text-pink-200 {
  color: rgb(157, 23, 77) !important;
}

/* Fix sky/blue button labels */
[data-theme="rose"] .bg-sky-600\/80,
[data-theme="chardonnay"] .bg-sky-600\/80 {
  background: rgba(2, 132, 199, 0.9) !important;
}

[data-theme="rose"] .bg-slate-600\/60,
[data-theme="chardonnay"] .bg-slate-600\/60 {
  background: rgba(71, 85, 105, 0.7) !important;
}

/* Fix white/90 opacity text */
[data-theme="rose"] .text-white\/90,
[data-theme="chardonnay"] .text-white\/90 {
  color: rgba(255,255,255,0.9) !important;
}

/* Spider chart labels in light themes */
[data-theme="rose"] .profile-spider-chart text,
[data-theme="chardonnay"] .profile-spider-chart text {
  fill: var(--theme-text) !important;
}

/* Spider chart grid lines in light themes */
[data-theme="rose"] .profile-spider-chart polygon[stroke*="rgba(255,255,255"],
[data-theme="chardonnay"] .profile-spider-chart polygon[stroke*="rgba(255,255,255"] {
  stroke: rgba(0, 0, 0, 0.15) !important;
}

[data-theme="rose"] .profile-spider-chart line,
[data-theme="chardonnay"] .profile-spider-chart line {
  stroke: rgba(0, 0, 0, 0.2) !important;
}

.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
}

/* Accessibility - Focus styles */
*:focus-visible {
  outline: 2px solid var(--theme-accent-hex);
  outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--theme-accent-hex);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(var(--theme-accent), 0.2);
}

/* Skip link for keyboard users */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--theme-accent-hex);
  color: white;
  padding: 8px 16px;
  z-index: 100;
  transition: top 0.3s;
}
.skip-link:focus {
  top: 0;
}

/* Reduced motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.gradient-bg {
  background: linear-gradient(135deg, var(--theme-bg-1) 0%, var(--theme-bg-2) 25%, var(--theme-bg-3) 50%, var(--theme-bg-1) 100%);
  color: var(--theme-text);
  transition: background 0.5s ease, color 0.3s ease;
}
.text-gradient {
  background: linear-gradient(135deg, rgba(var(--theme-accent), 0.6) 0%, rgba(var(--theme-accent), 0.8) 50%, var(--theme-accent-hex) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
  padding-bottom: 0.1em;
}
.btn-glow:hover {
  box-shadow: 0 0 30px rgba(var(--theme-accent), 0.5), 0 0 60px rgba(var(--theme-accent), 0.3);
}
.option-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.option-card:hover {
  transform: translateX(8px);
  background: rgba(var(--theme-accent), 0.15);
}
.option-card.selected {
  background: rgba(var(--theme-accent), 0.25);
  border-color: rgba(var(--theme-accent), 0.6);
}
.topic-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.topic-card:hover {
  transform: translateY(-4px);
  background: rgba(var(--theme-accent), 0.15);
  border-color: rgba(var(--theme-accent), 0.4);
}
.topic-card.selected {
  background: rgba(var(--theme-accent), 0.25);
  border-color: rgba(var(--theme-accent), 0.6);
  box-shadow: 0 0 20px rgba(var(--theme-accent), 0.3);
}
.mixed-count-btn.selected,
.mixed-difficulty-option.selected {
  background: rgba(var(--theme-accent), 0.25);
  border-color: rgba(var(--theme-accent), 0.6);
}
.wine-bubble {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(var(--theme-accent), 0.4), rgba(var(--theme-accent), 0.1));
  animation: float 6s ease-in-out infinite;
  transition: background 0.5s ease;
}
.progress-ring {
  transform: rotate(-90deg);
}
.progress-ring-circle {
  transition: stroke-dashoffset 0.5s ease-out;
}
input[type="radio"] {
  accent-color: var(--theme-accent-hex);
}
input[type="radio"]:checked {
  box-shadow: 0 0 10px rgba(var(--theme-accent), 0.5);
}
.scrollbar-thin::-webkit-scrollbar {
  width: 6px;
}
.scrollbar-thin::-webkit-scrollbar-track {
  background: rgba(var(--theme-accent), 0.05);
  border-radius: 3px;
}
.scrollbar-thin::-webkit-scrollbar-thumb {
  background: rgba(var(--theme-accent), 0.4);
  border-radius: 3px;
}
.scrollbar-thin::-webkit-scrollbar-thumb:hover {
  background: rgba(var(--theme-accent), 0.6);
}
/* Hide text cursor on non-interactive elements */
body {
  cursor: default;
}
p, span, h1, h2, h3, h4, h5, h6, div, label {
  cursor: default;
}
/* Theme button styling */
.theme-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}
.theme-btn:hover {
  transform: scale(1.15);
}
.theme-btn.active {
  border-color: var(--theme-text);
  box-shadow: 0 0 10px rgba(var(--theme-accent), 0.5);
}
.theme-btn::after {
  content: '';
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  background: inherit;
}
/* Dynamic text colors based on theme */
.text-theme { color: var(--theme-text); }
.text-theme-muted { color: var(--theme-text-muted); }
.text-accent { color: var(--theme-accent-hex); }
.bg-accent { background-color: var(--theme-accent-hex); }
.border-accent { border-color: rgba(var(--theme-accent), 0.3); }

/* Tasting Slider Styles */
.tasting-slider {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 100%;
  height: 44px;
  background: transparent;
  cursor: pointer;
  touch-action: none;
  margin: 0;
  padding: 0;
}
.tasting-slider:focus {
  outline: none;
}
/* Track */
.tasting-slider::-webkit-slider-runnable-track {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: rgba(var(--theme-accent), 0.2);
}
.tasting-slider::-moz-range-track {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: rgba(var(--theme-accent), 0.2);
  border: none;
}
/* Thumb */
.tasting-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--theme-accent-hex);
  cursor: grab;
  border: 3px solid white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  margin-top: -12px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.tasting-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}
.tasting-slider::-webkit-slider-thumb:active {
  cursor: grabbing;
  transform: scale(1.15);
  box-shadow: 0 4px 16px rgba(0,0,0,0.6);
}
.tasting-slider::-moz-range-thumb {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--theme-accent-hex);
  cursor: grab;
  border: 3px solid white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.tasting-slider::-moz-range-thumb:active {
  cursor: grabbing;
}
.slider-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 0.75rem;
  color: var(--theme-text-muted);
}
.slider-labels span {
  text-align: center;
  flex: 1;
}
.slider-value {
  text-align: center;
  font-weight: 600;
  color: var(--theme-accent-hex);
  margin-top: 4px;
  font-size: 0.9rem;
}

/* Override Tailwind wine-* colors with theme colors */
.text-wine-50, .text-wine-100, .text-wine-200 { color: var(--theme-text) !important; }
.text-wine-300, .text-wine-400, .text-wine-500 { color: var(--theme-text-muted) !important; }
.bg-wine-500\/30, .bg-wine-600\/30 { background-color: rgba(var(--theme-accent), 0.3) !important; }
.bg-wine-800\/30, .bg-wine-800\/50, .bg-wine-900\/50 { background-color: rgba(var(--theme-accent), 0.15) !important; }
.border-wine-600\/40, .border-wine-700\/30, .border-wine-700\/50 { border-color: rgba(var(--theme-accent), 0.3) !important; }
.from-wine-500, .from-wine-600, .from-wine-700 { --tw-gradient-from: var(--theme-accent-hex) !important; }
.to-wine-600, .to-wine-700, .to-wine-800, .to-wine-900 { --tw-gradient-to: rgba(var(--theme-accent), 0.6) !important; }
.hover\:from-wine-500:hover, .hover\:from-wine-600:hover { --tw-gradient-from: rgba(var(--theme-accent), 0.9) !important; }
.hover\:to-wine-600:hover, .hover\:to-wine-700:hover { --tw-gradient-to: rgba(var(--theme-accent), 0.7) !important; }
.hover\:bg-wine-800\/30:hover, .hover\:bg-wine-800\/50:hover { background-color: rgba(var(--theme-accent), 0.25) !important; }
.hover\:text-wine-200:hover { color: var(--theme-text) !important; }
.hover\:border-wine-600\/50:hover { border-color: rgba(var(--theme-accent), 0.5) !important; }
.from-wine-700\/20 { --tw-gradient-from: rgba(var(--theme-accent), 0.2) !important; }
.to-wine-600\/20 { --tw-gradient-to: rgba(var(--theme-accent), 0.15) !important; }
.hover\:from-wine-600\/30:hover { --tw-gradient-from: rgba(var(--theme-accent), 0.3) !important; }
.hover\:to-wine-500\/30:hover { --tw-gradient-to: rgba(var(--theme-accent), 0.25) !important; }

/* Level buttons - 3 tints of accent color */
.level-btn-1 {
  background-color: rgba(var(--theme-accent), 0.5);
}
.level-btn-1:hover {
  background-color: rgba(var(--theme-accent), 0.6);
}
.level-btn-2 {
  background-color: rgba(var(--theme-accent), 0.7);
}
.level-btn-2:hover {
  background-color: rgba(var(--theme-accent), 0.8);
}
.level-btn-3 {
  background-color: rgba(var(--theme-accent), 0.9);
}
.level-btn-3:hover {
  background-color: rgba(var(--theme-accent), 1);
}

/* SDEN buttons - amber/gold tint for distinction */
.level-btn-sden {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.7), rgba(180, 83, 9, 0.8));
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.level-btn-sden:hover {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.85), rgba(180, 83, 9, 0.95));
  border-color: rgba(245, 158, 11, 0.5);
}

/* Home card alignment fix - ensure buttons align at bottom */
.home-card-actions {
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: flex-end;
  gap: 0.5rem;
}

/* Main cards grid layout - Quiz/Oefenen left, Trainer right when logged in */
/* When logged out: Quiz and Oefenen side by side on desktop */
@media (min-width: 768px) {
  #leftCardsColumn.logged-out-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }

  /* Full width container when logged out */
  #mainCardsGrid:has(.logged-out-grid) {
    grid-template-columns: 1fr;
  }
}

/* Ensure all 4 home cards have equal height content areas */
@media (min-width: 1024px) {
  .grid.lg\:grid-cols-4 > .glass.flex-col {
    min-height: 320px;
  }
}

/* Mobile: Add extra bottom margin to glass cards in single column layouts */
@media (max-width: 767px) {
  /* Cards in grids get proper spacing via gap, but ensure minimum spacing */
  .glass.rounded-3xl {
    margin-bottom: 0.25rem;
  }

  /* Grid gap is sufficient, remove extra margin inside grids */
  .grid > .glass.rounded-3xl {
    margin-bottom: 0;
  }
}

/* ==========================================
   Wine Pour Animation (Welcome Modal)
   Clears the blur from bottom to top like wine being poured
   ========================================== */

/* Container for the clarity wave effect */
.wine-clarity-container {
  position: fixed;
  inset: 0;
  z-index: 109;
  pointer-events: none;
  overflow: hidden;
}

/* The wave element that rides the edge of clarity */
.wine-clarity-wave {
  position: absolute;
  left: -10%;
  width: 120%;
  height: 60px;
  bottom: 0;
  animation: waveRise 1.4s cubic-bezier(0.3, 0, 0.2, 1) forwards;
}

.wine-clarity-wave svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 8px rgba(var(--theme-accent), 0.4));
}

/* The wave path animates side to side */
.wine-clarity-wave-inner {
  animation: waveFloat 0.6s ease-in-out infinite;
}

/* Keyframes for the wave rising up the screen */
@keyframes waveRise {
  0% {
    bottom: 0;
  }
  100% {
    bottom: 110vh;
  }
}

/* Keyframes for the wave floating/wobbling motion */
@keyframes waveFloat {
  0%, 100% {
    transform: translateX(0) scaleY(1);
  }
  25% {
    transform: translateX(-1.5%) scaleY(1.1);
  }
  50% {
    transform: translateX(0) scaleY(0.95);
  }
  75% {
    transform: translateX(1.5%) scaleY(1.05);
  }
}

/* Second wave for depth effect */
.wine-clarity-wave-2 {
  animation-delay: 0.15s;
  opacity: 0.5;
}

.wine-clarity-wave-2 .wine-clarity-wave-inner {
  animation-delay: 0.3s;
}

/* Fade out the modal card smoothly */
.welcome-modal-fade-out {
  animation: cardFadeOut 0.4s ease-out forwards;
}

@keyframes cardFadeOut {
  0% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
  100% {
    opacity: 0;
    transform: scale(0.95) translateY(-20px);
  }
}

/* The blur mask that gets revealed from bottom */
.welcome-blur-mask {
  position: fixed;
  inset: 0;
  z-index: 108;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  clip-path: inset(0 0 0 0);
  transition: clip-path 0s linear;
}

.welcome-blur-mask.animating {
  animation: revealClarity 1.4s cubic-bezier(0.3, 0, 0.2, 1) forwards;
}

@keyframes revealClarity {
  0% {
    clip-path: inset(0 0 0 0);
  }
  100% {
    clip-path: inset(100% 0 0 0);
  }
}

/* Wave path colors - theme accent based */
.wine-wave-path {
  fill: rgba(var(--theme-accent), 0.6);
}

.wine-wave-path-2 {
  fill: rgba(var(--theme-accent), 0.3);
}

/* Theme-specific wave colors */
[data-theme="bordeaux"] .wine-wave-path {
  fill: rgba(203, 40, 91, 0.7);
}
[data-theme="bordeaux"] .wine-wave-path-2 {
  fill: rgba(203, 40, 91, 0.4);
}

[data-theme="rose"] .wine-wave-path {
  fill: rgba(114, 47, 55, 0.6);
}
[data-theme="rose"] .wine-wave-path-2 {
  fill: rgba(114, 47, 55, 0.35);
}

[data-theme="chardonnay"] .wine-wave-path {
  fill: rgba(180, 140, 60, 0.6);
}
[data-theme="chardonnay"] .wine-wave-path-2 {
  fill: rgba(180, 140, 60, 0.35);
}
