/* GuidedByQuran / Sirat - Web Application Design System */

:root {
  --bg-primary: #0a110e;
  --bg-secondary: #101e19;
  --bg-surface: #152721;
  --bg-surface-elevated: #1a322a;
  --border-color: rgba(212, 175, 55, 0.18);
  --border-subtle: rgba(255, 255, 255, 0.08);

  --text-primary: #f5f5f0;
  --text-secondary: #a3b8b0;
  --text-muted: #6f857d;

  --accent-gold: #d4af37;
  --accent-gold-light: #f3e5ab;
  --accent-gold-glow: rgba(212, 175, 55, 0.25);
  
  --accent-emerald: #10b981;
  --accent-emerald-dark: #064e3b;

  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-arabic: 'Amiri', 'Scheherazade New', serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.4);
  --shadow-gold: 0 4px 20px rgba(212, 175, 55, 0.15);

  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] {
  --bg-primary: #f7f9f8;
  --bg-secondary: #edf3f0;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f3f7f5;
  --border-color: rgba(0, 77, 64, 0.15);
  --border-subtle: rgba(0, 0, 0, 0.08);

  --text-primary: #0f241d;
  --text-secondary: #2d4f43;
  --text-muted: #5e7a70;

  --accent-gold: #b38600;
  --accent-gold-light: #664d00;
  --accent-gold-glow: rgba(179, 134, 0, 0.2);

  --accent-emerald: #059669;
  --accent-emerald-dark: #004d40;

  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.08);
  --shadow-gold: 0 4px 20px rgba(179, 134, 0, 0.12);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* App Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 17, 14, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

[data-theme="light"] .app-header {
  background: rgba(247, 249, 248, 0.92);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  cursor: pointer;
}

.brand-logo-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #103328 0%, #1c4a3c 100%);
  border: 1px solid var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-gold);
  color: var(--accent-gold);
  font-size: 1.3rem;
}

.brand-text h1 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--text-primary) 40%, var(--accent-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-text p {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.icon-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.icon-btn:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  transform: translateY(-2px);
}

/* Layout */
.app-container {
  display: flex;
  flex: 1;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.app-sidebar {
  width: 250px;
  padding: 1.5rem 1rem;
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.92rem;
  cursor: pointer;
  transition: var(--transition);
}

.nav-item:hover {
  background: var(--bg-surface);
  color: var(--accent-gold-light);
}

.nav-item.active {
  background: var(--bg-surface-elevated);
  color: var(--accent-gold);
  font-weight: 600;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.app-content {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
}

/* Hero Section */
.hero-card {
  background: linear-gradient(135deg, #132d24 0%, #184235 60%, #1f5544 100%);
  border: 1px solid var(--accent-gold);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-gold);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.hero-info h2 {
  font-size: 1.8rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.4rem;
}

.hero-info p {
  color: var(--accent-gold-light);
  font-size: 0.95rem;
  max-width: 500px;
}

.prayer-countdown-box {
  background: rgba(10, 17, 14, 0.75);
  border: 1px solid rgba(212, 175, 55, 0.4);
  backdrop-filter: blur(8px);
  padding: 1.25rem 1.75rem;
  border-radius: var(--radius-md);
  text-align: right;
  min-width: 240px;
}

.next-prayer-name {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-gold);
  font-weight: 700;
}

.next-prayer-time {
  font-size: 2.2rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
}

.prayer-countdown-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Section titles */
.section-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-primary);
}

/* Grid Launchers */
.launcher-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.launcher-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}

.launcher-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-gold);
  box-shadow: var(--shadow-gold);
  background: var(--bg-surface-elevated);
}

.launcher-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
}

.launcher-name {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-primary);
}

.launcher-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* Daily Quotes Cards */
.daily-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.quote-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.quote-tag {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--accent-gold);
  margin-bottom: 0.75rem;
}

.arabic-text {
  font-family: var(--font-arabic);
  font-size: 1.6rem;
  line-height: 1.9;
  text-align: right;
  direction: rtl;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.quote-translation {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 1rem;
}

.quote-source {
  font-size: 0.8rem;
  color: var(--accent-gold-light);
  font-weight: 600;
  text-align: right;
}

/* Views Section */
.view-section {
  display: none;
}

.view-section.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

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

/* Filter Bar */
.filter-bar {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.search-input {
  flex: 1;
  min-width: 250px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 1.25rem;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
}

.search-input:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px var(--accent-gold-glow);
}

.filter-select {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 1.25rem;
  color: var(--text-primary);
  font-family: var(--font-sans);
  outline: none;
  cursor: pointer;
}

/* Surah Grid */
.surah-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.surah-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: var(--transition);
}

.surah-card:hover {
  border-color: var(--accent-gold);
  transform: translateY(-2px);
  background: var(--bg-surface-elevated);
}

.surah-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.surah-num {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

.surah-names h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
}

.surah-names span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.surah-arabic-title {
  font-family: var(--font-arabic);
  font-size: 1.4rem;
  color: var(--accent-gold);
}

/* Verse Reader */
.reader-header {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.bismillah-banner {
  text-align: center;
  font-family: var(--font-arabic);
  font-size: 2.2rem;
  color: var(--accent-gold);
  margin: 1.5rem 0 2.5rem 0;
}

.verse-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  margin-bottom: 1.25rem;
  transition: var(--transition);
}

.verse-item:hover {
  border-color: var(--border-color);
}

.verse-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.verse-badge {
  background: var(--bg-secondary);
  color: var(--accent-gold);
  border: 1px solid var(--border-color);
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
}

.verse-arabic {
  font-family: var(--font-arabic);
  font-size: 2rem;
  line-height: 2.3;
  text-align: right;
  direction: rtl;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
}

.verse-transliteration {
  font-size: 0.95rem;
  color: var(--accent-gold-light);
  margin-bottom: 0.65rem;
  font-style: italic;
}

.verse-translation {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Floating Audio Bar */
.audio-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: rgba(15, 28, 23, 0.96);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--accent-gold);
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.audio-bar.active {
  transform: translateY(0);
}

.audio-track-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.audio-track-info .track-title {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-primary);
}

.audio-track-info .reciter-name {
  font-size: 0.75rem;
  color: var(--accent-gold);
}

.audio-play-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--accent-gold);
  color: #0a110e;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: var(--transition);
}

.audio-play-btn:hover {
  transform: scale(1.08);
}

/* Hadith & Duas Stack */
.card-stack {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.item-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: var(--transition);
}

.item-card:hover {
  border-color: var(--border-color);
}

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

.badge {
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
}

.badge-sahih {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-gold {
  background: rgba(212, 175, 55, 0.15);
  color: var(--accent-gold);
  border: 1px solid var(--border-color);
}

.counter-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 1.25rem;
  margin-top: 1rem;
}

.counter-btn {
  background: var(--accent-gold);
  color: #0a110e;
  border: none;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.counter-btn:hover {
  transform: scale(1.05);
}

/* Tasbih */
.tasbih-container {
  max-width: 500px;
  margin: 2rem auto;
  text-align: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-gold);
}

.tasbih-count-display {
  font-size: 5rem;
  font-weight: 800;
  color: var(--accent-gold);
  margin: 1.5rem 0;
  font-variant-numeric: tabular-nums;
}

.big-clicker {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, #1e4d3e 0%, #102d24 100%);
  border: 4px solid var(--accent-gold);
  color: #ffffff;
  font-size: 1.4rem;
  font-weight: 700;
  cursor: pointer;
  margin: 1.5rem auto;
  box-shadow: var(--shadow-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s ease;
  user-select: none;
}

.big-clicker:active {
  transform: scale(0.92);
}

/* Qibla Compass */
.qibla-container {
  max-width: 600px;
  margin: 2rem auto;
  text-align: center;
}

.compass-dial {
  width: 260px;
  height: 260px;
  border-radius: 50%;
  border: 4px solid var(--accent-gold);
  margin: 2rem auto;
  position: relative;
  background: radial-gradient(circle, #152721 0%, #0d1714 100%);
  box-shadow: var(--shadow-gold);
  display: flex;
  align-items: center;
  justify-content: center;
}

.compass-needle {
  position: absolute;
  width: 6px;
  height: 100px;
  background: linear-gradient(to top, transparent 0%, #ef4444 100%);
  top: 30px;
  transform-origin: bottom center;
  border-radius: 4px;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.compass-needle::after {
  content: '▲';
  position: absolute;
  top: -12px;
  left: -5px;
  color: #ef4444;
  font-size: 14px;
}

/* Prayer Times Table */
.prayer-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  margin-top: 1.5rem;
}

.prayer-table th, .prayer-table td {
  padding: 1rem 1.5rem;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.prayer-table th {
  background: var(--bg-surface-elevated);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-gold);
}

.prayer-table tr.active-prayer {
  background: rgba(212, 175, 55, 0.12);
  border-left: 4px solid var(--accent-gold);
}

/* Quiz UI */
.quiz-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 700px;
  margin: 0 auto;
}

.quiz-option {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
}

.quiz-option:hover {
  border-color: var(--accent-gold);
  background: var(--bg-surface-elevated);
}

.quiz-option.correct {
  background: rgba(16, 185, 129, 0.2);
  border-color: var(--accent-emerald);
  color: var(--accent-emerald);
}

.quiz-option.incorrect {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #ef4444;
}

/* Responsive */
@media (max-width: 900px) {
  .app-container {
    flex-direction: column;
  }
  .app-sidebar {
    width: 100%;
    flex-direction: row;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
    padding: 0.75rem;
  }
  .nav-item {
    white-space: nowrap;
    padding: 0.5rem 0.85rem;
  }
  .app-content {
    padding: 1rem;
  }
  .hero-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .prayer-countdown-box {
    width: 100%;
    text-align: left;
  }
}
