
/* Modern Marketplace Styles - Theme Aware */
:root {
  /* Using variables from modern-theme.css or local fallbacks */
  --brand: var(--primary-color, #6c5ce7);
  --brand-2: var(--info-color, #0891b2);
  --bg: var(--bg-primary, #ffffff);
  --bg-soft: var(--bg-secondary, #f6f7fb);
  --card: var(--bg-card, #ffffff);
  --muted: var(--text-muted, #64748b);
  --text: var(--text-primary, #1e293b);
  --text-soft: var(--text-secondary, #475569);
  --accent: var(--success-color, #10b981);
  --warning: var(--warning-color, #f59e0b);
  --danger: var(--danger-color, #ef4444);
  --radius: var(--border-radius-lg, 16px);
  --radius-sm: var(--border-radius-sm, 8px);
  --shadow: var(--shadow-lg, 0 10px 15px -3px rgb(0 0 0 / 0.1));
  --shadow-sm: var(--shadow-sm, 0 1px 2px 0 rgb(0 0 0 / 0.05));
  --border: 1px solid var(--border-color, #e2e8f0);
}

/* Base Styles */
.modern-header {
  border-bottom: var(--border);
  box-shadow: var(--shadow-sm);
  backdrop-filter: saturate(120%) blur(8px);
  background: var(--bg-primary);
}

.modern-header .nav-link {
  color: var(--text-soft);
}

.modern-header .nav-link.active,
.modern-header .nav-link:hover {
  color: var(--brand);
}

/* Buttons */
.btn-cta, 
.btn-modern.btn-primary {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  color: #ffffff !important;
  border: none;
  border-radius: var(--radius);
  padding: 0.8rem 1.6rem;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(var(--primary-color-rgb), 0.3);
  transition: all 0.3s ease;
}

.btn-cta:hover, 
.btn-modern.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(var(--primary-color-rgb), 0.4);
}

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

.btn-modern.btn-outline:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: rgba(var(--primary-color-rgb), 0.05);
}

/* Cards */
.card.market, 
.card.shadow-lg, 
.card.h-100,
.feature-card,
.stage-card,
.course-card {
  background: var(--card);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.card.market:hover,
.feature-card:hover,
.stage-card:hover,
.course-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

/* Badges */
.badge.free { background: var(--accent); color: #fff; }
.badge.paid { background: var(--brand); color: #fff; }

/* Payment Methods */
.payment-method {
  cursor: pointer;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 1.2rem;
  transition: all 0.2s;
  background: var(--bg-primary);
  color: var(--text);
}

.payment-method:hover {
  border-color: var(--brand);
  background: var(--bg-secondary);
}

.payment-method.active {
  border-color: var(--brand);
  background: rgba(var(--primary-color-rgb), 0.08);
}

/* Video Section */
.video-wrapper {
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

/* Lessons Sidebar */
.sidebar-lesson {
  background: var(--card);
  border-radius: var(--radius);
  height: calc(100vh - 160px);
  overflow: auto;
  border: var(--border);
}

.lesson-item {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s;
}

.lesson-item:hover {
  background: var(--bg-secondary);
}

.lesson-item a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}

.lesson-item small {
  color: var(--muted);
}

.lesson-item.bg-dark {
  background: rgba(var(--primary-color-rgb), 0.1);
}

/* Course Cards Overlay */
.course-card .course-overlay {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: all 0.3s ease;
}

.course-card:hover .course-overlay {
  opacity: 1;
}

.course-card .btn-play {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  background: #ffffff;
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  font-size: 1.2rem;
}

/* Hero Sections */
.hero-section, 
.page-hero {
  position: relative;
  isolation: isolate;
  background: var(--bg-secondary);
  border-bottom: var(--border);
}

.hero-section .hero-bg, 
.page-hero .hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: -2;
}

.hero-section .hero-overlay, 
.page-hero .hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(var(--bg-primary-rgb), 0.2), rgba(var(--bg-primary-rgb), 0.8));
  z-index: -1;
}

[data-theme="dark"] .hero-section .hero-overlay,
[data-theme="dark"] .page-hero .hero-overlay {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.2), rgba(15, 23, 42, 0.9));
}

.hero-section .hero-content h1, 
.page-hero .hero-content h1 {
  color: var(--text-primary);
  font-weight: 800;
  margin-bottom: 1.5rem;
}

.hero-section .hero-content p, 
.page-hero .hero-content p {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

/* Category Circles */
.category-circle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 2px solid var(--brand);
  color: var(--brand);
  background: var(--bg-primary);
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 1rem;
  text-align: center;
}

.category-circle:hover, 
.category-circle.active {
  background: var(--brand);
  color: #ffffff;
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(var(--primary-color-rgb), 0.3);
}

/* Footer */
.footer {
  background: var(--bg-primary);
  border-top: var(--border);
  padding: 4rem 0 2rem;
  color: var(--text-soft);
}

/* Dark mode specific fine-tuning */
[data-theme="dark"] .payment-method:not(.active) {
  background: var(--bg-secondary);
}

[data-theme="dark"] .sidebar-lesson {
  background: var(--bg-secondary);
}

[data-theme="dark"] .lesson-item:hover {
  background: var(--bg-tertiary);
}
