/* ============ Vive Learning — Purple Gradient Theme ============ */
:root {
  --p1: #7c3aed; --p2: #a855f7; --p3: #6d28d9; --p4: #4c1d95;
  --grad: linear-gradient(135deg, #7c3aed 0%, #a855f7 55%, #c084fc 100%);
  --grad-deep: linear-gradient(135deg, #2e1065 0%, #4c1d95 45%, #7c3aed 100%);
  --ink: #1e1b2e; --muted: #6b6580; --bg: #faf9ff; --card: #ffffff;
  --line: #e9e4f8; --soft: #f3efff;
  --radius: 16px;
  --shadow: 0 8px 30px rgba(124, 58, 237, .12);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Hind Siliguri', sans-serif; background: var(--bg); color: var(--ink); line-height: 1.7; }
a { color: var(--p1); text-decoration: none; }
img { max-width: 100%; }
.container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }

/* ---- Buttons ---- */
.btn { display: inline-block; padding: 12px 28px; border-radius: 12px; font-weight: 600; font-size: 16px; border: none; cursor: pointer; font-family: inherit; transition: .2s; text-align: center; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 6px 20px rgba(124,58,237,.35); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(124,58,237,.45); }
.btn-outline { background: transparent; color: var(--p1); border: 2px solid var(--p1); }
.btn-outline:hover { background: var(--soft); }
.btn-light { background: #fff; color: var(--p3); }
.btn-sm { padding: 8px 18px; font-size: 14px; border-radius: 10px; }
.btn-lg { padding: 16px 40px; font-size: 18px; }
.btn-block { display: block; width: 100%; }
.btn-danger { background: #dc2626; color: #fff; }
.btn-success { background: #16a34a; color: #fff; }

/* ---- Navbar ---- */
.navbar { background: rgba(255,255,255,.92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 100; }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { font-size: 24px; font-weight: 700; color: var(--ink); }
.logo span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo-light { color: #fff; }
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a { color: var(--ink); font-weight: 500; }
.nav-links a:hover { color: var(--p1); }
.nav-toggle { display: none; background: none; border: none; font-size: 26px; cursor: pointer; color: var(--p1); }

/* ---- Hero ---- */
.hero { background: var(--grad-deep); color: #fff; padding: 90px 0 100px; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; width: 500px; height: 500px; border-radius: 50%; background: radial-gradient(circle, rgba(192,132,252,.35), transparent 70%); top: -150px; right: -100px; }
.hero::after { content: ''; position: absolute; width: 400px; height: 400px; border-radius: 50%; background: radial-gradient(circle, rgba(124,58,237,.4), transparent 70%); bottom: -150px; left: -80px; }
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero h1 { font-size: 46px; line-height: 1.25; margin-bottom: 18px; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, #e9d5ff, #c084fc); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { font-size: 19px; color: #ddd3f5; margin-bottom: 30px; }
.hero-banner img { border-radius: 20px; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.hero-stats { display: flex; gap: 34px; margin-top: 38px; }
.hero-stats strong { font-size: 26px; display: block; }
.hero-stats span { color: #c4b5fd; font-size: 14px; }

/* ---- Sections ---- */
.section { padding: 70px 0; }
.section-title { text-align: center; margin-bottom: 44px; }
.section-title h2 { font-size: 32px; margin-bottom: 8px; }
.section-title p { color: var(--muted); }
.badge-grad { display: inline-block; background: var(--soft); color: var(--p1); padding: 4px 16px; border-radius: 100px; font-size: 14px; font-weight: 600; margin-bottom: 10px; }

/* ---- Course cards ---- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.course-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: .25s; display: flex; flex-direction: column; }
.course-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.course-thumb { aspect-ratio: 16/9; background: var(--grad); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 40px; font-weight: 700; }
.course-thumb img { width: 100%; height: 100%; object-fit: cover; }
.course-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.course-cat { font-size: 13px; color: var(--p1); font-weight: 600; }
.course-body h3 { font-size: 19px; margin: 6px 0 8px; }
.course-body h3 a { color: var(--ink); }
.course-meta { color: var(--muted); font-size: 14px; display: flex; gap: 14px; margin-bottom: 14px; }
.course-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; }
.price { font-size: 21px; font-weight: 700; color: var(--p3); }
.price del { color: var(--muted); font-weight: 400; font-size: 15px; margin-left: 6px; }

/* ---- Feature cards ---- */
.feature-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; text-align: center; transition: .25s; }
.feature-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.feature-icon { width: 60px; height: 60px; margin: 0 auto 14px; border-radius: 16px; background: var(--grad); display: flex; align-items: center; justify-content: center; font-size: 28px; }
.feature-card h3 { font-size: 18px; margin-bottom: 6px; }
.feature-card p { color: var(--muted); font-size: 14.5px; }

/* ---- CTA ---- */
.cta { background: var(--grad); border-radius: 24px; color: #fff; padding: 54px 40px; text-align: center; }
.cta h2 { font-size: 30px; margin-bottom: 10px; }
.cta p { color: #f0e7ff; margin-bottom: 26px; }

/* ---- Forms ---- */
.form-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 34px; max-width: 460px; margin: 50px auto; box-shadow: var(--shadow); }
.form-card h2 { margin-bottom: 4px; }
.form-card .sub { color: var(--muted); margin-bottom: 22px; font-size: 15px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 15px; }
.form-control { width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px; font-family: inherit; font-size: 15.5px; background: #fff; transition: .2s; }
.form-control:focus { outline: none; border-color: var(--p2); box-shadow: 0 0 0 3px rgba(168,85,247,.15); }
textarea.form-control { min-height: 110px; resize: vertical; }

.alert { padding: 13px 18px; border-radius: 12px; margin: 16px 0; font-weight: 500; }
.alert-success { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.alert-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-info { background: var(--soft); color: var(--p3); border: 1px solid var(--line); }

/* ---- Course landing ---- */
.course-hero { background: var(--grad-deep); color: #fff; padding: 60px 0; }
.course-hero-inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: start; }
.course-hero h1 { font-size: 36px; margin: 10px 0 12px; }
.course-hero .sub { color: #ddd3f5; font-size: 18px; }
.enroll-box { background: #fff; color: var(--ink); border-radius: 18px; padding: 26px; box-shadow: 0 20px 50px rgba(0,0,0,.3); }
.enroll-box .price { font-size: 32px; }
.enroll-box ul { list-style: none; margin: 16px 0 20px; }
.enroll-box li { padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 15px; }
.enroll-box li::before { content: '✓ '; color: var(--p1); font-weight: 700; }
.curriculum { max-width: 760px; }
.module { border: 1px solid var(--line); border-radius: 14px; margin-bottom: 14px; overflow: hidden; background: #fff; }
.module-head { background: var(--soft); padding: 14px 20px; font-weight: 700; }
.lesson-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 20px; border-top: 1px solid var(--line); font-size: 15px; }
.lesson-row .tag { font-size: 12px; background: var(--grad); color: #fff; padding: 2px 10px; border-radius: 100px; }
.lesson-row .dur { color: var(--muted); font-size: 13.5px; }

/* ---- Player ---- */
.player-layout { display: grid; grid-template-columns: 1fr 360px; gap: 24px; padding: 30px 0 60px; }
.video-wrap { position: relative; padding-top: 56.25%; border-radius: 16px; overflow: hidden; background: #000; box-shadow: var(--shadow); }
.video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-side { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; align-self: start; max-height: 80vh; overflow-y: auto; }
.player-side .module-head { position: sticky; top: 0; }
.lesson-link { display: flex; gap: 10px; align-items: center; padding: 11px 18px; border-top: 1px solid var(--line); color: var(--ink); font-size: 14.5px; }
.lesson-link:hover { background: var(--soft); }
.lesson-link.active { background: var(--soft); border-left: 3px solid var(--p1); font-weight: 600; }
.lesson-link .check { color: #16a34a; }
.progress-bar { height: 10px; background: var(--line); border-radius: 100px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--grad); border-radius: 100px; transition: width .4s; }

/* ---- Dashboard ---- */
.dash-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.page-head { background: var(--grad-deep); color: #fff; padding: 44px 0; margin-bottom: 36px; }
.page-head h1 { font-size: 30px; }
.page-head p { color: #ddd3f5; }

/* ---- Payment ---- */
.pay-steps { display: flex; gap: 10px; justify-content: center; margin: 26px 0; flex-wrap: wrap; }
.pay-step { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; font-weight: 600; }
.pay-step .n { width: 28px; height: 28px; border-radius: 50%; background: var(--line); display: flex; align-items: center; justify-content: center; font-size: 13px; }
.pay-step.active { color: var(--p1); }
.pay-step.active .n { background: var(--grad); color: #fff; }
.bkash-box { background: linear-gradient(135deg, #e2136e, #f43f8e); color: #fff; border-radius: 14px; padding: 20px; text-align: center; margin-bottom: 20px; }
.bkash-box .num { font-size: 28px; font-weight: 700; letter-spacing: 1px; }

/* ---- Tables (admin) ---- */
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
table.data { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.data th { background: var(--soft); text-align: left; padding: 12px 16px; color: var(--p4); white-space: nowrap; }
table.data td { padding: 12px 16px; border-top: 1px solid var(--line); vertical-align: middle; }
.pill { padding: 3px 12px; border-radius: 100px; font-size: 12.5px; font-weight: 600; }
.pill-pending { background: #fef3c7; color: #b45309; }
.pill-approved { background: #dcfce7; color: #15803d; }
.pill-rejected { background: #fee2e2; color: #b91c1c; }
.pill-published { background: #dcfce7; color: #15803d; }
.pill-draft { background: #f1f5f9; color: #475569; }

/* ---- Admin layout ---- */
.admin-layout { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-side { background: var(--grad-deep); color: #fff; padding: 24px 0; }
.admin-side .logo { display: block; padding: 0 24px 20px; }
.admin-side a.side-link { display: block; padding: 12px 24px; color: #d8ccf5; font-weight: 500; }
.admin-side a.side-link:hover, .admin-side a.side-link.active { background: rgba(255,255,255,.1); color: #fff; border-left: 3px solid #c084fc; }
.admin-main { padding: 30px 34px; background: var(--bg); }
.admin-main h1 { margin-bottom: 20px; font-size: 26px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 30px; }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.stat-card .num { font-size: 30px; font-weight: 700; color: var(--p3); }
.stat-card .lbl { color: var(--muted); font-size: 14px; }

/* ---- Footer ---- */
.footer { background: #17112b; color: #b8aed6; margin-top: 70px; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 36px; padding: 50px 20px 30px; }
.footer h4 { color: #fff; margin-bottom: 12px; }
.footer a { display: block; color: #b8aed6; padding: 3px 0; }
.footer a:hover { color: #c084fc; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); text-align: center; padding: 18px; font-size: 14px; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .hero-inner, .course-hero-inner, .player-layout { grid-template-columns: 1fr; }
  .grid-3, .grid-4, .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: 34px; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-side { padding: 10px 0; }
  .footer-inner { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .grid-3, .grid-4, .stat-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; position: absolute; top: 68px; left: 0; right: 0; background: #fff; flex-direction: column; padding: 18px; border-bottom: 1px solid var(--line); }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .hero { padding: 60px 0; }
}
