body {
  margin: 0;
  background: #0b0b0d;
  color: #f3f3f3;
  font-family: Inter, Arial, sans-serif;
}

.learn-shell {
  display: grid;
  grid-template-columns: 320px 1fr;
  min-height: 100vh;
}

.learn-sidebar {
  background: #111214;
  border-right: 1px solid #222;
  padding: 24px 20px;
}

.learn-main {
  padding: 28px;
  display: grid;
  gap: 22px;
}

.brand-block h1,
.hero-copy h2,
.library-header h3,
.chat-header h3 {
  margin: 0 0 8px 0;
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8ea8ff;
  margin-bottom: 8px;
}

.subcopy,
.muted,
.profile-bio {
  color: #b8b8b8;
}

.section-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8d8d8d;
  margin-bottom: 12px;
}

.trainer-panel,
.nav-panel,
.session-panel,
.upsell-panel {
  margin-top: 24px;
}

.learn-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.learn-nav-link {
  color: #d7d7d7;
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 10px;
  background: transparent;
}

.learn-nav-link.active,
.learn-nav-link:hover {
  background: #1c1d21;
  color: #fff;
}

.session-badge {
  font-size: 13px;
  color: #b8b8b8;
  background: #18191c;
  padding: 12px;
  border-radius: 12px;
}

.hero-card,
.profile-card,
.chat-card,
.library-card,
.viewer-card {
  background: #121316;
  border: 1px solid #23252b;
  border-radius: 18px;
  padding: 22px;
}

.hero-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.hero-media img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 18px;
  background: #1a1a1a;
}

.mini-list {
  margin: 12px 0 0 18px;
  color: #b8b8b8;
}

#returnLink {
  display: inline-block;
  margin-top: 12px;
  color: #7ea8ff;
  text-decoration: none;
  word-break: break-all;
}

#returnLink:hover {
  text-decoration: underline;
}

/* trainer list */
.employee-item {
  width: 100%;
  text-align: left;
  padding: 14px 18px;
  background: transparent;
  border: none;
  border-radius: 10px;
  margin-bottom: 8px;
  cursor: pointer;
  color: inherit;
}

.employee-item.active,
.employee-item:hover {
  background: #1f1f1f;
}

.employee-item-media {
  display: flex;
  align-items: center;
  gap: 14px;
}

.employee-item-media strong {
  display: block;
  font-size: 15px;
  color: #fff;
}

.employee-item-media span {
  display: block;
  font-size: 13px;
  color: #b8b8b8;
  margin-top: 4px;
}

.employee-thumb {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  object-fit: cover;
  background: #1a1a1a;
  flex: 0 0 54px;
}

/* chat */
.chat-log {
  height: 380px;
  overflow-y: auto;
  background: #0f0f0f;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 16px;
}

.msg {
  margin: 12px 0;
  padding: 14px 18px;
  border-radius: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.msg.user {
  background: #2d6cdf;
  color: #fff;
  margin-left: 40px;
}

.msg.bot {
  background: #1a1a1a;
  color: #f3f3f3;
  margin-right: 40px;
}

.msg.system {
  background: #161616;
  color: #b8b8b8;
  border: 1px solid #2a2a2a;
  font-size: 13px;
}

.chat-input {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-input textarea {
  width: 100%;
  height: 90px;
  resize: vertical;
  padding: 14px;
  border-radius: 12px;
  background: #111;
  color: #fff;
  border: 1px solid #2a2a2a;
  font-family: inherit;
  box-sizing: border-box;
}

.chat-input textarea:focus {
  outline: none;
  border-color: #2d6cdf;
  box-shadow: 0 0 0 2px rgba(45, 108, 223, 0.2);
}

/* buttons */
.btn {
  padding: 14px 28px;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
}

.primary {
  background: #2d6cdf;
  color: white;
}

.secondary {
  background: #333;
  color: white;
}

/* content cards */
.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(405px, 1fr));
  gap: 18px;
  margin-top: 16px;
}

.content-card {
  text-align: left;
  background: #18191d;
  border: 1px solid #2a2c33;
  border-radius: 14px;
  padding: 18px 20px;
  cursor: pointer;
  color: inherit;
  width: 100%;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
}

.content-card:hover {
  border-color: #4a7aee;
  background: #1c1e26;
  transform: translateY(-1px);
}

.content-card h4 {
  margin: 0 0 6px 0;
  font-size: 0.97rem;
  line-height: 1.4;
  color: #fff;
}

.doc-card-inner {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.doc-card-desc {
  font-size: 0.8rem;
  color: #8a90a0;
  margin: 0 0 6px 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.doc-card-read {
  font-size: 0.78rem;
  color: #4a7aee;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.module-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 4px 6px;
  margin-top: 8px;
  border-bottom: 1px solid #222530;
  grid-column: 1 / -1;
}

.module-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6a82c0;
}

.module-count {
  font-size: 0.72rem;
  color: #4a5068;
}

.content-card-meta {
  font-size: 13px;
  color: #9da3b0;
}

.empty-state {
  padding: 28px;
  background: #16171a;
  border: 1px dashed #333842;
  border-radius: 14px;
  color: #a6acb8;
  grid-column: 1 / -1;
}

/* viewer */
.hidden {
  display: none;
}

.viewer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.viewer-body {
  background: #0e0f12;
  border-radius: 12px;
  padding: 16px;
  min-height: 120px;
}

.doc-viewer {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
  color: #f2f2f2;
}

.video-viewer,
.youtube-viewer {
  width: 100%;
  min-height: 420px;
  border: none;
  border-radius: 12px;
  background: #000;
}

.viewer-description {
  margin-top: 14px;
  color: #b8b8b8;
}

/* modal */
.paywall-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.paywall-dialog {
  width: min(440px, calc(100vw - 32px));
  background: #121316;
  border: 1px solid #2b2d34;
  border-radius: 18px;
  padding: 24px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.yt-playlist-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 18px;
  align-items: start;
}

.yt-player-wrap {
  background: #0e0f12;
  border-radius: 12px;
  overflow: hidden;
}

.yt-list-wrap {
  background: #0e0f12;
  border-radius: 12px;
  padding: 10px;
  max-height: 420px;
  overflow-y: auto;
}

.yt-playlist-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.yt-playlist-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: #17191d;
  border: 1px solid #2a2c33;
  border-radius: 12px;
  padding: 10px;
  color: #fff;
  cursor: pointer;
}

.yt-playlist-item:hover,
.yt-playlist-item.active {
  border-color: #3b67d8;
  background: #1d2230;
}

.yt-playlist-thumb {
  width: 120px;
  height: 68px;
  object-fit: cover;
  border-radius: 8px;
  background: #000;
}

.yt-playlist-title {
  font-weight: 600;
  margin-bottom: 6px;
}

.yt-playlist-id {
  font-size: 12px;
  color: #9da3b0;
  word-break: break-all;
}

.yt-loading {
  color: #b8b8b8;
  padding: 16px;
}

@media (max-width: 980px) {
  .yt-playlist-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .learn-shell {
    grid-template-columns: 1fr;
  }

  .hero-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .msg.user,
  .msg.bot {
    margin-left: 0;
    margin-right: 0;
  }

  .video-viewer,
  .youtube-viewer {
    min-height: 260px;
  }
}
/* Force YouTube landscape */
.yt-playlist-shell {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.yt-player-wrap {
  flex: 1;
  min-width: 640px;           /* forces wide player */
  max-width: 100%;
}

.yt-player-wrap iframe {
  width: 100% !important;
  height: 405px !important;   /* 16:9 landscape */
  aspect-ratio: 16 / 9;
}

.yt-list-wrap {
  flex: 0 0 280px;
  max-height: 405px;
  overflow-y: auto;
}

/* Make sure individual video embeds are also landscape */
.youtube-card iframe,
.content-grid iframe {
  width: 100% !important;
  height: 405px !important;
  aspect-ratio: 16 / 9;
}

/* === ADDITIONS FOR 15-MIN TRIAL + PAYWALL === */

#trialTimer {
  background: #2a2a00;
  color: #ffcc00;
  font-weight: 500;
  white-space: nowrap;
}

/* Paywall Modal - clean and non-intrusive */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.modal {
  background: #1a1a1a;
  border: 1px solid #555;
  border-radius: 16px;
  width: 90%;
  max-width: 520px;
  padding: 32px;
  color: white;
  max-height: 92vh;
  overflow-y: auto;
}

.cashapp-btn {
  background: #00c853;
  color: black;
  font-weight: 600;
  padding: 16px 24px;
  font-size: 1.1rem;
  width: 100%;
  margin: 20px 0 12px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.qr-section img {
  max-width: 260px;
  border-radius: 12px;
  margin: 16px auto;
  display: block;
}

.cashtag {
  font-size: 1.35rem;
  font-weight: 600;
  color: #00c853;
  margin: 8px 0;
}

/* Make sure main content can still scroll */
.workspace-card-main {
  overflow-y: auto;
}

.chat-log {
  max-height: 560px;
  overflow-y: auto;
  scroll-behavior: smooth;
}

#contentGrid {
  max-height: 560px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Small safety for modal */
.modal-backdrop .modal {
  box-shadow: 0 10px 40px rgba(0,0,0,0.8);
}

/* Chat history */
.history-loaded-banner {
  text-align: center;
  color: #555;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  padding: 8px 0 4px;
}

.history-date-sep {
  text-align: center;
  color: #444;
  font-size: 0.72rem;
  margin: 10px 0 6px;
  position: relative;
}
.history-date-sep::before,
.history-date-sep::after {
  content: "";
  display: inline-block;
  width: 60px;
  height: 1px;
  background: #333;
  vertical-align: middle;
  margin: 0 8px;
}

.msg-timestamp {
  display: block;
  font-size: 0.68rem;
  color: #555;
  margin-top: 4px;
  text-align: right;
}

.msg-employee-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  color: #7dd3fc;
  background: rgba(125,211,252,0.1);
  border: 1px solid rgba(125,211,252,0.2);
  border-radius: 4px;
  padding: 1px 6px;
  margin-bottom: 6px;
  letter-spacing: 0.03em;
}

.msg.bot .msg-body h1, .msg.bot .msg-body h2, .msg.bot .msg-body h3 {
  margin: 8px 0 4px;
  font-size: 1em;
}
.msg.bot .msg-body ul { margin: 4px 0 4px 16px; padding: 0; }
.msg.bot .msg-body li { margin: 2px 0; }
.msg.bot .msg-body code {
  background: #1e1e2e;
  border-radius: 3px;
  padding: 1px 4px;
  font-size: 0.88em;
}
.msg.bot .msg-body p { margin: 4px 0; }
