/* ============================================================
   Kiosk CSS - Survey Kepuasan Pelanggan Kemenangan Jaya
   Target: Tablet Advan landscape 1280x800
   NO SCROLL — semua muat dalam 1 layar
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

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

:root {
  --red-dark: #7a1208;
  --red-mid: #b5200f;
  --red-main: #e8321a;
  --red-light: #ff5c42;
  --accent: #ff8c00;
  --white: #ffffff;
  --transition: 0.25s ease;
}

html,
body {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  font-family: 'Poppins', 'Segoe UI', 'Roboto', Arial, sans-serif;
  background: linear-gradient(135deg, var(--red-dark) 0%, var(--red-mid) 50%, var(--red-main) 100%);
  color: var(--white);
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

/* ---- Language Toggle ---- */
#lang-toggle {
  position: fixed;
  top: 16px;
  right: 20px;
  z-index: 999;
  display: flex;
  gap: 8px;
}

.lang-btn {
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.4);
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition);
}

.lang-btn.active {
  background: var(--white);
  color: var(--red-main);
  border-color: var(--white);
}

/* ---- App Wrapper ---- */
#app {
  width: 100vw;
  height: 100vh;
}

.screen {
  display: none;
  width: 100vw;
  height: 100vh;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  -webkit-animation: fadeIn 0.3s ease;
  animation: fadeIn 0.3s ease;
}

.screen.active {
  display: -webkit-flex;
  display: flex;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@-webkit-keyframes fadeIn {
  from {
    opacity: 0;
    -webkit-transform: translateY(12px);
  }

  to {
    opacity: 1;
    -webkit-transform: translateY(0);
  }
}

/* ============================================================
   SCREEN 1: WELCOME
   ============================================================ */
#screen-welcome .card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 80px;
  background: rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  width: 680px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.store-logo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  overflow: hidden;
  background: var(--white);
  box-shadow: 0 8px 24px rgba(232, 50, 26, 0.35);
}

.store-logo img {
  width: 80px;
  height: 80px;
  object-fit: contain;
}

.welcome-title {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 6px;
  opacity: 0.85;
}

.store-name {
  font-size: 30px;
  color: #ffe0dc;
  font-weight: 800;
  margin-bottom: 12px;
  line-height: 1.2;
}

.welcome-subtitle {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 36px;
  line-height: 1.6;
}

/* ============================================================
   SCREEN 2: RATING
   ============================================================ */
#screen-rating .card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 80px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  width: 720px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.question-text {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.4;
}

.emoji-face {
  font-size: 80px;
  display: block;
  min-height: 90px;
  margin-bottom: 12px;
  transition: var(--transition);
}

.star-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 8px;
}

.star-btn {
  font-size: 68px;
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.25);
  transition: color 0.15s, transform 0.15s;
  line-height: 1;
  padding: 6px;
  -webkit-tap-highlight-color: transparent;
}

.star-btn:hover,
.star-btn.selected {
  color: #ffe066;
  transform: scale(1.2);
}

.star-hint {
  font-size: 18px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.65);
  min-height: 26px;
  margin-top: 8px;
}

/* ============================================================
   SCREEN 3: FORM — layout 2 kolom agar muat di 800px height
   ============================================================ */
#screen-form {
  padding: 0 40px;
}

#screen-form .card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  padding: 28px 40px 24px;
  width: 100%;
  max-width: 1100px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.form-title {
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 4px;
}

.rating-display {
  font-size: 24px;
  color: var(--gold);
  letter-spacing: 4px;
  text-align: center;
  margin-bottom: 16px;
}

/* 2-kolom grid untuk form */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 24px;
}

.form-grid .form-group-full {
  grid-column: 1 / -1;
}

.form-group {
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 5px;
  color: rgba(255, 255, 255, 0.85);
}

.form-group input[type="text"],
.form-group input[type="tel"],
.form-group textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.12);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  padding: 11px 14px;
  color: var(--white);
  font-size: 16px;
  font-family: inherit;
  outline: none;
  resize: none;
  transition: border-color var(--transition);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(255, 255, 255, 0.38);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: #ff8c7a;
  background: rgba(255, 255, 255, 0.17);
}

.form-group textarea {
  min-height: 70px;
  max-height: 70px;
}

/* Source radio — 3 kolom x 2 baris untuk 6 item */
.radio-group {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

.radio-option {
  position: relative;
}

.radio-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.radio-option label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 12px 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  min-height: 52px;
  margin: 0;
}

.radio-option input[type="radio"]:checked+label {
  background: var(--red-main);
  border-color: var(--red-light);
}

.radio-option label:hover {
  border-color: var(--red-light);
  background: rgba(232, 50, 26, 0.25);
}

/* ---- Buttons ---- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--white);
  color: var(--red-main);
  border: none;
  border-radius: 50px;
  padding: 16px 48px;
  font-size: 19px;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  -webkit-tap-highlight-color: transparent;
}

.btn-primary:hover {
  background: #ffe0dc;
  transform: translateY(-2px);
}

.btn-primary:active {
  transform: scale(0.97);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 50px;
  padding: 14px 36px;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.btn-secondary:hover {
  border-color: rgba(255, 255, 255, 0.7);
  color: var(--white);
}

.btn-row {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin-top: 18px;
}

/* ---- Alert ---- */
.alert-error {
  background: rgba(239, 68, 68, 0.2);
  border: 1.5px solid rgba(239, 68, 68, 0.5);
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 14px;
  margin-bottom: 10px;
  display: none;
  text-align: center;
}

.alert-error.show {
  display: block;
}

/* ============================================================
   SCREEN 4: THANK YOU
   ============================================================ */
#screen-thankyou .card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 56px 80px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  width: 640px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.checkmark {
  font-size: 90px;
  margin-bottom: 20px;
  animation: pop 0.5s ease;
}

@keyframes pop {
  0% {
    transform: scale(0);
  }

  70% {
    transform: scale(1.2);
  }

  100% {
    transform: scale(1);
  }
}

.thankyou-title {
  font-size: 40px;
  font-weight: 800;
  margin-bottom: 12px;
}

.thankyou-sub {
  font-size: 19px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 24px;
  line-height: 1.6;
}

.countdown-bar-wrap {
  width: 80%;
  height: 7px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  overflow: hidden;
}

#countdown-bar {
  height: 100%;
  background: var(--white);
  border-radius: 4px;
  width: 100%;
  transition: width 1s linear;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ============================================================
   RESPONSIVE — Mobile (max 768px)
   Mode: scrollable, single-column, font lebih kecil
   ============================================================ */
@media (max-width: 768px) {

  html,
  body {
    overflow: auto;
    height: auto;
    min-height: 100vh;
  }

  #lang-toggle {
    top: 10px;
    right: 12px;
  }

  .lang-btn {
    font-size: 12px;
    padding: 6px 12px;
  }

  /* Screen jadi min-height, bisa scroll */
  .screen {
    min-height: 100vh;
    height: auto;
    padding: 20px 16px;
  }

  /* ---- Welcome ---- */
  #screen-welcome .card {
    width: 100%;
    padding: 36px 24px;
  }

  .store-logo {
    width: 72px;
    height: 72px;
    font-size: 32px;
  }

  .welcome-title {
    font-size: 18px;
  }

  .store-name {
    font-size: 22px;
  }

  .welcome-subtitle {
    font-size: 15px;
  }

  /* ---- Rating ---- */
  #screen-rating .card {
    width: 100%;
    padding: 32px 20px;
  }

  .question-text {
    font-size: 20px;
  }

  .emoji-face {
    font-size: 60px;
    min-height: 70px;
  }

  .star-btn {
    font-size: 48px;
    padding: 4px;
  }

  .star-row {
    gap: 6px;
  }

  .star-hint {
    font-size: 16px;
  }

  /* ---- Form ---- */
  #screen-form {
    padding: 16px;
    align-items: stretch;
  }

  #screen-form .card {
    padding: 24px 18px 20px;
    max-width: 100%;
  }

  .form-title {
    font-size: 18px;
  }

  /* 1 kolom di mobile */
  .form-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  /* Radio 2 kolom di mobile */
  .radio-group {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .radio-option label {
    font-size: 13px;
    padding: 10px 6px;
    min-height: 46px;
  }

  .btn-primary {
    font-size: 16px;
    padding: 14px 32px;
  }

  .btn-secondary {
    font-size: 15px;
    padding: 12px 24px;
  }

  .btn-row {
    flex-wrap: wrap;
    gap: 10px;
  }

  /* ---- Thank You ---- */
  #screen-thankyou .card {
    width: 100%;
    padding: 40px 24px;
  }

  .checkmark {
    font-size: 72px;
  }

  .thankyou-title {
    font-size: 30px;
  }

  .thankyou-sub {
    font-size: 16px;
  }
}

/* ---- Very small phones (max 375px) ---- */
@media (max-width: 375px) {
  .star-btn {
    font-size: 38px;
  }

  .star-row {
    gap: 2px;
  }

  .radio-group {
    grid-template-columns: 1fr;
  }
}
