:root {
  --bg: #140e0a;
  --bg2: #241912;
  --cream: #f5ebd9;
  --muted: #a68b6c;
  --accent: #e59846;
  --ceramic-top: #ffffff;
  --ceramic-main: #ebdcd0;
  --ceramic-shade: #cfb7a1;
  --coffee-dark: #2a150b;
  --coffee-mid: #5c3017;
  --coffee-rich: #8c4c23;
  --crema: #d89658;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: radial-gradient(circle at 50% 30%, #2b1d16 0%, var(--bg) 80%);
  color: var(--cream);
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

.stage {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: clamp(1.2rem, 4vw, 2.5rem);
}

/* top */
.top {
  width: 100%;
  max-width: 480px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-size: 1.5rem;
  letter-spacing: 0.18em;
  font-weight: 800;
  color: var(--accent);
  text-shadow: 0 2px 10px rgba(229, 152, 70, 0.25);
}
.mood {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--muted);
  transition: all 0.4s ease;
  font-weight: 600;
}
.mood.lit {
  color: #ffc278;
  text-shadow: 0 0 12px rgba(255, 194, 120, 0.4);
}

/* cup area */
.cup-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.steam {
  display: flex;
  gap: 20px;
  height: 65px;
  align-items: flex-start;
  justify-content: center;
  margin-bottom: 2px;
  filter: drop-shadow(0 0 8px rgba(255, 230, 200, 0.2));
}
.steam span {
  width: 10px;
  height: 42px;
  border-radius: 999px;
  background: radial-gradient(ellipse at center, rgba(255, 240, 220, 0.45) 0%, rgba(255, 240, 220, 0) 70%);
  filter: blur(5px);
  animation: rise 2.6s ease-in-out infinite;
  opacity: 0;
}
.steam span:nth-child(2) { animation-delay: 0.85s; width: 14px; }
.steam span:nth-child(3) { animation-delay: 1.7s; }

@keyframes rise {
  0% { transform: translateY(16px) scaleX(0.7) skewX(0deg); opacity: 0; }
  35% { opacity: 0.75; transform: translateY(0px) scaleX(1) skewX(-4deg); }
  70% { opacity: 0.5; transform: translateY(-18px) scaleX(1.3) skewX(4deg); }
  100% { transform: translateY(-38px) scaleX(1.7) skewX(-2deg); opacity: 0; }
}

.saucer-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cup-wrap {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  z-index: 2;
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
  padding: 0;
}
.cup-wrap:active {
  transform: scale(0.96) translateY(2px);
}

.cup-body {
  position: relative;
  width: 190px;
  height: 145px;
  background: linear-gradient(135deg, var(--ceramic-top) 0%, var(--ceramic-main) 35%, var(--ceramic-shade) 100%);
  border-radius: 18px 18px 46px 46px;
  box-shadow:
    inset -10px -8px 20px rgba(100, 70, 45, 0.4),
    inset 8px 6px 14px rgba(255, 255, 255, 0.95),
    0 24px 38px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

/* Rim & Coffee Top */
.cup-rim {
  position: absolute;
  top: 8px;
  left: 14px;
  right: 14px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(180deg, #d8c6b4 0%, #b39a82 100%);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4);
  padding: 3px;
  z-index: 3;
}

.coffee-surface {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(ellipse at 35% 35%, var(--coffee-mid) 0%, var(--coffee-dark) 85%);
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.6);
}

.crema {
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  background: radial-gradient(ellipse at 65% 35%, rgba(229, 152, 70, 0.5) 0%, rgba(140, 76, 35, 0.25) 45%, transparent 75%);
  filter: blur(1px);
}

.ripple {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  opacity: 0;
  transform: scale(0.3);
}

.ripple.animate {
  animation: rippleEffect 0.5s ease-out;
}

@keyframes rippleEffect {
  0% { transform: scale(0.2); opacity: 0.8; }
  100% { transform: scale(1.1); opacity: 0; }
}

/* Liquid level inside front view */
.liquid-chamber {
  position: absolute;
  bottom: 12px;
  left: 16px;
  right: 16px;
  top: 36px;
  border-radius: 0 0 36px 36px;
  overflow: hidden;
  pointer-events: none;
  background: rgba(40, 20, 10, 0.2);
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.4);
}

.liquid {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 100%;
  background: linear-gradient(180deg, var(--coffee-rich) 0%, var(--coffee-mid) 40%, var(--coffee-dark) 100%);
  border-radius: 0 0 36px 36px;
  transition: height 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: inset 0 6px 12px rgba(255, 200, 140, 0.25);
}

.liquid::before {
  content: "";
  position: absolute;
  top: -4px;
  left: 0;
  right: 0;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(90deg, #df974f, #f7c285, #b86728);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Gloss highlight on cup body */
.cup-gloss {
  position: absolute;
  top: 10px;
  left: 14px;
  width: 14px;
  height: 90px;
  background: linear-gradient(180deg, rgba(255,255,255,0.7) 0%, rgba(255,255,255,0.05) 100%);
  border-radius: 10px;
  filter: blur(1.5px);
  pointer-events: none;
  z-index: 4;
}

/* Handle */
.handle {
  position: absolute;
  right: -32px;
  top: 28px;
  width: 44px;
  height: 76px;
  border: 14px solid var(--ceramic-main);
  border-left: none;
  border-radius: 0 32px 36px 0;
  box-shadow:
    inset -3px 3px 6px rgba(255,255,255,0.7),
    inset -3px -3px 6px rgba(100, 70, 50, 0.3),
    4px 10px 18px rgba(0,0,0,0.4);
  z-index: 1;
}

/* Saucer & Base shadow */
.saucer {
  position: absolute;
  bottom: -10px;
  width: 240px;
  height: 30px;
  background: linear-gradient(180deg, var(--ceramic-top) 0%, var(--ceramic-main) 45%, var(--ceramic-shade) 100%);
  border-radius: 50%;
  box-shadow:
    inset 0 4px 6px rgba(255,255,255,0.8),
    inset 0 -4px 8px rgba(90, 65, 45, 0.3),
    0 12px 28px rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.cup-shadow {
  position: absolute;
  bottom: -22px;
  width: 210px;
  height: 18px;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.6) 0%, transparent 75%);
  border-radius: 50%;
  filter: blur(4px);
  z-index: 0;
}

.hint {
  margin-top: 36px;
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

/* bottom */
.bottom {
  width: 100%;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.sips {
  text-align: center;
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.sips span { color: var(--accent); font-weight: 700; font-size: 1.1rem; }

.fill {
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);
}
.fill-bar {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), #ffd17b);
  box-shadow: 0 0 10px rgba(229, 152, 70, 0.5);
  transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact {
  text-align: center;
  margin-top: 4px;
}

.mail-link {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-decoration: none;
  transition: all 0.25s ease;
  padding: 4px 10px;
  border-radius: 6px;
}
.mail-link:hover {
  color: var(--accent);
  text-shadow: 0 0 8px rgba(229, 152, 70, 0.3);
}