/* ================= BASIC LAYOUT ================= */

body {
  background: #aed9b7;
  color: rgb(255, 255, 255);
  font-family: monospace;
  margin: 0;
}



/* <!-- This code is for to avoid the flash good one  --> */
body:not(.page-ready) .info-cards,
body:not(.page-ready) .post-para-zone,
body:not(.page-ready) #resultPage {
  display: none;
}


body.result-open {
  overflow: hidden;
}


/* ================= TYPING AREA ================= */


#para {
    font-size: 30px;
    line-height: 50px;
    user-select: none;
    margin-top: 30px;
    text-align: center;
    max-width: 1100px;
}



.para-wrapper {
    max-height: 180px;
    overflow-y: auto;
    padding-right: 12px;
    margin-top: 20px;
    scroll-behavior: smooth;
    
}


#resetBtn {
  all: unset;
  display: block;
  margin: 18px auto 0;
  font-size: 26px;
  cursor: pointer;
  opacity: 0.55;
  position: relative;          /* for tooltip */
  transition: opacity 0.2s ease;
}

#resetBtn:hover,
#resetBtn:focus-visible {
  opacity: 1;
}

/* icon */
.icon {
  font-size: clamp(22px, 5vw, 28px);
  display: inline-block;
  transition: transform 0.6s ease;
}

/* rotate icon only */
#resetBtn:hover .icon,
#resetBtn:focus-visible .icon {
  transform: rotate(180deg);
}

/* tooltip */
.tooltip {
  position: absolute;
  bottom: -36px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 20, 35, 0.92);
  color: #fff;
  font-size: clamp(11px, 3vw, 13px);
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

/* show tooltip */
#resetBtn:hover .tooltip,
#resetBtn:focus-visible .tooltip {
  opacity: 1;
}

/* 📱 Mobile behavior */
@media (max-width: 768px) {
  .tooltip {
    bottom: -32px;
    font-size: 11px;
  }

  /* show tooltip on tap */
  #resetBtn:active .tooltip {
    opacity: 1;
  }

  #resetBtn:active .icon {
    transform: rotate(360deg);
  }
}


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



#sideProgress {
  position: fixed;
  right: 10px;
  top: 80px;
  width: 200px;
}


@media (max-width: 768px) {
  #sideProgress {
    display: none;
  }
}


/* ================= CONTROLS ================= */

.practice-controls {
  position: relative;
  z-index: 5000;
  display: flex;
  gap: clamp(15px, 4vw, 40px);
  justify-content: center;
  align-items: center;
  padding: 12px 18px;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 18px;
  backdrop-filter: blur(8px);
  flex-wrap: wrap;   /* 🔥 important */
}


/* ===== CONTROL ITEM ===== */
.control-item {
  position: relative;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(255,255,255,0.08);
  transition: all 0.2s ease;
  user-select: none;
}

.control-item:hover {
  background: rgba(255,255,255,0.18);
  transform: translateY(-1px);
}

/* ===== LABEL ===== */
.control-label {
  font-size: 20px;
  font-weight: 600;
  color: #eaeaea;
  opacity: 0.9;
  white-space: nowrap;
}

/* ===== ACTIVE STATE (IMPORTANT) ===== */
.control-item.active {
  background: #1f2933;
  color: #00ffd0;
  box-shadow: 0 0 15px rgba(0,255,208,0.45);
  font-weight: 600;
   transform: scale(0.96);
}

/* ===== TOGGLE CONTROLS ===== */
.control-item.toggle.active {
  background: #00ffd01f;
  border: 2px solid #00ffd0;
}

/* ===== DROPDOWN ===== */
.dropdown {
  position: absolute;
  top: 44px;
  left: 50%;
  transform: translateX(-50%);
  background: #111;
  border-radius: 12px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 9999;
  pointer-events: auto;
  min-width: 90px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.dropdown span {
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 13px;
  color: #ccc;
  cursor: pointer;
  transition: background 0.15s ease;
}

.dropdown span:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

.dropdown span.selected {
  background: #00ffd033;
  color: #00ffd0;
  font-weight: 600;
}

/* ===== HIDDEN ===== */
.hidden {
  display: none;
}


/* ================= LIVE STATS ================= */

/* ===== STATS + CLOCK WRAPPER ===== */
.stats-wrapper {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}


.stats-spacer {
  pointer-events: none;
}


.stats-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(20px, 6vw, 80px);
  color: rgb(0 64 11 / 73%);
  font-weight: 700;
  margin: 16px 0 14px;
  white-space: nowrap;
  flex-wrap: wrap;
  transform: translateX(120px);
}



.stat {
  text-align: center;
}

.stat-label {
  display: block;
  font-size: 25px;
  opacity: 3.6;
}

.stat-value {
  font-size: 20px;
}


/* ===== CLOCK WRAPPER ===== */
.clock-box {
  justify-self: end;
  padding-left: 40px;
  font-family: "JetBrains Mono", monospace;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

/* TIME */
.clock-time {
  font-size: 34px;
  opacity: 0.85;
  color: black;
}

/* DATE */
.clock-date {
  font-size: 18px;
  opacity: 1;
  color: #00698b;;
}

/* PROGRESS BAR */
.time-progress {
  width: 100%;
  height: 4px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

#timeProgressFill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #39c5ff, #16a34a);
  transition: width 0.4s ease;
}



.clock-box:hover {
  opacity: 1;
  transform: translateY(-1px);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .stats-wrapper {
    grid-template-columns: 1fr;
    justify-items: center;
    row-gap: 10px;
  }

  .stats-bar {
    margin-left: 0;
    gap: 110px;
    margin-bottom: -8px;
    margin-top: -5px;
    transform: none;
  }

    .clock-box {
    display: none;
  }

    .clock-box {
    display: none;
  }

  .hourly-celebrate {
    display: none;
  }
  
}



/* Hide on mobile / touch devices */
.clock-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hourly-celebrate {
  margin-top: 6px;        /* close to clock */
  font-size: 12px;
  color: rgba(24 154 0);
  opacity: 1.85;
}

/* Desktop only */
@media (hover: none) and (pointer: coarse) {
  .hourly-celebrate {
    display: none;
  }
}




/* 🔥 Make controls stack nicely on mobile */
@media (max-width: 768px) {

  .stats-bar {
    gap: 35px;
    margin: 10px 0;
  }

  .stat-label {
    font-size: 25px;
  }

  .stat-value {
    font-size: 25px;
  }

}







/* Very Important Code this one  */

.mobile-settings-panel {
  display: contents;
}

.mobile-settings-btn {
  display: none;
}

.panel-ok-btn {
  display: none;
}







/*  This Code is for only the mobile view  */

/* Hide mobile button on desktop */


@media (max-width: 768px) {

  .mobile-settings-btn {
    display: block;
    padding: 12px;
    text-align: center;
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 10px;
  }

  .mobile-settings-panel {
    display: none;
    background: rgb(0, 0, 0);
    padding: 40px;
    border-radius: 16px;
  }

  .mobile-settings-panel.active {
    display: grid;                 /* 🔥 grid only when open */
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }

  .mobile-settings-panel .control-item {
    width: 100%;
    text-align: center;
  }

  .panel-ok-btn {
    display: block;
    grid-column: span 2;
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 10px;
    background: #1f2933;
    color: #00ffd0;
    font-weight: bold;
    margin-top: 10px;
  }
  

}






/* ===== MODAL OVERLAY ===== */
#customModal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(10, 14, 25, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);

  z-index: 9999;
  opacity: 1;
  transition: opacity 0.25s ease;
}

/* hidden state (your JS already toggles this class) */
#customModal.hidden {
  opacity: 0;
  pointer-events: none;
}

/* ===== MODAL BOX ===== */
.modal-box {
  width: 360px;
  max-width: 92%;
  padding: 28px 26px;

  border-radius: 18px;

  /* glass look */
  background: linear-gradient(
    145deg,
    rgba(30, 35, 55, 0.75),
    rgba(15, 18, 30, 0.85)
  );

  border: 1px solid rgba(255,255,255,0.12);
  box-shadow:
    0 20px 50px rgba(0,0,0,0.55),
    inset 0 1px 0 rgba(255,255,255,0.06);

  color: #e6edf7;

  /* animation */
  transform: translateY(0) scale(1);
  animation: modalPop 0.28s cubic-bezier(.2,.9,.3,1.2);
}

/* open animation */
@keyframes modalPop {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ===== TITLE ===== */
.modal-box h3 {
  margin: 0 0 18px 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1px;
  text-align: center;
  color: #f8fafc;
}

/* ===== NUMBER INPUT ===== */
#customInput {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;

  background: rgba(10, 14, 25, 0.75);
  border: 1px solid rgba(255,255,255,0.15);
  color: #e6edf7;

  font-size: 18px;
  font-weight: 600;
  text-align: center;

  outline: none;
  transition: all 0.2s ease;
}

/* focus glow */
#customInput:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96,165,250,0.25);
  background: rgba(10, 14, 25, 0.95);
}

/* ===== NUMBER SPINNER STYLE ===== */

/* Chrome / Edge */
#customInput::-webkit-inner-spin-button,
#customInput::-webkit-outer-spin-button {
  opacity: 1;
  filter: invert(1);
  cursor: pointer;
}


/* ===== WARNING TEXT ===== */
.warning {
  margin-top: 10px;
  font-size: 13px;
  color: #f87171;
  text-align: center;
  letter-spacing: 0.4px;
}

/* ===== ACTION BUTTONS ===== */
.modal-actions {
  margin-top: 20px;
  display: flex;
  gap: 12px;
  justify-content: center;
}

.modal-actions button {
  flex: 1;
  padding: 12px 0;
  border-radius: 12px;

  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;

  border: none;
  cursor: pointer;

  transition: all 0.18s ease;
}

/* OK button */
#modalOk {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
  box-shadow: 0 6px 16px rgba(34,197,94,0.35);
}

#modalOk:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(34,197,94,0.5);
}

/* Cancel button */
#modalCancel {
  background: rgba(255,255,255,0.08);
  color: #cbd5f1;
  border: 1px solid rgba(255,255,255,0.18);
}

#modalCancel:hover {
  background: rgba(255,255,255,0.15);
  transform: translateY(-1px);
}

/* ===== SMALL SCREEN ===== */
@media (max-width: 480px) {
  .modal-box {
    padding: 22px;
  }

  #customInput {
    font-size: 16px;
  }
}

.control-item.toggle.active {
  background: #58603744;
  color: #ffffff;
  border-radius: 8px;
}


.post-para-zone {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 25px;
}

/* Restart button stays unchanged */

/* Future slot box */
.future-slot {
  width: 90%;
  max-width: 900px;
  height: 140px;

  border: 4px solid #1f2d2a;
  border-radius: 6px;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 36px;
  font-family: monospace;
  letter-spacing: 2px;

  color: #1f2d2a;
  background: transparent;

  user-select: none;
}

/* ================= INFO CARDS GRID ================= */
.info-cards {
  max-width: 100%;
  width: 100%;
  margin: 80px 0;          
  /* padding: 25px;   */
  
   display: flex;
  flex-direction: column;
  gap: 20px; 
}

.info-card {
  background: #000;
  border-radius: 0px;
  padding: 48px 64px;
  display: grid;
  /* grid-template-columns: 1fr 1fr;  */
  gap: 20px;
}



/* ================= CARD SIDES ================= */

.card-front,
.card-back {
  font-size: 23px;
  line-height: 1.55;
}

.card-front {
  padding-right: 15px;
  /* border-right: 1px solid rgb(255, 255, 255); */
}

/* .card-back {
  padding-left: 02px;
} */

/* ================= HEADINGS ================= */

.info-card h3 {
  margin-top: 0;
  margin-bottom: 14px;
  font-size: 27px;
}

.info-card h4 {
  margin: 12px 0 6px;
  font-size: 28px;
  font-weight: 600;
}

/* ================= LIST ================= */

.info-card ul {
  margin: 0;
  padding-left: 18px;
}

.info-card li {
  margin-bottom: 6px;
}

/* ================= RESPONSIVE ================= */

/* ===== MOBILE STACK INSIDE CARD ===== */
@media (max-width: 768px) {
  .info-card {
    padding: 28px 20px;
  }

  .card-front,
  .card-back {
    font-size: 19px;
  }

  .info-card h3 {
    font-size: 24px;
  }
}

/* For the tablet version */
@media (max-width: 900px) {
  .info-card {
    grid-template-columns: 1fr;
  }
}


/* ================= BACKGROUND AFTER FUTURE SLOT ================= */

.below-future-bg {
  background: #000000ce;          /* dark contrast */
  padding: 0px 1px 1px;
  margin-top: 20px;

}

/* keep cards readable */
.below-future-bg .info-card {
  background: rgba(255,255,255,0.06);
}


/* ================= IMAGE + TEXT INFO CARD ================= */

.info-with-image {
  display: grid;
  grid-template-columns: 1fr 0.9fr 1fr;
  align-items: center;
  gap: 64px;
}


.card-image {
  display: flex;
  justify-content: center;
  align-items: center;
}

.card-image img {
  width: 100%;
  max-width: 980px;
  height: 350px;
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);
}


@media (max-width: 900px) {
  .info-with-image {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .card-image img {
    max-width: 700px;
    height: 280px;
  }
}



/* ================= LIVE STATS IMAGE FIX ================= */

.info-card.livestats .livestats-top {
  display: grid;
  grid-template-columns: 1.35fr 750px;
  column-gap: 48px;
  align-items: start;
}

/* ================= IMAGE ================= */

.Livestats-image {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  /* margin-top: 250px;  */
}

.Livestats-image img {
  width: 750px;
  height: 250px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.35);
}

.image-caption {
  margin-top: 6px;
  font-size: 14px;
  opacity: 0.65;
  font-family: monospace;
}

/* ================= RESPONSIVE ================= */

@media (max-width: 1100px) {
  .info-card.livestats .livestats-top {
    grid-template-columns: 1fr;
  }

  .Livestats-image {
    margin-top: 24px;
  }

  .Livestats-image img {
    width: 100%;
    height: 280px;
  }
}

/* ////////////////   Common Error Contents////////////// */

.info-card.err .err-top {
  display: grid;
  grid-template-columns: 1.35fr 750px;
  column-gap: 48px;
  align-items: start;
}

/* ================= IMAGE ================= */

.err-image {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-top: 50px; /* ✅ controlled pull-down */
}

.err-image img {
  width: 809px;
  height: 328px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.35);
}

.image-caption {
  margin-top: 6px;
  font-size: 14px;
  opacity: 0.65;
  font-family: monospace;
}

/* ================= RESPONSIVE ================= */

@media (max-width: 1100px) {
  .info-card.err .err-top {
    grid-template-columns: 1fr;
  }

  .err-image {
    margin-top: 24px;
  }

  .err-image img {
    width: 100%;
    height: 280px;
  }
}



/* =============== Live Stats + WPM speed ============ */
.livestats-top {
  display: grid;
  grid-template-columns: 1.35fr 750px;
  gap: 48px;
  align-items: start;
}

/* RIGHT COLUMN */
.Livestats-image {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* COMMON IMAGE STYLE */
.Livestats-image img {
  width: 750px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 12px 30px rgba(0,0,0,0.35);
}

/* TOP IMAGE */
.Livestats-image img:first-child {
  height: 260px;
  margin-top: 25px; 
}

/* GAP IMAGE (PINK BOX IMAGE) */
.gap-image {
  height: 300px;
  margin-top: 90px; 
}

/* CAPTION */
.image-caption {
  margin-top: 6px;
  margin-bottom: 18px;
  font-size: 14px;
  opacity: 0.65;
  font-family: monospace;
}

/*///////***** Mobile    RESPONSIVE////////****** */
@media (max-width: 1100px) {
  .livestats-top {
    grid-template-columns: 1fr;
  }

  .Livestats-image img {
    width: 100%;
    height: 240px;
    /* margin-top: 25px; */
  }
}




/* =====================================================
   RESULT PAGE (CLEAN & CONSOLIDATED)
   ===================================================== */

#resultPage {
  position: fixed;
  inset: 0;
  z-index: 9999;
  overflow: auto;
}

/* For smooth mobile scroll */
#resultPage {
  -webkit-overflow-scrolling: touch;
}


/* dark section till resultss graph */
.result-dark-section {
  background: #0a0f1e;
}

.result-after-section {
  background: #000000;
  color: #ffffff;
  padding: 60px 16px;
}

.result-after-section > * {
  max-width: 1200px;
  margin: 0 auto;
}


/* ---------- SCROLL CONTAINER ---------- */

.result-scroll-container {
  /* height: 100vh;
  overflow-y: auto; */

  min-height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

/* ---------- TITLE ---------- */

.result-title {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #f8fafc;
  opacity: 0.9;
  text-align: center;
  margin: 0;
}

/* ---------- TOP ROW LAYOUT ---------- */

.result-top-row {
  width: 1400px;
  max-width: 95vw;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 70px;
}

/* ---------- SESSION HISTORY ---------- */

#sessionHistoryPanel {
  flex: 0 0 41%;
  max-width: 41%;
}

#sessionHistoryPanel h3 {
  margin-bottom: 12px;
  font-size: 30px;
  color: #e5edff;
  letter-spacing: 0.5px;
}

.session-item {
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 10px;
  background: rgba(255,255,255,0.04);
  color: #dbe7ff;
  font-size: 22px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.session-item:hover {
  transform: translateY(-4px);
}

/* ⭐ recent session */
.recent-session {
  border: 1px solid rgba(80,160,255,0.6);
  box-shadow: 0 0 12px rgba(80,160,255,0.25);
}

.session-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.recent-badge {
  background: rgba(80,160,255,0.15);
  color: #7bb6ff;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 800;
}

/* ---------- PARAGRAPHS ---------- */

.result-paragraphs {
  flex: 0 0 55%;
  max-width: 70%;
  width: 900px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.para-block {
  background: rgba(15, 20, 35, 0.55);
  border-radius: 12px;
  padding: 14px 16px;
}

.para-title {
  font-size: 13px;
  opacity: 0.7;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.scroll-para {
  max-height: 4.8em;
  overflow-y: auto;
  line-height: 1.6;
  font-size: 20px;
}

/* typing colors */
.result-paragraph span.correct { color: #4caf50; }
.result-paragraph span.wrong { color: #ff2a2a; }
.result-paragraph span.skipped { color: #f2c200; }
.result-paragraph span.extraLetter { color: #9b4dff; }

/* ---------- LEGEND ---------- */

.result-legend {
  display: flex;
  gap: 77px;
  flex-wrap: wrap;
  font-size: 18px;
  margin-top: -18px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.legend-dot.correct { background: #22c55e; }
.legend-dot.wrong { background: #ef4444; }
.legend-dot.skipped { background: #facc15; }
.legend-dot.extra { background: #a855f7; }

/* ---------- BUTTONS ---------- */

.result-buttons {
  display: flex;
  justify-content: center;
  gap: 156px;
  margin-top: -11px;
}

.result-buttons button {
  padding: 10px 18px;
  border-radius: 10px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.result-buttons button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  opacity: 0.95;
}

#sameParaBtn {
  background: #2563eb;
  color: white;
}

#retryBtn {
  background: #ff4d4f;
  color: white;
}

/* ---------- ADS ---------- */

.ads-slot {
  width: 900px;
  max-width: 92vw;
  height: 90px;
  border: 2px dashed rgba(255,255,255,0.25);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.5;
  font-size: 20px;
  letter-spacing: 2px;
}

/* ---------- GRAPH ---------- */

.wpm-graph-section {
  width: 900px;
  max-width: 92vw;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chart-title {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: #f8fafc;
  white-space: nowrap;
}

.wpm-graph-wrapper {
  width: 100%;
  height: 280px;
  padding: 16px;
  background: linear-gradient(180deg, #0f1117, #0b0d12);
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

.wpm-graph-wrapper canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

/* ---------- MOBILE STACK ---------- */




/* =====================================================
   PHASE 4 — RESPONSIVE RESULT PAGE (MOBILE)
   ===================================================== */

@media (max-width: 900px) {

  #resultPage {
    padding: 0;
  }

  .result-scroll-container {
    padding: 16px;
  }

  .result-top-row {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  /* Session history */
  #sessionHistoryPanel,
  .result-paragraphs {
    max-width: 100%;
    flex: 1 1 auto;
  }

  .para-block {
    padding: 12px;
  }

  .scroll-para {
    max-height: 180px;
    font-size: 14px;
    line-height: 1.5;
  }

  /* Buttons */
  .result-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .result-buttons button {
    width: 100%;
    padding: 12px;
    font-size: 15px;
  }

  /* Graph section */
  .wpm-graph-section {
    margin-top: 24px;
  }

  .wpm-graph-wrapper {
    height: 220px;
  }

  canvas#wpmChart {
    width: 100% !important;
    height: 100% !important;
  }
}




/* === 10-02-2026  ==== */
/* ====== Anout Last Sessions Content ======= */

.result-explain-section {
  max-width: 1900px;
  margin: 0 auto;
  padding: 0px 24px;
  line-height: 1.7;
}


/* Apply gap ONLY if section is NOT first */
.result-explain-section + .result-explain-section {
  margin-top: 250px;
   /* max-width: 1900px; */
}

.result-explain-section h2 {
  font-size: 32px;
  margin-bottom: 16px;
}

.result-explain-section h3 {
  font-size: 32px;
  margin-top: 32px;
  margin-bottom: 12px;
}

.result-explain-section ul {
  padding-left: 20px;
}

.result-explain-section li {
  margin-bottom: 12px;
  font-size: 24px;
}




/* Paragraph text */
.result-explain-section p {
  font-size: 24px;
  line-height: 1.75;
  margin-bottom: 22px;

  color: #d6d6d6;          /* slightly brighter */
  font-weight: 500;       /* THIS is the key */
  
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ===============================
   RESULT BOTTOM BUTTONS
================================ */

#bottomResultButtons {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 40px auto 20px;
  padding: 0 16px;
  flex-wrap: wrap;
}

/* base button style */
#bottomResultButtons button {
  min-width: 180px;
  padding: 14px 22px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: 
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* 🔁 Repeat Test */
#bottomResultButtons button:first-child {
  background: #1f2937; /* dark slate */
  color: #e5e7eb;
}

#bottomResultButtons button:first-child:hover {
  background: #111827;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25);
}

/* 🔄 Retry (new paragraph) */
#bottomResultButtons button:last-child {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
}

#bottomResultButtons button:last-child:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.45);
}

/* click feedback */
#bottomResultButtons button:active {
  transform: scale(0.97);
}

/* ===============================
   MOBILE RESPONSIVE
================================ */

@media (max-width: 600px) {
  #bottomResultButtons {
    flex-direction: column;
    gap: 12px;
  }

  #bottomResultButtons button {
    width: 100%;
    font-size: 15px;
    padding: 14px 18px;
  }
}




#bottomResultButtons {
  animation: slideUp 0.4s ease;
}

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


@media (max-width: 600px) {
  #bottomResultButtons {
    position: sticky;
    bottom: 12px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    padding: 12px;
    border-radius: 16px;
  }
}




/* ================= TOAST ================= */

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: rgba(17, 24, 39, 0.95);
  color: #e5e7eb;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: 
    opacity 0.25s ease,
    transform 0.25s ease;
  z-index: 9999;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* mobile */
@media (max-width: 600px) {
  .toast {
    font-size: 13px;
    padding: 10px 14px;
    bottom: 16px;
  }
}




#scrollTopBtn {
  position: fixed;
  bottom: 88px; /* above toast */
  right: 18px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(17, 24, 39, 0.9);
  color: #f30000;
  border: none;
  font-size: 20px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 9998;
}

#scrollTopBtn.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

#scrollTopBtn:hover {
  background: rgba(17, 24, 39, 1);
}

/* Mobile */
@media (max-width: 600px) {
  #scrollTopBtn {
    width: 38px;
    height: 38px;
    font-size: 18px;
    right: 14px;
    bottom: 72px;
  }
}





.mobile-stats {
  display: none;
}

@media (max-width: 768px) {

  /* Hide old stats */
  .stats-wrapper {
    display: none;
  }

  .mobile-stats {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px 0;
    background: #111;
    color: white;
    font-weight: bold;
    font-size: 19px;
  }

  .mobile-stat {
    position: relative;
    text-align: center;
    cursor: pointer;
  }

  .mobile-tooltip {
    position: absolute;
    top: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: #222;
    padding: 5px 8px;
    font-size: 12px;
    border-radius: 5px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    white-space: nowrap;
  }

  .mobile-stat.active .mobile-tooltip {
    opacity: 1;
  }
  #timerBox {
    display: none;
  }
}



@media (max-width: 768px) {

  #app {
    display: flex;
    flex-wrap: wrap;     /* 🔥 important */
    justify-content: center;
  }

  .para-wrapper {
    width: 100%;
    order: 1;
  }

  .practice-controls,
  .post-para-zone {
    order: 2;
    width: auto;          /* 🔥 important */
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px 10px 0 10px;
  }

}






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

.mobile-stat {
  flex: 1;
  text-align: center;
}

.reset-stat {
  flex: 0 0 auto;       /* 👈 important */
  width: 40px;
  font-size: 22px;
  cursor: pointer;
}

/* Hide mobile stats by default (desktop) */
.mobile-stats {
  display: none;
}

/* Show only in mobile */
@media (max-width: 768px) {
  .mobile-stats {
    display: flex;
  }
}



/* Hide desktop reset zone on mobile */
@media (max-width: 768px) {
  .post-para-zone {
    display: none;
  }
}



/* Kill body background bleed before footer */
html {
  background: #000;        /* match your last section color */
}

#footer {
  background: #000;
}

/* If your last section is .below-future-bg */
.below-future-bg {
  padding-bottom: 1px;     /* force it to fully wrap its content */
  margin-bottom: 0;
}

/* If your last section is .info-cards */
.info-cards {
  margin-bottom: 0;
  padding-bottom: 60px;
}