/* =============== PRACTICE PAGE THEME (3-color blurred BG + noise) =============== */

/* Base page */
.practice-page {
  min-height: 100vh;
  position: relative;
  background: #020617;
  color: #0b1120;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Glow background: 3 colors + heavy blur */
.practice-page::before {
  content: "";
  position: fixed;
  inset: -80px;
  z-index: -4;
  pointer-events: none;
  background:
    radial-gradient(circle at 0% 0%,    rgba(59, 130, 246, 0.9) 0, transparent 52%),
    radial-gradient(circle at 100% 0%,  rgba(16, 185, 129, 0.9) 0, transparent 52%),
    radial-gradient(circle at 50% 100%, rgba(244, 114, 182, 0.9) 0, transparent 50%);
  filter: blur(60px); /* big soft glow */
  opacity: 0.9;
}

/* Background container */
.px-bg {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
}

/* Noise ~10% */
.px-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(45deg,
      rgba(255, 255, 255, 0.09) 25%,
      transparent 25%,
      transparent 75%,
      rgba(255, 255, 255, 0.09) 75%
    ),
    linear-gradient(45deg,
      rgba(255, 255, 255, 0.09) 25%,
      transparent 25%,
      transparent 75%,
      rgba(255, 255, 255, 0.09) 75%
    );
  background-size: 3px 3px;
  background-position: 0 0, 1.5px 1.5px;
  opacity: 0.10;
  mix-blend-mode: soft-light;
}

/* Soft extra bubbles */
.px-bubble {
  position: absolute;
  border-radius: 999px;
  filter: blur(2px);
  opacity: 0.30;
}
.px-bubble.b1 {
  width: 260px;
  height: 260px;
  left: 10%;
  top: 18%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.65), transparent);
}
.px-bubble.b2 {
  width: 220px;
  height: 220px;
  right: 13%;
  top: 14%;
  background: radial-gradient(circle, rgba(52, 211, 153, 0.65), transparent);
}
.px-bubble.b3 {
  width: 320px;
  height: 320px;
  right: 20%;
  bottom: 8%;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.65), transparent);
}

/* Back button */
.practice-back-floating {
  position: fixed;
  left: 16px;
  top: 76px;
  z-index: 1000;
}
@media (max-width: 520px) {
  .practice-back-floating {
    top: 70px;
    left: 10px;
  }
}

/* Container & card */
.practice-container {
  max-width: 1180px;
  margin: 88px auto 40px;
  padding: 0 16px 32px;
  box-sizing: border-box;
}

.practice-card {
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: linear-gradient(
    135deg,
    rgba(15, 23, 42, 0.97),
    rgba(15, 23, 42, 0.93)
  );
  box-shadow:
    0 18px 55px rgba(15, 23, 42, 0.9),
    0 0 0 1px rgba(15, 23, 42, 0.85);
  overflow: hidden;
  color: #e5e7eb;
}

/* Header */
.practice-header-top {
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
  background: radial-gradient(circle at top left, rgba(59, 130, 246, 0.2), transparent 55%);
  padding: 14px 18px;
}

.practice-title {
  margin: 0;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.practice-sub {
  margin: 4px 0 0;
  color: #cbd5f5;
  font-size: 0.92rem;
}

/* Layout */
.practice-main-layout {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(260px, 1.2fr);
  gap: 16px;
  padding: 16px 18px 18px;
}
@media (max-width: 900px) {
  .practice-main-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Typing panel (left) */
.typing-panel {
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.94));
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.8);
}

/* Top stats bar */
.px-metrics-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  background: linear-gradient(135deg, #60a5fa, #3b82f6);
  border-radius: 14px;
  padding: 6px 10px;
  margin: 10px 10px 10px;
  color: #e5f0ff;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.9);
  font-size: 0.85rem;
}

.px-metric-cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.22);
}

.px-metric-label {
  font-weight: 700;
  letter-spacing: 0.04em;
  opacity: 0.95;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.px-metric-value {
  font-weight: 700;
  min-width: 52px;
  text-align: right;
}

@media (max-width: 768px) {
  .px-metrics-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 4px;
  }
}

/* Typing container */
.typing-container {
  padding: 10px 12px 12px;
}

/* Passage box */
#typing-text {
  border-radius: 16px !important;
  border: 1px solid rgba(148, 163, 184, 0.7) !important;
  background: rgba(15, 23, 42, 0.96) !important;
  color: #e5e7eb !important;
  padding: 12px 14px;
  height: 210px;
  max-height: 210px;
  overflow: auto;
  line-height: 1.9;
  font-size: 15px;
}

/* Input box */
#typing-input {
  border-radius: 16px !important;
  border: 1px solid rgba(148, 163, 184, 0.7) !important;
  background: rgba(15, 23, 42, 0.92) !important;
  color: #e5e7eb !important;
  margin-top: 10px;
  padding: 12px 14px;
  height: 210px;
  min-height: 210px;
  outline: none;
  resize: vertical;
  font-size: 15px;
  line-height: 1.9;
}
#typing-input::placeholder {
  color: rgba(148, 163, 184, 0.8);
}
#typing-input:focus {
  border-color: rgba(96, 165, 250, 0.9) !important;
  box-shadow:
    0 0 0 1px rgba(96, 165, 250, 0.75),
    0 0 0 6px rgba(96, 165, 250, 0.25);
}

/* Bottom actions */
.practice-bottom-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(15, 23, 42, 0.98);
}
.practice-bottom-actions .px-btn {
  flex: 0 0 auto;
  padding: 6px 14px;
  font-size: 0.84rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.85);
  background: rgba(15, 23, 42, 0.98);
  color: #e5e7eb;
  cursor: pointer;
  transition: background 0.12s ease, box-shadow 0.12s ease, transform 0.05s ease;
}
.practice-bottom-actions .px-btn.secondary {
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.7);
  color: #e5e7eb;
}
.practice-bottom-actions .px-btn:hover {
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.8);
  transform: translateY(-0.5px);
}
.practice-bottom-actions .px-btn:active {
  box-shadow: none;
  transform: translateY(0);
}

/* Keyboard (if present) */
.practice-keyboard {
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: rgba(15, 23, 42, 0.96);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.85);
}
.practice-keyboard span {
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.9);
  background: rgba(15, 23, 42, 0.96);
  color: rgba(229, 231, 235, 0.9);
}
.practice-keyboard span.kbd-next {
  border-color: rgba(96, 165, 250, 0.98);
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.34);
}
.practice-keyboard span.kbd-correct {
  border-color: rgba(52, 211, 153, 0.98);
  background: rgba(16, 185, 129, 0.24);
}
.practice-keyboard span.kbd-error {
  border-color: rgba(248, 113, 113, 0.98);
  background: rgba(248, 113, 113, 0.22);
}

/* Fonts */
.font-english {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.font-hindi {
  font-family: "Noto Sans Devanagari", system-ui, sans-serif;
  font-size: 1.4rem;
  line-height: 2.1;
}
.font-kruti {
  font-family: "Kruti Dev 010", "Kruti Dev 10", "Noto Sans Devanagari", system-ui, sans-serif;
  font-size: 1.5rem;
  line-height: 2.1;
}

/* Word highlight */
.practice-page .typing-text .tt-word {
  padding: 0 2px;
  border-radius: 3px;
  transition: background-color 0.12s ease, color 0.12s ease;
  white-space: pre;
}
.practice-page .typing-text .tt-word-correct {
  color: #38bdf8;
  font-weight: 600;
}
.practice-page .typing-text .tt-word-wrong {
  color: #f97373;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.practice-page .typing-text .tt-word-current {
  background: #facc15;
  color: #111827;
  font-weight: 600;
}
.practice-page .typing-text .tt-word-current-error {
  background: #fee2e2;
  color: #b91c1c;
  font-weight: 600;
}

/* Right panels */
.practice-right .practice-timer-panel,
.practice-right .practice-controls-top,
.practice-right .practice-tips {
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.55);
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.97), rgba(15, 23, 42, 0.95));
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.85);
}

.practice-timer-panel {
  padding: 12px 14px;
  margin-bottom: 10px;
}
.practice-timer-name {
  font-size: 0.9rem;
  color: #e5e7eb;
  margin-bottom: 6px;
}
.practice-timer-box {
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.8);
  padding: 8px 10px;
  margin-bottom: 10px;
  background: radial-gradient(circle at top left, rgba(59, 130, 246, 0.5), rgba(15, 23, 42, 0.99));
}
.practice-timer-label {
  font-size: 0.8rem;
  color: #cbd5f5;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.practice-timer-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: #f9fafb;
}

.px-mini {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.55);
}
.px-mini-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.px-mini-label {
  font-size: 0.78rem;
  color: #cbd5f5;
}

/* Controls */
.practice-controls-top {
  padding: 10px 14px 12px;
  margin-bottom: 10px;
}
.control-group {
  margin-bottom: 8px;
}
.control-group span {
  display: block;
  font-size: 0.82rem;
  color: #cbd5f5;
  margin-bottom: 2px;
}
.control-group select {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.8);
  padding: 5px 8px;
  background: rgba(15, 23, 42, 0.98);
  color: #e5e7eb;
  font-size: 0.85rem;
}

/* Session info row */
.session-row {
  margin-top: 10px;
}
.typing-stats-side {
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.8);
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #e5e7eb;
  font-size: 0.9rem;
}
.typing-stats-side .px-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.px-pill {
  font-size: 0.78rem;
  padding: 5px 8px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.85);
  background: rgba(15, 23, 42, 0.98);
  color: #e5e7eb;
}

/* Tips card */
.practice-tips {
  padding: 10px 14px 10px;
  font-size: 0.86rem;
  color: #e5e7eb;
}
.practice-tips strong {
  font-size: 0.86rem;
}
.practice-tips ul li {
  margin-bottom: 2px;
}

/* Time button disabled look */
.time-buttons .time-btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Locked overlay */
.px-overlay {
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.9);
  background: rgba(15, 23, 42, 0.98);
  color: #e5e7eb;
  padding: 14px;
}
.px-overlay h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}
.px-overlay p {
  margin: 0 0 10px;
  color: #cbd5f5;
  font-size: 0.85rem;
  line-height: 1.5;
}
.px-overlay .px-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.px-overlay .px-btn {
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(96, 165, 250, 0.9);
  background: rgba(37, 99, 235, 0.24);
  color: #bfdbfe;
  font-weight: 700;
  cursor: pointer;
}
.px-overlay .px-btn.secondary {
  border-color: rgba(148, 163, 184, 0.9);
  background: rgba(15, 23, 42, 0.98);
  color: #e5e7eb;
}

/* ==== FORCE BIG HINDI / KRUTI FONT ONLY ON PRACTICE PAGE ==== */

/* Hindi (Unicode / Mangal) – reference + input text */
.practice-page #typing-text.font-hindi,
.practice-page #typing-input.font-hindi,
.practice-page .typing-text.font-hindi,
.practice-page .typing-input-large.font-hindi {
  font-size: 1rem !important;    /* approx double of old size */
  line-height: 2 !important;
}

/* Hindi (Kruti Dev) – reference + input text */
.practice-page #typing-text.font-kruti,
.practice-page #typing-input.font-kruti,
.practice-page .typing-text.font-kruti,
.practice-page .typing-input-large.font-kruti {
  font-size: 1.5rem !important;    /* little bigger for Kruti */
  line-height: 1.4 !important;
}
