:root {
  --coffee-dark: #2C1810;
  --coffee-mid: #5D4037;
  --coffee-light: #8D6E63;
  --cream: #FFF8E1;
  --cream-soft: #FFFDE7;
  --shower-blue: #81D4FA;
  --shower-blue-light: #B3E5FC;
  --shower-blue-dark: #4FC3F7;
  --accent-orange: #FF8F00;
  --accent-red: #E53935;
  --accent-green: #43A047;
  --danger-safe: #66BB6A;
  --danger-edge: #FFA726;
  --danger-maniac: #EF5350;
  --danger-legend: #AB47BC;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Fredoka', sans-serif;
  background: var(--coffee-dark);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Steam background animation */
.steam-bg {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 0;
  background: linear-gradient(
    180deg,
    #1a0f0a 0%,
    #2C1810 30%,
    #3E2723 60%,
    #2C1810 100%
  );
  overflow: hidden;
}

.steam-bg::before,
.steam-bg::after {
  content: '';
  position: absolute;
  width: 200%;
  height: 200%;
  top: -50%;
  left: -50%;
  opacity: 0.04;
  animation: steamDrift 20s ease-in-out infinite;
}

.steam-bg::before {
  background: radial-gradient(ellipse at 30% 50%, var(--shower-blue) 0%, transparent 60%);
  animation-delay: -5s;
}

.steam-bg::after {
  background: radial-gradient(ellipse at 70% 40%, var(--cream) 0%, transparent 50%);
  animation-delay: -12s;
  animation-duration: 25s;
}

@keyframes steamDrift {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(3%, -2%) rotate(1deg); }
  50% { transform: translate(-2%, 3%) rotate(-1deg); }
  75% { transform: translate(2%, 1%) rotate(0.5deg); }
}

/* Steam wisps */
.steam-wisp {
  position: absolute;
  width: 60px;
  height: 80px;
  background: radial-gradient(ellipse, rgba(255,255,255,0.08) 0%, transparent 70%);
  border-radius: 50%;
  animation: wispFloat 8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes wispFloat {
  0% { transform: translateY(0) scale(1); opacity: 0; }
  20% { opacity: 0.6; }
  80% { opacity: 0.2; }
  100% { transform: translateY(-120px) scale(1.8); opacity: 0; }
}

/* Glass card */
.glass-card {
  background: rgba(255, 248, 225, 0.07);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 248, 225, 0.12);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.glass-card-light {
  background: rgba(255, 248, 225, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 248, 225, 0.15);
  border-radius: 16px;
}

/* Timer ring */
.timer-ring-bg {
  fill: none;
  stroke: rgba(255,255,255,0.08);
  stroke-width: 8;
}

.timer-ring-progress {
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: center;
  transition: stroke 1s ease, stroke-dashoffset 1s linear;
}

/* Sip button ripple */
.ripple-container {
  position: relative;
  overflow: hidden;
  border-radius: 50%;
}

.ripple-effect {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  animation: rippleExpand 0.8s ease-out forwards;
  pointer-events: none;
}

@keyframes rippleExpand {
  0% { transform: scale(0); opacity: 1; }
  100% { transform: scale(4); opacity: 0; }
}

/* Coffee cup wobble */
.coffee-wobble {
  display: inline-block;
  animation: wobble 4s ease-in-out infinite;
}

@keyframes wobble {
  0%, 85%, 100% { transform: rotate(0deg); }
  88% { transform: rotate(-8deg); }
  91% { transform: rotate(6deg); }
  94% { transform: rotate(-4deg); }
  97% { transform: rotate(2deg); }
}

/* Button press */
.btn-press {
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.btn-press:active {
  transform: scale(0.95) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3) !important;
}

/* Danger needle */
.danger-needle {
  transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: bottom center;
}

/* Tip card */
.tip-fade-enter {
  animation: tipFade 0.5s ease-in-out;
}

@keyframes tipFade {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 4px;
}
::-webkit-scrollbar-thumb {
  background: rgba(255,248,225,0.2);
  border-radius: 4px;
}

/* Water drop animation */
.water-drop {
  animation: dropFall 1.5s ease-in infinite;
}

@keyframes dropFall {
  0% { transform: translateY(-10px); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(20px); opacity: 0; }
}

/* Thermometer liquid */
.thermo-liquid {
  transition: height 1s ease, background-color 1s ease;
}

/* Session history scroll */
.history-scroll {
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.history-scroll > div {
  scroll-snap-align: start;
}

/* Pulsing glow */
.pulse-glow {
  animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 20px rgba(255, 143, 0, 0.3); }
  50% { box-shadow: 0 0 40px rgba(255, 143, 0, 0.6); }
}

.caveat-font {
  font-family: 'Caveat', cursive;
}