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

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Noto Sans Thai", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top, #0b1b3f 0, #050815 45%, #02030a 100%);
  color: #f7f2ff;
}

/* ทำให้ดูหรู น้ำเงิน-ทอง แวววาว */
.app-container {
  max-width: 460px;
  margin: 0 auto;
  padding: 16px 12px 32px;
}

.app-header {
  text-align: center;
  padding: 18px 12px 14px;
  border-radius: 24px;
  border: 1px solid rgba(235, 200, 120, 0.9);
  box-shadow:
    0 0 30px rgba(0, 0, 0, 0.9),
    0 0 18px rgba(255, 215, 128, 0.35);
  background:
    radial-gradient(circle at top, #123066 0, #050b1d 55%, #02030a 100%);
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
}

/* เงาเลื่อมทองเบา ๆ */
.app-header::after {
  content: "";
  position: absolute;
  inset: -40%;
  background:
    linear-gradient(
      120deg,
      rgba(255, 255, 255, 0.1),
      rgba(255, 255, 255, 0),
      rgba(255, 255, 255, 0.12)
    );
  opacity: 0.3;
  transform: translateX(-30%);
}

.logo-placeholder {
  width: 140px;
  height: 140px;
  margin: 0 auto 10px;
  border-radius: 50%;
  border: 2px dashed rgba(245, 214, 140, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: radial-gradient(circle at top, #1c315f 0, #050815 70%);
}

.logo-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.app-title {
  margin: 4px 0 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #ffecb3;
}

.app-subtitle {
  margin: 2px 0 6px;
  font-size: 18px;
  font-weight: 500;
  color: #ffe082;
}

.app-tagline {
  margin: 0;
  font-size: 12px;
  color: rgba(255, 239, 196, 0.85);
}

/* DATE BAR */

.date-bar {
  margin: 10px auto 14px;
  padding: 8px 12px;
  border-radius: 18px;
  border: 1px solid rgba(235, 200, 120, 0.9);
  background: linear-gradient(90deg, #123066, #08142b);
  text-align: center;
  font-size: 14px;
  color: #ffecb3;
  box-shadow:
    0 0 14px rgba(0, 0, 0, 0.7),
    0 0 10px rgba(255, 215, 128, 0.4);
}

/* MAIN */

.main-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* TIME CARD */

.time-card {
  padding: 10px 10px 12px;
  border-radius: 20px;
  border: 1px solid rgba(235, 200, 120, 0.9);
  background:
    radial-gradient(circle at top left, #132a58 0, #050b1d 50%, #020309 100%);
  box-shadow:
    0 0 16px rgba(0, 0, 0, 0.9),
    0 0 12px rgba(255, 215, 128, 0.25);
}

.special-card {
  border-width: 2px;
  border-color: #ffecb3;
  box-shadow:
    0 0 22px rgba(0, 0, 0, 1),
    0 0 18px rgba(255, 235, 160, 0.5);
}

.time-card-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 8px;
}

.time-card-header h3 {
  margin: 0;
  font-size: 16px;
  color: #ffecb3;
}

.time-range {
  margin: 0;
  font-size: 12px;
  color: rgba(255, 236, 179, 0.9);
}

/* BUTTON */

.action-button {
  width: 100%;
  margin: 2px 0 8px;
  padding: 9px 10px;
  border-radius: 999px;
  border: none;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  background:
    radial-gradient(circle at top, #ffe9a3 0, #f3c75a 45%, #c9912e 100%);
  color: #1b1840;
  box-shadow:
    0 0 14px rgba(0, 0, 0, 0.9),
    0 0 14px rgba(255, 215, 128, 0.55);
  transition: transform 0.1s ease, box-shadow 0.1s ease, filter 0.1s ease;
}

.action-button:active {
  transform: translateY(1px) scale(0.99);
  box-shadow:
    0 0 6px rgba(0, 0, 0, 1),
    0 0 10px rgba(255, 215, 128, 0.6);
  filter: brightness(0.95);
}

.special-button {
  box-shadow:
    0 0 18px rgba(0, 0, 0, 1),
    0 0 16px rgba(255, 241, 175, 0.95);
}

/* RESULT */

.result {
  margin-top: 4px;
  font-size: 13px;
}

.result-card {
  margin-top: 4px;
  padding: 8px 10px 9px;
  border-radius: 16px;
  border: 1px solid rgba(255, 236, 179, 0.9);
  background:
    radial-gradient(circle at top, #152b5e 0, #050b1d 55%, #02030a 100%);
}

.result-title {
  margin: 0 0 4px;
  font-size: 13px;
  color: #ffecb3;
}

.win6-line {
  margin: 2px 0 4px;
  font-size: 14px;
}

.win6-label {
  font-weight: 600;
  color: #ffecb3;
}

.win6-value {
  font-weight: 700;
  font-size: 20px;
  color: #ffeb99;
}

.digit-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 3px 0 5px;
}

.digit-pill {
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 236, 179, 0.85);
  background:
    radial-gradient(circle at top, rgba(255, 236, 179, 0.25), transparent 70%);
  font-size: 12px;
  color: #fff8dc;
}

.section-label {
  margin: 2px 0;
  font-weight: 500;
  font-size: 13px;
  color: #ffecb3;
}

.main-secondary-row {
  display: flex;
  gap: 8px;
  margin: 4px 0 6px;
}

.main-secondary-circle {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.circle-label {
  font-size: 12px;
  color: #ffecb3;
}

.circle-number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid #ffecb3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 17px;
  color: #1b1840;
  background:
    radial-gradient(circle at top, #ffe9a3 0, #f3c75a 45%, #c9912e 100%);
  box-shadow:
    0 0 12px rgba(0, 0, 0, 1),
    0 0 10px rgba(255, 239, 196, 0.7);
}

.info-line {
  margin: 0;
  font-size: 11px;
  color: rgba(255, 241, 200, 0.9);
}

.info-line span.label {
  font-weight: 500;
}

.info-line.muted {
  color: rgba(255, 241, 200, 0.78);
  margin-top: 1px;
}

/* FOOTER */

.app-footer {
  margin-top: 18px;
  font-size: 11px;
  color: rgba(255, 241, 200, 0.85);
  line-height: 1.5;
  text-align: center;
}

/* MOBILE TWEAKS */

@media (min-width: 520px) {
  .app-container {
    max-width: 520px;
  }
}
