/* ==========================================================================
   Koblenz Prayer Timings - Premium Islamic Glassmorphism Design System
   Convention: Islamic Center of Aachen (Islamisches Zentrum Aachen / MWL)
   ========================================================================== */

:root {
  /* Color Palette */
  --bg-primary: #060d17;
  --bg-secondary: #0b1526;
  --bg-card: rgba(15, 27, 48, 0.7);
  --bg-card-hover: rgba(22, 39, 70, 0.85);
  --bg-card-active: rgba(16, 185, 129, 0.12);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(52, 211, 153, 0.4);
  --border-gold: rgba(245, 158, 11, 0.35);

  --emerald-400: #34d399;
  --emerald-500: #10b981;
  --emerald-600: #059669;
  --gold-300: #fde68a;
  --gold-400: #fbbf24;
  --gold-500: #f59e0b;
  --sky-400: #38bdf8;
  --indigo-400: #818cf8;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-gold: #fcd34d;
  --text-emerald: #6ee7b7;

  /* Typography */
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-arabic: 'Amiri', 'Scheherazade New', serif;

  /* Shadows & Glass */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px -4px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 36px -6px rgba(0, 0, 0, 0.55);
  --shadow-glow: 0 0 35px -5px rgba(16, 185, 129, 0.3);
  --shadow-gold-glow: 0 0 30px -5px rgba(245, 158, 11, 0.25);

  --glass-blur: blur(16px);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(16, 185, 129, 0.15), transparent 45%),
    radial-gradient(circle at 10% 40%, rgba(56, 189, 248, 0.08), transparent 40%),
    radial-gradient(circle at 90% 70%, rgba(245, 158, 11, 0.06), transparent 35%);
  background-attachment: fixed;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* Subtle background stars/patterns */
.bg-ambient-pattern {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 0);
  background-size: 32px 32px;
  opacity: 0.6;
}

/* App Container with iOS Safe Area support */
.app-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding-top: max(1.5rem, env(safe-area-inset-top, 1.5rem));
  padding-right: max(1.25rem, env(safe-area-inset-right, 1.25rem));
  padding-bottom: max(3.5rem, env(safe-area-inset-bottom, 3.5rem));
  padding-left: max(1.25rem, env(safe-area-inset-left, 1.25rem));
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

/* Header & City Banner */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0.5rem 0;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(245, 158, 11, 0.25));
  border: 1px solid var(--border-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-400);
  box-shadow: var(--shadow-sm);
}

.brand-icon svg {
  width: 26px;
  height: 26px;
}

.brand-text h1 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(to right, #ffffff, #d1fae5);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.location-tag {
  font-size: 0.825rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.15rem;
}

.location-tag .dot {
  width: 6px;
  height: 6px;
  background-color: var(--emerald-400);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--emerald-400);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.btn-icon {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
  backdrop-filter: var(--glass-blur);
}

.btn-icon:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-focus);
  transform: translateY(-1px);
}

.btn-icon.active {
  color: var(--emerald-400);
  border-color: var(--emerald-500);
  background: rgba(16, 185, 129, 0.15);
}

/* Convention Pill Banner */
.convention-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-md);
  padding: 0.65rem 1.15rem;
  backdrop-filter: var(--glass-blur);
}

.convention-info {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
}

.convention-info svg {
  width: 18px;
  height: 18px;
  color: var(--emerald-400);
  flex-shrink: 0;
}

.convention-badge {
  background: rgba(245, 158, 11, 0.15);
  color: var(--gold-300);
  border: 1px solid var(--border-gold);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.convention-link-btn {
  background: none;
  border: none;
  color: var(--emerald-400);
  font-size: 0.825rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: var(--transition-fast);
}

.convention-link-btn:hover {
  color: var(--emerald-300);
}

/* Hero Section: Countdown & Current State */
.hero-card {
  position: relative;
  background: linear-gradient(135deg, rgba(16, 30, 56, 0.85), rgba(7, 18, 38, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  backdrop-filter: var(--glass-blur);
  overflow: hidden;
}

.hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--emerald-500), var(--gold-400), var(--sky-400));
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: center;
}

@media (max-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 1.5rem;
  }
}

.hero-next-info {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.hero-status-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.825rem;
  color: var(--emerald-400);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.pulse-indicator {
  width: 8px;
  height: 8px;
  background-color: var(--emerald-400);
  border-radius: 50%;
  position: relative;
}

.pulse-indicator::after {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 50%;
  border: 2px solid var(--emerald-400);
  animation: ripple 2s infinite ease-out;
}

@keyframes ripple {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(2.2); opacity: 0; }
}

.hero-prayer-title {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.1;
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

@media (max-width: 768px) {
  .hero-prayer-title {
    justify-content: center;
  }
}

.hero-prayer-title .arabic-name {
  font-family: var(--font-arabic);
  font-size: 1.85rem;
  color: var(--gold-400);
  font-weight: 400;
}

.hero-prayer-time {
  font-size: 1.25rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-top: 0.2rem;
}

.hero-prayer-time .target-time {
  color: #ffffff;
  font-weight: 700;
}

/* Countdown Clock Display */
.hero-countdown-box {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

@media (max-width: 768px) {
  .hero-countdown-box {
    align-items: center;
  }
}

.countdown-label {
  font-size: 0.785rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
}

.countdown-digits {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-gold);
  letter-spacing: 0.04em;
  text-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.countdown-digits .unit {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-left: -0.15rem;
  margin-right: 0.35rem;
}

/* Progress bar inside hero */
.hero-progress-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  margin-top: 1.5rem;
  overflow: hidden;
  position: relative;
}

.hero-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--emerald-500), var(--gold-400));
  border-radius: var(--radius-full);
  transition: width 1s linear;
}

/* Date Navigator Bar */
.date-navigator {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  backdrop-filter: var(--glass-blur);
}

.date-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-arrow-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.nav-arrow-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-focus);
}

.date-center-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.gregorian-date {
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
}

.gregorian-date:hover {
  color: var(--emerald-300);
}

.hijri-date {
  font-size: 0.825rem;
  color: var(--gold-300);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.hijri-date .arabic-hijri {
  font-family: var(--font-arabic);
  font-size: 0.95rem;
}

.quick-date-chips {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.chip-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-fast);
}

.chip-btn:hover, .chip-btn.active {
  background: rgba(16, 185, 129, 0.2);
  color: var(--emerald-300);
  border-color: var(--emerald-500);
}

/* Prayer Timings Main Grid */
.prayer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}

@media (max-width: 640px) {
  .prayer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.prayer-card {
  background: var(--bg-card);
  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;
  gap: 0.65rem;
  position: relative;
  transition: var(--transition-smooth);
  backdrop-filter: var(--glass-blur);
}

.prayer-card:hover {
  transform: translateY(-3px);
  background: var(--bg-card-hover);
  border-color: var(--border-focus);
  box-shadow: var(--shadow-md);
}

.prayer-card.current {
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.18), rgba(6, 78, 59, 0.35));
  border-color: var(--emerald-500);
  box-shadow: var(--shadow-glow);
}

.prayer-card.current::before {
  content: 'CURRENT';
  position: absolute;
  top: -10px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  background: var(--emerald-500);
  color: #064e3b;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
}

.prayer-card.next {
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.15), rgba(120, 53, 15, 0.25));
  border-color: var(--gold-400);
  box-shadow: var(--shadow-gold-glow);
}

.prayer-card.next::before {
  content: 'NEXT';
  position: absolute;
  top: -10px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  background: var(--gold-400);
  color: #78350f;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
}

.prayer-card.passed {
  opacity: 0.75;
}

.prayer-icon-wrapper {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

.prayer-card.current .prayer-icon-wrapper {
  background: rgba(16, 185, 129, 0.25);
  color: var(--emerald-300);
}

.prayer-card.next .prayer-icon-wrapper {
  background: rgba(245, 158, 11, 0.25);
  color: var(--gold-400);
}

.prayer-names {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.prayer-name-en {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
}

.prayer-name-ar {
  font-family: var(--font-arabic);
  font-size: 1.15rem;
  color: var(--text-gold);
  line-height: 1;
}

.prayer-time-val {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.prayer-card.next .prayer-time-val {
  color: var(--gold-300);
}

.prayer-card.current .prayer-time-val {
  color: var(--emerald-300);
}

/* Secondary Timings Bar (Imsak, Midnight, Last Third) */
.secondary-timings {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  backdrop-filter: var(--glass-blur);
}

.secondary-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.sec-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sky-400);
}

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

.sec-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.sec-time {
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
}

/* Feature Cards Grid (Qibla, Quick Actions, Tools) */
.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

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

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  backdrop-filter: var(--glass-blur);
}

.feature-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.feature-card-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.feature-card-title svg {
  color: var(--emerald-400);
}

/* Qibla Direction Visual */
.qibla-content {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.qibla-compass-dial {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 2px dashed rgba(255, 255, 255, 0.2);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.25);
}

.qibla-north {
  position: absolute;
  top: 3px;
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--text-muted);
}

.qibla-needle {
  position: absolute;
  width: 3px;
  height: 30px;
  background: linear-gradient(to top, transparent, var(--emerald-400));
  transform-origin: bottom center;
  bottom: 50%;
  border-radius: 2px;
  transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.qibla-kaaba-icon {
  width: 20px;
  height: 20px;
  color: var(--gold-400);
}

.qibla-stats {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.qibla-bearing {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--gold-300);
}

.qibla-meta {
  font-size: 0.825rem;
  color: var(--text-secondary);
}

/* Action Buttons Bar */
.action-buttons-group {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.btn-action {
  flex: 1;
  min-width: 130px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-action:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-focus);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-action.primary {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.3), rgba(5, 150, 105, 0.3));
  border-color: var(--emerald-500);
  color: var(--emerald-300);
}

.btn-action.primary:hover {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.45), rgba(5, 150, 105, 0.45));
  color: #ffffff;
}

/* Audio Player Trigger Section */
.audio-banner {
  background: linear-gradient(135deg, rgba(15, 27, 48, 0.85), rgba(16, 185, 129, 0.1));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.audio-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
}

.audio-info svg {
  color: var(--emerald-400);
}

.audio-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Modals & Dialogs */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 9, 18, 0.8);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.modal-overlay.open {
  display: flex;
  opacity: 1;
}

.modal-container {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  max-width: 780px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: modalPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
  0% { transform: scale(0.94); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.2);
}

.modal-header h2 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.modal-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.3rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.modal-close-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  background: rgba(0, 0, 0, 0.2);
}

/* Monthly Timetable Table */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}

.monthly-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: center;
}

.monthly-table th {
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald-300);
  font-weight: 700;
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.monthly-table td {
  padding: 0.65rem 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
}

.monthly-table tr:hover td {
  background: rgba(255, 255, 255, 0.03);
  color: #ffffff;
}

.monthly-table tr.today-row td {
  background: rgba(16, 185, 129, 0.2);
  color: #ffffff;
  font-weight: 700;
}

/* Settings Form Controls */
.setting-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.setting-group label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #ffffff;
}

.setting-group .setting-desc {
  font-size: 0.775rem;
  color: var(--text-muted);
}

.setting-select, .setting-input {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: #ffffff;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-size: 0.875rem;
  outline: none;
  transition: var(--transition-fast);
}

.setting-select:focus, .setting-input:focus {
  border-color: var(--emerald-400);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.offsets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.75rem;
}

.offset-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.offset-field span {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.offset-field input {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: #ffffff;
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  text-align: center;
}

/* Explanation Card in Convention Modal */
.convention-doc-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.convention-doc-card h3 {
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.param-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.param-pill {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--emerald-300);
}

.param-pill strong {
  color: #ffffff;
}

/* Footer */
.app-footer {
  margin-top: 2rem;
  padding: 1.5rem 0 0;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.sync-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--emerald-400);
  font-weight: 500;
}

/* ==========================================================================
   PWA & iOS Notification UI Components
   ========================================================================== */

/* Header Install Guide Button */
.btn-install-header {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: var(--radius-full);
  color: var(--emerald-400);
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-install-header:hover {
  background: rgba(16, 185, 129, 0.2);
  border-color: var(--emerald-400);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

@media (max-width: 480px) {
  .btn-install-header span {
    display: none;
  }
  .btn-install-header {
    padding: 0.5rem;
  }
}

/* Notification Header Button & Badge Dot */
#btnNotificationToggle {
  position: relative;
}

.notif-badge-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold-400);
  box-shadow: 0 0 8px var(--gold-400);
  display: none;
}

#btnNotificationToggle.enabled .notif-badge-dot {
  display: block;
  background: var(--emerald-400);
  box-shadow: 0 0 8px var(--emerald-400);
}

#btnNotificationToggle.needs-permission .notif-badge-dot {
  display: block;
  background: var(--gold-400);
  animation: pulseBadge 2s infinite ease-in-out;
}

@keyframes pulseBadge {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.7; }
}

/* iOS Smart Install Banner */
.ios-smart-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  background: linear-gradient(135deg, rgba(6, 78, 59, 0.6) 0%, rgba(15, 27, 48, 0.8) 100%);
  border: 1px solid rgba(52, 211, 153, 0.35);
  border-radius: var(--radius-md);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-md), 0 0 25px rgba(16, 185, 129, 0.15);
  animation: slideDownBanner 0.4s ease;
}

@keyframes slideDownBanner {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.ios-banner-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.ios-banner-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
}

.ios-banner-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: #ffffff;
}

.ios-banner-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.3;
}

.ios-banner-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.btn-banner-action {
  padding: 0.45rem 0.9rem;
  background: var(--emerald-500);
  border: none;
  border-radius: var(--radius-full);
  color: #03140e;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-banner-action:hover {
  background: var(--emerald-400);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.btn-banner-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast);
}

.btn-banner-close:hover {
  color: var(--text-primary);
}

@media (max-width: 640px) {
  .ios-smart-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  .ios-banner-actions {
    width: 100%;
    justify-content: space-between;
  }
  .btn-banner-action {
    flex-grow: 1;
    text-align: center;
  }
}

/* Notification Status Card inside Modal */
.notif-status-card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.1rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  transition: all var(--transition-fast);
}

.notif-status-card.granted {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(6, 78, 59, 0.25);
}

.notif-status-card.denied {
  border-color: rgba(244, 63, 94, 0.4);
  background: rgba(136, 19, 55, 0.2);
}

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

.notif-status-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(245, 158, 11, 0.15);
  color: var(--gold-400);
  flex-shrink: 0;
}

.notif-status-card.granted .notif-status-icon-wrap {
  background: rgba(16, 185, 129, 0.2);
  color: var(--emerald-400);
}

.notif-status-card.denied .notif-status-icon-wrap {
  background: rgba(244, 63, 94, 0.2);
  color: #fb7185;
}

.notif-status-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.notif-status-subtitle {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.btn-enable-notif {
  width: 100%;
  padding: 0.65rem 1rem;
  background: linear-gradient(135deg, var(--emerald-500), var(--emerald-600));
  border: none;
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.btn-enable-notif:hover {
  opacity: 0.95;
  transform: translateY(-1px);
}

.notif-status-card.granted .btn-enable-notif {
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald-400);
  border: 1px solid rgba(16, 185, 129, 0.3);
  box-shadow: none;
  pointer-events: none;
}

/* Prayer Notification Toggles List */
.prayer-toggles-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.65rem;
  margin-top: 0.5rem;
}

.prayer-toggle-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem;
  background: rgba(11, 21, 38, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.prayer-toggle-item:hover {
  border-color: rgba(52, 211, 153, 0.3);
  background: rgba(15, 27, 48, 0.9);
}

.prayer-toggle-item .toggle-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.prayer-toggle-item .toggle-name {
  font-size: 0.88rem;
  font-weight: 500;
}

.prayer-toggle-item .toggle-arabic {
  font-family: var(--font-arabic);
  font-size: 0.9rem;
  color: var(--gold-400);
}

.prayer-toggle-item input[type="checkbox"] {
  accent-color: var(--emerald-500);
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* Switch styling for general toggle */
.setting-row-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.switch-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}

.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: rgba(255, 255, 255, 0.15);
  transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 34px;
}

.toggle-switch .slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
}

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

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

/* Test Notification Box */
.test-notif-box {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  background: rgba(11, 21, 38, 0.5);
  border: 1px dashed rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

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

/* iOS Walkthrough Guide Modal */
.ios-guide-intro {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 1.25rem;
}

.ios-app-preview {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.ios-preview-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.ios-steps-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.ios-step-card {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  padding: 0.85rem 1rem;
  background: rgba(11, 21, 38, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.ios-step-card.highlight {
  background: rgba(6, 78, 59, 0.25);
  border-color: rgba(52, 211, 153, 0.35);
}

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid var(--emerald-400);
  color: var(--emerald-400);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.step-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

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

.step-text {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.ios-inline-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  padding: 2px 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  color: var(--text-primary);
  margin: 0 2px;
}

/* Print Stylesheet for Exporting Monthly Calendar */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }

  .bg-ambient-pattern,
  .app-header,
  .convention-pill,
  .hero-card,
  .date-navigator,
  .prayer-grid,
  .secondary-timings,
  .features-grid,
  .audio-banner,
  .app-footer,
  .modal-footer,
  .modal-close-btn {
    display: none !important;
  }

  .modal-overlay {
    position: static !important;
    background: none !important;
    padding: 0 !important;
    display: block !important;
    opacity: 1 !important;
  }

  .modal-container {
    border: none !important;
    box-shadow: none !important;
    max-width: 100% !important;
    color: #000000 !important;
  }

  .monthly-table th {
    background: #e2e8f0 !important;
    color: #0f172a !important;
  }

  .monthly-table td {
    color: #0f172a !important;
    border-bottom: 1px solid #cbd5e1 !important;
  }

  .monthly-table tr.today-row td {
    background: #f1f5f9 !important;
    font-weight: bold !important;
  }
}
