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

body {
  font-family: 'Noto Sans Khmer', sans-serif;
  background: #0c0121;
  color: #d9d9d9;
  overflow-x: hidden;
  min-height: 100vh;
}

img { max-width: 100%; display: block; }

/* ===== PAGE ===== */
.page {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Background */
.page-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.page-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-bg-mobile { display: none; }

/* ===== CARD ===== */
.card {
  position: relative;
  z-index: 1;
  width: 500px;
  background: linear-gradient(to bottom, #7a026d, #1b0037);
  border: 2px solid #ffd51c;
  border-radius: 20px;
  padding: 32px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

/* Logo */
.card-logo {
  width: 280px;
  height: 127px;
}

.card-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Content */
.card-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.card-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
}

/* Text */
.card-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  text-align: center;
  color: #ffd51c;
  font-size: 20px;
  font-weight: 500;
  line-height: normal;
  width: 100%;
}

/* Loading spinner */
.spinner-wrap {
  width: 80px;
  height: 80px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.spinner {
  width: 62px;
  height: 62px;
  animation: spin 1s linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
  .spinner { animation: none; }
}

/* Redirect label */
.redirect-label {
  font-size: 20px;
  font-weight: 500;
  color: white;
  text-align: center;
  line-height: normal;
}

/* Countdown */
.countdown {
  font-size: 48px;
  font-weight: 600;
  color: #ffd51c;
  text-align: center;
  line-height: normal;
}

/* Redirect button */
.btn-redirect {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 220px;
  height: 54px;
  text-decoration: none;
  color: white;
  cursor: pointer;
}

.btn-redirect-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.btn-redirect-mobile { display: none; }

.btn-redirect span {
  position: relative;
  z-index: 1;
  color: white;
  font-size: 20px;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
}

/* ===== MOBILE ===== */
@media (max-width: 959px) {
  .page-bg-desktop { display: none; }
  .page-bg-mobile { display: block; }

  .card {
    width: calc(100% - 32px);
    max-width: 398px;
    padding: 24px 16px;
    border-width: 1px;
  }

  .card-logo {
    width: 190px;
    height: 87px;
  }

  .card-top {
    gap: 12px;
  }

  .card-text {
    font-size: 18px;
  }

  .redirect-label {
    font-size: 16px;
  }

  .countdown {
    font-size: 32px;
  }

  .btn-redirect {
    width: 180px;
    height: 44px;
  }

  .btn-redirect-desktop { display: none; }
  .btn-redirect-mobile { display: block; }

  .btn-redirect span {
    font-size: 18px;
  }
}

/* Tablet zoom */
@media (min-width: 600px) and (max-width: 899px) {
  body { zoom: 1.3; }
}
