/* ============================================
   STUDENT PORTAL STYLES
   ============================================ */

/* STUDENT NAVBAR */
.student-nav {
  background: var(--black);
  border-bottom: 3px solid var(--yellow);
  padding: 0 1.5rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
.student-nav .nav-logo {
  display: flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--white);
}
.student-nav .nav-logo .logo-chip {
  background: var(--yellow);
  color: var(--black);
  padding: 0.15rem 0.4rem;
  border-radius: 2px;
  font-size: 0.7rem;
  font-weight: 800;
}
.nav-links { display: flex; align-items: center; gap: 0.25rem; }
.nav-links a {
  padding: 0.4rem 0.9rem;
  font-weight: 600;
  font-size: 0.875rem;
  color: #aaa;
  border-radius: var(--radius);
  transition: all 0.15s;
}
.nav-links a:hover, .nav-links a.active { color: var(--black); background: var(--yellow); }
.nav-right { display: flex; align-items: center; gap: 0.75rem; }

/* HERO SECTION */
.hero {
  background: var(--yellow);
  border-bottom: 3px solid var(--black);
  padding: 5rem 1.5rem;
  position: relative;
  overflow: hidden;
}
.hero-content { max-width: 700px; }
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--black);
  color: var(--white);
  padding: 0.3rem 0.85rem;
  border-radius: 2px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.25rem;
}
.hero h1 { margin-bottom: 1rem; }
.hero p { font-size: 1.1rem; color: #333; max-width: 540px; margin-bottom: 2rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-stats {
  display: flex; gap: 2.5rem; margin-top: 3rem;
  flex-wrap: wrap;
}
.hero-stat .value { font-family: var(--font-head); font-size: 1.75rem; font-weight: 800; }
.hero-stat .label { font-size: 0.8rem; font-weight: 600; color: #555; }

/* COURSE CARD (Student View) */
.course-card {
  background: var(--surface);
  border: var(--border-w) solid var(--black);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s, box-shadow 0.15s;
}
.course-card:hover { transform: translate(-3px,-3px); box-shadow: 8px 8px 0 var(--black); }

.course-card-thumb {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  border-bottom: 3px solid var(--black);
  background: #ddd;
}
.course-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.course-card-thumb .course-badge {
  position: absolute;
  top: 0.6rem; left: 0.6rem;
}
.course-card-thumb .preview-tag {
  position: absolute;
  bottom: 0.6rem; right: 0.6rem;
  background: var(--yellow);
  border: 2px solid var(--black);
  padding: 0.15rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 700;
}

.course-card-body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }
.course-card-category { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: #888; margin-bottom: 0.4rem; }
.course-card-title { font-family: var(--font-head); font-size: 1rem; font-weight: 800; line-height: 1.3; margin-bottom: 0.5rem; }
.course-card-meta  { font-size: 0.8rem; color: #666; display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.course-card-instructor { font-size: 0.8rem; font-weight: 600; margin-bottom: 0.75rem; }
.course-card-price {
  margin-top: auto;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding-top: 0.75rem;
  border-top: 2px solid #eee;
}
.price-current { font-family: var(--font-head); font-size: 1.4rem; font-weight: 800; }
.price-original { font-size: 0.9rem; color: #999; text-decoration: line-through; }
.price-free { font-family: var(--font-head); font-size: 1.2rem; font-weight: 800; color: var(--green); }
.course-card-actions { margin-top: auto; padding-top: 0.75rem; }

/* PROGRESS CARD */
.enrolled-card {
  background: var(--surface);
  border: var(--border-w) solid var(--black);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  transition: transform 0.15s;
}
.enrolled-card:hover { transform: translate(-2px,-2px); box-shadow: var(--shadow-lg); }
.enrolled-thumb {
  width: 100px; height: 70px;
  border: 2px solid var(--black);
  object-fit: cover;
  border-radius: var(--radius);
  flex-shrink: 0;
}
.enrolled-info { flex: 1; }
.enrolled-title { font-weight: 800; font-size: 0.95rem; margin-bottom: 0.3rem; }
.enrolled-meta  { font-size: 0.78rem; color: #666; margin-bottom: 0.5rem; }
.enrolled-progress-label { display: flex; justify-content: space-between; font-size: 0.75rem; font-weight: 700; margin-bottom: 0.25rem; }

/* CHECKOUT PAGE */
.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 2rem;
  align-items: start;
}
.checkout-summary {
  background: var(--surface);
  border: var(--border-w) solid var(--black);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  padding: 1.5rem;
  position: sticky;
  top: 80px;
}
.checkout-course-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border: 2px solid var(--black);
  border-radius: var(--radius);
  margin-bottom: 1rem;
}
.checkout-price-section {
  background: var(--yellow);
  border: 2px solid var(--black);
  border-radius: var(--radius);
  padding: 1rem;
  margin: 1rem 0;
}
.checkout-total { font-family: var(--font-head); font-size: 2rem; font-weight: 800; }
.referral-input-wrap { display: flex; gap: 0; }
.referral-input-wrap input { border-right: none; border-radius: var(--radius) 0 0 var(--radius); }
.referral-input-wrap .btn { border-radius: 0 var(--radius) var(--radius) 0; white-space: nowrap; }
.referral-applied {
  background: var(--green);
  border: 2px solid var(--black);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.8rem;
  font-weight: 700;
  margin-top: 0.5rem;
}

/* LEARN PAGE */
.learn-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  height: calc(100vh - 64px);
  overflow: hidden;
}
.video-area {
  overflow-y: auto;
  border-right: 3px solid var(--black);
}
.video-player-wrap {
  background: #000;
  border-bottom: 3px solid var(--black);
  position: relative;
  width: 100%;
  overflow: hidden;
}
.video-player-wrap iframe,
.video-player-wrap #ytPlayerContainer {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 16/9;
  border: none;
  display: block;
}
/* Hide YouTube logo, title, share, related videos overlay */
.video-player-wrap::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 160px; height: 42px;
  background: #000;
  z-index: 10;
  pointer-events: none;
}
/* Hide YouTube endscreen suggestions */
.yt-endscreen-overlay {
  position: absolute;
  inset: 0;
  background: #000;
  z-index: 20;
  display: none;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 700;
}
.yt-endscreen-overlay.show { display: flex; }
.video-controls-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  padding: 1rem;
  color: #fff;
  display: flex; align-items: center; justify-content: space-between;
}
.video-info-area { padding: 1.5rem; }
.video-title-big { font-family: var(--font-head); font-size: 1.5rem; font-weight: 800; margin-bottom: 0.5rem; }

/* SIDEBAR CURRICULUM */
.curriculum-sidebar {
  overflow-y: auto;
  background: var(--surface);
}
.curriculum-header {
  padding: 1rem;
  border-bottom: 3px solid var(--black);
  background: var(--black);
  color: var(--white);
  position: sticky; top: 0; z-index: 10;
}
.curriculum-section {
  border-bottom: 2px solid #eee;
}
.curriculum-section-header {
  padding: 0.85rem 1rem;
  background: var(--bg);
  font-weight: 800;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  border-bottom: 2px solid #ddd;
}
.curriculum-section-header:hover { background: var(--yellow); }
.curriculum-lesson {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.65rem 1rem;
  font-size: 0.83rem;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.1s;
}
.curriculum-lesson:hover { background: #f9f9f9; }
.curriculum-lesson.active { background: var(--yellow); font-weight: 700; }
.curriculum-lesson.completed { color: var(--green); }
.lesson-check {
  width: 18px; height: 18px;
  border: 2px solid var(--black);
  border-radius: 50%;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem;
}
.lesson-check.done { background: var(--green); }

/* DASHBOARD GRID */
.dashboard-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2rem;
}
.dashboard-main { min-width: 0; }
.dashboard-sidebar { min-width: 0; }

/* REFERRAL WIDGET */
.referral-widget {
  background: var(--black);
  color: var(--white);
  border: var(--border-w) solid var(--black);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.referral-code-display {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--yellow);
  color: var(--black);
  padding: 0.75rem 1rem;
  border: 3px solid var(--white);
  border-radius: var(--radius);
  text-align: center;
  letter-spacing: 0.1em;
  margin: 0.75rem 0;
  cursor: pointer;
  transition: transform 0.1s;
}
.referral-code-display:hover { transform: scale(1.02); }
.referral-link-wrap {
  display: flex; gap: 0;
  margin-top: 0.5rem;
}
.referral-link-wrap input {
  flex: 1;
  border-right: none;
  border-radius: var(--radius) 0 0 var(--radius);
  font-size: 0.78rem;
  background: #111;
  color: #ccc;
  border-color: #555;
  box-shadow: none;
}
.referral-link-wrap .btn { border-radius: 0 var(--radius) var(--radius) 0; }

/* EARNINGS CHART PLACEHOLDER */
.chart-wrap {
  border: var(--border-w) solid var(--black);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1rem;
  box-shadow: var(--shadow);
}
.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  height: 120px;
  padding: 0 0.5rem;
}
.chart-bar {
  flex: 1;
  background: var(--yellow);
  border: 2px solid var(--black);
  border-radius: 2px 2px 0 0;
  transition: height 0.5s ease;
  position: relative;
}
.chart-bar:hover { background: var(--pink); }
.chart-bar .bar-tooltip {
  position: absolute;
  top: -28px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--black);
  color: #fff;
  font-size: 0.65rem;
  padding: 0.15rem 0.35rem;
  border-radius: 2px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.15s;
}
.chart-bar:hover .bar-tooltip { opacity: 1; }

/* PAYMENT REQUEST */
.payout-widget {
  background: var(--surface);
  border: var(--border-w) solid var(--black);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.wallet-amount {
  font-family: var(--font-head);
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--yellow), var(--orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* NOTIFICATION TOAST */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.toast {
  background: var(--black);
  color: var(--white);
  padding: 0.85rem 1.25rem;
  border: 3px solid var(--black);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  max-width: 320px;
  box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 0.6rem;
  animation: slideInRight 0.3s ease;
}
.toast.success { background: var(--green); color: var(--black); }
.toast.error   { background: var(--red); }
.toast.warning { background: var(--yellow); color: var(--black); }
@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

/* RESPONSIVE STUDENT */
@media (max-width: 1024px) {
  .learn-layout { grid-template-columns: 1fr; height: auto; }
  .video-area { border-right: none; border-bottom: 3px solid var(--black); }
  .curriculum-sidebar { height: 400px; }
  .checkout-layout { grid-template-columns: 1fr; }
  .checkout-summary { position: static; }
  .dashboard-layout { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hero { padding: 3rem 1rem; }
}
