@import url('https://fonts.googleapis.com/css2?family=Prompt:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=Kanit:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --bg-cream: #FAF6F0;
  --bg-cream-soft: #F5EFEB;
  --bg-card: rgba(255, 255, 255, 0.88);
  --text-main: #2D231E;
  --text-muted: #7A6558;
  --text-light: #9B887D;
  --border-warm: rgba(140, 105, 75, 0.16);
  --accent-brown: #7F5539;
  --accent-brown-light: #9C6644;
  --accent-caramel: #8C6239;
  --accent-amber: #D4A373;
}

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

body {
  font-family: 'Prompt', 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-cream);
  color: var(--text-main);
  overflow-x: hidden;
  user-select: none;
}

h1, h2, h3, .heading-kanit {
  font-family: 'Kanit', 'Prompt', sans-serif;
  color: var(--text-main);
}

/* Custom Scrollbar in Warm Brown */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(140, 105, 75, 0.05);
}
::-webkit-scrollbar-thumb {
  background: rgba(140, 105, 75, 0.25);
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(140, 105, 75, 0.45);
}

/* Minimalist Glassmorphism in Cream / Warm White */
.glass-panel {
  background: rgba(255, 253, 250, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-warm);
  box-shadow: 0 16px 40px rgba(74, 52, 35, 0.06), 0 2px 6px rgba(74, 52, 35, 0.02);
}

.glass-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(140, 105, 75, 0.12);
  box-shadow: 0 8px 24px rgba(74, 52, 35, 0.04);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover {
  border-color: rgba(127, 85, 57, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(127, 85, 57, 0.12);
}

/* Ambient Warm Orbs */
.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(110px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.65;
  animation: floatOrb 20s ease-in-out infinite alternate;
}

.orb-1 {
  width: 500px;
  height: 500px;
  top: -120px;
  right: -80px;
  background: radial-gradient(circle, #E6D5C3 0%, rgba(230, 213, 195, 0) 70%);
}

.orb-2 {
  width: 600px;
  height: 600px;
  bottom: -180px;
  left: -120px;
  background: radial-gradient(circle, #EDE0D4 0%, rgba(237, 224, 212, 0) 70%);
  animation-duration: 24s;
  animation-delay: -6s;
}

.orb-3 {
  width: 400px;
  height: 400px;
  top: 35%;
  left: 30%;
  background: radial-gradient(circle, #DDB892 0%, rgba(221, 184, 146, 0) 70%);
  opacity: 0.35;
  animation-duration: 28s;
  animation-delay: -12s;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(35px, -25px) scale(1.08); }
  100% { transform: translate(-25px, 35px) scale(0.96); }
}

/* Button Pulse Animation */
@keyframes pulseGlowBrown {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 8px 24px rgba(127, 85, 57, 0.3);
  }
  50% {
    transform: scale(1.025);
    box-shadow: 0 12px 32px rgba(127, 85, 57, 0.45);
  }
}

.btn-pulse {
  animation: pulseGlowBrown 2.6s infinite ease-in-out;
}

/* Screen Views */
.screen-view {
  opacity: 0;
  transform: scale(0.98) translateY(10px);
  pointer-events: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: none;
}

.screen-view.active {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
  position: relative;
  display: flex;
}

/* Glass Cup Liquid Fill Animation */
.cup-container {
  position: relative;
  width: 160px;
  height: 240px;
  margin: 0 auto;
}

.cup-glass {
  position: absolute;
  inset: 0;
  border-left: 5px solid rgba(140, 105, 75, 0.3);
  border-right: 5px solid rgba(140, 105, 75, 0.3);
  border-bottom: 8px solid rgba(140, 105, 75, 0.4);
  border-bottom-left-radius: 36px;
  border-bottom-right-radius: 36px;
  box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.8), 0 15px 35px rgba(74, 52, 35, 0.12);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(4px);
  z-index: 10;
}

.liquid {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 0%;
  background: linear-gradient(180deg, #D4A373 0%, #8C6239 100%);
  transition: height 0.3s ease-out, background 0.8s ease;
  z-index: 5;
}

.liquid-wave {
  position: absolute;
  top: -12px;
  left: -50%;
  width: 200%;
  height: 24px;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 40%;
  animation: waveMotion 2.5s linear infinite;
}

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

/* Bubbles */
.bubble {
  position: absolute;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  animation: bubbleRise 3s infinite ease-in;
}

@keyframes bubbleRise {
  0% {
    bottom: 5px;
    transform: translateX(0) scale(0.6);
    opacity: 0.8;
  }
  100% {
    bottom: 95%;
    transform: translateX(15px) scale(1.2);
    opacity: 0;
  }
}

/* Steam Effect */
.steam-container {
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 2;
}

.steam-line {
  width: 6px;
  height: 38px;
  background: linear-gradient(to top, rgba(140, 105, 75, 0.35), transparent);
  border-radius: 999px;
  filter: blur(2.5px);
  animation: steamRise 2s infinite ease-out;
}

.steam-line:nth-child(2) {
  animation-delay: 0.4s;
  height: 48px;
}

.steam-line:nth-child(3) {
  animation-delay: 0.8s;
  height: 34px;
}

@keyframes steamRise {
  0% {
    transform: translateY(10px) scaleX(1);
    opacity: 0;
  }
  50% {
    opacity: 0.6;
    transform: translateY(-15px) scaleX(1.5);
  }
  100% {
    transform: translateY(-40px) scaleX(2.5);
    opacity: 0;
  }
}

/* Loyalty Stamp Card */
.stamp-slot {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(140, 105, 75, 0.07);
  border: 2px dashed rgba(140, 105, 75, 0.25);
  color: #8C776C;
  transition: all 0.3s;
}

.stamp-slot.active {
  background: linear-gradient(135deg, #8C6239, #6E4924);
  border-style: solid;
  border-color: #8C6239;
  color: #FFFFFF;
  box-shadow: 0 4px 15px rgba(140, 98, 57, 0.35);
  animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
  0% { transform: scale(0); opacity: 0; }
  70% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

/* Rating Stars */
.star-btn {
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.2s;
  color: #D4C5B9;
}
.star-btn:hover, .star-btn.active {
  transform: scale(1.25);
  color: #D97706 !important;
}

/* Sweetness Buttons */
.sweet-pill {
  border: 1px solid rgba(140, 105, 75, 0.18);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-main);
  transition: all 0.25s ease;
}

.sweet-pill:hover {
  border-color: rgba(127, 85, 57, 0.4);
  background: #FFFDF9;
}

.sweet-pill.active {
  background: linear-gradient(135deg, #7F5539 0%, #9C6644 100%);
  border-color: #7F5539;
  box-shadow: 0 4px 15px rgba(127, 85, 57, 0.28);
  color: #FFFFFF;
  font-weight: 600;
  transform: scale(1.04);
}

.sweet-pill.active span {
  color: #FFFFFF !important;
}

/* Temperature Buttons */
.temp-pill {
  border: 1px solid rgba(140, 105, 75, 0.18);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-main);
  transition: all 0.25s ease;
}

.temp-pill:hover {
  border-color: rgba(127, 85, 57, 0.4);
}

.temp-pill.active {
  border-color: #4A7C59;
  background: linear-gradient(135deg, #588157 0%, #3A5A40 100%);
  box-shadow: 0 4px 15px rgba(58, 90, 64, 0.28);
  color: #FFFFFF;
}

.temp-pill.active-warm {
  border-color: #B25D34;
  background: linear-gradient(135deg, #C26D38 0%, #A3501E 100%);
  box-shadow: 0 4px 15px rgba(163, 80, 30, 0.28);
  color: #FFFFFF;
}
