@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Playfair+Display:wght@500;600;700&display=swap');

:root {
  --bg: #091321;
  --panel: #18273b;
  --panel2: #101b2a;
  --line: #29405d;
  --gold: #d2a55f;
  --gold2: #e6bf7c;
  --text: #e7ebf2;
  --muted: #91a0b5;
  --green: #72dca6;
  --red: #f09a9a;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, Arial, sans-serif;
}

a {
  text-decoration: none;
  color: inherit;
}

.container {
  width: min(1480px, 87%);
  margin: auto;
}

/* ========== HEADER & NAV ========== */
header {
  height: 94px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  position: relative;
  z-index: 100;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
}

.seal {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--gold);
  color: #172131;
  display: grid;
  place-items: center;
  font-size: 20px;
}

.brand b {
  font-size: 13px;
  letter-spacing: 2px;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 1px;
  margin-top: 3px;
}

.links {
  display: flex;
  align-items: center;
  gap: 40px;
}

.links a {
  font-size: 12px;
  letter-spacing: 1px;
  font-weight: 600;
  color: #cbd1da;
}

.links a:hover,
.links a.active {
  color: var(--gold2);
}

.gold-btn {
  background: var(--gold);
  color: #16202d !important;
  padding: 14px 26px;
  border-radius: 28px;
  font-weight: 600;
}

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  color: var(--text);
  width: 44px;
  height: 44px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 20px;
  align-items: center;
  justify-content: center;
}

.menu-toggle:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* ========== HERO ========== */
.hero {
  padding: 48px 0 72px;
}

.hero h1,
.page-title {
  font-family: "Playfair Display", serif;
  font-size: 58px;
}

.hero p {
  max-width: 650px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
  margin-top: 10px;
}

/* ========== SEARCH / FORM ========== */
.main-grid {
  width: min(1450px, 84%);
  margin: 65px auto;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 45px;
  align-items: start;
}

.card {
  background: linear-gradient(135deg, #1b2b42, #17263a);
  border: 1px solid var(--line);
  border-radius: 40px;
  padding: 40px;
}

.card-head {
  display: flex;
  gap: 18px;
  align-items: center;
  margin-bottom: 34px;
}

.icon {
  width: 50px;
  height: 50px;
  border: 1px solid #36516e;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--gold);
  font-size: 22px;
}

.card h2 {
  font: 600 27px "Playfair Display", serif;
}

.sub {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

.group {
  margin-bottom: 24px;
}

label {
  display: block;
  font-size: 12px;
  letter-spacing: 2px;
  font-weight: 700;
  color: #aab7c8;
  margin-bottom: 11px;
}

input,
select {
  width: 100%;
  height: 58px;
  border: 1px solid #304866;
  border-radius: 20px;
  background: #1a293e;
  color: var(--text);
  padding: 0 18px;
  font: 16px Inter;
  outline: 0;
}

input:focus,
select:focus {
  border-color: var(--gold);
}

.helper {
  font-size: 11px;
  color: #8392a6;
  margin-top: 8px;
}

.error-msg {
  font-size: 13px;
  color: var(--red);
  margin-bottom: 12px;
  min-height: 20px;
}

.submit {
  width: 100%;
  height: 60px;
  border: 0;
  border-radius: 20px;
  background: var(--gold);
  font-weight: 700;
  font-size: 16px;
  color: #15202d;
  cursor: pointer;
}

.submit:hover {
  background: var(--gold2);
}

/* Recent results sidebar */
.recent {
  padding: 0;
  overflow: hidden;
}

.recent-title {
  padding: 25px 30px;
  border-bottom: 1px solid var(--line);
  font-size: 18px;
  font-weight: 600;
}

.recent-title span {
  color: var(--gold);
}

.recent-item {
  display: block;
  padding: 23px 30px;
  border-bottom: 1px solid var(--line);
}

.recent-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.exam {
  font-size: 15px;
  font-weight: 600;
}

.posts,
.date {
  font-size: 12px;
  color: var(--muted);
  margin-top: 9px;
}

.status {
  color: var(--green);
  font-size: 12px;
  font-weight: 600;
}

.date {
  text-align: right;
}

/* ========== SECTIONS ========== */
.section {
  padding: 90px 0;
}

.eyebrow {
  color: var(--gold);
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 13px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 30px;
}

.section h2 {
  font: 600 38px "Playfair Display", serif;
}

.desc {
  color: var(--muted);
  font-size: 11px;
  margin-top: 8px;
}

.view {
  color: var(--gold2);
  font-size: 10px;
  border-bottom: 1px solid var(--gold);
}

.grid3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.result-card,
.notice-card {
  background: linear-gradient(145deg, #151f2d, #101924);
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 24px;
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.tag {
  color: var(--gold);
  font-size: 9px;
  letter-spacing: 1px;
}

.result-card h3,
.notice-card h3 {
  font: 600 24px "Playfair Display", serif;
  margin-top: 15px;
}

.result-card p,
.notice-card p {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
  margin-top: 8px;
}

.link-btn {
  color: var(--gold2);
  font-size: 11px;
  margin-top: 20px;
}

/* Stats */
.scale {
  text-align: center;
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  max-width: 850px;
  margin: 40px auto 0;
  text-align: left;
}

.stat {
  min-height: 140px;
  padding: 22px;
  background: linear-gradient(145deg, #1b2533, #17202d);
  border: 1px solid var(--line);
  border-radius: 13px;
}

.stat b {
  font: 600 30px "Playfair Display", serif;
  color: var(--gold2);
  display: block;
  margin-top: 25px;
}

.stat span {
  font-size: 10px;
  color: var(--muted);
}

/* Notices list */
.list {
  border-top: 1px solid var(--line);
}

.notice-row {
  display: grid;
  grid-template-columns: 100px 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 24px 5px;
  border-bottom: 1px solid var(--line);
}

.notice-date {
  color: var(--gold);
  font-size: 10px;
}

.notice-row h3 {
  font-size: 15px;
}

.notice-row p {
  font-size: 10px;
  color: var(--muted);
  margin-top: 6px;
}


.result-card {
  min-height: 280px;
}

/* ========== RESULT DISPLAY ========== */
.result-display {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(210, 165, 95, 0.08), transparent 55%),
    #091321;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.result-modal-card {
  width: min(920px, 100%);
  background: linear-gradient(165deg, #1a2a40 0%, #142033 100%);
  border: 1px solid #2d4563;
  border-radius: 20px;
  overflow: hidden;
  box-shadow:
    0 4px 6px rgba(0, 0, 0, 0.12),
    0 24px 64px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.03);
  position: relative;
}

/* Subtle official watermark */
.result-modal-card::before {
  content: "UP POLICE";
  position: absolute;
  top: 52%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-28deg);
  font-size: 72px;
  font-weight: 700;
  letter-spacing: 12px;
  color: rgba(255, 255, 255, 0.025);
  pointer-events: none;
  white-space: nowrap;
  z-index: 0;
  font-family: Inter, sans-serif;
}

.result-modal-card > * {
  position: relative;
  z-index: 1;
}

/* Official department bar */
.result-official-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 28px;
  background: linear-gradient(90deg, #0f1c2c 0%, #152536 100%);
  border-bottom: 1px solid rgba(45, 70, 100, 0.7);
}

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

.official-seal {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  color: var(--gold);
  display: grid;
  place-items: center;
  font-size: 14px;
  background: rgba(210, 165, 95, 0.08);
  flex-shrink: 0;
}

.official-org {
  font-size: 13px;
  font-weight: 700;
  color: #e8eef6;
  letter-spacing: 0.3px;
}

.official-sub {
  font-size: 11px;
  color: #8a9cb0;
  margin-top: 2px;
  font-weight: 500;
}

.official-right {
  text-align: right;
}

.doc-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: #7a8fa5;
}

.doc-id {
  font-size: 12px;
  font-weight: 600;
  color: var(--gold2);
  margin-top: 3px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.3px;
}

/* Meta row */
.result-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 8px 0 4px;
  padding: 14px 0 18px;
  border-bottom: 1px solid rgba(48, 70, 95, 0.5);
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meta-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #7e90a6;
}

.meta-value {
  font-size: 13px;
  font-weight: 600;
  color: #c8d4e2;
}

.meta-value.mono,
.mono {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  letter-spacing: 0.4px;
  font-size: 12px;
}

/* Disclaimer */
.result-disclaimer {
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(12, 22, 36, 0.7);
  border: 1px solid rgba(48, 70, 95, 0.55);
}

.result-disclaimer p {
  font-size: 11.5px;
  line-height: 1.65;
  color: #8a9aaf;
}

.result-disclaimer strong {
  color: #a8b8c8;
  font-weight: 600;
}

/* Footer strip */
.result-footer-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px dashed rgba(48, 70, 95, 0.6);
  font-size: 11px;
  color: #6d8096;
}

.qualified-head {
  padding: 24px 40px 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  background: linear-gradient(180deg, #1e3644 0%, #1a2f3c 100%);
  border-bottom: 1px solid rgba(50, 98, 94, 0.5);
}

.qualified-left {
  display: flex;
  gap: 16px;
  align-items: center;
}

.check-circle {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border: 2px solid #69dda0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #69dda0;
  font-size: 18px;
  font-weight: 700;
  background: rgba(105, 221, 160, 0.08);
  box-shadow: 0 0 0 6px rgba(105, 221, 160, 0.06);
}

.qualified-head h1 {
  font: 600 28px/1.2 "Playfair Display", serif;
  color: #75dca6;
  letter-spacing: -0.3px;
}

.qualified-head p {
  margin-top: 6px;
  color: #9aabbc;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}

.close-x {
  font-size: 28px;
  color: #7a8fa5;
  line-height: 1;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  transition: background 0.2s, color 0.2s;
}

.close-x:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #c5d0dc;
}

.result-details {
  padding: 8px 40px 36px;
}

/* Candidate details grid */
.details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 32px;
  row-gap: 0;
}

.detail {
  padding: 18px 0;
  border-bottom: 1px solid rgba(48, 70, 95, 0.7);
}

.detail label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: #7e90a6;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.detail b {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: #e0e6ef;
  letter-spacing: 0.2px;
}

.detail b.green {
  color: #72dca6 !important;
  font-size: 18px;
}

/* Next stage callout */
.next-stage {
  margin-top: 28px;
  padding: 22px 24px;
  border: 1px solid rgba(53, 115, 104, 0.6);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(32, 58, 70, 0.9), rgba(26, 48, 58, 0.9));
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stage-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #8aa3b0;
}

.next-stage b {
  font-size: 17px;
  font-weight: 600;
  color: #7dd9b0;
  line-height: 1.35;
}

/* Score + Checklist row */
.extra-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 20px;
}

.info-box {
  border: 1px solid rgba(48, 70, 95, 0.8);
  background: rgba(18, 30, 46, 0.8);
  border-radius: 16px;
  padding: 22px 22px 20px;
}

.info-box h3 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #c8d2de;
  margin-bottom: 16px;
}

.info-box p {
  font-size: 12px;
  color: #8a9aaf;
  line-height: 1.65;
  margin-top: 12px;
}

.info-box ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.info-box li {
  font-size: 13px;
  color: #a0b0c4;
  line-height: 1.4;
  padding-left: 22px;
  position: relative;
}

.info-box li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1.5px solid #4a9b78;
  background: rgba(114, 220, 166, 0.12);
}

.info-box li::after {
  content: "";
  position: absolute;
  left: 3.5px;
  top: 8.5px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #72dca6;
}

/* Score bar */
.score-bar {
  height: 10px;
  background: #243447;
  border-radius: 99px;
  overflow: hidden;
  margin: 4px 0 10px;
}

.score-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #4ecf96, #72dca6);
  border-radius: 99px;
  box-shadow: 0 0 12px rgba(114, 220, 166, 0.25);
}

.score-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #8a9aaf;
  font-size: 12px;
  font-weight: 500;
}

.score-meta span:last-child {
  color: #72dca6;
  font-weight: 700;
  font-size: 14px;
}

/* Action buttons */
.result-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 24px;
}

.print-btn,
.another-btn {
  min-height: 54px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.2px;
}

.print-btn {
  background: linear-gradient(180deg, #dcb06a, #d0a05d);
  color: #15202d;
  border: 0;
  box-shadow: 0 2px 8px rgba(210, 165, 95, 0.2);
}

.another-btn {
  background: transparent;
  color: #c5d0dc;
  border: 1px solid #3a5470;
}

.another-btn:hover {
  border-color: #5a7a9a;
  background: rgba(255, 255, 255, 0.03);
}

/* ========== FOOTER ========== */
footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 24px;
  margin-top: 40px;
}

.foot {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}

.foot-links {
  display: flex;
  gap: 20px;
  color: var(--muted);
  font-size: 10px;
}


/* ========== IMAGES & VISUALS ========== */
.hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(105deg, rgba(9, 19, 33, 0.94) 0%, rgba(9, 19, 33, 0.88) 42%, rgba(9, 19, 33, 0.55) 100%),
    url("images/hero-bg.jpg") center 30% / cover no-repeat;
  border-bottom: 1px solid var(--line);
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-visual-strip {
  height: 200px;
  border-radius: 18px;
  border: 1px solid var(--line);
  overflow: hidden;
  position: relative;
  background: url("images/building.jpg") center 40% / cover no-repeat;
  margin-top: 40px;
}

.hero-visual-strip::after {
  content: "UTTAR PRADESH POLICE RECRUITMENT";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 22px 28px;
  background: linear-gradient(180deg, transparent 30%, rgba(5, 12, 22, 0.92));
  color: var(--gold2);
  font: 600 18px "Playfair Display", serif;
  letter-spacing: 1px;
}

.side-image {
  height: 160px;
  border-radius: 16px 16px 0 0;
  background: url("images/docs.jpg") center / cover no-repeat;
  border-bottom: 1px solid var(--line);
}

.result-card {
  overflow: hidden;
}

.result-card .card-thumb {
  height: 110px;
  margin: -24px -24px 18px;
  background: url("images/building.jpg") center 35% / cover no-repeat;
  border-bottom: 1px solid var(--line);
  position: relative;
}

.result-card .card-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(16, 25, 36, 0.95));
}

.stat-icon {
  font-size: 22px;
  opacity: 0.7;
  display: block;
  margin-bottom: 4px;
}

/* ========== ANIMATIONS ========== */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes softPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(210, 165, 95, 0); }
  50% { box-shadow: 0 0 0 8px rgba(210, 165, 95, 0.08); }
}

.anim-fade-up {
  opacity: 0;
  animation: fadeUp 0.55s ease forwards;
}

.anim-delay-1 { animation-delay: 0.08s; }
.anim-delay-2 { animation-delay: 0.16s; }
.anim-delay-3 { animation-delay: 0.24s; }
.anim-delay-4 { animation-delay: 0.32s; }

.hero .eyebrow,
.hero h1,
.hero p {
  opacity: 0;
  animation: fadeUp 0.6s ease forwards;
}

.hero .eyebrow { animation-delay: 0.05s; }
.hero h1 { animation-delay: 0.12s; }
.hero p { animation-delay: 0.22s; }
.hero p:last-of-type { animation-delay: 0.3s; }

.result-card,
.notice-card,
.stat,
.recent-item {
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.result-card:hover,
.notice-card:hover {
  transform: translateY(-5px);
  border-color: #4b6685;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
}

.stat:hover {
  transform: translateY(-3px);
  border-color: #3d5a78;
}

.seal {
  transition: transform 0.3s ease;
}

.brand:hover .seal {
  transform: scale(1.06);
}

.gold-btn {
  position: relative;
  overflow: hidden;
}

.gold-btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -80%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
  transition: left 0.5s ease;
}

.gold-btn:hover::after {
  left: 120%;
}

.submit:hover,
.print-btn:hover {
  transform: translateY(-2px);
}

/* Score bar fill animation when result page loads */
.score-fill {
  animation: scoreGrow 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.45s forwards;
  width: 0;
}

@keyframes scoreGrow {
  from { width: 0; }
}

/* Check circle subtle pulse on result page */
.check-circle {
  animation: softPulse 2.4s ease-in-out infinite;
}

/* Result page entrance motions */
@keyframes resultCardIn {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

@keyframes checkPop {
  0% {
    opacity: 0;
    transform: scale(0.4);
  }
  60% {
    transform: scale(1.12);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.anim-result-card {
  opacity: 0;
  animation: resultCardIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.anim-result-item {
  opacity: 0;
  animation: resultItemIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.anim-result-item.anim-delay-1 { animation-delay: 0.12s; }
.anim-result-item.anim-delay-2 { animation-delay: 0.22s; }
.anim-result-item.anim-delay-3 { animation-delay: 0.32s; }
.anim-result-item.anim-delay-4 { animation-delay: 0.42s; }

.result-modal-card .check-circle {
  animation: checkPop 0.55s cubic-bezier(0.34, 1.4, 0.64, 1) 0.15s both, softPulse 2.4s ease-in-out 0.8s infinite;
}

@media (prefers-reduced-motion: reduce) {
  .anim-fade-up,
  .hero .eyebrow,
  .hero h1,
  .hero p,
  .score-fill,
  .check-circle,
  .anim-result-card,
  .anim-result-item,
  .result-modal-card .check-circle {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .score-fill {
    width: auto;
  }
}


/* ========== PAGE TRANSITIONS ========== */
body {
  opacity: 0;
  transition: opacity 0.18s ease;
}

body.page-ready {
  opacity: 1;
}

a,
button {
  -webkit-tap-highlight-color: transparent;
}

.card,
.result-card,
.notice-card,
.recent-item,
.stat {
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.result-card:hover,
.notice-card:hover,
.recent-item:hover {
  transform: translateY(-4px);
  border-color: #4b6685;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.18);
}

.gold-btn,
.submit,
.print-btn,
.another-btn {
  transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
}

.gold-btn:hover,
.submit:hover,
.print-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow: 0 8px 25px rgba(210, 165, 95, 0.16);
}

.gold-btn:active,
.submit:active,
.print-btn:active {
  transform: scale(0.98);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ========== PAGE LOADER ========== */
.page-loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(9, 19, 33, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}

.page-loader.active {
  opacity: 1;
  visibility: visible;
}

.loader-box {
  text-align: center;
}

.loader-spinner {
  width: 28px;
  height: 28px;
  margin: 0 auto 12px;
  border: 2px solid #29405d;
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.loader-text {
  color: #91a0b5;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.3px;
}

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

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
  .menu-toggle {
    display: flex;
  }

  .links {
    display: none;
    position: absolute;
    top: 94px;
    left: 0;
    right: 0;
    background: var(--panel2);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    padding: 20px;
    gap: 16px;
    z-index: 99;
  }

  .links.open {
    display: flex;
  }

  .links a {
    width: 100%;
    text-align: center;
    padding: 12px;
  }

  .links .gold-btn {
    margin-top: 8px;
  }

  .main-grid {
    grid-template-columns: 1fr;
    width: 92%;
    margin: 40px auto;
  }

  .grid3 {
    grid-template-columns: 1fr;
  }

  .hero h1,
  .page-title {
    font-size: 45px;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .notice-row {
    grid-template-columns: 1fr auto;
  }

  .notice-date {
    grid-column: 1;
  }

  .notice-row > div:nth-child(2) {
    grid-column: 1;
  }

  .card {
    padding: 28px;
  }

  .section-head {
    align-items: start;
    flex-direction: column;
  }

  .qualified-head {
    padding: 24px 22px 20px;
  }

  .result-details {
    padding: 4px 22px 28px;
  }

  .result-official-bar {
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 18px;
    gap: 10px;
  }

  .official-right {
    text-align: left;
  }

  .result-meta {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .details-grid,
  .extra-grid,
  .result-actions {
    grid-template-columns: 1fr;
  }

  .details-grid {
    column-gap: 0;
  }

  .next-stage {
    border-radius: 14px;
    padding: 18px 18px;
  }

  .result-display {
    padding: 20px 14px;
  }

  .result-modal-card {
    border-radius: 20px;
  }

  .result-footer-strip {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

@media (max-width: 520px) {
  header {
    height: 76px;
  }

  .links {
    top: 76px;
  }

  .brand b {
    font-size: 10px;
  }

  .gold-btn {
    padding: 11px 16px;
  }

  .hero h1,
  .page-title {
    font-size: 38px;
  }

  .hero p {
    font-size: 15px;
  }

  .card {
    border-radius: 26px;
  }

  .recent {
    border-radius: 26px;
  }

  .section h2 {
    font-size: 30px;
  }

  .row {
    flex-direction: column;
    gap: 6px;
  }

  .foot {
    flex-direction: column;
    align-items: start;
  }

  .foot-links {
    flex-wrap: wrap;
  }

  .qualified-head h1 {
    font-size: 22px;
  }

  .qualified-head p {
    font-size: 13px;
  }

  .check-circle {
    width: 36px;
    height: 36px;
    font-size: 15px;
  }

  .detail b {
    font-size: 15px;
  }

  .detail b.green {
    font-size: 16px;
  }

  .print-btn,
  .another-btn {
    min-height: 50px;
    font-size: 14px;
  }
}

@media print {
  body {
    background: #fff !important;
    color: #111;
  }

  .result-display {
    padding: 0;
    background: #fff !important;
    min-height: auto;
  }

  .result-modal-card {
    box-shadow: none;
    border: 1px solid #ccc;
    border-radius: 0;
    width: 100%;
  }

  .result-modal-card::before {
    color: rgba(0, 0, 0, 0.04) !important;
  }

  .result-official-bar {
    background: #f0f0f0 !important;
    border-bottom: 1px solid #ccc;
  }

  .official-org,
  .doc-id {
    color: #111 !important;
  }

  .official-sub,
  .doc-label {
    color: #555 !important;
  }

  .official-seal {
    border-color: #888 !important;
    color: #555 !important;
    background: transparent !important;
  }

  .qualified-head {
    background: #f5f5f5 !important;
    border-bottom: 1px solid #ddd;
  }

  .qualified-head h1 {
    color: #1a7a4c !important;
  }

  .meta-label {
    color: #666 !important;
  }

  .meta-value {
    color: #222 !important;
  }

  .detail b,
  .next-stage b,
  .info-box h3,
  .info-box li {
    color: #222 !important;
  }

  .detail label,
  .stage-label,
  .score-meta,
  .info-box p,
  .result-disclaimer p,
  .result-footer-strip {
    color: #555 !important;
  }

  .result-disclaimer {
    background: #f9f9f9 !important;
    border-color: #ddd !important;
  }

  .result-actions,
  .close-x {
    display: none !important;
  }

  .score-fill {
    background: #2a9d6a !important;
    box-shadow: none !important;
  }
}
