/* ===========================================================
   หวยรัฐบาลไทย — Bootstrap 5 reconstruction
   Custom theme styles (palette derived from original site)
   =========================================================== */

:root {
  --ht-nav: #1e44b0;
  --ht-section: #007cf0;
  --ht-gold-1: #fce27e;
  --ht-gold-2: #dda72f;
  --ht-green: #28a745;
  --ht-panel-top: rgba(0, 165, 255, 0.36);
  --ht-panel-bottom: rgba(0, 80, 207, 0.81);
}

body {
  min-height: 100vh;
  font-family: 'Kanit', sans-serif;
  color: #fff;
  background-color: #0b56c4;
  background-image: url('../img/1702373729-1.webp');
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
  overflow-x: hidden;
}

a { text-decoration: none; }

/* ---------- Top header ---------- */
.ht-topbar {
  background: rgba(0, 0, 0, 0.18);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.ht-brand img { width: 56px; height: auto; }
.ht-brand .brand-th {
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1;
  color: #ffe08a;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .4);
}
.ht-brand .brand-en {
  font-size: .75rem;
  font-weight: 300;
  color: #cfe2ff;
  letter-spacing: .04em;
}

/* ---------- Buttons ---------- */
.btn-gold {
  background: linear-gradient(180deg, var(--ht-gold-1) 0%, var(--ht-gold-2) 100%);
  border: none;
  color: #4a3500;
  font-weight: 500;
}
.btn-gold:hover { color: #4a3500; filter: brightness(1.05); }

.btn-register {
  background: linear-gradient(180deg, #4ca2d4 0%, #a3f0ff 26%, #62b5ed 100%);
  border: none;
  color: #062b4d;
  font-weight: 500;
}
.btn-register:hover { color: #062b4d; filter: brightness(1.05); }

.btn-line {
  background: var(--ht-green);
  border: none;
  color: #fff;
  font-weight: 500;
}
.btn-line:hover { color: #fff; filter: brightness(1.05); }

/* ---------- Login panel ---------- */
.ht-login {
  background: linear-gradient(180deg, var(--ht-panel-top) 0%, var(--ht-panel-bottom) 100%);
  border-radius: 10px;
  box-shadow: 0 0 12px rgba(0, 0, 0, .25);
}
.ht-login .login-tagline {
  font-weight: 300;
  font-size: 1.05rem;
}
.ht-login .form-control { border: none; }
.ht-login .forgot { color: #fff; font-weight: 300; font-size: .9rem; }
.ht-login .forgot:hover { text-decoration: underline; }

/* ---------- Nav ---------- */
.ht-nav {
  background: var(--ht-nav);
  border-radius: 6px;
}
.ht-nav .nav-link {
  color: #fff;
  font-weight: 300;
  padding: .65rem 1rem;
}
.ht-nav .nav-link:hover,
.ht-nav .nav-link.active {
  color: #ffe08a;
}

/* ---------- Cards / sections ---------- */
.ht-card {
  background: rgba(0, 0, 0, .15);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(0, 0, 0, .2);
}
.ht-section-head {
  background: var(--ht-section);
  color: #fff;
  padding: .55rem .9rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  font-weight: 500;
}
.ht-section-head .flag { font-size: 1.2rem; line-height: 1; }
.ht-section-head .date-badge {
  margin-left: auto;
  background: rgba(255, 255, 255, .22);
  border-radius: 4px;
  padding: .1rem .5rem;
  font-size: .85rem;
  font-weight: 300;
}
.ht-section-head .head-icon {
  width: 22px; height: 22px; border-radius: 4px; display: inline-block;
}

/* ---------- Tables ---------- */
.ht-table {
  margin: 0;
  background: #fff;
  color: #1a1a1a;
}
.ht-table thead th {
  background: #f7f7f7;
  color: #1a1a1a;
  font-weight: 500;
  text-align: center;
  vertical-align: middle;
  border-color: #e3e3e3;
}
.ht-table td {
  text-align: center;
  vertical-align: middle;
  border-color: #ececec;
}
.flag-img { width: 26px; height: auto; border-radius: 2px; box-shadow: 0 0 2px rgba(0,0,0,.3); }
.ht-result-x { color: #d3122a; font-weight: 700; letter-spacing: .15rem; }
.ht-result-date { color: #1b8b2e; font-weight: 600; }
.ht-num { font-weight: 600; }

/* ---------- Provider logo marquee ---------- */
.ht-providers {
  background: var(--ht-nav);
  border-radius: 8px;
  padding: .6rem 0;
  overflow: hidden;
}
.ht-marquee {
  display: flex;
  width: max-content;
  align-items: center;
  animation: ht-scroll 40s linear infinite;
}
.ht-providers:hover .ht-marquee { animation-play-state: paused; }
.ht-marquee img {
  height: 46px;
  width: auto;
  margin: 0 22px;
  object-fit: contain;
}
@keyframes ht-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- Articles ---------- */
.ht-article {
  background: rgba(0, 0, 0, .25);
  border-radius: 10px;
  color: #fff;
  height: 100%;
  transition: transform .2s;
}
.ht-article:hover { transform: translateY(-4px); }
.ht-article .body { padding: .9rem; font-weight: 300; }

/* ---------- Footer ---------- */
.ht-footer {
  background: #071a3f;
  color: #cdd8ee;
  font-weight: 300;
  font-size: .9rem;
  margin-top: auto;
}
.ht-footer a { color: #ffe08a; }
.ht-footer .secure { color: #9fb4dd; font-size: .8rem; letter-spacing: .03em; }

/* ---------- Responsive ---------- */
@media (max-width: 575.98px) {
  .ht-brand .brand-th { font-size: 1.4rem; }
  .ht-marquee img { height: 36px; margin: 0 14px; }
}

/* ---------- Back to top ---------- */
#toTop {
  width: 45px; height: 45px; border-radius: 50%;
  position: fixed; bottom: 24px; right: 16px;
  display: none; align-items: center; justify-content: center;
  background: #fff; color: #1a1a1a; cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .35); z-index: 1050;
}

/* ============================================================
   MOBILE BOTTOM ACTION BAR (login/register) — เฉพาะมือถือ
   ============================================================ */
.mobile-actionbar{
  position:fixed; left:0; right:0; bottom:0; z-index:1055;
  display:flex; gap:8px;
  padding:8px 10px calc(8px + env(safe-area-inset-bottom,0px));
  background:linear-gradient(180deg, rgba(7,40,92,.88), rgba(7,40,92,.98));
  border-top:1px solid rgba(252,226,126,.4);
  box-shadow:0 -6px 20px rgba(0,0,0,.45);
  backdrop-filter:blur(6px);
}
.mab-btn{
  flex:1; text-align:center; padding:11px 8px; border-radius:10px;
  font-weight:700; font-size:.95rem; line-height:1.1;
  box-shadow:0 4px 12px rgba(0,0,0,.3);
}
.mab-login{ background:linear-gradient(180deg,#ffe89a,#f3c63f); color:#3a2a00; }
.mab-register{ background:linear-gradient(180deg,#3aa1ff,#1668d8); color:#fff; }
.mab-btn:active{ transform:translateY(1px); }
@media (max-width:991.98px){
  body{ padding-bottom:72px; }
  #toTop{ bottom:80px !important; }
}
