/* ==========================================================================
   L-TOOL ROULETTE - GIRLY PASTEL CHIC DESIGN SYSTEM
   ========================================================================== */

:root {
  --bg-gradient: linear-gradient(140deg, #fff2f5 0%, #ffe5ec 25%, #fde2e4 50%, #f4e8ff 75%, #ffe6f0 100%);
  --primary-pink: #ff4d6d;
  --primary-pink-hover: #ff2a55;
  --secondary-rose: #ff758f;
  --soft-pink: #ffb3c1;
  --blush-light: #fff0f3;
  --card-glass: rgba(255, 255, 255, 0.82);
  --card-glass-hover: rgba(255, 255, 255, 0.92);
  --card-border: rgba(255, 175, 195, 0.45);
  --card-shadow: 0 20px 45px -10px rgba(255, 77, 109, 0.18), 0 0 25px rgba(255, 182, 193, 0.25);
  --text-dark: #2d1822;
  --text-muted: #7d5a6b;
  --lavender: #8b5cf6;
  --gold-accent: #f59e0b;
  --mint: #10b981;
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --radius-full: 9999px;
  --transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  --font-main: 'Outfit', sans-serif;
  --font-cute: 'Quicksand', sans-serif;
  --font-quote: 'Playfair Display', serif;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-main);
  color: var(--text-dark);
  background: var(--bg-gradient);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  line-height: 1.5;
}

/* Background floating sparkles canvas */
#sparkles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
}

/* App Container */
.app-wrapper {
  position: relative;
  z-index: 1;
  max-width: 820px;
  margin: 0 auto;
  padding: 24px 16px 48px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Header */
.app-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding-top: 8px;
}

.header-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--soft-pink);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 12px rgba(255, 117, 143, 0.15);
}

.badge-text {
  font-family: var(--font-cute);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--primary-pink);
}

.badge-icon {
  font-size: 0.85rem;
}

.app-title {
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 800;
  color: #4a152d;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 10px rgba(255, 77, 109, 0.2);
}

.highlight-text {
  background: linear-gradient(135deg, #ff2a70 0%, #ff758f 50%, #c77dff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.app-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 540px;
  line-height: 1.45;
  font-family: var(--font-cute);
  font-weight: 600;
}

/* ==========================================================================
   GAME STAGE & 3D DICE
   ========================================================================== */
.game-stage {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Dice Arena */
.dice-arena {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.dice-glow-ring {
  position: absolute;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 117, 143, 0.35) 0%, rgba(255, 179, 193, 0.1) 50%, transparent 70%);
  filter: blur(25px);
  animation: pulseGlow 3s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes pulseGlow {
  0% { transform: scale(0.9); opacity: 0.6; }
  100% { transform: scale(1.15); opacity: 0.95; }
}

/* 3D Dice Perspective */
.dice-perspective {
  perspective: 900px;
  width: 170px;
  height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-bottom: 20px;
  user-select: none;
  outline: none;
}

.dice-perspective:focus-visible {
  outline: 3px solid var(--primary-pink);
  outline-offset: 8px;
  border-radius: var(--radius-md);
}

/* 15-Sided Crystal Polyhedral Dice */
.crystal-dice {
  width: 130px;
  height: 130px;
  position: relative;
  transform-style: preserve-3d;
  transform: rotateX(-15deg) rotateY(20deg);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.dice-perspective:hover .crystal-dice {
  transform: rotateX(-10deg) rotateY(35deg) scale(1.06);
}

/* Central Glowing Core */
.dice-core {
  position: absolute;
  inset: 0;
  border-radius: 36px;
  background: radial-gradient(circle at 35% 30%, #ffffff 0%, #ffb3c1 35%, #ff4d6d 75%, #c9184a 100%);
  box-shadow: 
    inset 0 4px 10px rgba(255, 255, 255, 0.8),
    inset 0 -6px 12px rgba(128, 0, 32, 0.4),
    0 18px 36px rgba(255, 77, 109, 0.4),
    0 0 24px rgba(255, 182, 193, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid rgba(255, 255, 255, 0.85);
  overflow: hidden;
}

.dice-current-number {
  font-size: 3.5rem;
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 3px 12px rgba(144, 0, 48, 0.6), 0 0 8px rgba(255, 255, 255, 0.8);
  font-family: var(--font-cute);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Sparkle accents inside dice */
.dice-sparkle-dot {
  position: absolute;
  width: 6px;
  height: 6px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 8px #ffffff;
}

.dice-sparkle-dot.s1 { top: 16px; left: 24px; animation: twinkle 1.5s infinite; }
.dice-sparkle-dot.s2 { bottom: 20px; right: 22px; animation: twinkle 1.8s infinite 0.5s; }
.dice-sparkle-dot.s3 { top: 28px; right: 28px; animation: twinkle 2s infinite 1s; }

@keyframes twinkle {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.3); }
}

/* Polyhedral facet overlays creating the multifaceted gem illusion */
.facet {
  position: absolute;
  inset: 0;
  border-radius: 36px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0.05) 50%, rgba(180, 0, 60, 0.15) 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  pointer-events: none;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 8px 12px;
}

.facet span {
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.facet-front  { transform: translateZ(28px); }
.facet-back   { transform: translateZ(-28px) rotateY(180deg); }
.facet-top    { transform: translateY(-28px) rotateX(90deg); }
.facet-bottom { transform: translateY(28px) rotateX(-90deg); }
.facet-left   { transform: translateX(-28px) rotateY(-90deg); }
.facet-right  { transform: translateX(28px) rotateY(90deg); }
.facet-iso1   { transform: rotateX(45deg) rotateY(45deg) scale(0.9); opacity: 0.35; }
.facet-iso2   { transform: rotateX(-45deg) rotateY(-45deg) scale(0.9); opacity: 0.35; }
.facet-iso3   { transform: rotateX(45deg) rotateY(-45deg) scale(0.88); opacity: 0.25; }
.facet-iso4   { transform: rotateX(-45deg) rotateY(45deg) scale(0.88); opacity: 0.25; }

/* Rolling 3D Animation */
.crystal-dice.is-rolling {
  animation: rollD15 1.4s cubic-bezier(0.2, 0.85, 0.4, 1.1) forwards;
}

@keyframes rollD15 {
  0% {
    transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg) scale(1);
  }
  20% {
    transform: rotateX(360deg) rotateY(180deg) rotateZ(90deg) scale(1.22) translateY(-30px);
  }
  45% {
    transform: rotateX(720deg) rotateY(540deg) rotateZ(270deg) scale(1.15) translateY(-15px);
  }
  70% {
    transform: rotateX(1080deg) rotateY(900deg) rotateZ(450deg) scale(1.05) translateY(-5px);
  }
  85% {
    transform: rotateX(1260deg) rotateY(1080deg) rotateZ(540deg) scale(0.95) translateY(4px);
  }
  100% {
    transform: rotateX(1440deg) rotateY(1260deg) rotateZ(540deg) scale(1) translateY(0);
  }
}

.crystal-dice.celebrate {
  animation: diceBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes diceBounce {
  0%, 100% { transform: rotateX(-15deg) rotateY(20deg) scale(1); }
  40% { transform: rotateX(-5deg) rotateY(15deg) scale(1.25) translateY(-20px); }
  70% { transform: rotateX(-18deg) rotateY(25deg) scale(0.95); }
}

/* Roll Action Bar */
.roll-action-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
}

.primary-roll-btn {
  background: linear-gradient(135deg, #ff4d6d 0%, #ff758f 50%, #f72585 100%);
  color: #ffffff;
  border: none;
  font-family: var(--font-cute);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 16px 40px;
  border-radius: var(--radius-full);
  box-shadow: 
    0 10px 25px -4px rgba(255, 77, 109, 0.5),
    0 0 15px rgba(255, 182, 193, 0.4),
    inset 0 2px 4px rgba(255, 255, 255, 0.5);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.primary-roll-btn::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(60deg, transparent 40%, rgba(255, 255, 255, 0.4) 50%, transparent 60%);
  transform: rotate(25deg);
  animation: shineBtn 3.5s infinite;
}

@keyframes shineBtn {
  0%, 70% { transform: translateX(-100%) rotate(25deg); }
  100% { transform: translateX(100%) rotate(25deg); }
}

.primary-roll-btn:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 14px 30px -4px rgba(255, 77, 109, 0.65), 0 0 22px rgba(255, 117, 143, 0.6);
}

.primary-roll-btn:active {
  transform: translateY(1px) scale(0.98);
}

.primary-roll-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.btn-dice-icon {
  font-size: 1.3rem;
}

/* Quick Options Chips */
.quick-options {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.chip-btn {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--soft-pink);
  color: var(--text-dark);
  font-family: var(--font-cute);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(255, 117, 143, 0.1);
}

.chip-btn:hover {
  background: #ffffff;
  border-color: var(--primary-pink);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 117, 143, 0.2);
}

.chip-btn.active {
  background: #ffe5ec;
  border-color: var(--primary-pink);
  color: var(--primary-pink);
}

/* ==========================================================================
   RESULT CARD (GLASSMORPHIC CHIC)
   ========================================================================== */
.result-card-container {
  width: 100%;
}

.glass-card {
  background: var(--card-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, #ff4d6d, #ff758f, #c77dff, #ffd166, #ff4d6d);
  background-size: 200% auto;
  animation: gradientFlow 4s linear infinite;
}

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

/* Card Header Meta */
.card-top-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.tool-number-pill {
  background: linear-gradient(135deg, #ff4d6d, #ff758f);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  box-shadow: 0 2px 8px rgba(255, 77, 109, 0.3);
}

.tool-category-pill {
  background: rgba(139, 92, 246, 0.12);
  color: var(--lavender);
  border: 1px solid rgba(139, 92, 246, 0.25);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: var(--radius-full);
}

.tool-emoji-badge {
  margin-left: auto;
  font-size: 1.6rem;
  filter: drop-shadow(0 2px 6px rgba(255, 77, 109, 0.25));
}

.tool-title {
  font-size: 1.7rem;
  font-weight: 800;
  color: #3b1325;
  letter-spacing: -0.3px;
  line-height: 1.25;
}

.tool-tagline {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-family: var(--font-cute);
  font-weight: 600;
  margin-top: -12px;
}

/* ==========================================================================
   EXAMPLE QUOTE BOX & AUDIO PLAYER
   ========================================================================== */
.example-quote-box {
  background: #ffffff;
  border: 1.5px solid rgba(255, 175, 195, 0.5);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: 0 8px 24px -6px rgba(255, 77, 109, 0.12);
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
}

.quote-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px dashed rgba(255, 175, 195, 0.6);
  padding-bottom: 14px;
}

.speaker-profile {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar-ring {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffe5ec, #ffb3c1);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border: 2px solid #ffffff;
  box-shadow: 0 3px 10px rgba(255, 77, 109, 0.2);
}

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

.pulse-indicator {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--mint);
  border: 2px solid #ffffff;
  display: none;
}

.pulse-indicator.active {
  display: block;
  animation: pulseGreen 1.2s infinite;
}

@keyframes pulseGreen {
  0% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.speaker-info {
  display: flex;
  flex-direction: column;
}

.speaker-name {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text-dark);
}

.speaker-role {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Speak Button with Soundwaves */
.speak-action-btn {
  background: linear-gradient(135deg, #ff4d6d, #ff758f);
  color: #ffffff;
  border: none;
  font-family: var(--font-cute);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 9px 18px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(255, 77, 109, 0.35);
}

.speak-action-btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 18px rgba(255, 77, 109, 0.5);
}

.speak-action-btn:active {
  transform: translateY(1px);
}

/* Sound Wave Animation */
.sound-wave {
  display: none;
  align-items: center;
  gap: 3px;
  height: 16px;
}

.sound-wave.playing {
  display: flex;
}

.sound-wave .bar {
  width: 3px;
  background: #ffffff;
  border-radius: 2px;
  animation: wavePulse 0.8s ease-in-out infinite alternate;
}

.sound-wave .b1 { height: 6px; animation-delay: 0.1s; }
.sound-wave .b2 { height: 14px; animation-delay: 0.3s; }
.sound-wave .b3 { height: 10px; animation-delay: 0.2s; }
.sound-wave .b4 { height: 8px; animation-delay: 0.4s; }

@keyframes wavePulse {
  0% { height: 4px; }
  100% { height: 16px; }
}

/* Example Text Quote */
.example-text {
  font-family: var(--font-quote);
  font-size: clamp(1.2rem, 3.2vw, 1.45rem);
  font-style: italic;
  font-weight: 600;
  color: #2b111e;
  line-height: 1.45;
  padding: 6px 4px;
  border-left: 4px solid var(--primary-pink);
  padding-left: 14px;
  background: linear-gradient(90deg, #fff5f8 0%, transparent 100%);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* Example Controls */
.example-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 6px;
}

.secondary-pill-btn {
  background: #fff0f3;
  border: 1px solid var(--soft-pink);
  color: var(--primary-pink);
  font-family: var(--font-cute);
  font-size: 0.84rem;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
}

.secondary-pill-btn:hover {
  background: #ffe5ec;
  border-color: var(--primary-pink);
  transform: translateY(-1px);
}

.speed-control-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fdf2f4;
  padding: 3px 6px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 175, 195, 0.4);
}

.speed-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-right: 4px;
  margin-left: 4px;
}

.speed-btn {
  background: transparent;
  border: none;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
}

.speed-btn.active {
  background: #ffffff;
  color: var(--primary-pink);
  box-shadow: 0 1px 4px rgba(255, 77, 109, 0.2);
}

/* ==========================================================================
   ACCORDION RULES & EXPLANATION
   ========================================================================== */
.rule-details-box {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 175, 195, 0.4);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
}

.accordion-toggle {
  width: 100%;
  background: none;
  border: none;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-family: var(--font-main);
  text-align: left;
}

.accordion-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #4a152d;
}

.accordion-chevron {
  font-size: 0.8rem;
  color: var(--primary-pink);
  transition: transform 0.3s ease;
}

.accordion-chevron.open {
  transform: rotate(180deg);
}

.accordion-content {
  display: none;
  padding: 0 18px 18px;
  flex-direction: column;
  gap: 12px;
}

.accordion-content.open {
  display: flex;
}

.rule-explanation {
  font-size: 0.9rem;
  color: var(--text-dark);
  line-height: 1.5;
}

.grammar-formula-box {
  background: #fff0f3;
  border-left: 3px solid var(--lavender);
  padding: 8px 14px;
  border-radius: 4px var(--radius-sm) var(--radius-sm) 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.formula-label {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--lavender);
}

.formula-code {
  font-size: 0.84rem;
  font-family: monospace;
  font-weight: 700;
  color: #3b1325;
}

/* ==========================================================================
   INTERACTIVE PRACTICE SANDBOX
   ========================================================================== */
.practice-box {
  background: linear-gradient(135deg, rgba(255, 240, 245, 0.8), rgba(254, 226, 236, 0.8));
  border: 1px dashed var(--soft-pink);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.practice-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.practice-icon {
  font-size: 1.1rem;
}

.practice-prompt-label {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--primary-pink);
  font-family: var(--font-cute);
}

.practice-input-group {
  display: flex;
  gap: 8px;
}

.practice-input {
  flex: 1;
  background: #ffffff;
  border: 1.5px solid rgba(255, 175, 195, 0.6);
  border-radius: var(--radius-full);
  padding: 10px 16px;
  font-family: var(--font-main);
  font-size: 0.9rem;
  color: var(--text-dark);
  outline: none;
  transition: var(--transition);
}

.practice-input:focus {
  border-color: var(--primary-pink);
  box-shadow: 0 0 0 3px rgba(255, 77, 109, 0.15);
}

.practice-input::placeholder {
  color: #b59fa8;
  font-size: 0.84rem;
}

.practice-speak-btn {
  background: #ffffff;
  border: 1.5px solid var(--soft-pink);
  color: var(--primary-pink);
  font-family: var(--font-cute);
  font-size: 0.84rem;
  font-weight: 700;
  padding: 0 16px;
  border-radius: var(--radius-full);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.practice-speak-btn:hover {
  background: var(--primary-pink);
  color: #ffffff;
  border-color: var(--primary-pink);
}

/* ==========================================================================
   ALL 15 TOOLS MODAL DRAWER
   ========================================================================== */
.tools-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(45, 24, 34, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 100;
  display: none;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.tools-modal-backdrop.open {
  display: flex;
  opacity: 1;
}

.tools-modal-sheet {
  background: #ffffff;
  width: 100%;
  max-width: 760px;
  max-height: 85vh;
  border-radius: 28px 28px 0 0;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.18);
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tools-modal-backdrop.open .tools-modal-sheet {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-title-group h3 {
  font-size: 1.3rem;
  font-weight: 800;
  color: #3b1325;
}

.modal-emoji {
  font-size: 1.5rem;
}

.modal-close-btn {
  background: #fff0f3;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-pink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.modal-close-btn:hover {
  background: var(--primary-pink);
  color: #ffffff;
}

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

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
  padding-bottom: 20px;
}

.tool-chip-card {
  background: #fff7f9;
  border: 1.5px solid rgba(255, 175, 195, 0.4);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
}

.tool-chip-card:hover {
  background: #ffffff;
  border-color: var(--primary-pink);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(255, 77, 109, 0.18);
}

.tool-chip-card.active {
  background: #ffe5ec;
  border-color: var(--primary-pink);
}

.chip-number-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff4d6d, #ff758f);
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(255, 77, 109, 0.3);
}

.chip-card-info {
  display: flex;
  flex-direction: column;
}

.chip-card-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-dark);
}

.chip-card-tag {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.app-footer {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 12px;
}

.app-footer strong {
  color: var(--primary-pink);
}

.footer-links {
  font-size: 0.75rem;
  opacity: 0.8;
}

/* ==========================================================================
   MOBILE & RESPONSIVE TWEAKS
   ========================================================================== */
@media (max-width: 600px) {
  .app-wrapper {
    padding: 16px 12px 32px;
    gap: 18px;
  }
  
  .glass-card {
    padding: 20px 16px;
    border-radius: var(--radius-md);
  }
  
  .primary-roll-btn {
    padding: 14px 28px;
    font-size: 1.05rem;
    width: 100%;
    justify-content: center;
  }
  
  .dice-perspective {
    width: 150px;
    height: 150px;
    margin-bottom: 14px;
  }
  
  .crystal-dice {
    width: 115px;
    height: 115px;
  }
  
  .dice-current-number {
    font-size: 3rem;
  }
  
  .quote-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .speak-action-btn {
    width: 100%;
    justify-content: center;
  }
  
  .practice-input-group {
    flex-direction: column;
  }
  
  .practice-speak-btn {
    padding: 10px;
  }
  
  .tools-grid {
    grid-template-columns: 1fr;
  }
}
