/* LinguPilot — Netflix-like dark UI on top of Bootstrap 5 */

:root {
  --lp-bg: #141414;
  --lp-surface: #1b1b1b;
  --lp-surface-2: #222222;
  --lp-text: #ffffff;
  --lp-muted: rgba(255, 255, 255, 0.72);
  --lp-muted-2: rgba(255, 255, 255, 0.55);
  --lp-navy: #0b1e3c;
  --lp-aqua: #16c7b4;
  --lp-border: rgba(255, 255, 255, 0.10);
  --lp-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
  --lp-pilot-blue: #168bc7;
}

html, body {
  height: 100%;
}

body.lp-body {
  background: radial-gradient(1200px 420px at 25% -10%, rgba(11, 30, 60, 0.65), transparent 60%),
              radial-gradient(900px 400px at 90% 0%, rgba(22, 199, 180, 0.18), transparent 55%),
              var(--lp-bg);
  color: #ffffff;
}

.lp-navbar {
  background: rgba(20, 20, 20, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--lp-border);
}

.lp-navbar .navbar-brand,
.lp-navbar .nav-link {
  color: var(--lp-text);
}

.lp-navbar .nav-link {
  color: var(--lp-muted);
  font-weight: 500;
}

.lp-navbar .nav-link:hover {
  color: var(--lp-text);
}

.lp-navbar .nav-link.active {
  color: var(--lp-text);
}

.lp-navbar .navbar-toggler {
  border-color: rgba(255, 255, 255, 0.2);
}

.lp-navbar .navbar-toggler-icon {
  filter: invert(1);
}

.lp-brand-logo {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

.lp-hero {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.lp-hero .lp-kicker {
  color: #4ca0ca;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
}

.lp-hero-card {
  background: linear-gradient(180deg, rgba(27, 27, 27, 0.92), rgba(27, 27, 27, 0.76));
  border: 1px solid var(--lp-border);
  border-radius: 18px;
  box-shadow: var(--lp-shadow);
}

.lp-surface {
  background: rgba(27, 27, 27, 0.78);
  border: 1px solid var(--lp-border);
  border-radius: 18px;
}

.lp-btn-primary {
  --bs-btn-bg: #168bc7;
  --bs-btn-border-color: #168bc7;
  --bs-btn-hover-bg: #12b6a6;
  --bs-btn-hover-border-color: #12b6a6;
  --bs-btn-active-bg: #0fa293;
  --bs-btn-active-border-color: #0fa293;
  --bs-btn-color: #0b1e3c;
  --bs-btn-hover-color: #0b1e3c;
  --bs-btn-active-color: #0b1e3c;
  font-weight: 700;
  border-radius: 12px;
}

.lp-link {
  color: #4ca0ca;
  text-decoration: none;
}
.lp-link:hover { color: #36e5d5; }

.lp-row-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  margin-bottom: 10px;
}
.lp-row-header h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
  color: #ffc107;
}
.lp-row-header p {
  margin: 0;
  color: var(--lp-muted-2);
  font-size: 0.9rem;
}

.lp-carousel {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(200px, 240px);
  gap: 16px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px;
  padding-right: 4px;
}

.lp-carousel::-webkit-scrollbar { height: 10px; }
.lp-carousel::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
}
.lp-carousel::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
}

.lp-card-link {
  display: block;
  scroll-snap-align: start;
}

.lp-card {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 220ms ease,
              border-color 220ms ease;
  cursor: pointer;
}

.lp-card-link:hover .lp-card,
.lp-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.42),
              0 0 0 1px rgba(22, 139, 199, 0.35);
  border-color: rgba(22, 139, 199, 0.45);
}

.lp-card-media {
  position: relative;
  overflow: hidden;
}

.lp-card-cover {
  aspect-ratio: 16 / 10;
  min-height: 132px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(1);
  transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

.lp-card-link:hover .lp-card-cover,
.lp-card:hover .lp-card-cover {
  transform: scale(1.04);
}

.lp-card-body {
  padding: 12px 14px 14px;
  background: #ffffff;
}

.lp-card-title {
  margin: 0;
  font-size: 0.94rem;
  font-weight: 800;
  line-height: 1.25;
  min-height: 1.25em;
  color: #141414;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lp-card-meta {
  margin-top: 6px;
  color: #5c6670;
  font-size: 0.8rem;
  font-weight: 500;
}

.lp-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(0, 0, 0, 0.12);
}

.lp-progress > span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--lp-pilot-blue), var(--lp-aqua));
  box-shadow: 0 0 8px rgba(22, 139, 199, 0.45);
}

.lp-lesson-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
}

.lp-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: var(--lp-muted);
  font-size: 0.85rem;
}

.lp-panel-title {
  font-weight: 900;
  letter-spacing: -0.02em;
}

.lp-lesson-video-wrap {
  width: 100%;
  max-width: 100%;
}

.lp-lesson-video-stage {
  cursor: pointer;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
}

.lp-lesson-video-stage:focus-visible {
  outline: 2px solid var(--lp-aqua);
  outline-offset: 2px;
}

.lp-lesson-video {
  display: block;
  width: 100%;
  height: auto;
  max-height: 70vh;
  border-radius: 12px;
  background: #000;
  object-fit: contain;
  pointer-events: auto;
  cursor: pointer;
}

.lp-video-range {
  --bs-form-range-thumb-bg: var(--lp-pilot-blue);
  --bs-form-range-track-bg: rgba(255, 255, 255, 0.18);
}

.lp-video-range::-webkit-slider-thumb {
  background: var(--lp-pilot-blue);
}

.lp-video-range::-moz-range-thumb {
  background: var(--lp-pilot-blue);
  border: none;
}

.lp-video-fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
  z-index: 99999;
  background: #000;
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.lp-video-fullscreen.is-active {
  display: flex !important;
}

.lp-video-fs-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 72px;
  z-index: 3;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 12px 16px;
  pointer-events: none;
}

.lp-video-fs-close {
  pointer-events: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.75rem;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.lp-video-fs-close:hover {
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
}

.lp-video-fullscreen.fs-show-close .lp-video-fs-close {
  opacity: 1;
  visibility: visible;
}

.lp-video-fs-body {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

.lp-video-fs-body .lp-lesson-video,
.lp-video-fullscreen.is-active .lp-lesson-video {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100vw;
  max-height: calc(100vh - 88px);
  border-radius: 0;
  background: #000;
  object-fit: contain;
  pointer-events: auto;
  cursor: pointer;
}

.lp-video-fs-footer {
  flex: 0 0 auto;
  width: 100%;
  padding: 12px 20px 24px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.88));
  z-index: 2;
}

.lp-video-fs-footer .lp-video-seek {
  margin-top: 0;
}

.lp-video-fs-footer .lp-video-range {
  --bs-form-range-track-bg: rgba(255, 255, 255, 0.28);
}

body.lp-video-fs-open {
  overflow: hidden;
}

@media (min-width: 992px) {
  .lp-lesson-video-section .lp-lesson-video-wrap {
    width: 100%;
    max-width: 100%;
  }

  .lp-lesson-video-wrap .lp-lesson-video {
    max-height: 45vh;
  }

  .lp-video-fullscreen.is-active .lp-lesson-video,
  .lp-video-fs-body .lp-lesson-video {
    max-height: calc(100vh - 88px) !important;
  }
}

.lp-form-control,
.lp-form-control:focus {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--lp-text);
  box-shadow: none;
}

.lp-form-control::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.lp-score-ring {
  width: 104px;
  height: 104px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--lp-aqua) 0deg, rgba(255, 255, 255, 0.12) 0deg);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.lp-score-ring strong {
  font-size: 1.6rem;
}

.lp-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(20, 20, 20, 0.75);
}

/* Comment section (Facebook style) */
.lp-comments-sort {
  color: rgba(255, 255, 255, 0.45);
}

.lp-comments-hint {
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.45;
}

.lp-comments-empty {
  color: rgba(255, 255, 255, 0.5);
  padding: 8px 0 16px;
}

.lp-comment-composer .lp-comment-input {
  border-radius: 20px;
  resize: vertical;
  min-height: 56px;
}

.lp-comments-list > .lp-comment-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding: 14px 0;
}

.lp-comments-list > .lp-comment-item:last-child {
  border-bottom: none;
}

.lp-comment-item {
  padding: 0;
}

.lp-comment-item--reply {
  padding: 10px 0 0;
}

.lp-comment-wrap {
  width: 100%;
}

.lp-comment-userbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-height: 22px;
  margin-bottom: 4px;
  padding: 2px 4px;
  background: transparent;
}

.lp-comment-author {
  font-weight: 700;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.92);
}

.lp-comment-bubble {
  display: inline-block;
  max-width: 100%;
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.1);
}

.lp-comment-text {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.92);
  white-space: pre-wrap;
  word-break: break-word;
}

.lp-comment-datetime,
.lp-comment-time-only {
  display: block;
  margin-bottom: 6px;
  font-size: calc(0.92rem - 2pt);
  color: rgba(255, 255, 255, 0.45);
}

.lp-comment-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-top: 8px;
  padding-left: 4px;
}

.lp-comment-actions {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
}

.lp-comment-action-btn {
  padding: 0;
  border: none;
  background: transparent;
  color: #168bc7;
  font-size: 0.85rem;
  font-weight: 20;
  cursor: pointer;
  line-height: 1.2;
}

.lp-comment-action-btn:hover,
.lp-comment-action-btn:focus,
.lp-comment-action-btn:active {
  background: transparent !important;
  border: none;
  box-shadow: none;
  color: #168bc7;
  text-decoration: underline;
}

.lp-comment-action-btn:disabled {
  opacity: 0.55;
  cursor: default;
  text-decoration: none;
}

.lp-comment-action-btn.is-active {
  text-decoration: underline;
}

.lp-comment-like-badge {
  display: inline-flex;
  align-items: center;
  margin-right: 2px;
}

.lp-comment-like-badge .lp-comment-like-count {
  font-size: calc(0.92rem - 2pt);
  font-weight: 700;
  color: #ffcc00;
}

.lp-comment-replies {
  margin-top: 10px;
  margin-left: 48px;
  padding-left: 0;
}

.lp-comment-item--reply .lp-comment-bubble {
  background: rgba(255, 255, 255, 0.07);
}

.lp-comment-reply-form,
.lp-comment-edit-form {
  margin-top: 10px;
  margin-left: 48px;
  padding-left: 16px;
  border-left: 2px solid rgba(22, 139, 199, 0.35);
}

.lp-comment-item--reply .lp-comment-reply-form,
.lp-comment-item--reply .lp-comment-edit-form {
  margin-left: 0;
}

.lp-comment-reply-form .lp-comment-input,
.lp-comment-edit-form .lp-comment-input {
  border-radius: 18px;
  min-height: 48px;
  font-size: 0.9rem;
}

.lp-comment-bubble.is-hidden {
  display: none;
}

.lp-task-check {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.lp-task-check-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  cursor: pointer;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.4;
}

.lp-task-checkbox {
  flex-shrink: 0;
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.15rem;
  accent-color: #168bc7;
  cursor: pointer;
}

.lp-task-checkbox:disabled {
  cursor: default;
  opacity: 0.85;
}

.lp-tasks-content ul li {
  margin-bottom: 0.35rem;
  font-style: italic;
  color: rgba(255, 255, 255, 0.88);
}

.lp-lesson-example-item {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

@media (max-width: 575.98px) {
  .lp-comment-replies,
  .lp-comment-reply-form {
    margin-left: 28px;
  }

  .lp-carousel {
    grid-auto-columns: minmax(160px, 200px);
  }

  .lp-card-cover { min-height: 118px; }
}

