@charset "utf-8";

@font-face {
  font-family: 'KanitLocal';
  src: url('../fonts/Kanit-Regular.woff') format('woff'),
       url('../fonts/Kanit-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy-950: #06162f;
  --navy-900: #092044;
  --navy-800: #0b2f63;
  --navy-700: #124f91;
  --gold-500: #f7c948;
  --gold-600: #d7a728;
  --sky-50: #f6fbff;
  --slate-50: #f8fafc;
  --slate-100: #eef2f7;
  --slate-200: #dbe3ee;
  --slate-500: #64748b;
  --slate-700: #334155;
  --slate-900: #0f172a;
  --success: #0f766e;
  --danger: #b42318;
  --warning: #b7791f;
  --radius-lg: 28px;
  --radius-md: 18px;
  --shadow-lg: 0 24px 70px rgba(2, 8, 23, .18);
  --shadow-md: 0 14px 35px rgba(15, 23, 42, .12);
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body.modern-page {
  margin: 0;
  min-height: 100vh;
  font-family: 'KanitLocal', 'Kanit', Tahoma, sans-serif;
  color: var(--slate-900);
  background:
    radial-gradient(circle at 10% 5%, rgba(247, 201, 72, .18), transparent 30%),
    radial-gradient(circle at 92% 12%, rgba(37, 99, 235, .22), transparent 28%),
    linear-gradient(135deg, #eef6ff 0%, #f8fafc 46%, #e7eef8 100%);
}

.modern-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

.hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  padding: 24px;
  min-height: 170px;
  background:
    linear-gradient(135deg, rgba(6, 22, 47, .98), rgba(18, 79, 145, .96)),
    linear-gradient(45deg, transparent, rgba(255, 255, 255, .12));
  color: #fff;
  box-shadow: var(--shadow-lg);
}

.hero:before,
.hero:after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.hero:before {
  width: 340px;
  height: 340px;
  right: -100px;
  top: -160px;
  background: rgba(247, 201, 72, .22);
}

.hero:after {
  width: 220px;
  height: 220px;
  right: 90px;
  bottom: -150px;
  border: 1px solid rgba(255,255,255,.22);
}

.brand-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 1;
}

.logo-frame {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
  flex: 0 0 auto;
}

.logo-frame img { max-width: 58px; max-height: 58px; }

.brand-title { margin: 0; font-size: clamp(1.3rem, 2.5vw, 2rem); font-weight: 700; letter-spacing: .2px; }
.brand-subtitle { margin: 3px 0 0; color: #ffdf7b; font-size: .98rem; }

.hero-copy {
  position: relative;
  z-index: 1;
  margin: 22px 0 0;
  max-width: 760px;
}

.hero-copy h2 {
  margin: 0;
  font-size: clamp(1.28rem, 2.8vw, 2.25rem);
  line-height: 1.35;
  font-weight: 700;
}

.hero-copy p {
  margin: 10px 0 0;
  color: rgba(255,255,255,.82);
  font-size: 1rem;
}

.main-panel {
  width: min(820px, 100%);
  margin: -28px auto 0;
  position: relative;
  z-index: 2;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.78);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.panel-header {
  padding: 22px 26px 14px;
  border-bottom: 1px solid var(--slate-100);
}

.panel-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #fff7df;
  color: #825b00;
  font-size: .9rem;
}

.panel-title {
  margin: 0;
  font-size: clamp(1.18rem, 2vw, 1.55rem);
  color: var(--navy-950);
}

.panel-note {
  margin: 8px 0 0;
  color: var(--slate-500);
  font-size: .96rem;
}

.panel-body { padding: 24px 26px 28px; }

.modern-form .form-group { margin-bottom: 20px; }
.modern-form label { color: var(--slate-700); font-weight: 600; margin-bottom: 8px; }

.input-icon-wrap { position: relative; }
.input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  text-align: center;
  color: var(--navy-700);
  opacity: .85;
}

.modern-form .form-control {
  min-height: 52px;
  border-radius: 16px;
  border: 1px solid var(--slate-200);
  padding: 12px 16px 12px 48px;
  font-size: 1.05rem;
  background: #fff;
  transition: .18s ease;
}

.modern-form .form-control:focus {
  border-color: var(--navy-700);
  box-shadow: 0 0 0 .22rem rgba(18, 79, 145, .14);
}

.captcha-box {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  padding: 14px;
  border: 1px solid var(--slate-200);
  border-radius: 18px;
  background: var(--slate-50);
}

.captcha-image {
  height: 52px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--slate-200);
}

.refresh-link,
.home-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--navy-700);
  font-weight: 600;
  text-decoration: none !important;
}

.refresh-link:hover,
.home-link:hover { color: var(--navy-950); }

.btn-modern-primary {
  width: 100%;
  min-height: 54px;
  border: 0;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--navy-700), var(--navy-950));
  box-shadow: 0 14px 26px rgba(18, 79, 145, .25);
  font-size: 1.08rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}

.btn-modern-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 32px rgba(18, 79, 145, .32);
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.result-card {
  padding: 16px;
  border: 1px solid var(--slate-100);
  border-radius: 18px;
  background: linear-gradient(180deg, #fff, #f8fafc);
}

.result-card.full { grid-column: 1 / -1; }
.result-label { color: var(--slate-500); font-size: .92rem; margin-bottom: 5px; }
.result-value { color: var(--slate-900); font-size: 1.15rem; font-weight: 700; word-break: break-word; }
.result-score {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--navy-950);
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1;
}
.result-score span { color: var(--slate-500); font-size: 1rem; font-weight: 600; }

.status-box {
  text-align: center;
  padding: 30px 18px;
  border-radius: 22px;
  border: 1px solid var(--slate-100);
  background: var(--slate-50);
}
.status-icon { font-size: 2.2rem; margin-bottom: 8px; }
.status-danger { color: var(--danger); }
.status-warning { color: var(--warning); }
.status-box h3 { margin: 0; font-size: 1.28rem; }
.status-box p { color: var(--slate-500); margin: 8px 0 0; }

.actions { margin-top: 22px; text-align: center; }
.footer-note {
  text-align: center;
  color: var(--slate-500);
  margin-top: 22px;
  font-size: .92rem;
}

@media (max-width: 640px) {
  .modern-shell { width: min(100% - 20px, 1120px); padding-top: 10px; }
  .hero { padding: 18px; border-radius: 22px; }
  .brand-row { align-items: flex-start; }
  .logo-frame { width: 62px; height: 62px; border-radius: 18px; }
  .logo-frame img { max-width: 48px; max-height: 48px; }
  .main-panel { margin-top: -18px; border-radius: 22px; }
  .panel-header, .panel-body { padding-left: 18px; padding-right: 18px; }
  .result-grid { grid-template-columns: 1fr; }
}
