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

:root {
  --primary-blue: #0b2a5e;
  --secondary-blue: #1d4ea8;
  --dark-blue: #0b1b2b;
  --brand-gradient: linear-gradient(90deg, #0b3a82 0%, #1556b8 60%, #0e8a3a 100%);
  --success-green: #0e8a3a;
  --success-green-hover: #0a6e2c;
  --danger-red: #e30613;
  --danger-red-hover: #b80510;
  --warning-yellow: #f4b400;
  --warning-bg: #fffbe6;
  --bg-color: #eef3fb;
  --card-bg: #ffffff;
  --text-primary: #0b1b2b;
  --text-secondary: #3a4756;
  --text-muted: #6b7785;
  --border-color: #d6e4f5;
  --light-blue-bg: #f6fbff;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Modals & Backdrop */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  transition: opacity 0.3s ease;
}

.modal-content {
  background-color: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  max-width: 384px;
  width: 100%;
  padding: 24px;
  text-align: center;
  animation: modalZoom 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalZoom {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.age-badge {
  margin: 0 auto;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: var(--danger-red);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 800;
  border: 4px solid var(--dark-blue);
}

.modal-title {
  margin-top: 16px;
  font-size: 18px;
  font-weight: 800;
  color: var(--dark-blue);
}

.modal-description {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 8px;
}

.modal-note {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 8px;
}

.modal-actions {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Common Layout Elements */
.header-top {
  background-color: var(--primary-blue);
  color: white;
  font-size: 11px;
  padding: 6px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-top-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-top-right {
  color: var(--warning-yellow);
  font-weight: 600;
}

.header-brand {
  background: var(--brand-gradient);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand-info {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.brand-logo {
  height: 36px;
  background-color: white;
  border-radius: 6px;
  padding: 4px;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .brand-logo {
    height: 44px;
  }
}

.brand-title {
  color: white;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (min-width: 768px) {
  .brand-title {
    font-size: 18px;
  }
}

.brand-jackpot {
  background-color: var(--warning-yellow);
  color: var(--text-primary);
  border-radius: 6px;
  padding: 6px 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  text-align: right;
  flex-shrink: 0;
}

.jackpot-label {
  font-size: 9px;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.05em;
  line-height: 1;
}

.jackpot-amount {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
  margin-top: 2px;
}

@media (min-width: 768px) {
  .jackpot-amount {
    font-size: 16px;
  }
}

.header-separator {
  height: 2px;
  background: linear-gradient(90deg, var(--warning-yellow) 0%, #1556b8 50%, var(--success-green) 100%);
}

main {
  max-width: 576px;
  margin: 0 auto;
  padding: 20px 16px;
}

.card {
  background-color: var(--card-bg);
  border-radius: 8px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  padding: 20px;
}

/* Button & UI Utilities */
.btn-primary {
  width: 100%;
  background-color: var(--secondary-blue);
  color: white;
  font-weight: 700;
  font-size: 14px;
  padding: 12px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s, opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary:hover:not(:disabled) {
  background-color: var(--primary-blue);
}

.btn-primary:disabled {
  background-color: #d1d5db;
  cursor: not-allowed;
  color: #9ca3af;
}

.btn-green {
  width: 100%;
  background-color: var(--success-green);
  color: white;
  font-weight: 700;
  font-size: 14px;
  padding: 12px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-green:hover:not(:disabled) {
  background-color: var(--success-green-hover);
}

.btn-green:disabled {
  background-color: #d1d5db;
  cursor: not-allowed;
}

.btn-red {
  width: 100%;
  background-color: var(--danger-red);
  color: white;
  font-weight: 700;
  font-size: 14px;
  padding: 12px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-red:hover {
  background-color: var(--danger-red-hover);
}

.btn-light {
  width: 100%;
  background-color: #e5e7eb;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 12px;
  padding: 10px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s;
  text-decoration: none;
  display: inline-block;
}

.btn-light:hover {
  background-color: #d1d5db;
}

.input-group {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.input-field-wrapper {
  display: flex;
  flex-direction: column;
}

.input-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.input-control {
  width: 100%;
  padding: 8px 12px;
  font-size: 14px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-control:focus {
  border-color: var(--secondary-blue);
  box-shadow: 0 0 0 1px var(--secondary-blue);
}

/* Card Step Title */
.step-header {
  text-align: center;
}

.step-emoji {
  font-size: 24px;
  display: inline-block;
}

.step-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 4px;
  text-transform: uppercase;
}

.step-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.label-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 20px;
  margin-bottom: 8px;
}

/* Prize Selection List */
.prize-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.prize-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  font-size: 14px;
  transition: border-color 0.2s, background-color 0.2s;
  background-color: var(--light-blue-bg);
  cursor: pointer;
  font-family: inherit;
}

.prize-btn:hover {
  border-color: var(--secondary-blue);
}

.prize-btn.selected {
  background-color: #e8f0ff;
  border-color: var(--secondary-blue);
  box-shadow: 0 0 0 2px rgba(29, 78, 216, 0.15);
}

.prize-btn-left {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
}

.prize-emoji {
  font-size: 18px;
}

.prize-rank {
  font-weight: 500;
}

.prize-amount {
  font-weight: 700;
  color: var(--text-primary);
}

.card-footer-sec {
  font-size: 10px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 8px;
}

/* Draw Step (Spin) CSS */
.spin-header {
  font-size: 12px;
  color: var(--text-muted);
}

.spin-header b {
  color: var(--text-primary);
}

.spin-prize-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 4px;
}

.spin-prize-amount {
  font-size: 16px;
  font-weight: 800;
  color: var(--success-green);
}

.spin-status {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.live-draw-card {
  margin-top: 16px;
  background: linear-gradient(135deg, #0b3a82 0%, #1d4ea8 100%);
  border-radius: 8px;
  padding: 16px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
  color: white;
}

.live-draw-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.live-tag {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
}

.live-tag::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--danger-red);
  animation: pulse-red 1s infinite alternate;
}

@keyframes pulse-red {
  from { opacity: 0.4; }
  to { opacity: 1; }
}

.live-draw-balls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.ball {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
  border: 2px solid transparent;
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@media (min-width: 480px) {
  .ball {
    width: 56px;
    height: 56px;
  }
}

.ball-empty {
  background-color: rgba(11, 27, 43, 0.4);
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.3);
  animation: ball-pulse 1.5s infinite ease-in-out;
}

@keyframes ball-pulse {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(0.96); opacity: 1; }
}

.ball-drawn {
  background-color: white;
  border-color: white;
  color: var(--dark-blue);
}

.ball-match {
  background-color: var(--warning-yellow);
  border-color: white;
  color: var(--dark-blue);
  transform: scale(1.1);
}

.your-number-indicator {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.9);
  margin-top: 12px;
}

.your-number-indicator b {
  color: var(--warning-yellow);
}

.lucky-numbers-grid {
  display: grid;
  grid-cols: 5; /* we will use fallback or dynamic layout */
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  max-width: 320px;
  margin: 0 auto;
}

.lucky-btn {
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  background-color: white;
  color: var(--dark-blue);
  border: 1px solid var(--secondary-blue);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lucky-btn:hover {
  background-color: var(--secondary-blue);
  color: white;
}

/* Congrats Box */
.congrats-box {
  margin-top: 20px;
  animation: congratsIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes congratsIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.congrats-content {
  background-color: #e8f7ee;
  border: 1px solid var(--success-green);
  border-radius: 6px;
  padding: 16px;
}

.congrats-emoji {
  font-size: 24px;
}

.congrats-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--success-green);
  margin-top: 4px;
}

.congrats-text {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.congrats-prize-rank {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 4px;
}

.congrats-prize-label {
  font-size: 24px;
  font-weight: 800;
  color: var(--danger-red);
  margin: 4px 0;
}

/* Bank Step CSS */
.bank-confirmed-header {
  background-color: var(--success-green);
  color: white;
  text-align: center;
  padding: 10px 16px;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  font-size: 14px;
  font-weight: 700;
}

.bank-card-body {
  background-color: var(--card-bg);
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  padding: 20px;
  border: 1px solid var(--success-green);
  border-top: none;
}

.bank-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.bank-logo-badge {
  width: 28px;
  height: 28px;
  font-size: 9px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.bank-logo-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 6px;
  background-color: white;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  border: 1px solid #e5e7eb;
  padding: 2px;
}

.bank-logo-badge-sm {
  width: 28px;
  height: 28px;
  font-size: 9px;
}

.bank-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  background-color: white;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 0;
  font-family: inherit;
}

.bank-btn:hover {
  border-color: var(--secondary-blue);
}

.bank-btn.selected {
  background-color: #e8f0ff;
  border-color: var(--secondary-blue);
  box-shadow: 0 0 0 2px rgba(29, 78, 216, 0.15);
}

.bank-name-label {
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
}

/* Processing View */
.processing-card {
  max-width: 448px;
  margin: 48px auto;
  padding: 24px;
  text-align: center;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--secondary-blue);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

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

.processing-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 16px;
}

.processing-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.processing-history {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
  font-size: 12px;
}

.history-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--success-green);
  animation: historyItemIn 0.3s ease forwards;
}

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

.history-check {
  font-weight: bold;
}

/* Approved View CSS */
.approved-card {
  border-top: 4px solid var(--success-green);
  text-align: center;
}

.approved-check {
  font-size: 32px;
}

.approved-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--success-green);
  margin-top: 4px;
}

.approved-bank-badge {
  margin: 12px auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: var(--light-blue-bg);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 8px;
  max-width: 320px;
}

.approved-bank-text {
  text-align: left;
}

.approved-bank-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}

.approved-bank-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
}

.approved-message {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 12px;
}

.approved-warning-box {
  margin-top: 16px;
  background-color: var(--warning-bg);
  border: 1px solid var(--warning-yellow);
  border-radius: 6px;
  padding: 12px;
  text-align: left;
}

.warning-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
}

.warning-text {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 6px;
}

.pulse-btn {
  animation: pulse-red-btn 2s infinite;
}

@keyframes pulse-red-btn {
  0% {
    box-shadow: 0 0 0 0 rgba(227, 6, 19, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(227, 6, 19, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(227, 6, 19, 0);
  }
}

/* VSL Step CSS */
.vsl-header-bar {
  background-color: var(--card-bg);
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  padding: 12px;
  border-left: 4px solid var(--success-green);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.vsl-grid-info {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  font-size: 12px;
  flex: 1;
  min-width: 0;
}

.vsl-info-col {
  min-width: 0;
}

.vsl-info-label {
  color: var(--text-muted);
  font-size: 10px;
  text-transform: uppercase;
}

.vsl-info-val {
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vsl-info-val.green {
  color: var(--success-green);
  font-weight: 800;
}

.vsl-title {
  text-align: center;
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.25;
}

@media (min-width: 768px) {
  .vsl-title {
    font-size: 20px;
  }
}

.vsl-title-green {
  color: var(--success-green);
}

.vsl-subtitle {
  text-align: center;
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 8px;
  max-width: 672px;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 768px) {
  .vsl-subtitle {
    font-size: 14px;
  }
}

.video-container {
  margin-top: 16px;
  border-radius: 6px;
  border: 1px solid var(--secondary-blue);
  background-color: var(--card-bg);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.video-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  background-color: white;
  border-bottom: 1px solid #e5e7eb;
  font-size: 11px;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--danger-red);
  color: white;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
}

.live-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: white;
  animation: pulse-dot 1s infinite alternate;
}

@keyframes pulse-dot {
  from { opacity: 0.4; }
  to { opacity: 1; }
}

.watching-count {
  color: var(--text-secondary);
  font-weight: 600;
}

.video-player-wrapper {
  padding: 6px;
  background-color: black;
}

/* Comments Area */
.comments-section {
  margin-top: 32px;
}

.comments-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.comments-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
  margin-bottom: 16px;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comment-card {
  background-color: var(--card-bg);
  border-radius: 6px;
  padding: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  border: 1px solid #e6e6e6;
  display: flex;
  gap: 12px;
}

.comment-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.comment-content {
  flex: 1;
  min-width: 0;
}

.comment-author {
  font-weight: 700;
  font-size: 12px;
  color: var(--text-primary);
}

.comment-text {
  color: var(--text-secondary);
  margin-top: 2px;
  font-size: 12px;
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
  font-size: 10px;
  color: var(--text-muted);
}

.comment-like-btn {
  background: none;
  border: none;
  color: inherit;
  font-family: inherit;
  font-size: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.comment-like-btn:hover {
  color: var(--secondary-blue);
}

.comment-likes-count {
  font-weight: 600;
}

/* Footer styling */
footer.site-footer {
  background-color: var(--primary-blue);
  color: white;
  margin-top: 40px;
  padding: 24px 16px;
}

.footer-content {
  max-width: 1024px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  font-size: 12px;
}

@media (min-width: 640px) {
  .footer-content {
    grid-template-columns: repeat(3, 1fr);
  }
}

.footer-col-title {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 4px;
}

.footer-col-desc {
  color: rgba(255, 255, 255, 0.8);
}

/* Utility Animations */
.animate-in {
  animation-duration: 0.3s;
  animation-fill-mode: both;
}

.fade-in {
  animation-name: fadeIn;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.hidden {
  display: none !important;
}
