:root {
  --bg: #0b1020;
  --bg-soft: #12172a;
  --text: #e7eaf3;
  --text-muted: #94a3b8;
  --primary: #6ea8fe;
  --secondary: #a78bfa;
  --accent: #22d3ee;
  --emerald-deep: #047857;
  --emerald-glow: #10b981;
  --card-bg: rgba(15, 23, 42, 0.6);
  --border: rgba(255, 255, 255, 0.1);
  --input-bg: rgba(255, 255, 255, 0.05);
  --select-hover-bg: rgba(16, 185, 129, 0.04);
  --header-height: 80px;
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

html.light {
  --bg: #f8fafc;
  --bg-soft: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --primary: #047857; /* Emerald as primary in light mode */
  --secondary: #059669;
  --accent: #0d9488;
  --emerald-deep: #064e3b;
  --emerald-glow: #34d399;
  --card-bg: rgba(255, 255, 255, 0.8);
  --border: #e2e8f0;
  --input-bg: #ffffff;
  --select-hover-bg: rgba(4, 120, 87, 0.04);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

.logo-round {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  font-weight: 700;
  color: var(--text);
}

.font-decorative {
  font-family: 'Eagle Lake', cursive;
}

.text-muted {
  color: var(--text-muted);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--secondary);
}

/* Backgrounds */
.bg-pattern {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background-image: url('../img/islamic-pattern-light.svg');
  opacity: 0.15;
  pointer-events: none;
  background-size: 400px;
  animation: patternFloat 60s linear infinite;
}

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

html.light .bg-pattern {
  opacity: 0.08;
}

.bg-glow {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at center, var(--primary) 0%, transparent 70%);
  opacity: 0.05;
  z-index: -2;
  pointer-events: none;
}

/* Header */
header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  height: var(--header-height);
  transition: all 0.3s ease;
  padding-top: 20px;
}

header.scrolled {
  position: fixed;
  background: rgba(15, 23, 42, 0.85); /* Dark glass */
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  padding-top: 0;
  height: 70px;
  animation: slideDown 0.3s ease forwards;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

@keyframes slideDown {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}

html.light header.scrolled {
  background: rgba(255, 255, 255, 0.8); /* Light glass */
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
}

.brand-text {
  font-size: 1.8rem;
  transition: color 0.3s;
}

.logo:hover .brand-text {
  color: var(--emerald-deep); /* Deep Emerald */
  text-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
}

.islamic-ornament {
  width: 48px;
  height: 48px;
  margin: 0 auto 20px;
  background-color: var(--emerald-glow);
  position: relative;
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M12 2L14.5 9.5L22 12L14.5 14.5L12 22L9.5 14.5L2 12L9.5 9.5L12 2Z' fill='currentColor'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M12 2L14.5 9.5L22 12L14.5 14.5L12 22L9.5 14.5L2 12L9.5 9.5L12 2Z' fill='currentColor'/%3E%3C/svg%3E");
  mask-repeat: no-repeat;
  mask-position: center;
}
.glass-pill {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 8px 32px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.glass-pill-small {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 6px 16px;
  display: flex;
  align-items: center;
}

.glass-pill-icon {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
  transition: all 0.2s;
}

.glass-pill-icon:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--primary);
  transform: translateY(-2px);
}

.glass-panel {
  background: var(--card-bg);
  backdrop-filter: blur(24px);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
}

/* Nav Links */
.nav-link {
  color: var(--text);
  opacity: 0.8;
  font-weight: 500;
  position: relative;
}

.nav-link:hover {
  opacity: 1;
  color: var(--emerald-glow);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--emerald-glow);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* Header Right */
.header-right {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* ===== LANGUAGE SELECTOR ===== */
.lang-select-wrapper {
  position: relative;
}

.btn-lang {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  font-size: 0.875rem;
  padding: 8px 14px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.btn-lang:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--emerald-glow);
}

.btn-lang .lang-icon {
  width: 16px;
  height: 16px;
  opacity: 0.7;
}

.btn-lang .lang-chevron {
  width: 14px;
  height: 14px;
  opacity: 0.5;
  transition: transform 0.3s ease;
}

.lang-select-wrapper.open .lang-chevron {
  transform: rotate(180deg);
}

/* Glassmorphism Dropdown */
.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  padding: 8px;
  display: none;
  flex-direction: column;
  gap: 4px;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  transform-origin: top right;
  animation: dropdownSlide 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

html.light .lang-dropdown {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05) inset;
}

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

.lang-dropdown.show {
  display: flex;
}

.lang-dropdown-header {
  padding: 8px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}

.lang-option {
  background: transparent;
  border: none;
  color: var(--text);
  padding: 10px 12px;
  text-align: left;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
}

.lang-option:hover {
  background: rgba(16, 185, 129, 0.1);
  color: var(--emerald-glow);
}

.lang-option.active {
  background: var(--emerald-glow);
  color: #fff;
}

.lang-flag {
  font-size: 1.1rem;
}

html.light .lang-option:hover {
  background: rgba(4, 120, 87, 0.1);
}

/* ===== THEME TOGGLE WITH ANIMATED TEXT ===== */
.theme-toggle-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-text-container {
  position: relative;
  height: 20px;
  overflow: hidden;
  min-width: 40px;
}

.theme-text {
  position: absolute;
  right: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.theme-text-light {
  transform: translateY(0);
  opacity: 1;
}

.theme-text-dark {
  transform: translateY(100%);
  opacity: 0;
}

/* Dark mode active - show dark text */
html.dark .theme-text-light {
  transform: translateY(-100%);
  opacity: 0;
}

html.dark .theme-text-dark {
  transform: translateY(0);
  opacity: 1;
}

/* Toggle Switch */
.theme-switch {
  position: relative;
  width: 56px;
  height: 30px;
  cursor: pointer;
}

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

.theme-slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border);
  border-radius: 30px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px;
}

.theme-slider::before {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  left: 3px;
  bottom: 3px;
  background: linear-gradient(135deg, #FFD93D, #FF9F1C);
  border-radius: 50%;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  box-shadow: 0 2px 10px rgba(255, 217, 61, 0.5);
  z-index: 2;
}

.slider-icon {
  width: 14px;
  height: 14px;
  transition: all 0.3s ease;
  z-index: 1;
}

.icon-sun {
  color: #FFD93D;
  opacity: 0.3;
}

.icon-moon {
  color: #a78bfa;
  opacity: 0.7;
}

/* Checked State (Dark Mode) */
.theme-switch input:checked + .theme-slider {
  background: rgba(167, 139, 250, 0.2);
  border-color: rgba(167, 139, 250, 0.3);
}

.theme-switch input:checked + .theme-slider::before {
  transform: translateX(26px);
  background: linear-gradient(135deg, #a78bfa, #8b5cf6);
  box-shadow: 0 2px 10px rgba(139, 92, 246, 0.5);
}

.theme-switch input:checked + .theme-slider .icon-sun {
  opacity: 0.7;
}

.theme-switch input:checked + .theme-slider .icon-moon {
  opacity: 0.3;
}

.theme-switch:hover .theme-slider {
  border-color: var(--emerald-glow);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
}

/* Hero Section */
.hero-video-section {
  position: relative;
  height: 90vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: -1;
  background-image: radial-gradient(circle at center, transparent 0%, var(--bg) 100%);
}

.hero-content-center {
  text-align: center;
  color: #fff;
  z-index: 10;
  max-width: 800px;
  padding: 0 20px;
  margin-top: 60px;
}

.hero-content-center h1 {
  font-size: 3.5rem;
  margin-bottom: 24px;
  text-shadow: 0 4px 30px rgba(0,0,0,0.5);
}

.hero-title {
  /* Dark Mode: Deep Emerald Green Gradient */
  color: #10b981;
  background: linear-gradient(135deg, #10b981, #047857);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  filter: drop-shadow(0 4px 20px rgba(16, 185, 129, 0.3));
}

html.light .hero-title {
  /* Light Mode: Black */
  background: none;
  background-clip: border-box;
  -webkit-background-clip: border-box;
  -webkit-text-fill-color: currentColor;
  color: #000000 !important;
  filter: none;
  text-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

.hero-content-center p {
  font-size: 1.25rem;
  color: rgba(255,255,255,0.9);
  margin-bottom: 40px;
}

/* Prayer Times Section */
.prayer-section {
  padding: 60px 0 100px;
  position: relative;
}

.prayer-card-wrapper {
  max-width: 900px;
  margin: -100px auto 0; /* Overlap hero */
  padding: 40px;
  position: relative;
  z-index: 20;
}

.prayer-header {
  text-align: center;
  margin-bottom: 40px;
}

.prayer-header h2 {
  font-size: 2.5rem;
  color: var(--emerald-glow);
  margin-bottom: 8px;
}

.location-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 40px;
}

.select-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.input-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* ===== CUSTOM SELECT DROPDOWN ===== */
.custom-select {
  position: relative;
}

.custom-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--text);
  font-size: 0.95rem;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: left;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.custom-select-trigger:hover:not(:disabled) {
  border-color: var(--emerald-glow);
  background: var(--select-hover-bg, rgba(16, 185, 129, 0.04));
}

.custom-select-trigger:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  filter: grayscale(0.3);
}

.custom-select.open .custom-select-trigger {
  border-color: var(--emerald-glow);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
  background: var(--select-hover-bg, rgba(16, 185, 129, 0.04));
}

.select-trigger-left {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  flex: 1;
  min-width: 0;
}

.select-trigger-icon {
  width: 18px;
  height: 18px;
  color: var(--emerald-glow);
  flex-shrink: 0;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.custom-select.open .select-trigger-icon,
.custom-select-trigger:hover .select-trigger-icon {
  opacity: 1;
}

.select-chevron {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.custom-select.open .select-chevron {
  transform: rotate(180deg);
  color: var(--emerald-glow);
}

.select-value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.select-value.placeholder {
  color: var(--text-muted);
}

.custom-select.disabled {
  pointer-events: none;
}

.custom-select.disabled .custom-select-trigger {
  opacity: 0.4;
}

/* Dropdown Panel */
.custom-select-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2), 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.98);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

html.light .custom-select-dropdown {
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
  border-color: #e2e8f0;
  background: #ffffff;
}

.custom-select.open .custom-select-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* Search Input */
.select-search-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

html.light .select-search-wrapper {
  background: rgba(0, 0, 0, 0.02);
}

.select-search-icon {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: color 0.2s;
}

.select-search-wrapper:focus-within .select-search-icon {
  color: var(--emerald-glow);
}

.select-search {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  caret-color: var(--emerald-glow);
}

.select-search::placeholder {
  color: var(--text-muted);
  opacity: 0.5;
}

/* Options List */
.select-options {
  max-height: 240px;
  overflow-y: auto;
  padding: 6px;
  scroll-behavior: smooth;
}

.select-options::-webkit-scrollbar {
  width: 5px;
}

.select-options::-webkit-scrollbar-track {
  background: transparent;
  margin: 6px 0;
}

.select-options::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 10px;
  transition: background 0.2s;
}

.select-options::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Individual Option */
.select-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  text-align: left;
  cursor: pointer;
  border-radius: 10px;
  transition: all 0.15s ease;
  position: relative;
}

.select-option:hover {
  background: rgba(16, 185, 129, 0.08);
}

html.light .select-option:hover {
  background: rgba(4, 120, 87, 0.06);
}

.select-option.active {
  background: rgba(16, 185, 129, 0.12);
  color: var(--emerald-glow);
  font-weight: 600;
}

html.light .select-option.active {
  background: rgba(4, 120, 87, 0.08);
  color: var(--primary);
}

.select-option.active::after {
  content: '';
  position: absolute;
  right: 14px;
  width: 6px;
  height: 6px;
  background: var(--emerald-glow);
  border-radius: 50%;
}

html.light .select-option.active::after {
  background: var(--primary);
}

.select-option.hidden {
  display: none;
}

/* No Results Message */
.select-no-results {
  padding: 20px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  display: none;
}

.select-no-results.visible {
  display: block;
}

.date-display {
  text-align: center;
  margin-bottom: 32px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 16px;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.date-gregorian {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.date-hijri {
  font-size: 1.25rem;
  color: var(--text);
}

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

.prayer-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 16px;
  text-align: center;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.prayer-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../img/islamic-pattern.svg');
  opacity: 0.05;
  z-index: 0;
  pointer-events: none;
}

.prayer-card span {
  position: relative;
  z-index: 1;
}

.prayer-card.current {
  background: var(--emerald-glow);
  border-color: var(--emerald-glow);
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
}

.prayer-card.current::before {
  opacity: 0.1;
}

.prayer-card.current .prayer-time,
.prayer-card.current .prayer-name {
  color: #fff;
}

.prayer-name {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: block;
}

.prayer-time {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  font-family: 'Inter', monospace; /* Tabular nums */
}

/* Loader */
.hidden { display: none !important; }

.loader {
  display: flex;
  justify-content: center;
  padding: 40px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255,255,255,0.1);
  border-radius: 50%;
  border-top-color: var(--emerald-glow);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Mobile Nav */
.burger-menu {
  display: none;
}

@media (max-width: 768px) {
  .nav-center { display: none; }
  .burger-menu { display: flex; }
  .header-inner { justify-content: space-between; }
  .location-selector { grid-template-columns: 1fr; }
  
  /* Hide language selector in navbar on mobile */
  .lang-select-wrapper { display: none; }
  
  .mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--bg);
    z-index: 90;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 32px;
  }
  
  .mobile-nav.active { display: flex; }
  .mobile-nav .nav-link { font-size: 1.5rem; }
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Utilities */
.centered {
  justify-content: center;
}

.store-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.store-btn {
  color: #fff;
  padding: 12px 24px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: transform 0.2s;
}

.store-btn:hover {
  transform: translateY(-2px);
}

.store-btn svg {
  width: 24px;
  height: 24px;
}

.store-btn-text {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.store-btn-text span:first-child {
  font-size: 0.7rem;
  opacity: 0.8;
}

.store-btn-text span:last-child {
  font-size: 1rem;
  font-weight: 700;
}

/* ===== FEATURES — BENTO GRID ===== */
.features-section {
  padding: 100px 0;
  position: relative;
  z-index: 10;
}

.section-title {
  text-align: center;
  margin-bottom: 60px;
}

.section-title h2 {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

/* Bento Grid Layout — 3 columns */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* Wide card spans 2 columns */
.bento-wide {
  grid-column: span 2;
}

/* Card Base */
.bento-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 32px;
  position: relative;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s ease;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.bento-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.2);
}

html.light .bento-card:hover {
  box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.08);
}

/* Accent Glow on Hover (top-left corner) */
.bento-card::before {
  content: '';
  position: absolute;
  top: -60px;
  left: -60px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 0;
}

.bento-card:hover::before {
  opacity: 1;
}

/* Accent Color Variants */
.bento-accent-emerald:hover { border-color: rgba(16, 185, 129, 0.4); }
.bento-accent-emerald::before { background: rgba(16, 185, 129, 0.08); }

.bento-accent-teal:hover { border-color: rgba(20, 184, 166, 0.4); }
.bento-accent-teal::before { background: rgba(20, 184, 166, 0.08); }

.bento-accent-violet:hover { border-color: rgba(139, 92, 246, 0.4); }
.bento-accent-violet::before { background: rgba(139, 92, 246, 0.08); }

.bento-accent-gold:hover { border-color: rgba(217, 176, 83, 0.4); }
.bento-accent-gold::before { background: rgba(217, 176, 83, 0.08); }

.bento-accent-amber:hover { border-color: rgba(245, 158, 11, 0.4); }
.bento-accent-amber::before { background: rgba(245, 158, 11, 0.08); }

.bento-accent-sky:hover { border-color: rgba(56, 189, 248, 0.4); }
.bento-accent-sky::before { background: rgba(56, 189, 248, 0.08); }

.bento-accent-rose:hover { border-color: rgba(244, 114, 182, 0.4); }
.bento-accent-rose::before { background: rgba(244, 114, 182, 0.08); }

/* Card Inner — content wrapper */
.bento-card-inner {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  position: relative;
  z-index: 1;
}

.bento-card:not(.bento-wide) .bento-card-inner {
  flex-direction: column;
}

/* Icon */
.bento-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.3s ease, background 0.3s ease;
}

.bento-icon svg,
.bento-icon i {
  width: 24px;
  height: 24px;
}

.bento-card:hover .bento-icon {
  transform: scale(1.08);
}

/* Icon color per accent */
.bento-accent-emerald .bento-icon { background: rgba(16, 185, 129, 0.12); color: #10b981; }
.bento-accent-teal .bento-icon { background: rgba(20, 184, 166, 0.12); color: #14b8a6; }
.bento-accent-violet .bento-icon { background: rgba(139, 92, 246, 0.12); color: #8b5cf6; }
.bento-accent-gold .bento-icon { background: rgba(217, 176, 83, 0.12); color: #d9b053; }
.bento-accent-amber .bento-icon { background: rgba(245, 158, 11, 0.12); color: #f59e0b; }
.bento-accent-sky .bento-icon { background: rgba(56, 189, 248, 0.12); color: #38bdf8; }
.bento-accent-rose .bento-icon { background: rgba(244, 114, 182, 0.12); color: #f472b6; }

html.light .bento-accent-emerald .bento-icon { background: rgba(4, 120, 87, 0.1); color: #047857; }
html.light .bento-accent-teal .bento-icon { background: rgba(13, 148, 136, 0.1); color: #0d9488; }
html.light .bento-accent-violet .bento-icon { background: rgba(109, 40, 217, 0.1); color: #6d28d9; }
html.light .bento-accent-gold .bento-icon { background: rgba(161, 121, 21, 0.1); color: #a17915; }
html.light .bento-accent-amber .bento-icon { background: rgba(217, 119, 6, 0.1); color: #d97706; }
html.light .bento-accent-sky .bento-icon { background: rgba(2, 132, 199, 0.1); color: #0284c7; }
html.light .bento-accent-rose .bento-icon { background: rgba(219, 39, 119, 0.1); color: #db2777; }

/* Text */
.bento-text {
  flex: 1;
  min-width: 0;
}

.bento-text h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text);
}

.bento-text p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Visual embellishments inside wide cards */
.bento-visual {
  position: relative;
  z-index: 1;
  margin-top: 20px;
}

/* Prayer mini times */
.bento-mini-times {
  display: flex;
  gap: 12px;
}

.bento-mini-time {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 12px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 80px;
  transition: all 0.3s ease;
}

html.light .bento-mini-time {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.06);
}

.bento-mini-time span:first-child {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.bento-mini-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.bento-mini-time.active {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.25);
}

.bento-mini-time.active span:first-child {
  color: var(--emerald-glow);
}

html.light .bento-mini-time.active {
  background: rgba(4, 120, 87, 0.08);
  border-color: rgba(4, 120, 87, 0.2);
}

html.light .bento-mini-time.active span:first-child {
  color: var(--primary);
}

/* Quran visual */
.bento-quran-line {
  font-size: 1.6rem;
  color: var(--text);
  opacity: 0.25;
  text-align: right;
  direction: rtl;
  line-height: 2;
  letter-spacing: 1px;
  user-select: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

html.light .bento-quran-line {
  opacity: 0.15;
}

/* PRO Badge */
.bento-has-badge .badge {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 2;
}

.badge {
  font-size: 0.65rem;
  padding: 4px 10px;
  border-radius: 8px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.badge-pro {
  background: linear-gradient(135deg, #FFD700, #F59E0B);
  color: #000;
  box-shadow: 0 2px 12px rgba(245, 158, 11, 0.3);
}

/* ===== BENTO RESPONSIVE ===== */
@media (max-width: 900px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .bento-wide {
    grid-column: span 2;
  }
}

@media (max-width: 600px) {
  .bento-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .bento-wide {
    grid-column: span 1;
  }
  .bento-card {
    padding: 24px;
  }
  .bento-card-inner {
    flex-direction: column !important;
  }
  .bento-mini-times {
    flex-wrap: wrap;
  }
  .section-title h2 {
    font-size: 1.8rem;
  }
}

/* Prayer Times */
.prayer-times-section {
  padding: 80px 0;
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.prayer-card {
  background: var(--card);
  border-radius: 24px;
  padding: 40px;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
  border: 1px solid var(--border);
  box-shadow: 0 20px 40px var(--shadow);
}

.prayer-form {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
  justify-content: center;
}

.form-select {
  padding: 12px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1rem;
  min-width: 150px;
}

.prayer-results {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 32px;
}

.prayer-time-item {
  padding: 16px;
  background: var(--bg);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.time-name {
  display: block;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.time-value {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
}

.prayer-date {
  margin-top: 24px;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

/* Footer */
footer {
  padding: 60px 0 30px;
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  margin-top: auto;
}

.logo-round.small {
  width: 32px;
  height: 32px;
}

.mb-4 {
  margin-bottom: 16px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  margin-bottom: 60px;
}

.footer-col h4 {
  margin-bottom: 20px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ===== CONTACT SECTION ===== */
.contact-section {
  padding: 80px 0;
  position: relative;
  z-index: 10;
}

.contact-card {
  text-align: center;
  padding: 48px 40px;
  max-width: 520px;
  margin: 0 auto;
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.contact-icon-wrapper {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--emerald-glow), var(--emerald-deep));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.contact-icon-wrapper svg {
  width: 26px;
  height: 26px;
  color: #fff;
  stroke-width: 2;
}

.contact-title {
  font-size: 1.5rem;
}

.contact-desc {
  font-size: 0.95rem;
  max-width: 360px;
  line-height: 1.6;
}

.contact-email-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  border-radius: 14px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  background: var(--card-bg);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  margin-top: 8px;
  text-decoration: none;
}

.contact-email-btn svg {
  width: 18px;
  height: 18px;
  color: var(--emerald-glow);
}

.contact-email-btn:hover {
  border-color: var(--emerald-glow);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.15);
  transform: translateY(-2px);
  color: var(--text);
}

.contact-links {
  display: flex;
  gap: 24px;
  margin-top: 12px;
}

.contact-sub-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color 0.2s;
  text-decoration: none;
}

.contact-sub-link svg {
  width: 15px;
  height: 15px;
}

.contact-sub-link:hover {
  color: var(--emerald-glow);
}

@media (max-width: 480px) {
  .contact-card {
    padding: 36px 24px;
  }
  .contact-links {
    flex-direction: column;
    gap: 12px;
    align-items: center;
  }
}

/* ===== PREMIUM MOBILE MENU ===== */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  pointer-events: none;
}

.mobile-menu-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 1;
}

.mobile-menu-container {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 400px;
  height: 100%;
  background: var(--bg);
  border-left: 1px solid var(--border);
  z-index: 2;
  transform: translateX(100%);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  padding: 40px 32px;
  box-shadow: -10px 0 40px rgba(0,0,0,0.5);
}

.mobile-menu-overlay.active {
  pointer-events: auto;
}

.mobile-menu-overlay.active .mobile-menu-bg {
  opacity: 1;
}

.mobile-menu-overlay.active .mobile-menu-container {
  transform: translateX(0);
}

.mobile-menu-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--text);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.mobile-menu-close:hover {
  background: rgba(255,255,255,0.1);
  transform: rotate(90deg);
  color: var(--emerald-glow);
}

.mobile-nav-links {
  margin-top: 60px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.mobile-nav-link {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s ease;
  display: block;
}

.mobile-nav-link:hover {
  color: var(--emerald-glow);
  padding-left: 10px;
}

/* Staggered Animation for Links */
.mobile-menu-overlay.active .mobile-nav-link {
  opacity: 1;
  transform: translateY(0);
}

.mobile-menu-overlay.active .mobile-nav-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu-overlay.active .mobile-nav-link:nth-child(2) { transition-delay: 0.2s; }
.mobile-menu-overlay.active .mobile-nav-link:nth-child(3) { transition-delay: 0.3s; }
.mobile-menu-overlay.active .mobile-nav-link:nth-child(4) { transition-delay: 0.4s; }

/* Mobile Language Selector - Dropdown Style */
.mobile-lang-selector {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease 0.45s;
}

.mobile-menu-overlay.active .mobile-lang-selector {
  opacity: 1;
  transform: translateY(0);
}

.mobile-lang-dropdown {
  position: relative;
  width: 100%;
}

.mobile-lang-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.mobile-lang-trigger:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--emerald-glow);
}

.mobile-lang-trigger .trigger-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mobile-lang-trigger .trigger-content .lang-flag {
  font-size: 1.3rem;
}

.mobile-lang-trigger .trigger-content span:last-child {
  font-weight: 500;
}

.mobile-lang-trigger .trigger-icon {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  transition: transform 0.3s ease;
}

.mobile-lang-dropdown.open .mobile-lang-trigger .trigger-icon {
  transform: rotate(180deg);
}

.mobile-lang-options {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.25s ease;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.3);
  z-index: 10;
}

.mobile-lang-dropdown.open .mobile-lang-options {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.mobile-lang-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  background: transparent;
  border: none;
  border-radius: 10px;
  color: var(--text);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.mobile-lang-option:hover {
  background: rgba(16, 185, 129, 0.1);
}

.mobile-lang-option.active {
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald-glow);
}

.mobile-lang-option.active::after {
  content: '✓';
  margin-left: auto;
  font-weight: 600;
  color: var(--emerald-glow);
}

.mobile-lang-option .lang-flag {
  font-size: 1.2rem;
}

.mobile-lang-option span:last-child {
  font-weight: 500;
}

/* Mobile Menu Footer */
.mobile-menu-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding-top: 32px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease 0.5s;
}

.mobile-menu-overlay.active .mobile-menu-footer {
  opacity: 1;
  transform: translateY(0);
}

.mobile-footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.mobile-footer-brand .brand-text {
  font-size: 1.5rem;
}

.mobile-footer-legal {
  display: flex;
  gap: 16px;
  margin-top: 24px;
  margin-bottom: 16px;
  font-size: 0.85rem;
}

.mobile-footer-legal a {
  color: var(--text-muted);
}

.mobile-footer-legal a:hover {
  color: var(--emerald-glow);
}

.copyright {
  color: var(--text-muted);
  font-size: 0.8rem;
  opacity: 0.6;
}

/* Hide old mobile menu styles if any */
.mobile-nav { display: none !important; }

/* RTL Support */
html[dir="rtl"] {
  direction: rtl;
  text-align: right;
}

/* RTL Header - no reverse needed, keep standard layout */

html[dir="rtl"] .store-btn {
  text-align: right;
  flex-direction: row-reverse;
}

html[dir="rtl"] .lang-dropdown {
  right: auto;
  left: 0;
}

html[dir="rtl"] .lang-option {
  text-align: right;
}

/* RTL Mobile Menu - slide from LEFT */
html[dir="rtl"] .mobile-menu-container {
  right: auto;
  left: 0;
  transform: translateX(-100%);
  border-left: none;
  border-right: 1px solid var(--border);
  box-shadow: 10px 0 40px rgba(0,0,0,0.5);
}

html[dir="rtl"] .mobile-menu-overlay.active .mobile-menu-container {
  transform: translateX(0);
}

html[dir="rtl"] .mobile-menu-close {
  right: auto;
  left: 24px;
}

html[dir="rtl"] .mobile-nav-link:hover {
  padding-left: 0;
  padding-right: 10px;
}

html[dir="rtl"] .back-link:hover {
  transform: translateX(4px);
}

html[dir="rtl"] .back-link svg {
  transform: rotate(180deg);
}

html[dir="rtl"] .footer-content {
  direction: rtl;
}

html[dir="rtl"] .legal-content ul {
  padding-left: 0;
  padding-right: 24px;
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background: var(--card-bg);
  backdrop-filter: blur(24px);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 48px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  animation: modalSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.modal-icon {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, var(--emerald-glow), var(--emerald-deep));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  color: #fff;
}

.modal-icon svg {
  width: 36px;
  height: 36px;
}

.modal-title {
  font-size: 1.5rem;
  margin-bottom: 12px;
  color: var(--text);
}

.modal-desc {
  color: var(--text-muted);
  margin-bottom: 32px;
  line-height: 1.6;
}

.modal-close {
  background: linear-gradient(135deg, var(--emerald-glow), var(--emerald-deep));
  color: #fff;
  border: none;
  padding: 14px 32px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.modal-close:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

/* ===== GLASS BUTTON ===== */
.glass-btn {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.glass-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: var(--emerald-glow);
  box-shadow: 0 8px 32px rgba(16, 185, 129, 0.2);
}

/* ===== LEGAL PAGES ===== */
.legal-page {
  padding: 120px 0 60px;
  min-height: 100vh;
}

.legal-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px;
}

.legal-content h1 {
  font-size: 2.5rem;
  margin-bottom: 24px;
  color: var(--emerald-glow);
}

.legal-content .last-update {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.legal-content section {
  margin-bottom: 32px;
}

.legal-content h2 {
  font-size: 1.25rem;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.legal-content p {
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.7;
}

.legal-content ul {
  padding-left: 24px;
  margin-bottom: 16px;
}

.legal-content li {
  color: var(--text-muted);
  margin-bottom: 8px;
  line-height: 1.6;
}

.legal-content a {
  color: var(--emerald-glow);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 32px;
  color: var(--text);
  font-weight: 500;
  transition: all 0.3s ease;
}

.back-link:hover {
  color: var(--emerald-glow);
  transform: translateX(-4px);
}

.back-link svg {
  width: 18px;
  height: 18px;
}

.attribution-item {
  margin-bottom: 20px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.attribution-item h3 {
  color: var(--text);
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.attribution-item p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.attribution-item a {
  font-size: 0.9rem;
  color: var(--emerald-glow);
}

/* Legal pages - header always fixed with background */
body:has(.legal-page) header {
  position: fixed;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  padding-top: 0;
  height: 70px;
}

html.light body:has(.legal-page) header {
  background: rgba(255, 255, 255, 0.8);
}

/* ===== RESPONSIVE - THEME TOGGLE ===== */
@media (max-width: 768px) {
  .theme-text-container {
    display: none;
  }
  
  .theme-toggle-wrapper {
    gap: 0;
  }
  
  .hero-content-center h1 {
    font-size: 2rem;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .legal-content {
    padding: 24px;
  }
  
  .legal-content h1 {
    font-size: 1.75rem;
  }
}
