/* ==========================================================================
   RESULT PAGE  (result.html)
   Built from Result-Page.psd — 1440px canvas, 1280px content width.
   Loads after main.css + matka.css (re-uses .mk-result-card, .mk-banner,
   .mk-age and the market colour helpers .mk-c-*).
   All new classes are prefixed "rs-".
   ========================================================================== */

:root {
  --rs-navy: #1f2d44;
  --rs-ink: #0a1931;
  --rs-gold-text: #fdd349;
  --rs-lime: #dddf29;
  --rs-pink: #dc3b96;
  --rs-purple: #542d5c;
  --rs-sec-a: #b21313;
  --rs-sec-b: #006b2d;
  --rs-sec-c: #009fe3;
  --rs-declared: #3cb500;
  --rs-upcoming: #f24b4b;
}

.rs-page {
  font-family: "Montserrat", sans-serif;
  color: var(--rs-ink);
}

.rs-container {
  max-width: 1310px;
  margin: 0 auto;
  padding: 0 15px;
}

/* ==========================================================================
   1. HERO — artwork + live results drawn on top
   Positions are % of the 1440 x 448 artwork, so everything scales together.
   ========================================================================== */
.rs-hero {
  background: #061433;
  line-height: 1;
}

.rs-hero-stage {
  position: relative;
  max-width: 1440px;
  margin: 0 auto;
  aspect-ratio: 1440 / 448;
  background: url("../images/result-hero-bg.jpg") center / 100% 100% no-repeat;
  container-type: inline-size;
}

.rs-hero-val {
  position: absolute;
  left: calc(var(--x) / 1440 * 100%);
  top: calc(var(--y) / 448 * 100%);
  transform: translate(-50%, -50%);
  font-family: "Montserrat", sans-serif;
  font-weight: 800;
  font-size: 2.15cqw;            /* ~31px at 1440 */
  color: #000;
  white-space: nowrap;
  text-align: center;
}

.rs-hero-val.is-round {
  color: #fdcb2b;
  font-size: 2.4cqw;             /* ~34px at 1440 */
  text-shadow: 0 1px 0 rgba(0,0,0,.35);
}

.rs-hero-val.is-pending { font-size: 2.6cqw; }

/* ==========================================================================
   Shared: pill heading
   ========================================================================== */
.rs-pill-heading {
  display: flex;
  justify-content: center;
  margin-bottom: 50px;
}

.rs-pill-heading h2 {
  margin: 0;
  min-width: 585px;
  max-width: 100%;
  height: 65px;
  padding: 0 30px;
  border-radius: 33px;
  background: var(--rs-navy);
  color: var(--rs-gold-text);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: .4px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* ==========================================================================
   Round card (used by "Last 3 rounds" and the "All rounds" slider)
   ========================================================================== */
.rs-round-card {
  min-width: 0;
  background: #fff;
  border: 1px solid #e2e2e2;
  border-radius: 10px;
  padding: 50px 14px 30px;
  min-height: 293px;
  display: flex;
  flex-direction: column;
}

.rs-round-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.rs-timing {
  background: var(--rs-lime);
  border-radius: 2px;
  width: 183px;
  min-height: 62px;
  padding: 6px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #111;
  flex-shrink: 0;
}

.rs-timing span {
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
}

.rs-timing strong {
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}

.rs-round-label {
  font-size: 26px;
  font-weight: 500;
  color: var(--rs-ink);
  letter-spacing: .5px;
}

.rs-round-no {
  width: 95px;
  height: 95px;
  border-radius: 50%;
  background: var(--rs-purple);
  color: #fff;
  font-size: 42px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rs-sections {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px 12px;
  margin-top: 30px;
}

.rs-sec {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.rs-sec-tag {
  width: 100%;
  height: 29px;
  border-radius: 3px;
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.rs-sec-val {
  width: 59px;
  height: 60px;
  border-radius: 3px;
  color: #fff;
  font-size: 27px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rs-sec.is-a .rs-sec-tag, .rs-sec.is-a .rs-sec-val { background: var(--rs-sec-a); }
.rs-sec.is-b .rs-sec-tag, .rs-sec.is-b .rs-sec-val { background: var(--rs-sec-b); }
.rs-sec.is-c .rs-sec-tag, .rs-sec.is-c .rs-sec-val { background: var(--rs-sec-c); }

.rs-sec-val.is-pending { font-size: 20px; }

/* ==========================================================================
   2. LAST 3 ROUNDS
   ========================================================================== */
.rs-last {
  background: #eeeeee;
  padding: 48px 0 36px;
}

.rs-last-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

/* ==========================================================================
   3. ALL ROUNDS SLIDER
   ========================================================================== */
.rs-all {
  background: #fff;
  padding: 37px 0 70px;
}

.rs-slider {
  position: relative;
  padding: 0 49px;
}

.rs-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 2 * 24px) / 3);
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: 4px 1px;
  scroll-padding: 0 1px;
}

.rs-track::-webkit-scrollbar { display: none; }

.rs-track .rs-round-card {
  scroll-snap-align: start;
  min-height: 249px;
  padding: 10px 12px 22px;
}

.rs-status {
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
}

.rs-status.is-declared { color: var(--rs-declared); }
.rs-status.is-upcoming { color: var(--rs-upcoming); }
.rs-status.is-live { color: #e08a00; }

.rs-track .rs-timing {
  background: var(--rs-pink);
  color: #fff;
  width: 164px;
  min-height: 56px;
  border-radius: 3px;
}

.rs-track .rs-timing span { font-size: 11px; margin-bottom: 5px; }
.rs-track .rs-timing strong { font-size: 13px; }
.rs-track .rs-round-label { font-size: 22px; }
.rs-track .rs-round-no { width: 86px; height: 86px; font-size: 38px; }
.rs-track .rs-sections { margin-top: 22px; gap: 4px 4px; }
.rs-track .rs-sec-tag { height: 27px; font-size: 14px; }
.rs-track .rs-sec-val { width: 53px; height: 54px; font-size: 24px; }

.rs-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 39px;
  height: 39px;
  border: 0;
  border-radius: 6px;
  background: #121c30;
  color: #fff;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: background-color .15s ease, opacity .15s ease;
}

.rs-arrow:hover { background: #2a3b5c; }
.rs-arrow:disabled { opacity: .35; cursor: default; }
.rs-arrow.is-prev { left: 0; }
.rs-arrow.is-next { right: 0; }

/* ==========================================================================
   4. MATKA KING RESULTS (re-uses .mk-result-card from matka.css)
   ========================================================================== */
.rs-matka {
  background: #fff;
  padding: 10px 0 80px;
}

.rs-heading {
  text-align: center;
  margin-bottom: 42px;
}

.rs-heading h2 {
  font-size: 32px;
  font-weight: 700;
  margin: 0;
  color: #000;
}

.rs-heading > span {
  display: block;
  width: 378px;
  max-width: 80%;
  height: 2px;
  background: #e8b21c;
  margin: 18px auto 20px;
}

.rs-heading p {
  max-width: 720px;
  margin: 0 auto;
  font-size: 13px;
  line-height: 1.5;
  color: #222;
}

.rs-matka-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 28px 20px;
}

.rs-matka .mk-result-card {
  min-height: 265px;
  padding: 14px 8px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.rs-matka .mk-result-card h3 { margin-bottom: 10px; }
.rs-matka .mk-result-date { margin-bottom: 14px; }

.rs-m-status {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 14px;
}

.rs-matka .mk-result-num { margin-bottom: 18px; }
.rs-matka .mk-result-num.is-pending { font-size: 26px; }

.rs-m-at {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
  margin-top: auto;
  white-space: nowrap;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1299px) {
  .rs-round-label { font-size: 20px; }
  .rs-round-no { width: 78px; height: 78px; font-size: 34px; }
  .rs-timing { width: 160px; }
  .rs-timing strong { font-size: 13px; }
  .rs-track .rs-timing { width: 140px; }
  .rs-track .rs-round-label { font-size: 18px; }
  .rs-track .rs-round-no { width: 70px; height: 70px; font-size: 30px; }
  .rs-m-at { font-size: 14px; }
  .rs-matka .mk-result-card h3 { font-size: 18px; }
}

@media (max-width: 1099px) {
  .rs-last-grid { grid-template-columns: 1fr 1fr; }
  .rs-last-grid .rs-round-card:last-child { display: none; }
  .rs-track { grid-auto-columns: calc((100% - 24px) / 2); }
  .rs-matka-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
  .rs-pill-heading { margin-bottom: 28px; }
  .rs-pill-heading h2 { min-width: 0; width: 100%; height: 52px; font-size: 17px; padding: 0 18px; }
  .rs-last { padding: 32px 0; }
  .rs-last-grid { grid-template-columns: 1fr; gap: 12px; }
  .rs-last-grid .rs-round-card:last-child { display: flex; }
  .rs-round-card { padding: 22px 12px; min-height: 0; }
  .rs-slider { padding: 0 36px; }
  .rs-arrow { width: 30px; height: 30px; font-size: 16px; }
  .rs-track { grid-auto-columns: 100%; gap: 12px; }
  .rs-track .rs-round-card { padding: 10px 10px 18px; }
  .rs-heading h2 { font-size: 24px; }
  .rs-matka-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .rs-matka .mk-result-card { min-height: 0; }
  .rs-m-status { font-size: 14px; }
  .rs-m-at { font-size: 12px; white-space: normal; }
}

@media (max-width: 575px) {
  /* stack: timing on top, "Round" + number below */
  .rs-round-head { flex-wrap: wrap; justify-content: center; gap: 10px 14px; }
  .rs-timing, .rs-track .rs-timing { width: 100%; min-height: 48px; }
  .rs-round-label, .rs-track .rs-round-label { font-size: 20px; }
  .rs-round-no, .rs-track .rs-round-no { width: 64px; height: 64px; font-size: 28px; }
  .rs-sections, .rs-track .rs-sections { gap: 4px 6px; margin-top: 18px; }
  .rs-sec-tag, .rs-track .rs-sec-tag { font-size: 12px; height: 26px; }
  .rs-sec-val, .rs-track .rs-sec-val { width: 48px; height: 48px; font-size: 22px; }
}
