/* ═══════════════════════════════════════════════════════════
   Masark Theme System
   Three themes: Original, Option 1 (Vibrant VARK), Option 2 (Modern AI)
   ═══════════════════════════════════════════════════════════ */

/* ── Theme: Original (default — no overrides needed) ────── */
/* The original styling comes from landing.css and other CSS files as-is. */


/* ═══════════════════════════════════════════════════════════
   Theme: Option 1 — Vibrant VARK
   Colorful, bold, playful — all 4 VARK colors prominent
   Colors: Teal #00aca8, Pink #ed216e, Blue #087fc1, Yellow #f9b50e
   Font: Open Sans
   ═══════════════════════════════════════════════════════════ */

html[data-theme="option1"] {
  /* Brand overrides */
  --primary-start: #087fc1;
  --primary-end: #00aca8;
  --secondary-accent: #ed216e;

  /* Neutral palette */
  --bg-body: #f0f7fa;
  --bg-white: #ffffff;
  --bg-subtle: #e8f4f8;

  /* Shadows — teal-tinted */
  --shadow-glow: 0 0 40px rgba(8, 127, 193, 0.18);
  --shadow-card-hover: 0 20px 40px -12px rgba(8, 127, 193, 0.18);

  /* Portal cards */
  --portal-learner: #ed216e;
  --portal-parent: #f9b50e;
  --portal-instructor: #087fc1;
  --portal-org: #00aca8;
}

/* Navbar */
html[data-theme="option1"] .navbar {
  background: rgba(255, 255, 255, 0.95) !important;
  border-bottom: 3px solid transparent;
  border-image: linear-gradient(90deg, #00aca8, #087fc1, #ed216e, #f9b50e) 1;
}

/* Gradient text */
html[data-theme="option1"] .gradient-text {
  background: linear-gradient(135deg, #087fc1 0%, #00aca8 50%, #ed216e 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
}

/* Section labels */
html[data-theme="option1"] .section-label {
  color: #087fc1;
  background: linear-gradient(135deg, rgba(8, 127, 193, 0.1), rgba(0, 172, 168, 0.1));
  border-color: rgba(8, 127, 193, 0.2);
}

/* Primary button */
html[data-theme="option1"] .btn-primary {
  background: linear-gradient(135deg, #087fc1, #00aca8) !important;
}

html[data-theme="option1"] .btn-primary:hover {
  box-shadow: 0 8px 24px rgba(8, 127, 193, 0.35) !important;
}

/* Secondary/outline button */
html[data-theme="option1"] .btn-outline {
  border-color: #087fc1 !important;
  color: #087fc1 !important;
}

html[data-theme="option1"] .btn-outline:hover {
  background: rgba(8, 127, 193, 0.08) !important;
}

/* Hero decoration */
html[data-theme="option1"] .hero-decor-blob {
  background: radial-gradient(circle, rgba(8, 127, 193, 0.12) 0%, rgba(0, 172, 168, 0.06) 60%, transparent 70%) !important;
}

/* VARK cards — brighter borders */
html[data-theme="option1"] .vark-card {
  border-width: 2px !important;
}

/* Portal cards hover glow */
html[data-theme="option1"] .portal-card:hover {
  transform: translateY(-6px);
}

/* Feature cards */
html[data-theme="option1"] .feature-card:hover {
  border-color: rgba(8, 127, 193, 0.3) !important;
}

/* CTA section */
html[data-theme="option1"] .cta-section {
  background: linear-gradient(135deg, #087fc1 0%, #00aca8 50%, #087fc1 100%) !important;
}

/* Footer */
html[data-theme="option1"] .footer a:hover {
  color: #00aca8 !important;
}

/* Scrollbar accent */
html[data-theme="option1"] ::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #087fc1, #00aca8);
}

/* Student / Teacher / Learner / Parent home pages */
html[data-theme="option1"] .hub-stat-value {
  color: #087fc1 !important;
}

html[data-theme="option1"] .hub-nav-card:hover {
  border-color: rgba(8, 127, 193, 0.3) !important;
  box-shadow: 0 8px 24px rgba(8, 127, 193, 0.12) !important;
}

/* Auth pages */
html[data-theme="option1"] .auth-card {
  border-top: 3px solid #087fc1 !important;
}

html[data-theme="option1"] .auth-btn {
  background: linear-gradient(135deg, #087fc1, #00aca8) !important;
}

html[data-theme="option1"] .auth-btn:hover {
  box-shadow: 0 8px 24px rgba(8, 127, 193, 0.3) !important;
}

/* Admin panel overrides */
html[data-theme="option1"] .admin-sidebar-item:hover {
  background: rgba(8, 127, 193, 0.08) !important;
}

html[data-theme="option1"] .admin-sidebar-item.active {
  background: rgba(8, 127, 193, 0.15) !important;
  color: #087fc1 !important;
}

html[data-theme="option1"] .admin-sidebar-count {
  background: rgba(8, 127, 193, 0.12) !important;
  color: #087fc1 !important;
}

html[data-theme="option1"] .stat-card:hover {
  border-color: rgba(8, 127, 193, 0.3) !important;
}

html[data-theme="option1"] .admin-search:focus {
  border-color: rgba(8, 127, 193, 0.5) !important;
  box-shadow: 0 0 0 3px rgba(8, 127, 193, 0.08) !important;
}

html[data-theme="option1"] .admin-breadcrumbs a:hover {
  color: #087fc1 !important;
}

html[data-theme="option1"] .settings-btn-primary {
  background: linear-gradient(135deg, #087fc1, #00aca8) !important;
}

html[data-theme="option1"] .settings-btn-primary:hover {
  box-shadow: 0 4px 16px rgba(8, 127, 193, 0.3) !important;
}

/* Admin accent bar */
html[data-theme="option1"] header + .h-0\.5 > div:nth-child(1) {
  background: linear-gradient(to right, #00aca8, #087fc1) !important;
}
html[data-theme="option1"] header + .h-0\.5 > div:nth-child(2) {
  background: linear-gradient(to right, #087fc1, #ed216e) !important;
}
html[data-theme="option1"] header + .h-0\.5 > div:nth-child(3) {
  background: linear-gradient(to right, #ed216e, #f9b50e) !important;
}

/* Admin spinner */
html[data-theme="option1"] .animate-spin {
  border-color: #087fc1 !important;
  border-top-color: transparent !important;
}

/* Admin header back/logout buttons */
html[data-theme="option1"] #header-right a:hover {
  background: rgba(8, 127, 193, 0.1) !important;
  color: #087fc1 !important;
  border-color: rgba(8, 127, 193, 0.3) !important;
}

/* Admin background blobs */
html[data-theme="option1"] .fixed.inset-0 > div:first-child {
  background: rgba(8, 127, 193, 0.1) !important;
}
html[data-theme="option1"] .fixed.inset-0 > div:last-child {
  background: rgba(0, 172, 168, 0.1) !important;
}

/* Status badges */
html[data-theme="option1"] .status-generating {
  background: rgba(237, 33, 110, 0.2);
  color: #ed216e;
}

html[data-theme="option1"] .status-ready {
  background: rgba(0, 172, 168, 0.2);
  color: #00aca8;
}

html[data-theme="option1"] .status-published {
  background: rgba(8, 127, 193, 0.2);
  color: #087fc1;
}


/* ═══════════════════════════════════════════════════════════
   Theme: Option 2 — Modern AI
   Elegant gradient, book+star logo, pink-blue gradient focus
   Primary gradient: Pink #ed216e → Blue #087fc1
   Secondary: Teal #00aca8, Yellow #f9b50e
   ═══════════════════════════════════════════════════════════ */

html[data-theme="option2"] {
  /* Brand overrides */
  --primary-start: #ed216e;
  --primary-end: #087fc1;
  --secondary-accent: #00aca8;

  /* Neutral palette — warm tint */
  --bg-body: #faf8fc;
  --bg-white: #ffffff;
  --bg-subtle: #f5f0fa;

  /* Shadows — pink-tinted */
  --shadow-glow: 0 0 40px rgba(237, 33, 110, 0.14);
  --shadow-card-hover: 0 20px 40px -12px rgba(237, 33, 110, 0.15);

  /* Portal cards */
  --portal-learner: #ed216e;
  --portal-parent: #f9b50e;
  --portal-instructor: #087fc1;
  --portal-org: #00aca8;
}

/* Navbar */
html[data-theme="option2"] .navbar {
  background: rgba(255, 255, 255, 0.95) !important;
  border-bottom: 3px solid transparent;
  border-image: linear-gradient(90deg, #ed216e, #087fc1, #00aca8, #f9b50e) 1;
}

/* Gradient text */
html[data-theme="option2"] .gradient-text {
  background: linear-gradient(135deg, #ed216e 0%, #087fc1 50%, #00aca8 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
}

/* Section labels */
html[data-theme="option2"] .section-label {
  color: #ed216e;
  background: linear-gradient(135deg, rgba(237, 33, 110, 0.08), rgba(8, 127, 193, 0.08));
  border-color: rgba(237, 33, 110, 0.18);
}

/* Primary button */
html[data-theme="option2"] .btn-primary {
  background: linear-gradient(135deg, #ed216e, #087fc1) !important;
}

html[data-theme="option2"] .btn-primary:hover {
  box-shadow: 0 8px 24px rgba(237, 33, 110, 0.3) !important;
}

/* Secondary/outline button */
html[data-theme="option2"] .btn-outline {
  border-color: #ed216e !important;
  color: #ed216e !important;
}

html[data-theme="option2"] .btn-outline:hover {
  background: rgba(237, 33, 110, 0.06) !important;
}

/* Hero decoration */
html[data-theme="option2"] .hero-decor-blob {
  background: radial-gradient(circle, rgba(237, 33, 110, 0.1) 0%, rgba(8, 127, 193, 0.06) 60%, transparent 70%) !important;
}

/* Feature cards */
html[data-theme="option2"] .feature-card:hover {
  border-color: rgba(237, 33, 110, 0.25) !important;
}

/* CTA section */
html[data-theme="option2"] .cta-section {
  background: linear-gradient(135deg, #ed216e 0%, #087fc1 50%, #00aca8 100%) !important;
}

/* Footer */
html[data-theme="option2"] .footer a:hover {
  color: #ed216e !important;
}

/* Scrollbar accent */
html[data-theme="option2"] ::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #ed216e, #087fc1);
}

/* Student / Teacher / Learner / Parent home pages */
html[data-theme="option2"] .hub-stat-value {
  color: #ed216e !important;
}

html[data-theme="option2"] .hub-nav-card:hover {
  border-color: rgba(237, 33, 110, 0.25) !important;
  box-shadow: 0 8px 24px rgba(237, 33, 110, 0.1) !important;
}

/* Auth pages */
html[data-theme="option2"] .auth-card {
  border-top: 3px solid #ed216e !important;
}

html[data-theme="option2"] .auth-btn {
  background: linear-gradient(135deg, #ed216e, #087fc1) !important;
}

html[data-theme="option2"] .auth-btn:hover {
  box-shadow: 0 8px 24px rgba(237, 33, 110, 0.25) !important;
}

/* Admin panel overrides */
html[data-theme="option2"] .admin-sidebar-item:hover {
  background: rgba(237, 33, 110, 0.06) !important;
}

html[data-theme="option2"] .admin-sidebar-item.active {
  background: rgba(237, 33, 110, 0.12) !important;
  color: #ed216e !important;
}

html[data-theme="option2"] .admin-sidebar-count {
  background: rgba(237, 33, 110, 0.1) !important;
  color: #ed216e !important;
}

html[data-theme="option2"] .stat-card:hover {
  border-color: rgba(237, 33, 110, 0.25) !important;
}

html[data-theme="option2"] .admin-search:focus {
  border-color: rgba(237, 33, 110, 0.4) !important;
  box-shadow: 0 0 0 3px rgba(237, 33, 110, 0.06) !important;
}

html[data-theme="option2"] .admin-breadcrumbs a:hover {
  color: #ed216e !important;
}

html[data-theme="option2"] .settings-btn-primary {
  background: linear-gradient(135deg, #ed216e, #087fc1) !important;
}

html[data-theme="option2"] .settings-btn-primary:hover {
  box-shadow: 0 4px 16px rgba(237, 33, 110, 0.25) !important;
}

/* Admin accent bar */
html[data-theme="option2"] header + .h-0\.5 > div:nth-child(1) {
  background: linear-gradient(to right, #ed216e, #c91a5e) !important;
}
html[data-theme="option2"] header + .h-0\.5 > div:nth-child(2) {
  background: linear-gradient(to right, #c91a5e, #087fc1) !important;
}
html[data-theme="option2"] header + .h-0\.5 > div:nth-child(3) {
  background: linear-gradient(to right, #087fc1, #00aca8) !important;
}

/* Admin spinner */
html[data-theme="option2"] .animate-spin {
  border-color: #ed216e !important;
  border-top-color: transparent !important;
}

/* Admin header back/logout buttons */
html[data-theme="option2"] #header-right a:hover {
  background: rgba(237, 33, 110, 0.08) !important;
  color: #ed216e !important;
  border-color: rgba(237, 33, 110, 0.25) !important;
}

/* Admin background blobs */
html[data-theme="option2"] .fixed.inset-0 > div:first-child {
  background: rgba(237, 33, 110, 0.08) !important;
}
html[data-theme="option2"] .fixed.inset-0 > div:last-child {
  background: rgba(8, 127, 193, 0.08) !important;
}


/* ═══════════════════════════════════════════════════════════
   Theme Selector UI (Admin Settings)
   ═══════════════════════════════════════════════════════════ */

.theme-selector-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 0.75rem;
}

.theme-card {
  border: 2px solid var(--border-color, rgba(255,255,255,0.1));
  border-radius: 0.75rem;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.25s ease;
  background: var(--bg-glass, rgba(255,255,255,0.05));
}

.theme-card:hover {
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.theme-card.active {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2), 0 8px 24px rgba(0, 0, 0, 0.2);
}

.theme-card-preview {
  height: 120px;
  position: relative;
  overflow: hidden;
}

/* Original theme preview */
.theme-preview-original {
  background: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 100%);
}
.theme-preview-original::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #f59e0b, #f97316, #eab308);
}
.theme-preview-original::after {
  content: 'Masark';
  position: absolute;
  top: 20px; left: 16px;
  font-size: 14px;
  font-weight: 700;
  color: #e2e8f0;
  font-family: 'Open Sans', sans-serif;
}
.theme-preview-original .preview-dots {
  position: absolute;
  bottom: 16px; left: 16px; right: 16px;
  display: flex;
  gap: 6px;
}
.theme-preview-original .preview-dot {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}

/* Option 1 theme preview */
.theme-preview-option1 {
  background: linear-gradient(135deg, #f0f7fa 0%, #e8f4f8 100%);
}
.theme-preview-option1::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #00aca8, #087fc1, #ed216e, #f9b50e);
}
.theme-preview-option1::after {
  content: 'MASARK';
  position: absolute;
  top: 20px; left: 16px;
  font-size: 14px;
  font-weight: 800;
  color: #1a1a2e;
  font-family: 'Open Sans', sans-serif;
  letter-spacing: 1px;
}
.theme-preview-option1 .preview-dots {
  position: absolute;
  bottom: 16px; left: 16px; right: 16px;
  display: flex;
  gap: 6px;
}

/* Option 2 theme preview */
.theme-preview-option2 {
  background: linear-gradient(135deg, #faf8fc 0%, #f5f0fa 100%);
}
.theme-preview-option2::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #ed216e, #087fc1, #00aca8, #f9b50e);
}
.theme-preview-option2::after {
  content: 'Masark';
  position: absolute;
  top: 20px; left: 16px;
  font-size: 14px;
  font-weight: 700;
  color: #1a1a2e;
  font-family: 'Open Sans', sans-serif;
}
.theme-preview-option2 .preview-dots {
  position: absolute;
  bottom: 16px; left: 16px; right: 16px;
  display: flex;
  gap: 6px;
}

.preview-dot {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}

.theme-card-info {
  padding: 0.875rem 1rem;
}

.theme-card-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary, #e2e8f0);
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.theme-card-name .active-badge {
  font-size: 0.625rem;
  font-weight: 600;
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
}

.theme-card-desc {
  font-size: 0.75rem;
  color: var(--text-secondary, #94a3b8);
  line-height: 1.4;
}

@media (max-width: 768px) {
  .theme-selector-grid {
    grid-template-columns: 1fr;
  }
}
