/* CSS Variables & Theme Definition */
:root {
  --font-header: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;

  /* Premium HSL Color Palette */
  --bg-dark: hsl(260, 30%, 6%);
  --panel-bg: hsla(260, 25%, 12%, 0.45);
  --panel-bg-hover: hsla(260, 25%, 18%, 0.6);
  --panel-border: hsla(260, 100%, 100%, 0.08);
  --panel-border-active: hsla(280, 100%, 70%, 0.6);
  
  --text-primary: hsl(0, 0%, 96%);
  --text-secondary: hsl(260, 20%, 70%);
  --text-muted: hsl(260, 15%, 50%);

  /* Neon Gradients */
  --grad-primary: linear-gradient(135deg, hsl(270, 100%, 60%) 0%, hsl(320, 100%, 55%) 100%);
  --grad-secondary: linear-gradient(135deg, hsl(185, 100%, 50%) 0%, hsl(220, 100%, 55%) 100%);
  --grad-accent: linear-gradient(135deg, hsl(35, 100%, 55%) 0%, hsl(10, 100%, 55%) 100%);
  --grad-success: linear-gradient(135deg, hsl(140, 90%, 50%) 0%, hsl(170, 90%, 45%) 100%);
  
  --glow-shadow: 0 0 30px hsla(280, 100%, 60%, 0.3);
  --glow-shadow-hover: 0 0 40px hsla(280, 100%, 65%, 0.55);
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-body);
  height: 100dvh;
  width: 100vw;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

/* Moving Gradient Glowing Backgrounds */
.bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  z-index: 0;
  opacity: 0.45;
  pointer-events: none;
}

.bg-glow-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, hsl(280, 100%, 50%) 0%, transparent 70%);
  top: -100px;
  left: -100px;
  animation: floatGlow1 25s infinite alternate ease-in-out;
}

.bg-glow-2 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, hsl(320, 100%, 45%) 0%, transparent 70%);
  bottom: -150px;
  right: -150px;
  animation: floatGlow2 30s infinite alternate ease-in-out;
}

.bg-glow-3 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, hsl(190, 100%, 40%) 0%, transparent 70%);
  top: 40%;
  left: 30%;
  animation: floatGlow3 20s infinite alternate ease-in-out;
}

@keyframes floatGlow1 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(150px, 80px) scale(1.2); }
}

@keyframes floatGlow2 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-100px, -120px) scale(1.1); }
}

@keyframes floatGlow3 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(80px, -80px) scale(0.9); }
}

/* Kiosk Frame Container (9:16 Aspect Ratio constraints on Desktop/Mock environments) */
.kiosk-container {
  width: 100%;
  height: 100%;
  max-width: 540px; /* Standard vertical preview */
  max-height: 960px; /* standard 9:16 aspect */
  background: hsla(260, 40%, 6%, 0.8);
  border: 1px solid hsla(260, 100%, 100%, 0.05);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.8), inset 0 0 2px hsla(0, 0%, 100%, 0.1);
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 10;
  overflow: hidden;
  border-radius: 32px;
  backdrop-filter: blur(10px);
}

/* If true fullscreen mode is required (e.g. tablet, actual kiosk device) */
@media (max-aspect-ratio: 4/3) {
  .kiosk-container {
    max-width: 100%;
    max-height: 100%;
    border-radius: 0;
    border: none;
  }
}

/* Persistent Kiosk Header */
.kiosk-header {
  padding: 24px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--panel-border);
}

.brand-logos {
  display: flex;
  align-items: center;
  gap: 12px;
}

.kiosk-logo {
  height: 24px;
  object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.15));
}

.glasshouse-logo {
  height: 20px;
}

.penta-logo {
  height: 14px;
}

.logo-divider {
  width: 1px;
  height: 16px;
  background-color: hsla(260, 100%, 100%, 0.12);
}

.header-status {
  display: flex;
  align-items: center;
  gap: 8px;
  background: hsla(140, 100%, 50%, 0.08);
  border: 1px solid hsla(140, 100%, 50%, 0.2);
  padding: 6px 14px;
  border-radius: 30px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: hsl(140, 100%, 50%);
  box-shadow: 0 0 10px hsl(140, 100%, 50%);
  animation: pulseDot 2s infinite;
}

.status-text {
  font-size: 11px;
  font-weight: 600;
  color: hsl(140, 100%, 80%);
  text-transform: uppercase;
  letter-spacing: 1px;
}

@keyframes pulseDot {
  0% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.6; }
}

/* Screens Container */
.screens-container {
  flex: 1;
  position: relative;
  overflow: hidden;
}

/* Core Screen Transitions */
.screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 24px 24px;
  display: none;
  flex-direction: column;
  justify-content: space-between;
}

.screen.active {
  display: flex;
  animation: screenEnter 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.screen.exit {
  display: flex;
  animation: screenExit 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes screenEnter {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.97);
    filter: blur(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes screenExit {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
  to {
    opacity: 0;
    transform: translateY(-30px) scale(0.97);
    filter: blur(10px);
  }
}

/* Button & Typography Utilities */
.gradient-text {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 40px hsla(300, 100%, 50%, 0.1);
}

.btn {
  border: none;
  border-radius: 16px;
  font-family: var(--font-header);
  font-size: 18px;
  font-weight: 700;
  padding: 16px 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.btn:active {
  transform: scale(0.96);
}

.btn-primary {
  background: var(--grad-primary);
  color: var(--text-primary);
  box-shadow: var(--glow-shadow);
}

.btn-primary:active {
  box-shadow: 0 0 20px hsla(280, 100%, 65%, 0.4);
}

.btn-secondary {
  background: var(--panel-bg);
  color: var(--text-primary);
  border: 1px solid var(--panel-border);
}

.btn-secondary:active {
  background: hsla(260, 25%, 22%, 0.8);
  border-color: var(--panel-border-active);
}

.btn-arrow {
  transition: transform 0.2s ease;
}

.btn:hover .btn-arrow {
  transform: translateX(4px);
}

/* SCREEN 1: WELCOME SCREEN SPECIFICS */
.welcome-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 14px;
}

.hero-graphic {
  position: relative;
  width: 150px;
  height: 170px;
  margin-bottom: 8px;
}

.glass-cup {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 75px;
  height: 110px;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px 10px 22px 22px;
  backdrop-filter: blur(5px);
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.liquid {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 75%;
  background: linear-gradient(to top, hsl(325, 100%, 60%), hsl(340, 100%, 65%));
  border-radius: 0 0 20px 20px;
  animation: wave 4s infinite linear;
}

.liquid::after {
  content: '';
  position: absolute;
  top: -10px;
  left: -20%;
  width: 140%;
  height: 20px;
  background: hsla(340, 100%, 75%, 0.6);
  border-radius: 50%;
  animation: liquidSurface 2s infinite ease-in-out alternate;
}

.straw {
  position: absolute;
  top: -20px;
  left: 60%;
  width: 7px;
  height: 100px;
  background: linear-gradient(90deg, hsl(180, 100%, 70%) 30%, hsl(180, 100%, 50%) 70%);
  transform: rotate(15deg);
  border-radius: 5px;
  box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
}

.floating-fruit {
  position: absolute;
  font-size: 24px;
  filter: drop-shadow(0 8px 15px rgba(0,0,0,0.3));
  animation: float 4s infinite ease-in-out;
}

.strawberry {
  top: 10px;
  left: 10px;
  animation-delay: 0s;
}

.banana {
  top: -10px;
  right: 15px;
  animation-delay: 1s;
}

.peach {
  bottom: 50px;
  left: -15px;
  animation-delay: 2s;
}

.milk {
  bottom: 60px;
  right: -10px;
  animation-delay: 1.5s;
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
  50% { transform: translateY(-10px) rotate(8deg) scale(1.05); }
}

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

.welcome-title {
  font-family: var(--font-header);
  font-size: 30px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.5px;
}

.welcome-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
  max-width: 90%;
  margin-bottom: 8px;
}

.welcome-footer {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  animation: pulseText 2s infinite ease-in-out;
}

@keyframes pulseText {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.9; }
}

/* QUESTIONS COMMON LAYOUT */
.screen-header {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.step-badge {
  align-self: flex-start;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-secondary);
}

.progress-bar-outer {
  width: 100%;
  height: 6px;
  background-color: var(--panel-bg);
  border-radius: 10px;
  overflow: hidden;
}

.progress-bar-inner {
  height: 100%;
  background: var(--grad-primary);
  border-radius: 10px;
  box-shadow: 0 0 10px hsla(300, 100%, 55%, 0.5);
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.question-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 32px;
}

.question-text {
  font-family: var(--font-header);
  font-size: 28px;
  font-weight: 800;
  line-height: 1.25;
}

.options-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* OPTION CARD BUTTONS */
.option-card {
  width: 100%;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  text-align: left;
  gap: 18px;
  cursor: pointer;
  position: relative;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.option-card:hover {
  background: var(--panel-bg-hover);
  border-color: var(--panel-border-active);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.option-card:active {
  transform: scale(0.97);
}

.option-icon {
  font-size: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  background: hsla(260, 100%, 100%, 0.04);
  border-radius: 14px;
  transition: transform 0.3s ease;
}

.option-card:hover .option-icon {
  transform: scale(1.1) rotate(5deg);
}

.option-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.option-title {
  font-family: var(--font-header);
  font-weight: 700;
  font-size: 17px;
  color: var(--text-primary);
}

.option-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.35;
}

.select-indicator {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--panel-border);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.2s ease;
}

.option-card:hover .select-indicator {
  border-color: var(--panel-border-active);
}

.option-card.selected {
  background: var(--panel-bg-hover);
  border-color: hsl(280, 100%, 70%);
}

.option-card.selected .select-indicator {
  border-color: hsl(280, 100%, 70%);
  background-color: hsl(280, 100%, 70%);
}

.option-card.selected .select-indicator::after {
  content: '';
  width: 8px;
  height: 8px;
  background-color: var(--text-primary);
  border-radius: 50%;
}

/* RESULT SCREEN SPECIFICS */
.result-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.result-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.success-badge {
  background: hsla(140, 100%, 50%, 0.1);
  border: 1px solid hsla(140, 100%, 50%, 0.3);
  color: hsl(140, 100%, 80%);
  padding: 4px 12px;
  border-radius: 30px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.result-title {
  font-family: var(--font-header);
  font-size: 26px;
  font-weight: 800;
  background: linear-gradient(90deg, #fff, hsl(270, 20%, 80%));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-top: 4px;
}

.result-visual-wrapper {
  position: relative;
  width: 160px;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-glow {
  position: absolute;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: hsl(300, 100%, 50%);
  filter: blur(45px);
  z-index: 1;
  opacity: 0.6;
  animation: pulseGlow 4s infinite ease-in-out;
}

@keyframes pulseGlow {
  0%, 100% { transform: scale(0.9); opacity: 0.55; }
  50% { transform: scale(1.15); opacity: 0.75; }
}

.result-smoothie-image {
  position: relative;
  z-index: 5;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 15px 35px rgba(0, 0, 0, 0.4));
  animation: floatImage 6s infinite ease-in-out;
}

@keyframes floatImage {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(-3deg); }
}

.result-info-card {
  width: 100%;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  backdrop-filter: blur(20px);
}

.ingredients-section h3 {
  font-family: var(--font-header);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.ingredients-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ingredient-tag {
  background: hsla(260, 100%, 100%, 0.05);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.description-section {
  border-top: 1px solid var(--panel-border);
  padding-top: 12px;
}

.description-section p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.slogan-section {
  border-top: 1px dashed var(--panel-border);
  padding-top: 16px;
  text-align: center;
  margin-top: 4px;
}

.slogan-text {
  font-size: 14px;
  color: hsl(280, 100%, 80%);
  text-shadow: 0 0 10px hsla(280, 100%, 60%, 0.2);
  line-height: 1.5;
  font-weight: 500;
}

.slogan-text strong {
  color: hsl(320, 100%, 75%);
  font-weight: 700;
}

.result-actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.result-actions .btn {
  width: 100%;
}

.countdown-text {
  font-size: 12px;
  color: var(--text-muted);
}

#countdown-timer {
  font-weight: 700;
  color: var(--text-secondary);
}

/* Persistent Kiosk Footer */
.kiosk-footer {
  padding: 20px;
  text-align: center;
  border-top: 1px solid var(--panel-border);
}

.kiosk-footer p {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}
