/* ===== Gilded Lectures Quiz UI — DARK THEME ===== */

/* ===== COLOR VARIABLES ===== */

:root {
  --glq-bg-card: #1e1e1e;
  --glq-bg-soft: #262626;
  --glq-bg-hover: #2f2f2f;

  --glq-border: #333333;
  --glq-border-soft: #2a2a2a;

  --glq-text-main: #ffffff;
  --glq-text-muted: #b5b5b5;

  --glq-accent: #be7104;
  --glq-accent-hover: #a55f03;

  --glq-success-bg: #1f3a2a;
  --glq-success-border: #2e7d4f;
  --glq-success-text: #7ee2a8;

  --glq-warn-bg: #3a2f16;
  --glq-warn-border: #8c6b1f;
  --glq-warn-text: #ffd27a;

  --glq-first-bg: #3a2a12;
  --glq-first-text: #ffd79a;

  --glq-draw-bg: #1f2d46;
  --glq-draw-text: #cfe2ff;
}

/* ===== BOX / CARD ===== */

.glq-box {
  background: var(--glq-bg-card);
  border: 1px solid var(--glq-border);
  border-radius: 14px;
  padding: 24px;
  margin: 18px 0;
  font-family: inherit;
  color: var(--glq-text-main);
  max-width: 100%;
  overflow: visible !important;
}

/* ===== TITLE ===== */

.glq-title {
  margin: 0 0 14px 0;
  font-size: 22px;
  font-weight: 700;
  color: var(--glq-text-main);
  line-height: 1.3;
}

/* ===== QUESTION TEXT ===== */

.glq-question {
  margin: 12px 0 18px 0;
  font-size: 16px;
  color: var(--glq-text-muted);
  line-height: 1.6;
}

/* ===== FORM ===== */

.glq-form {
  margin-top: 12px;
}

/* ===== INPUT FIELD ===== */

.glq-input {
  width: 100% !important;
  max-width: 520px;
  padding: 12px 14px;
  border: 1px solid var(--glq-border);
  border-radius: 10px;
  font-size: 15px;
  transition: all 0.2s ease;
  background: var(--glq-bg-soft);
  color: var(--glq-text-main);
}

.glq-input:focus {
  outline: none;
  border-color: var(--glq-accent);
  box-shadow: 0 0 0 3px rgba(190, 113, 4, 0.25);
}

/* ===== RADIO OPTIONS ===== */

.glq-radio {
  display: block;
  margin: 10px 0;
  font-size: 15px;
  cursor: pointer;
  color: var(--glq-text-main);
}

/* ===== PRIMARY BUTTON ===== */

.glq-btn {
  display: inline-block;
  background: var(--glq-accent) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 10px !important;
  padding: 12px 22px !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  text-align: center;
  text-decoration: none !important;
  box-shadow: 0 6px 18px rgba(190, 113, 4, 0.25);
}

.glq-btn:hover {
  background: var(--glq-accent-hover) !important;
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(190, 113, 4, 0.35);
}

.glq-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 14px rgba(190, 113, 4, 0.25);
}

/* ===== NOTICES ===== */

.glq-notice {
  padding: 12px 16px;
  border-radius: 10px;
  margin: 14px 0;
  font-size: 14px;
  line-height: 1.5;
}

.glq-notice.ok {
  background: var(--glq-success-bg);
  border: 1px solid var(--glq-success-border);
  color: var(--glq-success-text);
}

.glq-notice.warn {
  background: var(--glq-warn-bg);
  border: 1px solid var(--glq-warn-border);
  color: var(--glq-warn-text);
}

/* ===== HISTORY ITEMS ===== */

.glq-history-item {
  padding: 18px 0;
  border-top: 1px solid var(--glq-border-soft);
}

.glq-history-item:first-child {
  border-top: none;
}

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

@media (max-width: 768px) {
  .glq-box {
    padding: 18px;
  }

  .glq-title {
    font-size: 20px;
  }

  .glq-btn {
    width: 100% !important;
  }
}

/* ===== TABLE ===== */

.glq-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
  font-size: 14px;
}

.glq-table th {
  text-align: left;
  padding: 12px;
  background: var(--glq-bg-soft);
  border-bottom: 1px solid var(--glq-border-soft);
  font-weight: 600;
  color: var(--glq-text-main);
}

.glq-table td {
  padding: 12px;
  border-bottom: 1px solid var(--glq-border);
  color: var(--glq-text-muted);
}

.glq-table tr:hover {
  background: var(--glq-bg-hover);
}

/* ===== TABS ===== */

.glq-tabs-wrapper {
  margin-top: 20px;
}

.glq-tabs-nav {
  display: flex;
  gap: 8px;
  margin: 18px 0 12px 0;
  border-bottom: 2px solid var(--glq-border);
}

.glq-tab-btn {
  padding: 10px 18px !important;
  border: none !important;
  background: var(--glq-bg-soft) !important;
  color: var(--glq-text-muted) !important;
  cursor: pointer !important;
  font-weight: 600;
  border-radius: 8px 8px 0 0 !important;
  transition: all 0.2s ease;
}

.glq-tab-btn.active {
  background: var(--glq-accent) !important;
  color: #fff !important;
}

/* ===== PANELS ===== */

.glq-tab-panel {
  display: none;
}

.glq-tab-panel.active {
  display: block;
}

/* ===== WINNER BADGES ===== */

.glq-winner {
  padding: 10px 14px;
  border-radius: 10px;
  margin: 8px 0;
  font-weight: 600;
}

.glq-winner.first {
  background: var(--glq-first-bg);
  border-left: 6px solid var(--glq-accent);
  color: var(--glq-first-text);
}

.glq-winner.draw {
  background: var(--glq-draw-bg);
  border-left: 6px solid #2a7de1;
  color: var(--glq-draw-text);
}

/* ===== RESPONSIVE TABLE SCROLL ===== */

.glq-table-wrap {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto !important;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

/* Prevent layout breaking */

.glq-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
}

.glq-table th,
.glq-table td {
  white-space: normal;
  word-break: break-word;
}

/* Optional column sizing */

.glq-table td:nth-child(1) {
  max-width: 180px;
}
.glq-table td:nth-child(2) {
  max-width: 140px;
}
.glq-table td:nth-child(5) {
  min-width: 160px;
}

@media (min-width: 765px) {
  .quiz-width {
    max-width: 60%;
  }
}

.glq-pagination {
  margin-top: 20px;
}

.glq-pagination ul {
  display: flex;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}

.glq-pagination a,
.glq-pagination span {
  display: inline-block;
  padding: 8px 12px;
  border: 1px solid var(--glq-border);
  border-radius: 6px;
  text-decoration: none;
  color: var(--glq-text-main);
}

.glq-pagination .current {
  background: var(--glq-bg-card);
  color: var(--glq-accent);
  border-color: var(--glq-border);
}

:root {
  --glq-bg-1: #0f1724;
  --glq-bg-2: #1a2433;
  --glq-panel: rgba(255, 255, 255, 0.06);
  --glq-panel-2: rgba(255, 255, 255, 0.12);
  --glq-border-strong: rgba(220, 232, 255, 0.45);
  --glq-border-soft: rgba(255, 255, 255, 0.08);
  --glq-text-main: #f5f7fb;
  --glq-text-soft: rgba(255, 255, 255, 0.82);
  --glq-text-dim: rgba(255, 255, 255, 0.62);
}

.glq-ui-shell {
  padding: 8px 0;
}

.glq-box.glq-box--mockup {
  position: relative;
  background:
    radial-gradient(circle at top left, rgba(255,255,255,0.08), transparent 28%),
    linear-gradient(135deg, #1a2230 0%, #101826 45%, #1d2737 100%);
  border: 2px solid var(--glq-border-strong);
  border-radius: 22px;
  padding: 22px 22px 24px;
  color: var(--glq-text-main);
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 0 0 3px rgba(255,255,255,0.04);
  overflow: hidden;
}

.glq-box.glq-box--mockup::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.05) 25%, transparent 45%, rgba(255,255,255,0.04) 70%, transparent 100%);
  pointer-events: none;
}

.quiz-width.quiz-width-full {
  max-width: 100%;
  position: relative;
  z-index: 1;
}

.glq-headline {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.glq-headline-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: linear-gradient(180deg, #f4f7fb, #dfe5ed);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8), 0 4px 14px rgba(0,0,0,0.25);
}

.glq-title {
  margin: 0;
  color: #ffffff;
  font-size: 32px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  text-shadow: 0 2px 0 rgba(0,0,0,0.45);
}

.glq-details-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.16), rgba(255,255,255,0.11));
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  padding: 14px 18px 16px;
  margin-bottom: 14px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 8px 20px rgba(0,0,0,0.15);
  backdrop-filter: blur(8px);
}

.glq-details-label {
  color: rgba(255,255,255,0.88);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.6px;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.glq-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--glq-text-soft);
  font-size: 17px;
  margin: 8px 0;
}

.glq-meta-row strong {
  color: #ffffff;
}

.glq-meta-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  font-size: 17px;
  opacity: 0.95;
}

.glq-time-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 9px 16px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffe8b1 0%, #f6ce79 100%);
  color: #221300;
  font-size: 16px;
  font-weight: 700;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.75),
    0 6px 14px rgba(0,0,0,0.18);
}

.glq-divider {
  height: 1px;
  background: linear-gradient(90deg, rgba(255,255,255,0.08), rgba(255,255,255,0.28), rgba(255,255,255,0.08));
  margin: 16px 0 14px;
}

.glq-question-title {
  color: #ffffff;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 12px;
  text-shadow: 0 1px 0 rgba(0,0,0,0.35);
}

.glq-question {
  margin: 0 0 12px 0;
  color: rgba(255,255,255,0.72);
  font-size: 15px;
  line-height: 1.6;
}

.glq-form-modern {
  margin-top: 6px;
}

.glq-answer-wrap {
  margin-bottom: 12px;
}

.glq-input.glq-input-modern {
  width: 100% !important;
  max-width: 100%;
  height: 56px;
  padding: 0 18px;
  border-radius: 14px;
  border: 2px solid rgba(255,255,255,0.24);
  background: linear-gradient(180deg, #f2f4f7 0%, #ffffff 100%);
  color: #222;
  font-size: 18px;
  box-shadow:
    inset 0 1px 2px rgba(0,0,0,0.08),
    0 2px 0 rgba(255,255,255,0.35);
}

.glq-input.glq-input-modern::placeholder {
  color: #6d737c;
}

.glq-input.glq-input-modern:focus {
  outline: none;
  border-color: #ffbf47;
  box-shadow:
    inset 0 1px 2px rgba(0,0,0,0.08),
    0 0 0 4px rgba(255, 191, 71, 0.18);
}

.glq-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.glq-btn {
  min-height: 54px;
  padding: 0 28px !important;
  border-radius: 14px !important;
  font-size: 17px !important;
  font-weight: 700 !important;
  border: 1px solid transparent !important;
  box-shadow: 0 8px 18px rgba(0,0,0,0.18);
}

.glq-btn-submit {
  background: linear-gradient(180deg, #ffcf69 0%, #e89d23 100%) !important;
  color: #1d1200 !important;
  border-color: rgba(255,255,255,0.16) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.45),
    0 10px 20px rgba(104, 58, 0, 0.35) !important;
}

.glq-btn-submit:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.glq-btn-arrow {
  margin-left: 6px;
  font-size: 20px;
  vertical-align: middle;
}

.glq-btn[disabled] {
  opacity: 1;
  cursor: not-allowed !important;
}

.glq-mcq-list {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.glq-radio-modern {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
}

.glq-radio-modern input[type="radio"] {
  transform: scale(1.15);
}

.glq-radio-modern span {
  color: #fff;
}

@media (min-width: 765px) {
  .quiz-width {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .glq-box.glq-box--mockup {
    padding: 18px 14px 18px;
    border-radius: 18px;
  }

  .glq-headline {
    gap: 10px;
  }

  .glq-headline-icon {
    width: 38px;
    height: 38px;
    font-size: 20px;
  }

  .glq-title {
    font-size: 22px;
  }

  .glq-meta-row {
    font-size: 15px;
  }

  .glq-question-title {
    font-size: 18px;
  }

  .glq-input.glq-input-modern {
    height: 52px;
    font-size: 16px;
  }

  .glq-actions {
    justify-content: stretch;
  }

  .glq-actions .glq-btn {
    width: 100% !important;
  }
}