
@font-face {
    font-family: 'KFGQPC Uthmanic Script HAFS';
    src: url('https://cdn.jsdelivr.net/gh/mustafa0x/qpc-fonts@f93bf5f3/various-woff2/UthmanicHafs1%20Ver18.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Amiri:wght@400;700&display=swap');

:root {
  /* Colors - CeriaKid Vibrant Style */
  /* Primary: Purple (Fun, Gamified) */
  --primary: #9333ea;
  --primary-dark: #7e22ce;
  --primary-light: #f3e8ff;
  
  /* Secondary: Bright Cyan/Blue (Friendly, Sky) */
  --secondary: #0ea5e9;
  --secondary-light: #e0f2fe;
  
  /* Accent: Sunny Yellow */
  --accent: #facc15;
  --accent-light: #fef08a;
  
  --success: #10b981;
  --danger: #ef4444;

  /* Backgrounds */
  --bg-color: #f0f9ff;
  --surface: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.75);

  /* Typography Colors */
  --text-main: #334155;
  --text-muted: #64748b;

  --border: rgba(255, 255, 255, 0.6);

  /* Arabic Font */
  --font-arabic: 'Amiri', serif;

  /* 3D Tactile Shadows (Pop Out Effect) */
  --shadow-sm: 0 4px 0 rgba(0, 0, 0, 0.08);
  --shadow-md: 0 6px 0 rgba(0, 0, 0, 0.12), 0 2px 5px rgba(0,0,0,0.05);
  --shadow-lg: 0 8px 0 rgba(0, 0, 0, 0.15), 0 4px 10px rgba(0,0,0,0.05);
  --shadow-glass: 0 8px 0 rgba(147, 51, 234, 0.15), inset 0 3px 0 rgba(255, 255, 255, 1);

  /* Rounded Radii for Kids Look */
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Smooth Transitions */
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--bg-color);
  
  background-size: cover;
  background-position: center;
  /* background-attachment: fixed; removed */
  color: var(--text-main);
  line-height: 1.6;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Hide scrollbar for Chrome, Safari and Opera */
html::-webkit-scrollbar, body::-webkit-scrollbar, *::-webkit-scrollbar {
  display: none;
}

/* Background Gradients & Shapes (Scenic Hills & Rainbow) */
.bg-shapes { display: none; }

.bg-shape {
  position: absolute;
}

.shape-1 {
  bottom: -20vh;
  left: -10vw;
  width: 70vw;
  height: 50vh;
  background: linear-gradient(180deg, #a3e635 0%, #65a30d 100%);
  border-radius: 50%;
  filter: blur(8px);
  opacity: 0.9;
}

.shape-2 {
  bottom: -25vh;
  right: -5vw;
  width: 80vw;
  height: 60vh;
  background: linear-gradient(180deg, #84cc16 0%, #4d7c0f 100%);
  border-radius: 50%;
  filter: blur(10px);
  opacity: 0.8;
}

/* Add a rainbow arc via an extra shape if desired */
.bg-shapes::before {
  content: '';
  position: absolute;
  top: 15vh;
  left: 50%;
  transform: translateX(-50%);
  width: 120vw;
  height: 120vw;
  border-radius: 50%;
  background: transparent;
  box-shadow: 
    inset 0 0 0 15px rgba(239, 68, 68, 0.25), 
    inset 0 0 0 30px rgba(249, 115, 22, 0.25), 
    inset 0 0 0 45px rgba(250, 204, 21, 0.25), 
    inset 0 0 0 60px rgba(34, 197, 94, 0.25), 
    inset 0 0 0 75px rgba(56, 189, 248, 0.25);
  filter: blur(6px);
  opacity: 0.6;
}


/* Utilities */
.dashboard-layout .glass-panel {
  background: var(--surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 2px solid rgba(255, 255, 255, 0.6);
  box-shadow: var(--shadow-glass);
  border-radius: var(--radius-xl);
}

/* Micro-interactions */
.hover-scale {
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease;
}
.hover-scale:hover {
  transform: translateY(-4px) scale(1.02);
}

.dashboard-layout .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid rgba(255, 255, 255, 0.3);
  outline: none;
  background: white;
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
  transform: translateY(0);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.dashboard-layout .btn:active {
  transform: translateY(4px) !important; /* Push down to shadow depth */
  box-shadow: 0 0 0 rgba(0,0,0,0) !important;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  box-shadow: 0 5px 0 var(--primary-dark), inset 0 2px 0 rgba(255,255,255,0.4);
  border: none;
}

.btn-primary:hover {
  box-shadow: 0 7px 0 var(--primary-dark), inset 0 2px 0 rgba(255,255,255,0.4);
  transform: translateY(-2px);
}

/* App Container */
#app {
  width: 100%;
  height: 100vh;
  display: flex;
}

/* --- Views --- */
.view {
  display: none;
  width: 100%;
  height: 100%;
}

.view.active {
  display: flex;
  animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

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

/* --- Login View --- */
#login-view {
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.login-container {
  width: 100%;
  max-width: 450px;
  padding: 3rem 2rem;
  text-align: center;
  position: relative;
  box-shadow: 0 15px 35px rgba(0,0,0,0.1), 0 0 25px rgba(184, 134, 11, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.logo-wrapper {
  margin-bottom: 2rem;
}

.logo-icon {
  font-size: 3.5rem;
  background: -webkit-linear-gradient(135deg, var(--primary), var(--secondary));
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  margin-bottom: 1rem;
}


.login-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.login-subtitle {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
  text-align: left;
}

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-main);
  font-size: 0.9rem;
}

.form-input {
  width: 100%;
  padding: 0.875rem 1.25rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.8);
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-light);
  outline: none;
}

.role-selector {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.role-btn {
  padding: 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: white;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--text-muted);
}

.role-btn.selected {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary-dark);
}

.role-btn i {
  font-size: 1.5rem;
}

/* --- Dashboard Layout --- */

.dashboard-layout {
  background-image: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1)), url('https://res.cloudinary.com/db48wsxex/image/upload/v1784002287/photo_2026-07-14_12-09-55_atd0la.jpg');
  background-size: cover;
  background-position: center;
  /* background-attachment: fixed; removed */
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

/* Sidebar */
.dashboard-layout .sidebar {
  width: 240px;
  background: var(--surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-right: 1px solid rgba(255, 255, 255, 0.5);
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1rem;
  transition: var(--transition);
  z-index: 10;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(20px);
  border-right: 2px solid rgba(255, 255, 255, 0.6);
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
}

.sidebar-header .logo-icon {
  font-size: 2rem;
  margin: 0;
}

.sidebar-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
}

.nav-links {
  list-style: none;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  overflow-y: auto;
  overflow-x: hidden;
  margin-bottom: 1rem;
}

/* Custom scrollbar for nav links if needed */
.nav-links::-webkit-scrollbar {
  width: 4px;
}
.nav-links::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 0.8rem;
  margin-bottom: 0.5rem;
  border-radius: var(--radius-full);
  color: var(--text-main);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  white-space: normal;
  line-height: 1.2;
  transition: var(--transition);
  cursor: pointer;
  background: white;
  border: 2px solid rgba(255, 255, 255, 0.5);
  box-shadow: var(--shadow-sm);
  transform: translateY(0);
}

.nav-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(255, 255, 255, 0.9);
}

.nav-item.active {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 0 var(--primary-dark), inset 0 2px 0 rgba(255,255,255,0.4);
}

.nav-item.active:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 transparent;
}

.nav-special:not(.active) {
  background: linear-gradient(135deg, var(--accent), #f59e0b);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 0 #d97706, inset 0 2px 0 rgba(255,255,255,0.4);
}
.nav-special:not(.active):active {
  transform: translateY(4px);
  box-shadow: 0 0 0 transparent;
}
.nav-special:not(.active) i {
  color: white !important;
}

.nav-item i {
  font-size: 1.25rem;
  width: 24px;
  text-align: center;
}

.sidebar-footer {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-dark);
  font-weight: 700;
}

.user-info h4 {
  font-size: 0.9rem;
  font-weight: 600;
}

.user-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.logout-btn {
  margin-left: auto;
  color: var(--danger);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--radius-md);
}

.logout-btn:hover {
  background: #fee2e2;
}

/* Main Content Area */
.main-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  position: relative;
}

.topbar {
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: rgba(248, 250, 252, 0.8);
  backdrop-filter: blur(12px);
  z-index: 5;
}

.page-title {
  font-size: 1.5rem;
  font-weight: 700;
}

.topbar-actions {
  display: flex;
  gap: 1rem;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.icon-btn:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--danger);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.content-wrapper {
  padding: 0 2rem 2rem;
  max-width: 1200px;
  margin: 0 auto 3rem auto;
  width: 100%;
}

/* Dashboard Cards/Widgets */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.stat-icon {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-lg);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
}

.stat-card.blue {
  background: linear-gradient(135deg, #0ea5e9, #38bdf8);
  border: 2px solid #7dd3fc;
  box-shadow: 0 6px 0 #0284c7, inset 0 3px 0 rgba(255,255,255,0.4);
  color: white;
}
.stat-card.blue .stat-icon {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.4);
}
.stat-card.blue h3, .stat-card.blue p {
  color: white !important;
}

.stat-card.purple {
  background: linear-gradient(135deg, #a855f7, #c084fc);
  border: 2px solid #d8b4fe;
  box-shadow: 0 6px 0 #7e22ce, inset 0 3px 0 rgba(255,255,255,0.4);
  color: white;
}
.stat-card.purple .stat-icon {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.4);
}
.stat-card.purple h3, .stat-card.purple p {
  color: white !important;
}

.stat-card.gold {
  background: linear-gradient(135deg, #facc15, #fde047);
  border: 2px solid #fef08a;
  box-shadow: 0 6px 0 #ca8a04, inset 0 3px 0 rgba(255,255,255,0.4);
  color: white;
}
.stat-card.gold .stat-icon {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.4);
}
.stat-card.gold h3, .stat-card.gold p {
  color: white !important;
}

.stat-card.green {
  background: linear-gradient(135deg, #10b981, #34d399);
  border: 2px solid #6ee7b7;
  box-shadow: 0 6px 0 #059669, inset 0 3px 0 rgba(255,255,255,0.4);
  color: white;
}
.stat-card.green .stat-icon {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.4);
}
.stat-card.green h3, .stat-card.green p {
  color: white !important;
}

.stat-info h3 {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.stat-info p {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1;
}

.quran-verse {
  font-family: var(--font-arabic);
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 2.5;
  color: #111;
  text-align: right;
  flex: 1;
  direction: rtl;
}

/* Phase 8: Tajweed Colors */
.tajweed-ghunnah {
  color: #ef4444; /* Red for Dengung/Ghunnah */
  font-weight: 700;
}
.tajweed-qalqalah {
  color: #3b82f6; /* Blue for Qalqalah */
  font-weight: 700;
}

.dashboard-layout .card {
  background: var(--surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-glass);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
}
.dashboard-layout .card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.card-title {
  font-size: 1.2rem;
  font-weight: 700;
}

.mobile-only {
  display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
  .mobile-only {
    display: flex !important;
  }

  .sidebar {
    position: fixed;
    left: -100%;
    height: 100vh;
    z-index: 2000;
  }

  .sidebar.open {
    left: 0;
  }
  
  /* Mobile Overlay */
  .sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    z-index: 1999;
  }
  
  .sidebar-overlay.active {
    display: block;
  }

  .content-wrapper {
    padding: 0 1rem 1rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Avatar Profile Box --- */
.profile-box {
  margin-bottom: 1.5rem; 
  text-align: center; 
  border: 2px solid #7dd3fc; 
  background: linear-gradient(180deg, #e0f2fe 0%, #ffffff 100%);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: 0 4px 0 #38bdf8;
}

.main-avatar-display {
  width: 100px; 
  height: 100px; 
  background: var(--primary-light); 
  color: var(--primary-dark); 
  border-radius: 50%; 
  display: inline-flex; 
  align-items: center; 
  justify-content: center; 
  font-size: 3rem; 
  font-weight: 800; 
  margin-bottom: 1rem; 
  border: 4px solid white; 
  box-shadow: var(--shadow-md); 
  transition: 0.3s; 
  cursor: pointer; 
  position: relative;
}

.main-avatar-display:hover {
  transform: scale(1.05);
}

.avatar-camera-icon {
  position: absolute; 
  bottom: 0; 
  right: 0; 
  background: var(--primary); 
  color: white; 
  border-radius: 50%; 
  width: 28px; 
  height: 28px; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  font-size: 1.2rem; 
  border: 3px solid white;
}

/* --- Settings View --- */
.settings-container {
  display: flex;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  min-height: 500px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.settings-sidebar {
  width: 250px;
  background: var(--bg-main);
  border-right: 1px solid var(--border);
  padding: 1.5rem 0;
}

.settings-title {
  padding: 0 1.5rem;
  margin-bottom: 1rem;
  font-size: 1.1rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.settings-menu {
  list-style: none;
}

.settings-menu-item {
  padding: 1rem 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--text-main);
  font-weight: 500;
  transition: all 0.3s;
  border-left: 4px solid transparent;
}

.settings-menu-item:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.settings-menu-item.active {
  background: var(--primary-light);
  color: var(--primary);
  border-left-color: var(--primary);
}

.settings-content {
  flex: 1;
  padding: 2.5rem;
  background: white;
}

.settings-tab-pane {
  display: none;
  animation: fadeIn 0.3s ease;
}

.settings-tab-pane.active {
  display: block;
}

.settings-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.settings-desc h4 {
  margin-bottom: 0.2rem;
  color: var(--text-main);
}

.settings-desc p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Toggle Switch (iOS style) */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-switch .slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: .4s;
  border-radius: 34px;
}

.toggle-switch .slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .slider {
  background-color: var(--primary);
}

.toggle-switch input:checked + .slider:before {
  transform: translateX(22px);
}

.toggle-switch input:disabled + .slider {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Mobile Settings Responsive */
@media (max-width: 768px) {
  .settings-container {
    flex-direction: column;
  }
  .settings-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .settings-content {
    padding: 1.5rem;
  }
}

/* --- Activity Timeline --- */
.activity-timeline {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: relative;
  padding-left: 1.5rem;
}

.activity-timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 5px;
  width: 2px;
  background: var(--border);
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  background: var(--bg-main);
  padding: 1rem 1.2rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.timeline-item::before {
  content: '';
  position: absolute;
  top: 1.2rem;
  left: -1.5rem;
  width: 12px;
  height: 12px;
  background: white;
  border: 2px solid var(--primary);
  border-radius: 50%;
  transform: translateX(-50%);
  z-index: 1;
}

.timeline-item.success::before {
  border-color: var(--success);
}
.timeline-item.warning::before {
  border-color: #f59e0b;
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.timeline-title {
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.timeline-time {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.timeline-desc {
  font-size: 0.9rem;
  color: var(--text-light);
}

/* --- Card Utilities --- */
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

/* --- Landing View --- */

#landing-view {
  overflow-y: auto;
  overflow-x: hidden;
  background-image: url('https://res.cloudinary.com/db48wsxex/image/upload/v1784002288/photo_2026-07-14_12-09-51_jbqyqa.jpg');
  background-size: cover;
  background-position: center top;
  /* background-attachment: fixed; removed */
}
.landing-container {
  max-width: 1200px;
  margin: 0 auto 3rem auto;
  width: 100%;
  padding-top: 1rem;
}
.landing-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  border-radius: var(--radius-full);
  margin-bottom: 4rem;
}
.logo-wrapper-small {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.logo-icon-small {
  font-size: 1.8rem;
  color: var(--primary);
}
.floating-card i {
  font-size: 2rem;
  color: var(--primary);
}

/* Phase 9: Mobile UI Polish & Responsive Layouts */
@media (max-width: 992px) {
  .hero-section {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
    margin-top: 2rem;
  }
  .hero-subtitle {
    margin: 0 auto 2rem;
  }
  .hero-actions {
    justify-content: center;
  }
  .hero-visual {
    width: 100%;
    justify-content: center !important;
  }
}


.logo-text {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
}
.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary-dark);
}
.btn-outline:hover {
  background: var(--primary-light);
}

.hero-section {
  display: flex;
  align-items: flex-start;
  gap: 4rem;
  min-height: 70vh;
  flex-wrap: wrap;
}
.hero-content, .hero-visual {
  min-width: 350px;
}
.hero-content {
  flex: 1;
}
.badge-pill {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--primary-light);
  color: var(--primary-dark);
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
}
.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  background: -webkit-linear-gradient(135deg, var(--text-main), var(--primary-dark));
  background: linear-gradient(135deg, var(--text-main), var(--primary-dark));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  max-width: 500px;
}
.hero-actions {
  display: flex;
  gap: 1rem;
}
.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.1rem;
}
.btn-glass {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  color: var(--text-main);
  cursor: pointer;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  transition: var(--transition);
}
.btn-glass:hover {
  background: rgba(255, 255, 255, 0.8);
}

.hero-visual {
  flex: 1;
  position: relative;
  display: flex;
  justify-content: center;
  margin: auto 0;
}
.hero-circle {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 20px 40px rgba(139, 92, 246, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: float 6s ease-in-out infinite;
}
.hero-circle i {
  font-size: 8rem;
  color: white;
}
.floating-card {
  position: absolute;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  animation: float 4s ease-in-out infinite alternate;
}
.card-1 { top: 10%; left: 0; animation-delay: 0s; }
.card-2 { bottom: 15%; right: 10%; animation-delay: -1s; }
.card-3 { bottom: 30%; left: 10%; animation-delay: -2s; }

.floating-card i {
  font-size: 2rem;
  background: white;
  padding: 0.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.text-gold { color: var(--accent); }
.text-primary { color: var(--primary); }
.text-purple { color: var(--secondary); }
.floating-card h4 { font-size: 0.9rem; font-weight: 700; color: var(--text-main); }
.floating-card p { font-size: 0.8rem; color: var(--text-muted); }

@keyframes float {
  0% { transform: translateY(0px); }
  100% { transform: translateY(-20px); }
}

@media (max-width: 992px) {
  .hero-section { flex-direction: column; text-align: center; }
  .hero-subtitle { margin: 0 auto 2.5rem; }
  .hero-actions { justify-content: center; }
  .floating-card { display: none; }
}

/* --- Quran Module Styles --- */
.surah-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  padding-bottom: 2rem;
}
.surah-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
  overflow: hidden;
}
.surah-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}
.surah-number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.surah-info {
  flex: 1;
}
.surah-name-rumi {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-main);
  margin-bottom: 0.2rem;
}
.surah-translate {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.surah-name-arab {
  font-family: var(--font-arabic);
  font-size: 1.5rem;
  color: var(--primary);
  text-align: right;
}
.surah-card.locked {
  opacity: 0.6;
  filter: grayscale(100%);
  cursor: not-allowed;
}
.surah-card.locked:hover {
  transform: none;
  box-shadow: var(--shadow-sm);
  border-color: var(--border);
}

/* Detail View */
.detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  margin-bottom: 2rem;
}

.verses-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.verse-item {
  background: white;
  border-radius: var(--radius-xl);
  padding: 2rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: var(--transition);
}
.verse-item.active-play {
  border-color: var(--primary);
  background: var(--primary-light);
}
.verse-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  border-bottom: 1px dashed var(--border);
  padding-bottom: 1rem;
}
.verse-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--secondary-light);
  color: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.verse-actions {
  display: flex;
  gap: 0.5rem;
}
.verse-arab {
  font-family: var(--font-arabic);
  font-size: 2.5rem;
  text-align: right;
  line-height: 2;
  color: var(--text-main);
  margin-bottom: 1.5rem;
  direction: rtl;
}
.verse-terjemahan {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ================== MUSHAF VIEW (FASA 11) ================== */
.mushaf-block {
  background-color: #fdfbf7; /* Warm ivory paper color */
  background-image: 
    linear-gradient(rgba(212, 175, 55, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212, 175, 55, 0.03) 1px, transparent 1px);
  background-size: 20px 20px;
  border-radius: 8px;
  padding: 4.5rem 3rem;
  
  /* Classic Islamic frame using multiple box-shadow layers */
  border: 2px solid #D4AF37; /* Metallic Gold */
  box-shadow: 
    0 0 0 8px #0f172a, /* Deep Navy Blue */
    0 0 0 10px #D4AF37, /* Gold outline */
    inset 0 0 0 6px #0f172a, /* Inner Navy Blue */
    inset 0 0 0 8px #D4AF37, /* Inner Gold outline */
    0 25px 50px -12px rgba(0,0,0,0.3), /* Heavy realistic shadow */
    inset 0 0 100px rgba(212, 175, 55, 0.12); /* Soft gold inner glow */
    
  text-align: center;
  line-height: 2.8;
  max-width: 900px;
  margin: 25px auto;
  position: relative;
}

/* Corner Ornaments (Top-Left & Bottom-Right) */
.mushaf-block::before,
.mushaf-block::after {
  content: "❀";
  position: absolute;
  font-size: 1.8rem;
  color: #D4AF37;
  line-height: 1;
  pointer-events: none;
}

.mushaf-block::before {
  top: 13px;
  left: 13px;
}

.mushaf-block::after {
  bottom: 13px;
  right: 13px;
}

.basmalah-header {
  font-family: var(--font-arabic);
  font-size: 2.4rem;
  color: #0f172a;
  margin-bottom: 2rem;
  display: block;
}

.mushaf-verse {
  font-family: var(--font-arabic);
  font-size: 2.5rem;
  color: #0f172a; /* Dark navy text like classic ink */
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
  padding: 0 0.3rem;
  border-radius: 8px;
}

.mushaf-verse:hover {
  background: rgba(212, 175, 55, 0.15); /* Soft gold hover */
}

.mushaf-verse.verse-active {
  background: var(--primary);
  color: white;
}

.mushaf-verse.verse-active .ayah-end-marker {
  color: white;
}

.ayah-end-marker {
  font-family: Arial, sans-serif; /* Fallback for circle if needed, though Amiri handles it */
  font-size: 1.8rem;
  color: var(--primary);
  margin: 0 0.5rem;
  display: inline-block;
  vertical-align: middle;
}

.btn-mark-read {
  background: none;
  border: none;
  color: #cbd5e1;
  font-size: 1.5rem;
  cursor: pointer;
  margin: 0 0.25rem;
  transition: var(--transition);
  vertical-align: middle;
}
.btn-mark-read:hover {
  color: var(--success);
  transform: scale(1.1);
}
.btn-mark-read.read {
  color: var(--success);
}
.mushaf-verse.verse-read {
  background: rgba(16, 185, 129, 0.1);
  border-radius: 8px;
  padding: 2px 4px;
}

/* --- Tajweed Colors --- */
.tajweed-color {
  transition: background-color 0.2s;
  border-radius: 4px;
}
.tajweed-active .tajweed-c, 
.tajweed-active .tajweed-i, 
.tajweed-active .tajweed-w, 
.tajweed-active .tajweed-g { color: #ef4444; } /* Merah (Dengung) */

.tajweed-active .tajweed-q { color: #3b82f6; } /* Biru (Lantunan) */

.tajweed-active .tajweed-m, 
.tajweed-active .tajweed-p, 
.tajweed-active .tajweed-o { color: #10b981; } /* Hijau (Panjang) */

.tajweed-active .tajweed-a, 
.tajweed-active .tajweed-l, 
.tajweed-active .tajweed-h, 
.tajweed-active .tajweed-s { color: #9ca3af; } /* Kelabu (Gugur) */

/* Apabila ayat aktif (di-klik/main), override warna supaya jelas di atas background biru gelap */
.mushaf-verse.verse-active .tajweed-color {
  color: white !important;
}

/* Interaktif hover pada huruf tajwid */
.tajweed-active .tajweed-color:hover {
  background-color: rgba(0,0,0,0.05);
  cursor: help;
}

/* Sticky Player */
.sticky-audio-player {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 600px;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  z-index: 100;
}
.player-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.player-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: white;
  color: var(--text-main);
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}
.player-btn:hover { background: var(--primary-light); color: var(--primary); }
.play-btn {
  width: 50px;
  height: 50px;
  background: var(--primary);
  color: white;
  font-size: 2rem;
}
/* --- Quiz Module Styles --- */
.quiz-option {
  background: white;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.quiz-option:hover:not(.disabled) {
  border-color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px rgba(14, 165, 233, 0.2);
}

.quiz-option:active:not(.disabled) {
  transform: translateY(1px);
}

.quiz-option.correct {
  border-color: #22c55e;
  background: #dcfce7;
  color: #166534;
}

.quiz-option.wrong {
  border-color: #ef4444;
  background: #fee2e2;
  color: #991b1b;
  animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

.quiz-option.disabled {
  cursor: not-allowed;
  opacity: 0.8;
}

@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); }
}

/* --- Recording Module Styles --- */
.btn-record-active {
  background: #ef4444 !important;
  animation: pulse-red 1.5s infinite;
}

@keyframes pulse-red {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { box-shadow: 0 0 0 20px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   KEDAI GANJARAN: ANIMASI ISLAMIK & EFEK PREMIUM
   ========================================================================== */

/* --- 1. Keyframes Animations --- */
@keyframes twinkle {
  0%, 100% { opacity: 0.8; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(0.9); }
}

@keyframes gradientPulse {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes borderSpin {
  100% { transform: rotate(360deg); }
}

@keyframes textGlowPulse {
  0%, 100% { text-shadow: 0 0 5px currentColor, 0 0 10px currentColor; }
  50% { text-shadow: 0 0 15px currentColor, 0 0 25px currentColor; }
}

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

/* --- 2. Latar Belakang Avatar (Backgrounds) --- */
.bg-lailatul-qadr {
  background: radial-gradient(circle at center, #1e3a8a, #0f172a) !important;
  position: relative;
  overflow: hidden;
}
.bg-lailatul-qadr::before {
  content: "✨";
  position: absolute;
  top: 10%; right: 20%;
  font-size: 0.8rem;
  color: white;
  animation: twinkle 2s infinite ease-in-out;
}
.bg-lailatul-qadr::after {
  content: "✨";
  position: absolute;
  bottom: 20%; left: 15%;
  font-size: 0.6rem;
  color: white;
  animation: twinkle 3s infinite ease-in-out 1s;
}

.bg-subuh-madinah {
  background: linear-gradient(-45deg, #f59e0b, #ef4444, #ec4899) !important;
  background-size: 400% 400% !important;
  animation: gradientPulse 6s ease infinite !important;
}

.bg-taman-firdaus {
  background: linear-gradient(to top, #10b981, #047857) !important;
  background-image: repeating-linear-gradient(45deg, rgba(255,255,255,0.05) 25%, transparent 25%, transparent 75%, rgba(255,255,255,0.05) 75%, rgba(255,255,255,0.05)), linear-gradient(to top, #10b981, #047857) !important;
  background-size: 20px 20px, 100% 100% !important;
  animation: floatUp 10s linear infinite !important;
}

/* --- 3. Bingkai Avatar (Frames) --- */
.frame-kiswah {
  border: 4px solid #111827 !important;
  box-shadow: 0 0 0 3px #fbbf24 inset, 0 0 15px rgba(0,0,0,0.5) !important;
}

.frame-an-noor {
  border: 4px solid #fef08a !important;
  box-shadow: 0 0 15px #fde047, inset 0 0 10px #fef08a !important;
  animation: textGlowPulse 2s infinite ease-in-out !important;
}

.frame-tawaf {
  position: relative;
  border: 4px solid transparent !important;
  background-clip: padding-box !important;
}
.frame-tawaf::before {
  content: "";
  position: absolute;
  top: -6px; left: -6px; right: -6px; bottom: -6px;
  border-radius: 50%;
  border: 4px dashed #3b82f6;
  animation: borderSpin 8s linear infinite;
  z-index: -1;
}

/* Fix for inner content so pseudo element doesn't overlap text */
.main-avatar-display, #settings-avatar-preview {
  position: relative;
  z-index: 1;
}

/* --- 4. Gelaran Kehormat (Titles) --- */
.title-mujahid {
  color: #ef4444 !important;
  font-weight: 800 !important;
  text-shadow: 0 0 5px rgba(239, 68, 68, 0.5) !important;
}

.title-al-hafiz {
  background: linear-gradient(90deg, #f59e0b, #eab308, #f59e0b) !important;
  background-size: 200% auto !important;
  color: #fff !important;
  background-clip: text !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  animation: gradientPulse 3s linear infinite !important;
  font-weight: 900 !important;
}

.title-syurga {
  color: #3b82f6 !important;
  font-weight: 800 !important;
  animation: textGlowPulse 2s infinite ease-in-out !important;
}

/* --- New Store Items --- */

.bg-padang-arafah {
  background: linear-gradient(135deg, #fef08a, #f59e0b) !important;
  box-shadow: inset 0 0 15px rgba(245, 158, 11, 0.5) !important;
  animation: gradientPulse 5s ease-in-out infinite !important;
}

.bg-gurun-sahara {
  background: repeating-linear-gradient(
    45deg,
    #fcd34d,
    #fcd34d 10px,
    #f59e0b 10px,
    #f59e0b 20px
  ) !important;
  background-size: 200% 200% !important;
  animation: floatUp 8s linear infinite !important;
}

.frame-zamzam {
  border: 4px solid #93c5fd !important;
  box-shadow: 0 0 15px #60a5fa, inset 0 0 10px #bfdbfe !important;
  animation: textGlowPulse 2.5s infinite ease-in-out !important;
}

.frame-raudhah {
  border: 4px solid #10b981 !important;
  box-shadow: 0 0 15px #34d399, inset 0 0 10px #6ee7b7 !important;
  animation: textGlowPulse 2s infinite ease-in-out !important;
}

.onboarding-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border-color: var(--primary) !important;
}

.title-khalifah {
  color: #8b5cf6 !important;
  font-weight: 800 !important;
  background: linear-gradient(90deg, #8b5cf6, #d946ef, #8b5cf6) !important;
  background-size: 200% auto !important;
  background-clip: text !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  animation: gradientPulse 3s linear infinite !important;
}

.title-daie {
  color: #10b981 !important;
  font-weight: 800 !important;
  text-shadow: 0 2px 4px rgba(16, 185, 129, 0.4) !important;
}

.frame-mihrab {
  border-top: 6px solid #eab308 !important;
  border-left: 3px solid #ca8a04 !important;
  border-right: 3px solid #ca8a04 !important;
  border-bottom: 2px solid #a16207 !important;
  border-top-left-radius: 40% !important;
  border-top-right-radius: 40% !important;
  box-shadow: inset 0 5px 10px rgba(202, 138, 4, 0.3) !important;
}

.title-khalifah {
  color: #8b5cf6 !important;
  font-weight: 800 !important;
  text-shadow: 0 0 8px rgba(139, 92, 246, 0.6) !important;
}

.title-daie {
  color: #047857 !important;
  font-weight: 800 !important;
  -webkit-text-stroke: 1px #a7f3d0;
  text-shadow: 2px 2px 0px #10b981 !important;
}

/* --- 5. Avatar Ikon Islamik --- */
.icon-avatar-display {
  font-size: 2rem !important; /* Adjust based on container size */
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}/* ==================== TAJWID PINTAR ==================== */
.flip-card { 
  background-color: transparent; 
  height: 200px; 
  perspective: 1000px; 
  cursor: pointer; 
}

.flip-card-inner { 
  position: relative; 
  width: 100%; 
  height: 100%; 
  text-align: center; 
  transition: transform 0.6s; 
  transform-style: preserve-3d; 
}

.flip-card.is-flipped .flip-card-inner { 
  transform: rotateY(180deg); 
}

.flip-card-front, .flip-card-back { 
  position: absolute; 
  width: 100%; 
  height: 100%; 
  -webkit-backface-visibility: hidden; 
  backface-visibility: hidden; 
  border-radius: var(--radius-lg); 
  padding: 1.5rem; 
  display: flex; 
  flex-direction: column; 
  justify-content: center; 
  align-items: center; 
  box-shadow: 0 4px 15px rgba(0,0,0,0.05); 
}

.flip-card-front { 
  background: white; 
  border: 2px solid var(--border); 
}

.flip-card-back { 
  background: var(--primary); 
  color: white; 
  transform: rotateY(180deg); 
}

.flip-card-title { 
  font-weight: 800; 
  font-size: 1.2rem; 
  margin-bottom: 0.5rem; 
  color: var(--primary-dark); 
}

.flip-card-icon { 
  font-size: 3rem; 
  margin-bottom: 0.5rem; 
}

.flip-card-back .flip-card-title { 
  color: white; 
}

.flip-card-back p { 
  font-size: 0.95rem; 
  line-height: 1.5; 
  opacity: 0.9; 
}

/* Tajwid Quiz Modal Options */
.tajwid-quiz-option {
    padding: 1rem;
    border: 2px solid var(--primary-light);
    border-radius: var(--radius-md);
    background: white;
    color: var(--text-main);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    width: 100%;
}
.tajwid-quiz-option:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}
.tajwid-quiz-option.correct {
    border-color: #10b981;
    background: #d1fae5;
    color: #065f46;
}
.tajwid-quiz-option.wrong {
    border-color: #ef4444;
    background: #fee2e2;
    color: #991b1b;
}


/* Tajwid Pintar UI Revamp */
.tajwid-accordion-header { transition: all 0.3s ease; border-radius: var(--radius-md); overflow: hidden; }
.tajwid-accordion-header:hover { transform: translateY(-2px); z-index: 2; position: relative; }
.tajwid-accordion-body { max-height: 0; overflow: hidden; transition: max-height 0.4s cubic-bezier(0, 1, 0, 1), opacity 0.3s ease; opacity: 0; }
.tajwid-accordion-body.open { opacity: 1; transition: max-height 0.6s ease-in-out, opacity 0.4s ease; }
.tajwid-formula-badge { position: relative; overflow: hidden; }
.tajwid-formula-badge::before { content: ""; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: linear-gradient(to right, transparent, rgba(255,255,255,0.4), transparent); transform: rotate(45deg) translateY(-100%); transition: transform 0.6s ease; }
.tajwid-formula-badge:hover::before { transform: rotate(45deg) translateY(100%); }
.tajwid-btn-glow { position: relative; z-index: 1; overflow: hidden; }
.tajwid-btn-glow::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 10px rgba(255,255,255,0.5); opacity: 0; transition: opacity 0.3s ease; z-index: -1; }
.tajwid-btn-glow:hover::after { opacity: 1; }
.makmal-text-glow { text-shadow: 0 0 15px currentColor; }


/* Skala Keseluruhan Dashboard 90% */



/* Premium Framer Motion Feel Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes pulseSoft {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

.dashboard-layout .card, .dashboard-layout .stat-card, .dashboard-layout .hero-premium {
  animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.dashboard-layout .stat-card:nth-child(1) { animation-delay: 0.1s; }
.dashboard-layout .stat-card:nth-child(2) { animation-delay: 0.2s; }
.dashboard-layout .stat-card:nth-child(3) { animation-delay: 0.3s; }
.dashboard-layout .stat-card:nth-child(4) { animation-delay: 0.4s; }

.sidebar {
  animation: slideInRight 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Glass panel global standard */
.dashboard-layout .glass-panel {
  background: var(--surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
}

.btn {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.btn:active {
  transform: scale(0.95);
}

.dashboard-layout .btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255,255,255,0.5);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%);
  transform-origin: 50% 50%;
}

.dashboard-layout .btn:focus:not(:active)::after {
  animation: ripple 1s ease-out;
}

@keyframes ripple {
  0% { transform: scale(0, 0); opacity: 0.5; }
  100% { transform: scale(20, 20); opacity: 0; }
}


/* ==================== MUSHAF DIGITAL ==================== */
.nav-item[data-target="mushaf-module"] span {
  font-family: var(--font-arabic), serif;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--primary-dark);}

.mushaf-main.dark-mode {
  background: #111827;
  color: #f3f4f6;
  border-color: #374151;
}

.mushaf-main.dark-mode #mushaf-content-area {
  color: #f3f4f6 !important;
}

.mushaf-main.dark-mode #mushaf-current-juzuk {
  color: #fbbf24 !important;
}

/* Real Mushaf Page Styling */
.mushaf-page-frame {
  background-color: #fdfaf2; /* Off-white paper color */
  border: 12px solid transparent;
  border-image: repeating-linear-gradient(45deg, #b8860b, #b8860b 2px, transparent 2px, transparent 4px) 12;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.05), 0 10px 30px rgba(0,0,0,0.1);
  padding: 2.5rem;
  margin-top: 1rem;
  min-height: 70vh;
}

.mushaf-main.dark-mode .mushaf-page-frame {
  background-color: #1f2937; /* Dark mode paper */
  box-shadow: inset 0 0 30px rgba(0,0,0,0.5);
  border-image: repeating-linear-gradient(45deg, #4b5563, #4b5563 2px, transparent 2px, transparent 4px) 12;
}

#mushaf-content-area {
  text-align: justify;
  text-justify: inter-word;
  padding: 0 1rem;
}

/* Ayah styling */
.ayah-box {
  display: inline;
  position: relative;
  transition: all 0.2s ease;
  line-height: 1.8;
  font-weight: 500;
  color: #000000;
}

.ayah-box:hover {
  background: rgba(147, 51, 234, 0.05);
  border-radius: 4px;
}

.mushaf-main.dark-mode .ayah-box:hover {
  background: rgba(251, 191, 36, 0.1);
}

.ayah-end-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 0.5rem;
  font-size: 1.5rem;
  color: var(--primary-dark);
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  top: 5px;
}

.mushaf-main.dark-mode .ayah-end-icon {
  color: #9ca3af;
}

.ayah-end-icon:hover {
  transform: scale(1.2);
  color: #b8860b;
}

.ayah-end-icon.pinned {
  color: #ffd700;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.ayah-end-icon span.ayah-number {
  position: absolute;
  font-size: 0.8rem;
  font-family: 'Poppins', sans-serif;
  font-weight: bold;
}

/* Sidebar Surah items */
.surah-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem;
  background: white;
  border-radius: var(--radius-md);
  margin-bottom: 0.5rem;
  cursor: pointer;
  border: 1px solid rgba(0,0,0,0.05);
  transition: all 0.2s ease;
}

.surah-item:hover {
  background: var(--primary-light);
  transform: translateX(-3px);
}

.surah-item.locked {
  opacity: 0.6;
  cursor: not-allowed;
  background: #f3f4f6;
}

.surah-item.locked:hover {
  background: #f3f4f6;
  transform: none;
}

.surah-item-name {
  font-family: var(--font-arabic);
  font-size: 1.3rem;
  font-weight: bold;
}

.juzuk-header {
  padding: 0.5rem 0;
  font-weight: 700;
  color: var(--primary-dark);
  border-bottom: 2px solid var(--primary-light);
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
}

.pin-item {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  background: white;
  border-radius: var(--radius-md);
  border-left: 4px solid var(--accent);
  box-shadow: 0 2px 10px rgba(0,0,0,0.02);
  cursor: pointer;
  transition: all 0.2s ease;
}

.pin-item:hover {
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  transform: translateY(-2px);
}

/* ========================================================= */
/* RESPONSIVE WEB DESIGN (RWD) & CROSS-BROWSER FIXES */
/* ========================================================= */

/* 1. KESERASIAN RENTAS-PELAYAR (Safari & Chrome) */
* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.glass-panel {
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

/* 2. MEDIA FLEKSIBEL (Imej & Video) */
img, video {
  max-width: 100%;
  height: auto;
  object-fit: cover;
}

/* 4. TABLET (Max-width: 1024px) */
@media (max-width: 1024px) {
  /* Adjust grids to 2 columns where needed */
  .modules-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  
  .role-selector {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .quran-grid, .hafazan-grid, .dashboard-grid {
    grid-template-columns: 1fr !important;
  }
  
  .btn {
    padding: 1rem 1.5rem !important; /* Larger touch targets */
  }
}

/* 5. TELEFON PINTAR (Max-width: 768px) */
@media (max-width: 768px) {
  body, html {
    overflow-x: hidden;
  }
  
  .dashboard-layout {
    flex-direction: column;
  }

  .dashboard-layout .sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    height: 100vh;
    z-index: 1000;
    transition: left 0.3s ease-in-out;
    border-right: none;
  }

  .dashboard-layout .sidebar.open {
    left: 0;
  }

  .sidebar-overlay.active {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
  }

  .mobile-only {
    display: block !important;
  }

  .topbar {
    padding: 0.5rem 1rem;
  }

  .main-content {
    padding: 1rem;
  }
  
  .modules-grid, .role-selector {
    grid-template-columns: 1fr !important;
  }

  .btn {
    padding: 0.875rem 1.2rem !important;
    font-size: 1rem;
  }
}

/* Utiliti Sembunyi/Tunjuk */
.mobile-only {
  display: none;
}
@media (max-width: 768px) {
  .mobile-only {
    display: inline-block;
  }
}

/* --- Sidebar Collapsible State --- */
@media (min-width: 769px) {
  .dashboard-layout .sidebar {
      transition: width 0.3s ease, transform 0.3s ease;
  }

.dashboard-layout .sidebar.collapsed {
    width: 80px !important;
}

.dashboard-layout .sidebar.collapsed .sidebar-header h2,
.dashboard-layout .sidebar.collapsed .nav-item span,
.dashboard-layout .sidebar.collapsed .sidebar-header img {
    display: none;
}

.dashboard-layout .sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 0.75rem;
}

  .dashboard-layout .sidebar.collapsed .nav-item i {
      font-size: 1.5rem;
      margin: 0;
  }
}

.mushaf-main { background: transparent !important; padding: 0 !important; box-shadow: none !important; }

.pin-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); z-index: 9999;
    display: none; align-items: center; justify-content: center;
}
.pin-modal-content {
    background: #fff; padding: 2rem; border-radius: var(--radius-lg);
    width: 90%; max-width: 400px; text-align: center;
}
.pin-modal-content h3 { margin-bottom: 1rem; color: var(--primary-dark); }
.pin-modal-content p { font-size: 1.2rem; font-family: 'KFGQPC Uthmanic Script HAFS', serif; margin-bottom: 2rem; }
.pin-btn-group { display: flex; gap: 1rem; justify-content: center; }

/* Keseragaman Fon Al-Quran (Waqaf) */
.quran-text-standard, #quran-module, #mushaf-view, #road-to-khatam-view, .mushaf-page-frame, .ayah-text, .ayah-box, #quran-detail-view {
    font-family: 'KFGQPC Uthmanic Script HAFS', serif !important;
}


/* ==== MUSHAF EXACT LAYOUT ==== */
.mushaf-page-frame {
    background-color: #fdfaf6;
    padding: 2.5rem 3rem;
    border: 1px solid #e5dfd3;
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    
    /* Perfect Justification without breaking ligatures */
    text-align: justify;
    text-justify: inter-word;
    text-align-last: center;
    
    color: #1a1a1a;
    line-height: 2.4;
    font-size: 2.5rem;
    font-family: 'KFGQPC Uthmanic Script HAFS', serif !important;
}

.mushaf-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #D4AF37;
    border-radius: 8px;
    padding: 0.5rem 2rem;
    margin-bottom: 2.5rem;
    font-family: 'Amiri', serif;
    font-size: 1.3rem;
    color: #111827;
    font-weight: bold;
    background: linear-gradient(90deg, rgba(212,175,55,0.05), rgba(212,175,55,0.15), rgba(212,175,55,0.05));
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.mushaf-page-footer {
    text-align: center;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    color: #736b5e;
    font-weight: 600;
    margin-top: 2rem;
    border-top: 2px solid #d4c8b8;
    padding-top: 0.5rem;
}

/* Ensure Surah title is centered and has distinct background */
.mushaf-surah-title {
    text-align: center;
    font-size: 2.2rem;
    background: linear-gradient(to right, transparent, rgba(212, 175, 55, 0.1), transparent), url('https://cdn.pixabay.com/photo/2021/04/22/16/22/islamic-pattern-6199464_960_720.png') center/cover;
    background-color: #fcf9f2;
    background-blend-mode: overlay;
    border: 2px solid #D4AF37;
    border-radius: 50px;
    padding: 0.5rem 4rem;
    margin: 2.5rem auto;
    width: fit-content;
    font-family: 'Amiri', serif;
    font-weight: bold;
    color: #111827;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05), inset 0 0 10px rgba(212,175,55,0.2);
    position: relative;
    overflow: hidden;
}

.mushaf-surah-title::before, .mushaf-surah-title::after {
    content: '❀';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #D4AF37;
    font-size: 1.5rem;
}

.mushaf-surah-title::before { left: 1.5rem; }
.mushaf-surah-title::after { right: 1.5rem; }

/* ==================== NEW LANDING PAGE ==================== */
#landing-view {
    --primary-main: #2E8B57; /* SeaGreen */
    --primary-dark: #1B4D3E; /* Emerald Green */
    background: #f8fbf9;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    padding: 0;
}

#landing-view.active {
    display: block !important;
}

.landing-navbar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 4rem;
    z-index: 50;
    background: linear-gradient(to bottom, rgba(255,255,255,0.9), transparent);
}

.landing-nav-links {
    display: flex;
    gap: 2rem;
}

.landing-nav-links a {
    text-decoration: none;
    color: var(--primary-dark);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.landing-nav-links a.active, .landing-nav-links a:hover {
    color: var(--primary-main);
}

.landing-nav-actions {
    display: flex;
    gap: 1rem;
}

.landing-hero {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background-image: url('assets/img/hero-bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    padding: 6rem 4rem 8rem 4rem;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(248, 251, 249, 0.95) 0%, rgba(248, 251, 249, 0.7) 40%, transparent 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.hero-text-section {
    max-width: 600px;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.1;
    margin-bottom: 1rem;
}

.hero-highlight {
    color: var(--primary-dark);
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-main);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.hero-tagline {
    font-size: 1.1rem;
    color: var(--primary-main);
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 2.5rem;
}

.hero-cta {
    display: flex;
    gap: 1rem;
}

.hero-btn {
    padding: 0.8rem 2rem;
    font-size: 1.1rem;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.hero-btn-outline {
    padding: 0.8rem 2rem;
    font-size: 1.1rem;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.9);
    color: var(--primary-dark);
    border: 1px solid rgba(255,255,255,0.4);
    backdrop-filter: blur(10px);
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.hero-btn-outline:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.hero-features-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.feature-card-float {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255,255,255,0.6);
    transform: translateX(0);
    transition: transform 0.3s ease;
}

.feature-card-float:hover {
    transform: translateX(-10px);
}

.feature-card-float .feature-icon {
    width: 40px;
    height: 40px;
    background: rgba(46, 139, 87, 0.1);
    color: var(--primary-main);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.feature-card-float .feature-text {
    display: flex;
    flex-direction: column;
}

.feature-card-float .feature-text strong {
    color: var(--text-dark);
    font-size: 0.95rem;
}

.feature-card-float .feature-text span {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Stats Bar */
.landing-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    max-width: 1200px;
    margin: -4rem auto 3rem auto;
    position: relative;
    z-index: 20;
    padding: 0 2rem;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 15px 35px rgba(0,0,0,0.06);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon-wrapper {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

.stat-info h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 0.2rem 0;
}

.stat-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

.stars {
    color: #ffc107;
    font-size: 1rem;
    margin-left: 5px;
}

/* Modules Grid */
.landing-modules-section {
    width: 100%;
    background-color: #f8fbf9;
    background-image: radial-gradient(circle at center, rgba(46,139,87,0.04) 0%, transparent 100%), url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%231b4d3e' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    padding: 5rem 2rem 6rem 2rem;
    position: relative;
    border-radius: 40px 40px 0 0;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.05);
}

.landing-modules-section::before {
    display: none;
}

.landing-modules-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.modules-header {
    text-align: center;
    margin-bottom: 3rem;
}

.modules-header h2 {
    font-size: 2rem;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.modules-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.module-card {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.04);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid transparent;
}

.module-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    border-color: rgba(46, 139, 87, 0.2);
}

.module-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    flex-shrink: 0;
}

.module-info {
    flex: 1;
}

.module-info h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 0.3rem 0;
}

.module-info p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
}

.module-arrow {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f3f4f6;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
}

.module-card:hover .module-arrow {
    background: var(--primary-main);
    color: white;
}

/* Footer Trust Badges */
.landing-footer {
    padding: 3rem 2rem;
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    background: #f8fbf9;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.trust-badge i {
    font-size: 2rem;
    color: var(--primary-main);
}

.trust-badge .badge-text {
    display: flex;
    flex-direction: column;
}

.trust-badge .badge-text strong {
    font-size: 0.95rem;
    color: var(--text-dark);
}

.trust-badge .badge-text span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 1024px) {
    .landing-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: 3rem;
    }
    
    .hero-overlay {
        background: linear-gradient(to bottom, rgba(248, 251, 249, 0.95) 0%, rgba(248, 251, 249, 0.8) 100%);
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .hero-features-list {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .feature-card-float:hover {
        transform: translateY(-5px);
    }
}

@media (max-width: 768px) {
    .landing-nav-links {
        display: none; /* Hide on mobile for simplicity */
    }
    
    .landing-navbar {
        padding: 1rem;
    }
    
    .landing-hero {
        padding: 7rem 1rem 2rem 1rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .landing-stats {
        grid-template-columns: 1fr;
        padding: 0 1rem;
        margin-top: 2rem;
    }
    
    .trust-badge {
        width: 100%;
    }
}


/* ==================== BOTTOM DECORATION & VIDEO MODAL ==================== */
.landing-cta-section {
    background: linear-gradient(135deg, var(--primary-main), var(--primary-dark));
    padding: 5rem 2rem;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.landing-cta-section::before {
    content: '';
    position: absolute;
    top: -50%; left: -10%; width: 120%; height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 10%, transparent 10%), radial-gradient(circle, rgba(255,255,255,0.1) 10%, transparent 10%);
    background-size: 50px 50px;
    background-position: 0 0, 25px 25px;
    opacity: 0.5;
    z-index: 1;
}

.cta-content {
    position: relative;
    z-index: 10;
    max-width: 800px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.video-modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-modal-content {
    background: #000;
    width: 90%;
    max-width: 800px;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
    aspect-ratio: 16/9;
}

.video-close-btn {
    position: absolute;
    top: 15px; right: 15px;
    width: 40px; height: 40px;
    background: rgba(255,255,255,0.2);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
    z-index: 10;
}
.video-close-btn:hover {
    background: rgba(255,255,255,0.4);
}

/* ================= UI FIXES ================= */
.landing-cta-section {
    padding: 3rem 2rem !important; /* Smaller box */
}
.landing-cta-section h2 {
    font-size: 2.2rem !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.5rem;
}
@media (max-width: 768px) {
    .landing-cta-section h2 {
        white-space: normal; /* Allow wrap on mobile */
        font-size: 1.8rem !important;
    }
}

.nav-special-text {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.sidebar.collapsed .nav-special-text {
    display: none !important;
}

.dashboard-hero {
    background: linear-gradient(135deg, #1b4d3e 0%, #2e8b57 100%), url('data:image/svg+xml,%3Csvg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"%3E%3Cg fill="none" fill-rule="evenodd"%3E%3Cpath d="M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z" fill="%23ffffff" fill-opacity="0.05"/%3E%3C/g%3E%3C/svg%3E') !important;
    color: white !important;
    border-radius: 20px !important;
    padding: 2.5rem !important;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(46,139,87,0.2) !important;
}
.dashboard-hero * {
    color: white !important;
}
.dashboard-hero .btn-accent {
    color: #1b4d3e !important;
    background: white !important;
}
.dashboard-hero .btn-accent * {
    color: #1b4d3e !important;
}
