/* LinguaProof custom styles on top of Bulma */
:root {
  --lp-navy: #0E2A47;
  --lp-navy-2: #173F63;
  --lp-gold: #C9A227;
  --lp-gold-dark: #8A6D1B;
  --lp-cream: #FDFCF7;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--lp-cream);
  color: #26323E;
}
main { flex: 1 0 auto; }
.lp-footer { flex-shrink: 0; margin-top: auto; background: #F2F0E8; }

/* Brand */
.lp-navbar { background: var(--lp-navy); }
.lp-navbar .navbar-item, .lp-navbar .navbar-burger { color: #D9E2EC; }
.lp-navbar .navbar-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.lp-brand { color: #fff !important; font-weight: 700; }
.lp-brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(160deg, var(--lp-navy-2), var(--lp-navy));
  border: 2px solid var(--lp-gold); color: #fff; margin-right: 8px;
  font-family: Georgia, "Times New Roman", serif;
}
.lp-brand-name { letter-spacing: .5px; }

/* Hero */
.lp-hero { background: linear-gradient(155deg, var(--lp-navy) 0%, var(--lp-navy-2) 62%, #1D4E7A 100%); color: #fff; padding: 4.5rem 1.5rem; }
.lp-hero .title, .lp-hero .subtitle.is-5 { color: #fff; }
.lp-hero .subtitle { color: #C9D4E0 !important; }
.lp-hero-title { font-family: Georgia, "Times New Roman", serif; }
.lp-hero strong { color: #fff; }
.lp-hero .button.is-outlined {
  background: transparent; color: #fff; border-color: rgba(255,255,255,.55);
}
.lp-hero .button.is-outlined:hover { color: var(--lp-gold); border-color: var(--lp-gold); }
.has-letter-spacing { letter-spacing: 3px; }
.has-text-gold { color: var(--lp-gold) !important; }
.lp-navy { color: var(--lp-navy) !important; }

/* Buttons */
.lp-btn-gold {
  background: var(--lp-gold); border-color: var(--lp-gold); color: #1A1408;
  font-weight: 700;
}
.lp-btn-gold:hover, .lp-btn-gold:focus {
  background: #D8B23C; border-color: #D8B23C; color: #1A1408;
}

/* Feature cards */
.lp-feature { border-top: 3px solid var(--lp-gold); height: 100%; }
.lp-step {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--lp-navy); color: #fff; font-weight: 700; margin-bottom: .75rem;
}
.lp-section-alt { background: #F6F4EC; }
.lp-scale-card { height: 100%; border-top: 3px solid var(--lp-navy); }
.lp-scale-big { color: var(--lp-gold-dark); }

.lp-method-box {
  background: #F6F4EC; border-left: 4px solid var(--lp-gold);
  padding: 1.25rem 1.5rem; border-radius: 6px;
}
.lp-method-box p { margin-bottom: .5rem; }
.lp-method-box summary { cursor: pointer; }
.lp-checklist li { list-style: none; position: relative; padding-left: 1.4rem; margin-bottom: .45rem; }
.lp-checklist li::before { content: "-"; color: var(--lp-gold-dark); font-weight: 700; position: absolute; left: .2rem; }
.lp-checklist { margin-left: 0 !important; }
.lp-price-card { height: 100%; }
.lp-price-card-featured { border: 2px solid var(--lp-gold); }
.lp-price-header { background: var(--lp-navy); }
.lp-price-header .card-header-title { color: #fff; justify-content: center; }
.lp-faq { margin-bottom: .75rem; }

/* Auth cards */
.lp-auth-card { border-top: 4px solid var(--lp-gold); }

/* Dashboard */
.lp-start-box { border-left: 4px solid var(--lp-gold); }
.lp-tag-cefr { background: var(--lp-navy); color: #fff; font-weight: 700; }
.lp-table thead th { color: var(--lp-navy); border-bottom-color: var(--lp-gold); }

/* Test page */
.lp-test-section-wrap { padding-top: 1.5rem; }
.lp-progress { --bulma-progress-bar-background-color: #E8E4D8; }
.lp-progress::-webkit-progress-value { background-color: var(--lp-navy-2) !important; }
.lp-progress::-moz-progress-bar { background-color: var(--lp-navy-2) !important; }
.lp-progress::-webkit-progress-bar { background-color: #E8E4D8; }
.progress:not([value])::-webkit-progress-bar { background-color: #E8E4D8; }
.lp-section-tabs .button { border: 1px solid #D8D4C6; background: #fff; }
.lp-section-tabs .button.is-active { background: var(--lp-navy); color: #fff; border-color: var(--lp-navy); font-weight: 600; }
.lp-section-tabs .button.is-disabled-sec { opacity: .55; }

.lp-question-card { border: 1px solid #E3DFD2; border-radius: 8px; padding: 1rem 1.25rem; margin-bottom: 1rem; background: #fff; }
.lp-question-num { font-weight: 700; color: var(--lp-navy); margin-right: .5rem; }
.lp-opt {
  display: flex; align-items: flex-start; gap: .6rem;
  border: 1px solid #E3DFD2; border-radius: 6px;
  padding: .55rem .8rem; margin-top: .5rem; cursor: pointer;
  transition: background .12s ease, border-color .12s ease;
  background: #FFFDF6;
}
.lp-opt:hover { border-color: var(--lp-navy-2); }
.lp-opt input { margin-top: .3rem; accent-color: var(--lp-navy); }
.lp-opt.is-selected { border-color: var(--lp-navy); background: #EEF3F9; box-shadow: 0 0 0 1px var(--lp-navy) inset; }
.lp-opt .lp-opt-letter { font-weight: 700; color: var(--lp-navy); }

.lp-passage {
  background: #F6F4EC; border-left: 4px solid var(--lp-navy-2);
  padding: 1.25rem 1.5rem; border-radius: 6px;
  font-size: .95rem; line-height: 1.65;
}
.lp-sticky-passage { position: sticky; top: 1rem; max-height: 80vh; overflow-y: auto; }

.lp-listen-controls { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.lp-listen-audio { flex: 1 1 260px; min-width: 240px; max-width: 420px; height: 40px; vertical-align: middle; }
.lp-listen-audio::-webkit-media-controls-panel { background: var(--lp-navy); }
.lp-play-btn {
  border: none; background: var(--lp-navy); color: #fff;
  width: 52px; height: 52px; border-radius: 50%; font-size: 1.1rem;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.lp-play-btn:hover { background: var(--lp-navy-2); }
.lp-play-btn[disabled] { opacity: .45; cursor: not-allowed; }
.lp-play-count { font-size: .8rem; color: #5A6B7B; }

textarea.lp-essay { min-height: 260px; font-size: 1rem; }
.lp-word-count { font-size: .8rem; color: #5A6B7B; }
.lp-word-count.is-short { color: #B03A2E; font-weight: 600; }

/* Review page */
.lp-review-card { border-left: 4px solid #D8D4C6; }
.lp-review-card.lp-ok { border-left-color: #2E7D32; }
.lp-review-card.lp-wrong { border-left-color: #C0392B; }
.lp-review-options { list-style: none; margin-left: 0 !important; }
.lp-review-options li { padding: .4rem .6rem; border-radius: 4px; }
.lp-review-options li.lp-opt-correct { background: #E8F5E9; }
.lp-review-options li.lp-opt-wrong { background: #FDECEA; }
.lp-essay-box { font-size: .92rem; white-space: pre-wrap; }

/* Result page */
.lp-result-hero { background: linear-gradient(155deg, var(--lp-navy), var(--lp-navy-2)); color: #fff; padding: 3rem 1.5rem; }
.lp-result-hero .title { color: #fff; }
.lp-result-hero .has-text-grey { color: #B9C6D4 !important; }
.lp-cefr-big { font-size: 5rem; font-weight: 800; color: var(--lp-gold); line-height: 1.1; font-family: Georgia, "Times New Roman", serif; }
.lp-scale-result { height: 100%; border-top: 3px solid var(--lp-gold); }
.lp-subtable td { border-bottom: none; }
.lp-feedback-card { height: 100%; }
.has-text-warning-dark { color: #8A6D1B !important; }

/* Certificate page */
.lp-cert-figure { border: 1px solid #E3DFD2; border-radius: 8px; overflow: hidden; background: #fff; }
.lp-cert-img { width: 100%; height: auto; display: block; }
.lp-verify-card { border-top: 4px solid #2E7D32; }

/* Pay page */
.lp-pay-card { border-top: 3px solid var(--lp-navy-2); }
.lp-pay-card.lp-pay-demo { border-top-color: #B03A2E; }
.lp-pay-summary { border-left: 4px solid var(--lp-gold); }

/* Toast */
.lp-toast {
  position: fixed; bottom: 1.25rem; left: 50%; transform: translateX(-50%);
  background: var(--lp-navy); color: #fff; padding: .7rem 1.2rem; border-radius: 8px;
  box-shadow: 0 6px 20px rgba(14,42,71,.35); z-index: 100; font-size: .9rem;
  opacity: 0; transition: opacity .25s ease; pointer-events: none;
}
.lp-toast.is-visible { opacity: 1; }

/* ---------------- Speaking section (v1.1) ---------------- */
.lp-speak-controls { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.lp-rec-btn {
  border: none; background: #C0392B; color: #fff;
  width: 56px; height: 56px; border-radius: 50%; font-size: 1.05rem;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 6px rgba(192,57,43,.15);
  transition: box-shadow .2s ease, transform .1s ease;
}
.lp-rec-btn:hover { background: #A93226; }
.lp-rec-btn.is-recording { background: #C0392B; animation: lp-pulse 1.2s ease infinite; }
@keyframes lp-pulse {
  0%   { box-shadow: 0 0 0 4px rgba(192,57,43,.35); }
  70%  { box-shadow: 0 0 0 16px rgba(192,57,43,0); }
  100% { box-shadow: 0 0 0 4px rgba(192,57,43,0); }
}
.lp-rec-timer { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--lp-navy); min-width: 3.2rem; }
.lp-rec-state { font-size: .8rem; color: #5A6B7B; }
.lp-transcript {
  background: #F6F4EC; border-left: 4px solid var(--lp-navy-2); border-radius: 6px;
  padding: .85rem 1.1rem; font-size: .95rem; line-height: 1.6; min-height: 3.4rem;
  white-space: pre-wrap; margin-top: .75rem;
}
.lp-transcript .is-interim { color: #8A94A0; font-style: italic; }
.lp-speak-actions { display: flex; gap: .6rem; align-items: center; margin-top: .75rem; flex-wrap: wrap; }
.lp-grade-tag { font-size: .85rem; }
.lp-speak-feedback {
  margin-top: .75rem; background: #EFF7EF; border-left: 4px solid #2E7D32;
  border-radius: 6px; padding: .85rem 1.1rem; font-size: .9rem;
}
.lp-speak-feedback.is-offline { background: #FBF4E4; border-left-color: var(--lp-gold-dark); }
textarea.lp-typed-answer { min-height: 120px; }

/* ---------------- Admin panel (v1.1) ---------------- */
.lp-admin-sidebar {
  float: left; width: 220px; background: var(--lp-navy); color: #D9E2EC;
  padding: 1.25rem 1rem 2rem;
}
.lp-admin-main { overflow: hidden; padding: 1.5rem 2rem 3rem; min-width: 0; }
.lp-admin-main > .title { margin-top: 0; }
.lp-admin-heading {
  text-transform: uppercase; letter-spacing: 1.5px; font-size: .7rem;
  color: #8FA5BC; margin-bottom: .4rem; font-weight: 700;
}
.lp-admin-user { color: #C9D4E0; margin-bottom: 1rem; }
.lp-admin-nav { list-style: none; margin-left: 0 !important; }
.lp-admin-nav a {
  display: block; padding: .5rem .75rem; border-radius: 6px;
  color: #D9E2EC; font-size: .92rem; margin-bottom: .15rem;
}
.lp-admin-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.lp-admin-nav a.is-active { background: var(--lp-gold); color: #1A1408; font-weight: 700; }
.lp-admin-main { flex: 1; padding: 1.5rem 2rem 3rem; min-width: 0; }
.lp-admin-main > .title { margin-top: 0; }
.lp-stat-card { border-top: 3px solid var(--lp-gold); height: 100%; }
.lp-stat-money { border-top-color: #2E7D32; }
.lp-chart {
  display: flex; align-items: flex-end; gap: 10px; height: 180px; padding: 1.25rem;
}
.lp-chart-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; flex: 1; height: 100%; }
.lp-chart-bar {
  width: 100%; max-width: 34px; background: var(--lp-navy-2); border-radius: 4px 4px 0 0;
  min-height: 4px;
}
.lp-chart-day { font-size: .65rem; color: #8A94A0; margin-top: .3rem; }
.lp-admin-modal { width: 920px; max-width: 94vw; }
.lp-admin-modal .modal-card-body { max-height: 62vh; }
.lp-settings-card { border-top: 3px solid var(--lp-navy-2); max-width: 860px; }
.lp-admin-pane { margin-top: 1rem; }
@media (max-width: 768px) {
  .lp-admin-sidebar { float: none; width: 100%; }
  .lp-admin-main { padding: 1.25rem 1rem 2.5rem; }
}

@media print {
  .navbar, .footer, .lp-share-buttons, .lp-submit-row { display: none !important; }
  .lp-cert-figure { border: none; }
}
