﻿/* =========================================
   GLOBAL VARIABLES & RESET
   ========================================= */
:root {
  --primary: #0f172a;
  --primary-hover: #334155;
  --accent: #3b82f6;
  --bg-body: #f8fafc;
  --bg-surface: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.85);
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --border-color: #e2e8f0;
  --border-radius-sm: 8px;
  --border-radius-md: 16px;
  --border-radius-lg: 24px;
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.025);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
  --container-width: 1100px;
  --header-height: 72px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

.hidden {
  display: none !important;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

h1,
h2,
h3,
h4 {
  color: var(--primary);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 0.75rem;
}

h1 {
  font-size: 3.5rem;
}

h2 {
  font-size: 2.25rem;
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
}

p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
}

/* =========================================
   UI COMPONENTS (Buttons & Inputs)
   ========================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.75rem;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn--primary,
.btn-primary {
  background-color: var(--primary);
  color: #fff;
  box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.2);
}

.btn--primary:hover,
.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 8px -1px rgba(15, 23, 42, 0.3);
}

.btn--ghost {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn--ghost:hover {
  background-color: #fff;
  border-color: var(--text-muted);
}

.btn--block {
  width: 100%;
}

input,
select,
textarea,
.input-field {
  width: 100%;
  padding: 12px 16px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  font-size: 1rem;
  font-family: inherit;
  color: var(--text-main);
  transition: all 0.2s ease;
  box-shadow: var(--shadow-xs);
}

input:focus,
select:focus,
textarea:focus,
.input-field:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
  background-color: #fff;
}

label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 8px;
}

/* =========================================
   PUBLIC: NAVIGATION
   ========================================= */
.nav {
  height: var(--header-height);
  background-color: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
}

.brand__dot {
  width: 24px;
  height: 24px;
  background: var(--primary);
  border-radius: 6px;
  position: relative;
}

.brand__dot::after {
  content: '';
  position: absolute;
  top: 6px;
  left: 6px;
  width: 8px;
  height: 8px;
  background: white;
  border-radius: 50%;
}

.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
}

.nav__toggle span {
  width: 22px;
  height: 2px;
  background: var(--text-main);
  margin: 5px 0;
}

/* =========================================
   PUBLIC: HERO & SECTIONS
   ========================================= */
.hero {
  padding: 6rem 0 4rem;
  text-align: center;
  background: radial-gradient(50% 50% at 50% 10%, rgba(59, 130, 246, 0.05) 0%, transparent 100%);
}

.hero__content {
  max-width: 750px;
  margin: 0 auto;
}

.hero__title {
  margin-bottom: 1.5rem;
}

.hero__title .accent {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.hero__subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
}

.hero__actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 3rem;
}

.hero__meta {
  display: flex;
  justify-content: center;
  gap: 2rem;
  font-size: 0.875rem;
  color: var(--text-light);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.section {
  padding: 4rem 0;
}

.section__head {
  margin-bottom: 3rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 32px;
}

/* =========================================
   PUBLIC: COURSE CARDS
   ========================================= */
.card {
  background: var(--bg-surface);
  border-radius: var(--border-radius-md);
  border: 1px solid rgba(226, 232, 240, 0.8);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}

.card__media {
  /* aspect-ratio: 16/9; Removed to allow natural height */
  background-color: #f1f5f9;
  overflow: hidden;
}

.card__media img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.6s ease;
}

.card:hover .card__media img {
  transform: scale(1.05);
}

.card__body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card__title {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.card__desc {
  font-size: 0.925rem;
  line-height: 1.6;
  margin-bottom: auto;
}

.card__footer {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--bg-body);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
}

.cta {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* =========================================
   PUBLIC: COURSE DETAIL & REVIEWS
   ========================================= */
.course-grid {
  display: grid;
  place-items: center;
  margin-top: 2rem;
}

.course-card {
  background: var(--bg-surface);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  padding: 2.5rem;
  display: flex;
  gap: 40px;
  width: 100%;
}

.course-info h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

#share-bar {
  background: var(--bg-surface);
  padding: 12px;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

#share-bar a,
#share-bar button {
  font-size: 0.85rem;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: #fff;
  cursor: pointer;
}



/* =========================================
   PUBLIC: CHECKOUT
   ========================================= */
.checkout-title {
  text-align: center;
  margin: 3rem 0;
}

.price-panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 auto 24px;
  max-width: 520px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.price-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.course-mini-thumb {
  width: 70px;
  height: auto;
  border-radius: 10px;
  background-color: #f1f5f9;
  border: 1px solid #f1f5f9;
  display: block;
}

.price-left__meta {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

.mini-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
}

.mini-type {
  font-size: 0.85rem;
  color: #64748b;
  font-weight: 500;
}

.price-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  text-align: right;
  flex-shrink: 0;
}

.price-original {
  font-size: 0.9rem;
  color: #94a3b8;
  text-decoration: line-through;
  font-weight: 500;
  margin-bottom: 2px;
  opacity: 0.8;
}

.price-current {
  font-size: 1.8rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
  letter-spacing: -0.03em;
  transition: color 0.3s ease;
}

.price-current.text-green {
  color: #10b981 !important;
}

.price-savings {
  margin-top: 8px;
  display: inline-block;
  background-color: #ecfdf5;
  color: #047857;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 5px 12px;
  border-radius: 99px;
  border: 1px solid #d1fae5;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.checkout-form {
  max-width: 520px;
  margin: 0 auto 5rem;
  background: var(--bg-surface);
  padding: 2.5rem;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
}

.coupon-wrapper {
  flex: 1;
}

.checkout-actions {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* =========================================
   ADMIN LAYOUT (SIDEBAR & MAIN)
   ========================================= */
.admin-root {
  display: flex;
  min-height: 100vh;
  background: #f1f5f9;
}

/* Sidebar: White Background like Coupon Cards */
.sidebar {
  width: 280px;
  background: #ffffff;
  /* Changed from Dark Navy to White */
  color: #1e293b;
  /* Changed from White text to Dark */
  padding: 2rem;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  transition: width 0.3s ease;
  border-right: 1px solid #e2e8f0;
  /* Added Border */
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.02);
  /* Soft shadow */
}

/* Sidebar Title: Styled like the "FREECOURSE" Badge */
.sidebar h2 {
  color: #1b0134;
  /* Green Text */
  background: #f0fdf4;
  /* Mint Background */
  border: 1px dashed #86efac;
  /* Dashed Border */
  font-size: 1.2rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 2.5rem;
  padding: 10px;
  border-radius: 8px;
  text-align: center;
}

/* Sidebar Links */
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  color: #64748b;
  /* Dark Gray */
  border-radius: 8px;
  margin-bottom: 6px;
  font-weight: 600;
  transition: all 0.2s;
  font-size: 0.95rem;
  border: 1px solid transparent;
}

.sidebar-nav a:hover {
  background: #f8fafc;
  color: #0f172a;
  border-color: #e2e8f0;
}

/* Active Link: Styled like Coupon Badges (Green/Mint) */
.sidebar-nav a.active {
  background: var(--primary);
  /* Uses the dark navy color #0f172a */
  color: #ffffff;
  /* White text for contrast */
  border: 1px solid transparent;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  /* Adds a subtle shadow for depth */
}

.sidebar-collapse {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 1.2rem;
  align-self: flex-end;
  margin-bottom: 1rem;
}

.content {
  flex: 1;
  padding: 3rem;
  overflow-x: hidden;
}

.topbar {
  border-bottom: 1px solid #cbd5e1;
  padding-bottom: 1.5rem;
  margin-bottom: 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Stats Cards */
.stat-card {
  background: #fff;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  text-align: center;
}

.stat-card h3 {
  font-size: 3rem;
  margin: 0;
  color: var(--primary);
}

/* =========================================
   ADMIN: COUPONS CARD STYLING
   ========================================= */
#coupon-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.coupon-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.coupon-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  border-color: #cbd5e1;
}


/* =========================================
   CHECKOUT NOTIFICATIONS & MESSAGES
   ========================================= */
.msg-toast {
  padding: 12px 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 12px;
  animation: slideDownFade 0.3s ease-out;
}

.msg-toast--success {
  background-color: #ecfdf5;
  color: #065f46;
  border: 1px solid #d1fae5;
}

.msg-toast--error {
  background-color: #fef2f2;
  color: #991b1b;
  border: 1px solid #fee2e2;
}

/* Inline Field Messages - Badge Style */
.field-msg {
  font-size: 0.85rem;
  margin-top: 8px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 8px;
  animation: fadeIn 0.3s ease;
}

.field-msg.success {
  color: #065f46;
  background-color: #ecfdf5;
  border: 1px solid #a7f3d0;
}

.field-msg.error {
  color: #991b1b;
  background-color: #fef2f2;
  border: 1px solid #fecaca;
}

.input-error {
  border-color: #ef4444 !important;
  background-color: #fef2f2 !important;
}

/* Animations */
@keyframes slideDownFade {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.shake {
  animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
  40%, 60% { transform: translate3d(4px, 0, 0); }
}

.coupon-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 12px;
}

.coupon-code-badge {
  background: #f0fdf4;
  color: #15803d;
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  border: 1px dashed #86efac;
}

.coupon-course {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 600;
  text-transform: uppercase;
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.coupon-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.info-group {
  display: flex;
  flex-direction: column;
}

.info-label {
  font-size: 0.7rem;
  color: #94a3b8;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 2px;
}

.info-val {
  font-size: 0.95rem;
  font-weight: 600;
  color: #334155;
}

.upi-info {
  background: #f8fafc;
  border-radius: 6px;
  padding: 8px;
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.4;
}

.card-actions-row {
  display: flex;
  gap: 10px;
  margin-top: auto;
}

.btn-edit-coupon,
.btn-delete-coupon {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid;
}

.btn-edit-coupon {
  background: white;
  color: var(--text-main);
  border-color: #cbd5e1;
}

.btn-edit-coupon:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.btn-delete-coupon {
  background: white;
  color: #ef4444;
  border-color: #fecaca;
}

.btn-delete-coupon:hover {
  background: #fef2f2;
  border-color: #dc2626;
}

/* =========================================
   ADMIN: COURSE LIST
   ========================================= */
#course-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.course-admin-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.course-admin-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.1);
  border-color: #cbd5e1;
}

.course-admin-media {
  height: auto;
  background-color: #f1f5f9;
  overflow: hidden;
  position: relative;
  border-bottom: 1px solid #f1f5f9;
}

.course-admin-media img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s ease;
}

.course-admin-card:hover .course-admin-media img {
  transform: scale(1.05);
}

.course-admin-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.course-admin-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
  line-height: 1.3;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.course-admin-desc {
  font-size: 0.9rem;
  color: #64748b;
  margin-bottom: 16px;
  line-height: 1.5;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.course-admin-price {
  font-size: 1.2rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 16px;
}

.course-admin-actions {
  display: flex;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
}

.btn-action-edit {
  flex: 1;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #0f172a;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-action-edit:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.btn-action-delete {
  flex: 1;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #fecaca;
  background: #fff;
  color: #dc2626;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-action-delete:hover {
  background: #fef2f2;
  border-color: #dc2626;
}

/* =========================================
   UTILITIES & ANIMATIONS
   ========================================= */
.login-overlay,
.reset-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.login-box,
.reset-box {
  background: #fff;
  padding: 3rem;
  border-radius: 16px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
}

.skeleton {
  background: #e2e8f0;
  background-image: linear-gradient(90deg, #e2e8f0 0px, #f1f5f9 40px, #e2e8f0 80px);
  background-size: 200% 100%;
  animation: shine 1.5s infinite linear;
  border-radius: 6px;
}

@keyframes shine {
  0% {
    background-position: -100px;
  }

  60%,
  100% {
    background-position: 140px;
  }
}

@keyframes shake {

  10%,
  90% {
    transform: translate3d(-1px, 0, 0);
  }

  20%,
  80% {
    transform: translate3d(2px, 0, 0);
  }

  30%,
  50%,
  70% {
    transform: translate3d(-3px, 0, 0);
  }

  40%,
  60% {
    transform: translate3d(3px, 0, 0);
  }
}

.shake {
  animation: shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
}

.input-error {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1) !important;
  background-color: #fef2f2 !important;
}

.field-error {
  display: none;
  color: #dc2626;
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 6px;
  margin-bottom: 4px;
  animation: fadeInError 0.3s ease-out forwards;
}

@keyframes fadeInError {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.field-success {
  display: none;
  background-color: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #15803d;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 10px;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
  animation: slideDownFade 0.3s ease-out forwards;
}

@keyframes slideDownFade {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.notify-card {
  position: fixed;
  top: 24px;
  right: 24px;
  background: #fff;
  padding: 16px 20px;
  border-radius: 12px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
  border: 1px solid #e2e8f0;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  z-index: 2000;
  animation: slideInRight 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 380px;
}

.notify-success {
  border-left: 4px solid #10b981;
}

.notify-success .icon {
  color: #10b981;
}

.notify-success .msg {
  color: #0f172a;
  font-weight: 500;
  font-size: 0.95rem;
}

.notify-error {
  border-left: 4px solid #ef4444;
}

.notify-error .icon {
  color: #ef4444;
  font-size: 1.1rem;
}

.notify-error .msg {
  color: #7f1d1d;
  font-weight: 600;
  font-size: 0.95rem;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.otp-input-group {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 24px 0;
}

.otp-input-single {
  width: 48px !important;
  height: 56px;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  padding: 0;
  transition: all 0.2s ease;
}

.otp-input-single:focus {
  border-color: #3b82f6;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
  outline: none;
  transform: translateY(-2px);
}

.otp-input-single.filled {
  background-color: #eff6ff;
  border-color: #bfdbfe;
}

@media (max-width: 768px) {
  h1 {
    font-size: 2.5rem;
  }

  .hero {
    padding: 4rem 0;
  }

  .course-card {
    flex-direction: column;
    padding: 1.5rem;
    gap: 20px;
  }

  .admin-root {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: auto;
    padding: 1rem;
  }

  .sidebar-nav {
    flex-direction: row;
    overflow-x: auto;
  }

  .sidebar-nav a {
    white-space: nowrap;
  }

  .content {
    padding: 1.5rem;
  }

  .nav__links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    flex-direction: column;
    box-shadow: var(--shadow-lg);
  }

  .nav__toggle {
    display: block;
  }

  .review-summary-card {
    flex-direction: column-reverse;
    gap: 20px;
    padding: 20px;
  }

  .summary-stats {
    border-left: none;
    padding-left: 0;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
    width: 100%;
  }

  .summary-bars {
    width: 100%;
    max-width: 100%;
  }

  .price-panel {
    padding: 12px;
  }

  .course-mini-thumb {
    width: 56px;
    height: 56px;
  }

  .mini-title {
    font-size: 0.95rem;
  }

  .price-current {
    font-size: 1.4rem;
  }

  .price-savings {
    font-size: 0.7rem;
    padding: 4px 10px;
  }
}

.messages-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.message-card {
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.2s;
}


/* =========================================
   MOBILE RESPONSIVENESS REFINEMENTS
   ========================================= */

/* Footer Columns Class (Replaces inline styles) */
.footer-columns {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
  width: 100%;
}

@media (max-width: 768px) {
  .footer-columns {
    flex-direction: column;
    gap: 1.5rem;
  }
}

/* Enhanced Mobile Queries */
@media (max-width: 480px) {
  .container {
    padding: 0 20px;
  }

  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }

  .nav__inner {
    padding: 0;
  }

  .hero {
    padding: 3rem 0;
  }

  /* Checkout Form mobile padding */
  .checkout-form {
    padding: 1.5rem;
  }
  
  /* Stack buttons on very small screens */
  .checkout-actions .btn {
    width: 100%;
  }

  .price-panel {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .price-right {
    align-items: flex-start;
    text-align: left;
    width: 100%;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
  }
}

/* =========================================
   PUBLIC: FOOTER
   ========================================= */
.footer {
  background-color: #000;
  border-top: 1px solid #333;
  color: #fff;
  padding: 4rem 0 2rem;
  margin-top: 4rem;
}

.footer__inner {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 80px;
  margin-bottom: 3rem;
}

.footer h4 {
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 1.2rem;
}

.footer a {
  display: block;
  color: #cbd5e1;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.footer a:hover {
  color: #fff;
  text-decoration: underline;
}

.copyright {
  text-align: center;
  color: #94a3b8;
  font-size: 0.9rem;
  padding-top: 2rem;
  border-top: 1px solid #333;
}

@media (max-width: 768px) {
  .footer__inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}
/* =========================================
   PUBLIC: REVIEWS MARQUEE
   ========================================= */
.marquee-wrapper {
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee-content {
  animation: scroll 40s linear infinite;
  padding-left: 2rem;
}

.marquee-content:hover {
  animation-play-state: paused;
}

@keyframes scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); } 
}

.review-card {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  min-width: 320px;
  max-width: 320px;
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.review-user {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
  margin-bottom: 2px;
}

.review-course {
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
  background: #eff6ff;
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
  margin-top: 4px;
}

.review-stars {
  color: #fbbf24;
  font-size: 0.9rem;
  letter-spacing: 2px;
}

.review-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  display: -webkit-box;
  line-clamp: 4;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-style: italic;
}

/* =========================================
   MY COURSES PAGE
   ========================================= */
.my-courses-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}

.my-course-card {
  display: flex;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e8f0;
  transition: all 0.2s ease;
  height: 220px;
}

.my-course-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.05);
  border-color: #cbd5e1;
}

.my-course-media {
  width: 300px;
  min-width: 300px;
  position: relative;
  overflow: hidden;
  background: #f1f5f9;
}

.my-course-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.my-course-card:hover .my-course-media img {
  transform: scale(1.05);
}

.my-course-body {
  flex: 1;
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.my-course-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
  line-height: 1.3;
}

.my-course-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.my-course-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.btn-start-reading {
    background-color: var(--primary);
    color: white;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.btn-start-reading:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
  .my-courses-grid {
      grid-template-columns: 1fr;
      max-width: 100%;
  }

  .my-course-card {
    flex-direction: column;
    height: auto;
  }
  
  .my-course-media {
    width: 100%;
    min-width: 100%;
    height: 200px;
  }
}
/* =========================================
   PREMIUM COURSE PAGE REDESIGN
   ========================================= */
.course-main {
  padding-bottom: 4rem;
}

/* 1. Immersive Hero */
.course-hero {
  background: radial-gradient(circle at 10% 20%, rgb(255, 252, 245) 0%, rgb(255, 245, 245) 90%);
  padding: 4rem 0 6rem; /* Extra padding bottom for overlap */
  position: relative;
  overflow: hidden;
}

.course-hero__inner {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

.course-breadcrumb {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.course-hero h1 {
  font-size: 3rem;
  line-height: 1.1;
  color: var(--primary);
  margin-bottom: 1rem;
  max-width: 700px;
}

.course-hero__desc {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 650px;
  line-height: 1.6;
  margin-bottom: 2rem;
}

/* 2. Main Layout (Grid) */
.course-container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
}

.course-grid-layout {
  display: grid;
  grid-template-columns: 1fr 380px; /* Content | Sidebar */
  gap: 60px;
  margin-top: -4rem; /* Overlap hero */
}

/* Left Column */
.course-content {
  padding-right: 20px;
}

.course-tabs {
  display: flex;
  gap: 30px;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 30px;
}

.course-tab {
  padding: 12px 0;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
}

.course-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* Right Column (Sticky Pricing Card) */
.course-sidebar {
  position: relative;
}

.pricing-card {
  position: sticky;
  top: 100px;
  background: white;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255,255,255,0.5);
}

.pricing-card img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 20px;
  border: 1px solid #f1f5f9;
}

.pricing-price {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 10px;
}

.pricing-features {
  margin: 20px 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.pricing-feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

/* Mobile Responsive */
@media (max-width: 900px) {
  .course-grid-layout {
    grid-template-columns: 1fr;
    margin-top: 0;
    gap: 40px;
  }
  
  .course-hero {
    padding: 3rem 0;
  }
  
  .pricing-card {
    position: static;
    margin-top: -20px;
    z-index: 2;
  }
  
  .course-grid-layout {
      display: flex;
      flex-direction: column-reverse; /* Put content below price on mobile if desired, or keep standard */
      flex-direction: column; 
  }
}
/* =========================================
   PREMIUM CHECKOUT REDESIGN (SPLIT LAYOUT)
   ========================================= */
.checkout-page {
  background-color: #f8fafc;
  min-height: 100vh;
  padding: 2rem 0 4rem;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.checkout-layout {
  width: 100%;
  max-width: 800px; /* Reduced from 900px */
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 340px; /* Reduced right column from 380px */
  gap: 24px;
}

/* Left Panel: Summary */
.checkout-summary-panel {
  background: white;
  border-radius: 16px;
  padding: 24px; /* Reduced padding from 30px */
  border: 1px solid #e2e8f0;
  height: fit-content;
}

.checkout-course-large-thumb {
  width: 120px; /* Reduced from 140px */
  border-radius: 8px;
  margin-bottom: 16px;
  border: 1px solid #f1f5f9;
   /* No forced aspect ratio, use natural */
   height: auto;
   object-fit: cover;
   display: block; /* Ensure it respects width */
}

.checkout-course-title {
  font-size: 1.5rem; /* Reduced from 1.8rem */
  line-height: 1.2;
  color: var(--primary);
  margin-bottom: 8px;
}

.checkout-course-type {
  display: inline-block;
  background: #f1f5f9;
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 20px;
}

.checkout-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-top: 1px dashed #e2e8f0;
}

.checkout-total-price {
  font-size: 2rem; /* Reduced from 2.5rem */
  font-weight: 800;
  color: var(--primary);
}

/* Right Panel: Form */
.checkout-form-panel {
  background: white;
  border-radius: 16px;
  padding: 24px; /* Reduced padding from 32px */
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.05); /* Softer shadow */
  border: 1px solid rgba(226, 232, 240, 0.8);
  position: sticky;
  top: 100px;
  height: fit-content;
}

.checkout-form-header {
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
}

.checkout-form-header h2 {
    font-size: 1.25rem; /* Reduced from 1.5rem */
    margin: 0;
}

/* Mobile Responsive */
@media (max-width: 900px) {
  .checkout-layout {
    grid-template-columns: 1fr;
    max-width: 600px;
    gap: 24px;
  }
  
  .checkout-form-panel {
      position: static;
      box-shadow: none;
      border: 1px solid #e2e8f0;
  }
  
  .checkout-summary-panel {
      border: none;
      background: transparent;
      padding: 0;
  }
}

/* =========================================
   PREMIUM REVIEWS SYSTEM
   ========================================= */

/* Review Modal */
.review-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(10px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.review-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.review-modal {
  background: #fff;
  width: 90%;
  max-width: 500px;
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.review-modal-overlay.active .review-modal {
  transform: scale(1);
}

.star-rating-widget {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  margin: 24px 0;
  padding: 20px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px dashed #cbd5e1;
}

.stars {
  display: flex;
  gap: 12px;
}

.star {
  font-size: 2.5rem;
  color: #e2e8f0;
  cursor: pointer;
  transition: transform 0.1s, color 0.15s;
}

.star:hover {
    transform: scale(1.1);
}

.star.active,
.star.hover {
  color: #fbbf24;
  filter: drop-shadow(0 2px 4px rgba(251, 191, 36, 0.3));
}

/* Homepage Marquee */
.reviews-section {
    padding: 80px 0;
    background: linear-gradient(to bottom, #f8fafc, #ffffff);
    overflow: hidden;
    position: relative;
}

.reviews-scroll-container {
    width: 100%;
    margin-top: 40px;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.reviews-track {
    display: flex;
    gap: 32px;
    width: max-content;
    padding: 20px 0;
    animation: scroll 60s linear infinite;
}

.reviews-track:hover {
    animation-play-state: paused;
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Premium Review Card (Homepage) */
.review-card-premium {
    background: #fff;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 20px;
    padding: 28px;
    width: 380px;
    flex-shrink: 0;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02), 0 2px 4px -1px rgba(0,0,0,0.02);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.review-card-premium:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.05), 0 10px 10px -5px rgba(0,0,0,0.02);
    border-color: #cbd5e1;
}

.reviewer-info {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.reviewer-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    box-shadow: 0 4px 6px -2px rgba(59, 130, 246, 0.3);
}

.reviewer-meta h4 {
    margin: 0;
    font-size: 1rem;
    color: #0f172a;
    font-weight: 700;
}

.reviewer-meta span {
    font-size: 0.85rem;
    color: #64748b;
    display: block;
    margin-top: 2px;
}

/* Course Page Review Stats */
.rating-snapshot {
    display: flex;
    gap: 60px;
    background: #fff;
    padding: 40px;
    border-radius: 24px;
    border: 1px solid #e2e8f0;
    margin-bottom: 50px;
    flex-wrap: wrap;
    align-items: center;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.06);
}

.rating-big-score {
    text-align: center;
    min-width: 140px;
    padding-right: 40px;
    border-right: 1px solid #f1f5f9;
}

.big-rating {
    font-size: 4rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1;
    letter-spacing: -2px;
}

.big-stars {
    color: #fbbf24;
    font-size: 1.25rem;
    margin: 12px 0;
    letter-spacing: 2px;
}

.rating-bars {
    flex: 1;
    min-width: 280px;
}

.bar-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 10px;
}

.bar-label {
    width: 40px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #64748b;
}

.bar-bg {
    flex: 1;
    height: 10px;
    background: #f1f5f9;
    border-radius: 99px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: #fbbf24;
    border-radius: 99px;
}

.bar-percent {
    width: 40px;
    text-align: right;
    font-size: 0.85rem;
    color: #94a3b8;
    font-weight: 500;
}

.review-list-item {
    border-bottom: 1px solid #f1f5f9;
    padding: 30px 0;
}

.review-list-item:last-child {
    border-bottom: none;
}

