/* ============================================================
   SANKALP DIGITAL PATHSHALA – FINAL STYLESHEET (13px base)
   Netflix dark • Sky-blue accent • Compact, clean, all pages
   ============================================================ */
:root {
  --bg-body: #0f0f0f;
  --bg-card: #1a1a1a;
  --bg-nav: rgba(15, 15, 15, 0.9);
  --sky: #00b4d8;
  --sky-dark: #0096c7;
  --text: #e5e5e5;
  --text-muted: #b3b3b3;
  --border: rgba(255, 255, 255, 0.08);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --font: 'Inter', 'Segoe UI', system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 13px;               /* ≈0.8x zoom, comfortable reading */
}

body {
  font-family: var(--font);
  background: var(--bg-body);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: var(--sky);
  text-decoration: none;
  transition: color 0.2s;
}
img {
  display: block;
  max-width: 100%;
}

/* ---------- SCROLLBAR ---------- */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: #1a1a1a; }
::-webkit-scrollbar-thumb { background: var(--sky); border-radius: 3px; }

/* ---------- PUBLIC NAVBAR (fixed, slim, single line) ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 50px;
  background: var(--bg-nav);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  z-index: 1000;
  transition: transform 0.3s;
}
.navbar.hidden { transform: translateY(-100%); }
.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1400px;
  margin: auto;
}
.nav-logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav-links {
  list-style: none;
  display: flex;
  gap: 1rem;
}
.nav-links a {
  color: var(--text-muted);
  font-weight: 500;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  transition: color 0.2s;
  white-space: nowrap;
}
.nav-links a:hover,
.nav-links a.active { color: #fff; }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
}

/* ---------- DASHBOARD HEADER (replaces navbar when logged in) ---------- */
.dashboard-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 50px;
  background: rgba(15, 15, 15, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  z-index: 1000;
  transition: transform 0.3s;
}
.dashboard-header.hidden { transform: translateY(-100%); }
.dashboard-header .sidebar-toggle-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  margin-right: 0.8rem;
  display: none;          /* visible only on mobile */
}
.dashboard-header h2 {
  color: #fff;
  font-weight: 600;
  margin: 0;
  font-size: 1.1rem;
  white-space: nowrap;
}
.dashboard-header .header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-muted);
}
.topbar-user { font-size: 0.9rem; }

/* ---------- HERO SECTION ---------- */
.hero-featured {
  position: relative;
  height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, #0a0a1a 0%, #0d1b2a 50%, #1b2838 100%);
  margin-top: 50px;       /* offset for fixed header */
}
.hero-background {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(circle at 30% 40%, rgba(0,180,216,0.15) 0%, transparent 50%),
    radial-gradient(circle at 70% 60%, rgba(0,180,216,0.1) 0%, transparent 50%);
  animation: rotateGradient 20s linear infinite;
}
.hero-featured .hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  padding: 0 2rem;
}
.hero-title.animated-gradient {
  font-size: 2.8rem;
  font-weight: 800;
  background: linear-gradient(135deg, #fff, #90e0ef, var(--sky));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: textPulse 3s ease-in-out infinite alternate;
}
.hero-subtitle {
  font-size: 1rem;
  color: rgba(255,255,255,0.8);
  margin: 1rem 0 2rem;
}

/* ---------- ANIMATIONS ---------- */
@keyframes rotateGradient {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes textPulse {
  0%   { filter: drop-shadow(0 0 6px rgba(0,180,216,0.4)); }
  100% { filter: drop-shadow(0 0 16px rgba(0,180,216,0.7)); }
}
@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.5rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  background: rgba(255,255,255,0.1);
  color: #fff;
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--sky);
  color: #000;
}
.btn-primary:hover {
  background: var(--sky-dark);
  box-shadow: 0 0 12px rgba(0,180,216,0.5);
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--sky);
  color: var(--sky);
}
.btn-outline:hover {
  background: rgba(0,180,216,0.15);
}
.btn-lg { padding: 0.7rem 1.8rem; font-size: 1rem; }
.btn-full { width: 100%; }
.btn-danger { background: #e50914; color: white; }
.btn-danger:hover { background: #b20710; }
.btn-success { background: #2ecc71; color: white; }
.btn-warning { background: #f39c12; color: white; }
.btn-xs { padding: 0.3rem 0.6rem; font-size: 0.8rem; }
.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.85rem; }

/* ---------- SECTIONS & CONTAINERS ---------- */
.section { padding: 3rem 1.5rem; }
.container { max-width: 1200px; margin: auto; }
.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}
.section-subtitle { color: var(--text-muted); margin-bottom: 1.5rem; }
.text-center { text-align: center; }
.mt-3 { margin-top: 1.5rem; }

/* ---------- CARDS ---------- */
.courses-grid,
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}
.course-card,
.feature-card,
.milestone-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  transition: transform 0.2s, border-color 0.2s;
}
.course-card:hover,
.feature-card:hover,
.milestone-card:hover {
  border-color: var(--sky);
  transform: translateY(-3px);
}
.course-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 0.8rem;
}
.price { font-weight: 700; color: var(--sky); }
.original-price { text-decoration: line-through; color: #666; margin-left: 0.4rem; font-size: 0.85rem; }
.discount-badge {
  background: #ff4d4d;
  color: white;
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 0.75rem;
}

/* Feature card (landing) specifics */
.feature-card {
  text-align: center;
  background: rgba(26,26,26,0.6);
  backdrop-filter: blur(10px);
}
.feature-icon { font-size: 2rem; margin-bottom: 0.8rem; }
.feature-card h3 { font-size: 1.1rem; color: #fff; margin-bottom: 0.4rem; }
.feature-card p { color: var(--text-muted); font-size: 0.85rem; }

/* ---------- AUTH PAGES ---------- */
.auth-section {
  padding-top: 70px;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  width: 100%;
  max-width: 420px;
}
.auth-card h2 { color: #fff; margin-bottom: 1.2rem; font-size: 1.4rem; }
.form-group { margin-bottom: 1rem; }
.form-group label {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}
input,
textarea,
select {
  width: 100%;
  padding: 0.6rem 0.8rem;
  background: #262626;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: var(--font);
  font-size: 0.9rem;
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--sky);
  outline: none;
}

/* ---------- DASHBOARD LAYOUT ---------- */
.dashboard-layout {
  display: flex;
  padding-top: 50px;           /* equal to header height */
  min-height: 100vh;
}
.sidebar {
  width: 230px;
  background: #141414;
  border-right: 1px solid var(--border);
  padding: 1.2rem;
  position: fixed;
  top: 50px;
  left: 0;
  height: calc(100vh - 50px);
  overflow-y: auto;
  z-index: 50;
  transition: transform 0.3s;
}
.sidebar .close-sidebar {
  display: none;               /* shown only on mobile */
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
}
.sidebar-brand {
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1.5rem;
}
.sidebar-link {
  display: block;
  padding: 0.55rem 0.8rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9rem;
  transition: background 0.2s, color 0.2s;
  margin-bottom: 0.2rem;
}
.sidebar-link:hover,
.sidebar-link.active {
  background: rgba(0,180,216,0.15);
  color: var(--sky);
}
.logout-link { color: #e50914 !important; }

.dashboard-main { flex: 1; margin-left: 230px; }
.dashboard-content { padding: 1.5rem; }

/* ---------- COMPACT COURSE LIST ---------- */
.compact-course-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.compact-course-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.8rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: transform 0.2s, border-color 0.2s;
}
.compact-course-item:hover {
  border-color: var(--sky);
  transform: translateX(3px);
}
.course-info strong { display: block; color: #fff; margin-bottom: 0.2rem; }
.progress-text { font-size: 0.8rem; color: var(--text-muted); }

/* ---------- LECTURE CARDS ---------- */
.lecture-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.2rem;
  flex-wrap: wrap;
}
.lecture-list-stacked {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.lecture-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.8rem;
  transition: transform 0.2s, border-color 0.2s;
}
.lecture-card:hover {
  border-color: var(--sky);
  transform: translateY(-2px);
}
.lecture-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}
.lecture-title { font-weight: 500; color: #fff; flex: 1; }
.lecture-time { font-size: 0.75rem; color: var(--text-muted); margin-left: 1rem; }
.lecture-actions-row {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.6rem;
  flex-wrap: wrap;
}
.complete-badge {
  background: #2ecc71;
  color: white;
  padding: 2px 6px;
  border-radius: 8px;
  font-size: 0.75rem;
}

/* ---------- PROGRESS BAR ---------- */
.progress-bar {
  height: 8px;
  background: #333;
  border-radius: 4px;
  overflow: hidden;
  margin: 0.8rem 0;
}
.progress-fill {
  height: 100%;
  background: var(--sky);
  border-radius: 4px;
  transition: width 0.5s ease;
}

/* ---------- PERFORMANCE REPORT ---------- */
.report-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.report-item {
  background: var(--bg-card);
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  display: flex;
  justify-content: space-between;
  border: 1px solid var(--border);
  transition: transform 0.2s;
}
.report-item:hover { transform: translateX(3px); }
.report-date { color: var(--text-muted); font-size: 0.85rem; }

/* ---------- DOUBT CARDS ---------- */
.doubt-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 0.8rem;
  transition: border-color 0.2s;
}
.doubt-card:hover { border-color: var(--sky); }
.reply { color: var(--sky); margin-left: 1.2rem; font-weight: 500; }
.pending { color: #f39c12; font-style: italic; }
.replied-badge {
  background: rgba(46,204,113,0.2);
  color: #2ecc71;
  padding: 2px 6px;
  border-radius: 8px;
  font-size: 0.8rem;
  margin-left: 0.8rem;
}

/* AI replied badge (used in My Doubts) */
.badge.ai-replied {
  background: var(--sky);
  color: #000;
  padding: 2px 6px;
  border-radius: 8px;
  font-size: 0.75rem;
  margin-left: 0.5rem;
}

/* ---------- DISCUSSION PANEL (MODAL) ---------- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}
.discussion-panel,
.modal-content {
  background: #1e1e1e;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 650px;
  max-height: 80vh;
  overflow-y: auto;
  padding: 1.5rem;
}
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.panel-header h3 { color: #fff; margin: 0; }
.close-panel-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
}
.comments-list { margin-bottom: 1.2rem; }
.comment-thread { margin-bottom: 0.8rem; }
.comment {
  background: #2a2a2a;
  border-radius: var(--radius-sm);
  padding: 0.7rem;
  margin-bottom: 0.4rem;
}
.comment-author { font-weight: 600; color: #fff; }
.comment-time { font-size: 0.75rem; color: var(--text-muted); margin-left: 0.5rem; }
.comment-text { margin-top: 0.4rem; }
.reply { margin-left: 1.2rem; background: #333; }
.admin-reply {
  background: rgba(0,180,216,0.1);
  border-left: 3px solid var(--sky);
  padding-left: 0.8rem;
  margin-left: 1.2rem;
}
.reply-form { margin-top: 0.6rem; }
.reply-form textarea,
.new-comment-box textarea {
  width: 100%;
  background: #262626;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: #fff;
  padding: 0.5rem;
  margin-bottom: 0.4rem;
}
.new-comment-box { display: flex; flex-direction: column; gap: 0.4rem; }

/* ---------- SANKALP SATHI CHAT ---------- */
.sathi-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 120px);
  background: #1a1a1a;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}
.sathi-chat-header {
  background: var(--sky);
  color: #000;
  padding: 0.8rem 1rem;
}
.sathi-chat-header h3 { font-size: 1.2rem; margin: 0; }
.sathi-chat-header p { margin: 0; font-size: 0.75rem; opacity: 0.9; }
.sathi-messages {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.sathi-user-message {
  align-self: flex-end;
  background: var(--sky);
  color: #000;
  padding: 0.5rem 0.8rem;
  border-radius: 10px 10px 4px 10px;
  max-width: 70%;
  word-break: break-word;
}
.sathi-bot-message {
  align-self: flex-start;
  background: #2a2a2a;
  color: var(--text);
  padding: 0.5rem 0.8rem;
  border-radius: 10px 10px 10px 4px;
  max-width: 85%;
  word-break: break-word;
}
.sathi-bot-message.formatted p { margin-bottom: 0.4rem; }
.sathi-bot-message.formatted strong { font-weight: 700; }
.sathi-bot-message.formatted em { font-style: italic; }
.sathi-bot-message.formatted code {
  background: rgba(255,255,255,0.1);
  padding: 0.15rem 0.3rem;
  border-radius: 3px;
}
.powered-by {
  margin-top: 0.6rem;
  font-size: 0.65rem;
  color: #666;
  text-align: right;
  font-style: italic;
}
.sathi-input-area {
  display: flex;
  padding: 0.7rem;
  border-top: 1px solid var(--border);
  background: #141414;
}
.sathi-input-area input {
  flex: 1;
  background: #262626;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.8rem;
  color: #fff;
  font-size: 0.9rem;
}
.sathi-input-area button {
  background: var(--sky);
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.5rem 1rem;
  margin-left: 0.5rem;
  color: #000;
  font-size: 1.1rem;
  cursor: pointer;
}

/* ---------- ADMIN PANEL ---------- */
.admin-login-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}
#adminPanel {
  padding-top: 50px;
  min-height: 100vh;
  display: none;       /* toggled via JS */
}
#adminSidebar {
  position: fixed;
  top: 50px;
  left: 0;
  width: 230px;
  height: calc(100vh - 50px);
  background: #141414;
  border-right: 1px solid var(--border);
  padding: 1.2rem;
  overflow-y: auto;
  z-index: 45;
  transition: transform 0.3s;
}
#adminSidebar .close-sidebar {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
  display: block;
}
#adminContent {
  margin-left: 230px;
  padding: 1.5rem;
}

/* ---------- TABLE ---------- */
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
th, td {
  padding: 0.6rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
th { background: #262626; color: #fff; font-weight: 600; }
tr:hover { background: rgba(255,255,255,0.03); }

/* ---------- TOAST NOTIFICATIONS ---------- */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.toast {
  background: #333;
  color: #fff;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--sky);
  animation: slideIn 0.3s ease;
  max-width: 320px;
}
.toast-error { border-color: #e50914; }
.toast-success { border-color: #2ecc71; }

/* ---------- FOOTER ---------- */
.footer {
  background: #111;
  padding: 1.5rem;
  text-align: center;
  border-top: 1px solid var(--border);
  color: #666;
  font-size: 0.8rem;
}
.footer a { color: #666; transition: color 0.2s; }
.footer a:hover { color: var(--sky); }
.footer-content {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto 1rem;
  text-align: left;
}
.footer h4 { color: #fff; margin-bottom: 0.5rem; font-size: 0.9rem; }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 0.3rem; }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  font-size: 0.8rem;
}

/* ---------- FLOATING WHATSAPP ---------- */
.floating-whatsapp {
  position: fixed;
  bottom: 15px;
  right: 15px;
  background: #25D366;
  color: white;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 0 12px rgba(37,211,102,0.5);
  z-index: 999;
  transition: transform 0.3s;
}
.floating-whatsapp:hover { transform: scale(1.1); }

/* ---------- NOTIFICATION BADGE ---------- */
#notifBadge {
  background: #e50914;
  color: white;
  border-radius: 50%;
  padding: 0.15rem 0.4rem;
  font-size: 0.65rem;
  margin-right: 0.4rem;
  display: none;
}

/* ---------- LOADING SPINNER ---------- */
.loading-spinner {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 50px;
    left: 0;
    right: 0;
    background: #141414;
    flex-direction: column;
    padding: 0.8rem;
    border-bottom: 1px solid var(--border);
  }
  .nav-links.active { display: flex; }

  .dashboard-header .sidebar-toggle-btn { display: block; }

  .sidebar {
    transform: translateX(-100%);
    top: 0;
    height: 100vh;
    z-index: 90;
  }
  .sidebar.active { transform: translateX(0); }
  .sidebar .close-sidebar { display: block; }
  .dashboard-main { margin-left: 0; }

  #adminSidebar {
    transform: translateX(-100%);
    top: 0;
    height: 100vh;
    z-index: 90;
  }
  #adminSidebar.active { transform: translateX(0); }
  #adminContent { margin-left: 0; }

  .hero-title.animated-gradient { font-size: 2rem; }
}
