/* ============================================
   Cliniverse Spin Machine
   Brand: #136a8a (teal), #0d1a2d (navy),
          #ff6d4e (coral), #f6fafa (off-white)
   Primary target: iPad landscape (1024x768)
   ============================================ */

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

html, body {
  height: 100dvh;
  width: 100vw;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #0d1a2d;
  color: #f6fafa;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

#app {
  height: 100%;
  width: 100%;
  position: relative;
}

/* ---- Views ---- */
.view {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2vh 2vw;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease, transform 0.45s ease;
  transform: translateY(12px);
}

.view.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* ---- Logo ---- */
.logo-container {
  margin-bottom: 1.5vh;
  flex-shrink: 0;
}

.logo {
  height: 9vh;
  width: auto;
}

.logo-small {
  height: 6vh;
}

/* ---- Reels ---- */
.reels-container {
  display: flex;
  gap: 2.5vw;
  margin-bottom: 2vh;
  flex-shrink: 0;
}

.reel {
  width: 22vw;
  height: 46vh;
  background: linear-gradient(145deg, #1a2a42, #0f1e33);
  border: 3px solid #136a8a;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 0 40px rgba(19, 106, 138, 0.3), inset 0 0 30px rgba(0, 0, 0, 0.3);
}

.reel::before,
.reel::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 20%;
  z-index: 2;
  pointer-events: none;
}

.reel::before {
  top: 0;
  background: linear-gradient(to bottom, #0f1e33 0%, transparent 100%);
}

.reel::after {
  bottom: 0;
  background: linear-gradient(to top, #0f1e33 0%, transparent 100%);
}

.reel-strip {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: absolute;
  left: 0;
  right: 0;
  will-change: transform;
}

.reel-symbol {
  width: 22vw;
  height: 46vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1vh;
  flex-shrink: 0;
}

.reel-emoji {
  font-size: 16vh;
  line-height: 1;
}

.reel-label {
  font-size: 1.6vh;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(246, 250, 250, 0.5);
  text-align: center;
  line-height: 1.2;
}

/* ---- Idle Callout ---- */
.idle-callout {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.8vh;
  padding: 2vh 6vw;
  background: linear-gradient(145deg, rgba(19, 106, 138, 0.25), rgba(255, 109, 78, 0.12));
  border: 2px solid rgba(255, 109, 78, 0.35);
  border-radius: 20px;
  margin-bottom: 2vh;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
  min-width: 30vw;
  flex-shrink: 0;
}

.idle-callout.visible {
  opacity: 1;
  transform: scale(1);
}

.callout-win {
  font-size: 4.5vh;
  font-weight: 900;
  letter-spacing: 8px;
  color: #ff6d4e;
  text-transform: uppercase;
}

.callout-emoji {
  font-size: 5vh;
  line-height: 1.2;
}

.callout-text {
  font-size: 2.5vh;
  font-weight: 700;
  color: #f6fafa;
  letter-spacing: 1px;
}



/* ---- Buttons ---- */
.btn-play {
  background: #ff6d4e;
  color: #fff;
  border: none;
  padding: 3.5vh 10vw;
  font-size: 4.5vh;
  font-weight: 900;
  letter-spacing: 6px;
  text-transform: uppercase;
  border-radius: 80px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 8px 48px rgba(255, 109, 78, 0.45);
  animation: pulse-btn 2.2s ease-in-out infinite;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.btn-play:hover,
.btn-play:active {
  transform: scale(1.04);
  box-shadow: 0 10px 56px rgba(255, 109, 78, 0.6);
}

@keyframes pulse-btn {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

.btn-spin {
  width: 100%;
  background: #ff6d4e;
  color: #fff;
  border: none;
  padding: 20px;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 4px 20px rgba(255, 109, 78, 0.35);
  margin-top: 0.75rem;
}

.btn-spin:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 28px rgba(255, 109, 78, 0.5);
}

.btn-spin:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-next {
  background: #ff6d4e;
  color: #fff;
  border: none;
  padding: 3vh 10vw;
  font-size: 3vh;
  font-weight: 800;
  letter-spacing: 4px;
  text-transform: uppercase;
  border-radius: 80px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  margin-top: 3vh;
  flex-shrink: 0;
  box-shadow: 0 6px 36px rgba(255, 109, 78, 0.4);
}

.btn-next:hover,
.btn-next:active {
  transform: scale(1.03);
  box-shadow: 0 8px 48px rgba(255, 109, 78, 0.55);
}

.btn-back {
  display: inline-block;
  color: rgba(246, 250, 250, 0.5);
  font-size: 0.9rem;
  text-decoration: none;
  margin-top: 1rem;
  transition: color 0.2s ease;
}

.btn-back:hover {
  color: #f6fafa;
}

/* ---- Form ---- */
.form-card {
  background: linear-gradient(145deg, #162640, #0f1e33);
  border: 1px solid rgba(19, 106, 138, 0.3);
  border-radius: 24px;
  padding: 3rem 3rem 2rem;
  width: 100%;
  max-width: 460px;
  text-align: center;
}

.form-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.form-subtitle {
  color: rgba(246, 250, 250, 0.6);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.form-group {
  text-align: left;
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: rgba(246, 250, 250, 0.6);
  margin-bottom: 0.5rem;
}

.form-group input {
  width: 100%;
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(19, 106, 138, 0.35);
  border-radius: 14px;
  color: #f6fafa;
  font-size: 1.15rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.form-group input::placeholder {
  color: rgba(246, 250, 250, 0.25);
}

.form-group input:focus {
  border-color: #136a8a;
  box-shadow: 0 0 0 3px rgba(19, 106, 138, 0.15);
}

.consent-text {
  font-size: 0.75rem;
  color: rgba(246, 250, 250, 0.35);
  line-height: 1.5;
  margin-top: 1rem;
}

/* ---- Prize Card ---- */
.prize-card {
  background: linear-gradient(145deg, #162640, #0f1e33);
  border: 2px solid rgba(19, 106, 138, 0.35);
  border-radius: 32px;
  padding: 6vh 6vw;
  width: 92vw;
  max-width: 640px;
  text-align: center;
  opacity: 0;
  transform: translateY(30px) scale(0.92);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.prize-card.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.prize-emoji {
  font-size: 16vh;
  margin-bottom: 2.5vh;
  line-height: 1;
}

.prize-tier {
  display: inline-block;
  padding: 1.2vh 4vw;
  border-radius: 30px;
  font-size: 2.2vh;
  font-weight: 800;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 2.5vh;
  background: rgba(19, 106, 138, 0.25);
  color: #136a8a;
  border: 1px solid rgba(19, 106, 138, 0.4);
}

.prize-tier.tier-jackpot {
  background: rgba(255, 109, 78, 0.15);
  color: #ff6d4e;
  border-color: rgba(255, 109, 78, 0.4);
}

.prize-tier.tier-big-win {
  background: rgba(255, 109, 78, 0.1);
  color: #ff6d4e;
  border-color: rgba(255, 109, 78, 0.3);
}

.prize-name {
  font-size: 5.5vh;
  font-weight: 800;
  margin-bottom: 2vh;
  line-height: 1.3;
}

.prize-description {
  font-size: 2.8vh;
  color: rgba(246, 250, 250, 0.75);
  line-height: 1.6;
  margin-bottom: 2.5vh;
}

.prize-sms-note {
  font-size: 2.2vh;
  color: #136a8a;
  font-weight: 600;
}

/* ---- Confetti Canvas ---- */
#confetti-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 100;
}

/* ============================================
   PORTRAIT phones / small screens
   ============================================ */
@media (orientation: portrait) and (max-width: 600px) {
  .reel {
    width: 27vw;
    height: 30vh;
  }

  .reel-symbol {
    width: 27vw;
    height: 30vh;
  }

  .reel-emoji {
    font-size: 10vh;
  }

  .reel-label {
    font-size: 1.3vh;
  }

  .logo {
    height: 7vh;
  }

  .btn-play {
    padding: 2.5vh 12vw;
    font-size: 3.5vh;
    letter-spacing: 4px;
  }

  .callout-win {
    font-size: 3.5vh;
  }

  .callout-emoji {
    font-size: 4vh;
  }

  .callout-text {
    font-size: 2vh;
  }

  .form-card {
    max-width: 92vw;
    padding: 2rem 1.5rem 1.5rem;
  }

  .prize-card {
    max-width: 92vw;
    padding: 2rem 1.5rem;
  }
}

/* ============================================
   PORTRAIT tablets (iPad portrait 768x1024)
   ============================================ */
@media (orientation: portrait) and (min-width: 601px) {
  .reel {
    width: 24vw;
    height: 32vh;
  }

  .reel-symbol {
    width: 24vw;
    height: 32vh;
  }

  .reel-emoji {
    font-size: 12vh;
  }

  .btn-play {
    padding: 3vh 10vw;
    font-size: 4vh;
  }
}

/* ============================================
   LANDSCAPE tablets (iPad landscape 1024x768)
   This is the PRIMARY target layout
   ============================================ */
@media (orientation: landscape) {
  .view {
    padding: 1.5vh 3vw;
  }

  .logo-container {
    margin-bottom: 1vh;
  }

  .logo {
    height: 8vh;
  }

  .logo-small {
    height: 5.5vh;
  }

  .reels-container {
    gap: 2vw;
    margin-bottom: 1.5vh;
  }

  .reel {
    width: 20vw;
    height: 52vh;
    border-radius: 22px;
  }

  .reel-symbol {
    width: 20vw;
    height: 52vh;
  }

  .reel-emoji {
    font-size: 18vh;
  }

  .reel-label {
    font-size: 1.8vh;
    letter-spacing: 2px;
  }

  .idle-callout {
    margin-bottom: 1.5vh;
    padding: 1.5vh 5vw;
    min-width: 25vw;
  }

  .callout-win {
    font-size: 4vh;
    letter-spacing: 10px;
  }

  .callout-emoji {
    font-size: 4.5vh;
  }

  .callout-text {
    font-size: 2.2vh;
  }

  .btn-play {
    padding: 3vh 8vw;
    font-size: 4vh;
    letter-spacing: 8px;
    border-radius: 100px;
  }

  .btn-next {
    margin-top: 2.5vh;
    padding: 3vh 8vw;
    font-size: 3vh;
  }

  /* Prize reveal: large centered card */
  .prize-card {
    max-width: 56vw;
    padding: 5vh 5vw;
  }

  .prize-emoji {
    font-size: 14vh;
  }

  .prize-name {
    font-size: 5vh;
  }

  .prize-description {
    font-size: 2.5vh;
  }

  .prize-sms-note {
    font-size: 2vh;
  }

  .prize-tier {
    font-size: 2vh;
  }

  /* Form view in landscape */
  .form-card {
    max-width: 36vw;
    padding: 2.5vh 2.5vw;
  }

  .form-title {
    font-size: 3vh;
  }

  .form-subtitle {
    font-size: 1.8vh;
    margin-bottom: 2vh;
  }

  .form-group input {
    padding: 1.8vh 1.5vw;
    font-size: 2vh;
  }

  .form-group label {
    font-size: 1.4vh;
  }

  .btn-spin {
    padding: 2vh;
    font-size: 2.2vh;
  }

  .consent-text {
    font-size: 1.2vh;
  }

  .btn-back {
    font-size: 1.5vh;
  }
}
