@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700;800&family=Inter:wght@400;500;600&display=swap');

:root {
  /* Dark Theme (Default) */
  --bg-color: oklch(12% 0.01 250);
  --bg-gradient: linear-gradient(to bottom, oklch(15% 0.02 250), oklch(10% 0.01 250));
  --card-bg: oklch(22% 0.03 250 / 0.7);
  --text-main: oklch(95% 0.01 250);
  --text-muted: oklch(70% 0.01 250);
  
  --accent-gold: oklch(85% 0.15 85);
  --accent-blue: oklch(70% 0.15 250);
  --accent-emerald: oklch(80% 0.15 150);
  --accent-crimson: oklch(65% 0.2 25);
  
  /* Poker Suits - 4-Color Style */
  --suit-spade: oklch(100% 0 0);
  --suit-heart: oklch(60% 0.2 25);
  --suit-diamond: oklch(65% 0.15 250);
  --suit-club: oklch(70% 0.15 150);
  
  --glass-border: oklch(100% 0 0 / 0.1);
  --glass-highlight: oklch(100% 0 0 / 0.05);
  
  --font-main: 'Inter', sans-serif;
  --font-heading: 'Montserrat', sans-serif;
}

[data-theme="light"] {
  --bg-color: oklch(98% 0.01 250);
  --bg-gradient: linear-gradient(to bottom, oklch(98% 0.01 250), oklch(94% 0.02 250));
  --card-bg: oklch(100% 0 0 / 0.6);
  --text-main: oklch(20% 0.02 250);
  --text-muted: oklch(50% 0.02 250);
  
  --glass-border: oklch(0% 0 0 / 0.08);
  --glass-highlight: oklch(0% 0 0 / 0.02);
  
  --suit-spade: oklch(20% 0.02 250); /* Darker for light mode */
}

/* Base Reset & Background */
body {
  background-color: var(--bg-color);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-main);
  font-family: var(--font-main);
  margin: 0;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* Typography Customization */
h1, h2, h3 {
  font-family: var(--font-heading);
  letter-spacing: -0.02em;
}

/* Glassmorphism Components */
.glass-card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  box-shadow: 
    0 4px 6px -1px oklch(0% 0 0 / 0.3),
    0 20px 40px -10px oklch(0% 0 0 / 0.5),
    inset 0 1px 1px var(--glass-highlight);
}

/* Modern Segmented Control */
.segmented-control {
  background: oklch(0% 0 0 / 0.3);
  padding: 4px;
  border-radius: 12px;
  display: grid;
  grid-auto-flow: column;
  gap: 4px;
}

.segmented-control button {
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  color: oklch(70% 0.01 250);
}

.segmented-control button.active {
  background: var(--accent-blue);
  color: oklch(15% 0.02 250);
  box-shadow: 0 4px 12px oklch(70% 0.15 250 / 0.4);
}

/* Interactive Cards */
.card-slot {
  aspect-ratio: 2.5/3.5;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

.card-slot::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, oklch(100% 0 0 / 0.1), transparent);
  pointer-events: none;
}

.card-slot.selected {
  border-color: var(--accent-gold);
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 0 20px oklch(85% 0.15 85 / 0.3);
}

.card-slot .rank {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(to bottom, #fff, #ccc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Modal Animation */
#selector-modal {
  transition: opacity 0.3s ease;
}

#selector-modal.hidden {
  display: none;
  opacity: 0;
}

#selector-modal:not(.hidden) .modal-content {
  animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

/* Result Visualization */
.equity-display {
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 20px currentColor;
}

.tier-badge {
  padding: 4px 16px;
  border-radius: 99px;
  font-size: 1.5rem;
  font-weight: 800;
  text-transform: uppercase;
}

/* Flop Specific UI */
.strength-meter {
  height: 8px;
  background: oklch(0% 0 0 / 0.3);
  border-radius: 99px;
  overflow: hidden;
  position: relative;
}

.strength-bar {
  height: 100%;
  transition: width 1s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 0 15px currentColor;
}

.phase-badge {
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.stat-card {
  background: oklch(100% 0 0 / 0.03);
  border: 1px solid oklch(100% 0 0 / 0.05);
  padding: 12px;
  border-radius: 16px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: oklch(100% 0 0 / 0.1);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: oklch(100% 0 0 / 0.2);
}
