/* Main Theme & Kiosk 9:16 Responsive Container */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700;800;900&family=Outfit:wght@400;600;700;800;900&display=swap');

:root {
  --eh-green: #3c8348;
  --eh-green-dark: #27562f;
  --eh-green-glow: #52b363;
  --gold-primary: #ffd700;
  --gold-gradient: linear-gradient(135deg, #ffe57f 0%, #ffc107 50%, #ff8f00 100%);
  --gold-border: linear-gradient(135deg, #fff3b0, #ffd700, #b8860b, #ffd700);
  --casino-red: #9e1414;
  --casino-dark-red: #5c0000;
  --bg-dark: #121914;
  --glass-bg: rgba(18, 40, 22, 0.75);
  --glass-border: rgba(255, 215, 0, 0.3);
  --shadow-gold: 0 0 25px rgba(255, 215, 0, 0.4);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

body, html {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #080c09;
  font-family: 'Outfit', 'Montserrat', sans-serif;
  color: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Kiosk 9:16 Aspect Ratio Enforcer */
.kiosk-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  max-width: calc(100vh * (9 / 16));
  max-height: 100vh;
  background: radial-gradient(circle at center, #1b3d22 0%, #0a170d 70%, #050b06 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  overflow: hidden;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.9), 0 0 30px rgba(60, 131, 72, 0.3);
  border-left: 2px solid rgba(255, 215, 0, 0.2);
  border-right: 2px solid rgba(255, 215, 0, 0.2);
}

/* Animated Radiant Rays Background */
.kiosk-bg-rays {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: repeating-conic-gradient(
    from 0deg,
    rgba(60, 131, 72, 0.15) 0deg 15deg,
    rgba(10, 23, 13, 0.05) 15deg 30deg
  );
  animation: rotateRays 60s linear infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes rotateRays {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Header & Logo Display */
.brand-header {
  position: relative;
  z-index: 10;
  width: 100%;
  padding-top: 20px;
  padding-bottom: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.brand-logo-img {
  max-width: 82%;
  max-height: 165px;
  object-fit: contain;
  filter: drop-shadow(0 6px 15px rgba(0, 0, 0, 0.7)) drop-shadow(0 0 20px rgba(255, 215, 0, 0.3));
  transition: transform 0.3s ease;
}

.brand-logo-img:hover {
  transform: scale(1.03);
}

/* View Section Wrappers */
.page-view {
  position: relative;
  z-index: 10;
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 15px 20px;
  animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- PAGE 1: WELCOME SCREEN --- */
.welcome-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 30px;
  width: 100%;
}

.jackpot-banner-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 3rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 5px;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 4px 20px rgba(255, 215, 0, 0.5);
  margin-bottom: 5px;
}

.welcome-subtitle {
  font-size: 1.25rem;
  color: #d1e7d5;
  font-weight: 600;
  letter-spacing: 1px;
}

/* Golden Glowing Action Buttons */
.btn-gold-pulse {
  position: relative;
  width: 85%;
  max-width: 320px;
  padding: 20px 30px;
  font-family: 'Montserrat', sans-serif;
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #3b0000;
  background: var(--gold-gradient);
  border: 3px solid #ffffff;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 30px rgba(255, 215, 0, 0.8);
  outline: none;
  transition: all 0.25s ease;
  animation: pulseGlow 2s infinite alternate;
}

.btn-gold-pulse:active {
  transform: scale(0.95);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.8), 0 0 15px rgba(255, 215, 0, 0.9);
}

@keyframes pulseGlow {
  0% { transform: scale(1); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 25px rgba(255, 215, 0, 0.7); }
  100% { transform: scale(1.05); box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7), 0 0 45px rgba(255, 215, 0, 1); }
}

/* --- PAGE 2: REGISTRATION FORM --- */
.register-card {
  width: 90%;
  max-width: 380px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 2px solid var(--glass-border);
  border-radius: 24px;
  padding: 30px 25px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), inset 0 0 20px rgba(255, 215, 0, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

.form-group {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center; /* Center aligned field labels */
}

.form-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gold-primary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  text-align: center; /* Center text labels */
}

.form-input {
  width: 100%;
  height: 56px;
  background: rgba(0, 0, 0, 0.6);
  border: 2px solid rgba(255, 215, 0, 0.4);
  border-radius: 14px;
  color: #ffffff;
  font-family: 'Outfit', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  text-align: center; /* Center input field text */
  letter-spacing: 1px;
  outline: none;
  transition: all 0.3s ease;
}

.form-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
  text-align: center; /* Center placeholder text */
  font-weight: 500;
  font-size: 1.1rem;
}

.form-input:focus {
  border-color: var(--gold-primary);
  background: rgba(0, 0, 0, 0.85);
  box-shadow: 0 0 18px rgba(255, 215, 0, 0.5);
}

.form-input.error-field {
  border-color: #ff4d4d;
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

.error-text {
  color: #ff6b6b;
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 6px;
  text-align: center;
}

/* --- PAGE 4: RESULT SCREEN --- */
.result-card {
  width: 90%;
  max-width: 380px;
  background: var(--glass-bg);
  backdrop-filter: blur(15px);
  border: 3px solid var(--gold-primary);
  border-radius: 24px;
  padding: 20px 18px;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8), var(--shadow-gold);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-sizing: border-box;
}

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

.result-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.7rem;
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1.2;
}

.win-title {
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 4px 18px rgba(255, 215, 0, 0.8);
}

.lose-title {
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.result-message {
  font-size: 1.05rem;
  color: #e0f2e3;
  line-height: 1.4;
  font-weight: 600;
}

.winning-items-display {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 6px 0;
  width: 100%;
}

.winning-item-badge {
  width: 70px;
  height: 70px;
  background: radial-gradient(circle, rgba(255,215,0,0.3) 0%, rgba(0,0,0,0.6) 80%);
  border: 2px solid var(--gold-primary);
  border-radius: 14px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.winning-item-badge img {
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
}

/* Prize Display Styling for Win & Lose Cards */
.prize-display-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: 4px 0;
  width: 100%;
}

.prize-img {
  width: 160px;
  max-width: 55%;
  height: auto;
  max-height: 110px;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.7)) drop-shadow(0 0 14px rgba(255, 215, 0, 0.5));
  animation: floatPrize 2.8s ease-in-out infinite alternate;
}

@keyframes floatPrize {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(-5px) scale(1.02); }
}

.prize-win-banner {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.25rem;
  font-weight: 900;
  color: #ffffff;
  background: linear-gradient(135deg, #fff3b0 0%, #ffd700 50%, #ff8f00 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 3px 12px rgba(255, 215, 0, 0.6);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.prize-lose-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 4px 0;
  width: 100%;
}

.prize-lose-img {
  width: 160px;
  max-width: 55%;
  height: auto;
  max-height: 110px;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.65));
}

.auto-refresh-timer {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.timer-count {
  color: var(--gold-primary);
  font-weight: 800;
  font-size: 1.2rem;
}

/* Footer Info */
.kiosk-footer {
  position: relative;
  z-index: 10;
  width: 100%;
  padding: 12px;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 1px;
}
