:root {
  --primary: #15d0fb;
  --gray: #9ca3af;
  --gray-light: #e5e7eb;
  --bg: #ffffff;
  --card: #f9fafb;
}

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

html, body {
  height: 100%;
  font-family: 'Paytone One', sans-serif;
  background: var(--bg);
}

.material-symbols-rounded {
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.container {
  width: 100%;
  max-width: 480px;
  height: 100vh;
  height: -webkit-fill-available;
  margin: 0 auto;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  position: relative;
}

@supports (height: 100dvh) {
  .container { height: 100dvh; }
}

/* ===== LOGIN ===== */
.login-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('https://lh3.googleusercontent.com/d/1MF-2auOnEESkng-aaFFP69Et2rMe7Tfc');
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px;
  gap: 16px;
  z-index: 1000;
}

.login-title {
  font-size: 28px;
  line-height: 1.3;
  color: white;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
  text-align: left;
  margin-bottom: 8px;
  font-family: 'Paytone One', sans-serif;
  padding-left: 4px;
}

.input-field {
  width: 100%;
  padding: 18px;
  font-size: 16px;
  border-radius: 16px;
  border: 1px solid var(--gray-light);
  outline: none;
  font-family: 'Paytone One', sans-serif;
  background: white;
}

.input-field:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(21,208,251,0.2);
}

.btn {
  width: 100%;
  padding: 16px;
  border-radius: 16px;
  border: none;
  background: var(--primary);
  color: white;
  font-size: 16px;
  font-family: 'Paytone One', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 6px 16px rgba(21,208,251,0.25);
}

.btn:hover {
  background: #0fa8d6;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(21,208,251,0.4);
}

.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.6; transform: scale(1); }

/* ===== APP MAIN ===== */
#appMain {
  display: none;
  flex: 1;
  flex-direction: column;
  background: var(--bg);
  height: 100vh;
  overflow: hidden;
}

.app-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  scrollbar-width: none;
}

.app-content::-webkit-scrollbar { display: none; }

.card {
  background: var(--card);
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 16px;
}

.h1 {
  font-size: 26px;
  color: var(--primary);
  margin-bottom: 16px;
  font-family: 'Paytone One', sans-serif;
}

/* ===== BOTTOM NAV ===== */
.bottom-nav {
  display: flex;
  border-top: 1px solid var(--gray-light);
  background: white;
}

.nav-item {
  flex: 1;
  text-align: center;
  padding: 10px 0;
  color: var(--gray);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Paytone One', sans-serif;
}

.nav-item.active { color: var(--primary); }
.nav-item span { display: block; font-size: 24px; margin-bottom: 2px; }

/* ===== TAB CONTENT ===== */
.tab-content { display: none; }
.tab-content.active {
  display: block;
  animation: fade 0.25s ease;
}

@keyframes fade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

/* ===== TAB ƯU ĐÃI ===== */
.promo-item {
  background: var(--card);
  border-radius: 20px;
  padding: 24px 20px;
  margin-bottom: 20px;
}

.promo-item h3 {
  font-size: 22px;
  color: var(--primary);
  margin-bottom: 16px;
  line-height: 1.4;
  font-family: 'Paytone One', sans-serif;
}

.promo-btn {
  width: 100%;
  padding: 14px;
  border-radius: 16px;
  border: none;
  background: var(--primary);
  color: white;
  font-size: 15px;
  font-family: 'Paytone One', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 6px 16px rgba(21,208,251,0.25);
}

.promo-btn:active { transform: scale(0.98); }

/* ===== TAB HỘP QUÀ ===== */
.gift-box {
  text-align: center;
  padding: 10px 0;
  cursor: pointer;
}

@keyframes gentleShake {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(5deg); }
  75% { transform: rotate(-5deg); }
}

.gift-icon {
  font-size: 100px;
  color: var(--primary);
  margin-bottom: 8px;
  transition: transform 0.1s ease;
  animation: gentleShake 0.3s ease-in-out infinite;
}

.gift-icon:hover {
  animation: gentleShake 0.15s ease-in-out infinite;
  transform: scale(1.05);
}

.gift-icon:active { 
  transform: scale(0.95); 
}

.gift-box.disabled { 
  opacity: 0.5; 
}

.gift-box p { 
  color: var(--gray); font-size: 14px; font-family: 'Paytone One', sans-serif; 
}

.voucher-section { 
  margin-top: 20px; 
}

.voucher-section h4 {
  font-size: 16px;
  color: var(--primary);
  margin-bottom: 12px;
  font-family: 'Paytone One', sans-serif;
}

.voucher-item {
  background: white;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--gray-light);
}

.voucher-name {
  font-weight: bold;
  color: #333;
  font-size: 15px;
  font-family: 'Paytone One', sans-serif;
}

.voucher-date {
  font-size: 13px;
  color: var(--gray);
  font-family: 'Paytone One', sans-serif;
}

/* ===== TAB ĐUA TOP ===== */
.prize-banner {
  background: linear-gradient(145deg, #ffd700, #ffaa00);
  border-radius: 20px;
  padding: 16px;
  text-align: center;
  margin-bottom: 20px;
  color: #333;
  font-size: 18px;
  font-weight: bold;
  font-family: 'Paytone One', sans-serif;
}

.ranking-title {
  font-size: 16px;
  color: var(--primary);
  margin-bottom: 12px;
  font-family: 'Paytone One', sans-serif;
}

.rank-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: white;
  border-radius: 16px;
  margin-bottom: 8px;
  font-size: 15px;
  border: 1px solid var(--gray-light);
  font-family: 'Paytone One', sans-serif;
}

.rank-item.top1 { background: #fff9e6; border-color: #ffd700; }
.rank-item.top2 { background: #f8f8f8; border-color: #e0e0e0; }
.rank-item.top3 { background: #fdf4e6; border-color: #cd7f32; }

.your-rank {
  background: #e6f7ff;
  border-radius: 16px;
  padding: 12px 16px;
  border: 1px solid var(--primary);
  display: flex;
  justify-content: space-between;
  margin: 16px 0;
  font-family: 'Paytone One', sans-serif;
}

.honor-box {
  background: var(--card);
  border-radius: 16px;
  padding: 12px;
  text-align: center;
  margin-bottom: 16px;
  font-size: 14px;
  color: #666;
  font-family: 'Paytone One', sans-serif;
}

/* Request Box */
.request-box {
  background: var(--card);
  border-radius: 20px;
  padding: 16px;
  margin-bottom: 16px;
}

.stats-row {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.stat-card {
  flex: 1;
  background: white;
  border-radius: 16px;
  padding: 12px;
  text-align: center;
  border: 1px solid var(--gray-light);
}

.stat-card .label {
  font-size: 12px;
  color: var(--gray);
  margin-bottom: 4px;
}

.stat-card .value {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary);
}

.request-box input {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--gray-light);
  border-radius: 16px;
  font-size: 15px;
  margin-bottom: 12px;
  text-align: center;
  outline: none;
  font-family: 'Paytone One', sans-serif;
}

.request-box input:focus {
  border-color: var(--primary);
}

.game-btn {
  display: block;
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #ff6b6b, #feca57);
  border: none;
  border-radius: 16px;
  color: white;
  font-family: 'Paytone One', sans-serif;
  font-size: 18px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.game-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}

.game-btn.disabled {
  background: #9ca3af;
  pointer-events: none;
  opacity: 0.6;
}

/* ===== TAB ĐẶT MÓN ===== */
.menu-image {
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 16px;
}

.menu-image img {
  width: 100%;
  height: auto;
  display: block;
}

.btn-zalo {
  display: block;
  background: #0068ff;
  color: white;
  text-decoration: none;
  padding: 16px;
  border-radius: 16px;
  text-align: center;
  font-size: 16px;
  font-family: 'Paytone One', sans-serif;
  transition: all 0.2s;
  box-shadow: 0 6px 16px rgba(0,104,255,0.25);
}

.btn-zalo:active { transform: scale(0.98); }
.note { text-align: center; margin-top: 8px; color: var(--gray); font-size: 13px; font-family: 'Paytone One', sans-serif; }

/* ===== TAB THÔNG TIN ===== */
.profile-section { text-align: center; margin-bottom: 20px; }
.avatar-icon { font-size: 80px; color: var(--primary); margin-bottom: 8px; }
.profile-phone { font-size: 18px; color: var(--primary); font-family: 'Paytone One', sans-serif; }

.branch-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: white;
  border-radius: 16px;
  margin-bottom: 8px;
  border: 1px solid var(--gray-light);
}

.branch-icon { font-size: 24px; }
.branch-item h4 { font-size: 15px; font-family: 'Paytone One', sans-serif; }
.branch-item p { font-size: 13px; color: var(--gray); font-family: 'Paytone One', sans-serif; }

.social-links {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 20px 0;
}

.social-link {
  text-decoration: none;
  color: var(--primary);
  padding: 12px 20px;
  border: 1px solid var(--primary);
  border-radius: 16px;
  font-size: 14px;
  font-family: 'Paytone One', sans-serif;
  transition: all 0.2s;
  background: white;
}

.social-link:hover {
  background: var(--primary);
  color: white;
}

.logout-btn {
  width: 100%;
  padding: 16px;
  border: 1px solid var(--primary);
  border-radius: 16px;
  background: white;
  color: var(--primary);
  font-size: 16px;
  font-family: 'Paytone One', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
}

.logout-btn:hover {
  background: var(--primary);
  color: white;
}

/* ===== MODAL ===== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.modal-content {
  background: white;
  border-radius: 24px;
  padding: 24px;
  width: 90%;
  max-width: 360px;
  text-align: center;
}

.modal-icon { font-size: 48px; margin-bottom: 16px; }
.modal-title {
  font-size: 20px;
  color: var(--primary);
  margin-bottom: 16px;
  font-family: 'Paytone One', sans-serif;
}

.modal-voucher {
  background: var(--card);
  border-radius: 16px;
  padding: 20px;
  margin: 16px 0;
}

.modal-voucher .code {
  font-size: 16px;
  color: var(--primary);
  font-weight: bold;
  margin: 8px 0;
  font-family: 'Paytone One', sans-serif;
}

.modal-voucher .info {
  font-size: 18px;
  color: #333;
  margin: 8px 0;
  font-family: 'Paytone One', sans-serif;
}

.modal-voucher .date {
  font-size: 14px;
  color: var(--gray);
  font-family: 'Paytone One', sans-serif;
}

.close-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 16px;
  background: var(--primary);
  color: white;
  font-size: 15px;
  font-family: 'Paytone One', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 6px 16px rgba(21,208,251,0.25);
}

.close-btn:active { transform: scale(0.98); }
