:root {
  --primary-color: #1a5f4a;
  --secondary-color: #d4af37;
  --bg-color: #faf8f5;
  --text-color: #2c2c2c;
  --border-color: #e0dcd5;
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  background: var(--primary-color);
  padding: 1rem 2rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

nav {
  display: flex;
  justify-content: center;
  gap: 2rem;
}

nav a {
  color: white;
  text-decoration: none;
  font-size: 1.1rem;
  transition: opacity 0.3s;
}

nav a:hover {
  opacity: 0.8;
}

main {
  flex: 1;
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

footer {
  background: var(--primary-color);
  color: white;
  text-align: center;
  padding: 1.5rem;
  margin-top: auto;
}

/* Home page */
.home-page {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.home-page h1 {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.home-page h2 {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin: 2rem 0 1rem;
  font-weight: 500;
}

.home-page .subtitle {
  font-size: 1.2rem;
  color: #666;
  margin-bottom: 2rem;
}

.search-section {
  margin: 2rem 0;
}

.search-section input {
  padding: 1rem 2rem;
  font-size: 1.1rem;
  border: 2px solid var(--border-color);
  border-radius: 30px;
  width: 100%;
  max-width: 450px;
  font-family: 'Inter', sans-serif;
  text-align: center;
}

.search-section input:focus {
  outline: none;
  border-color: var(--primary-color);
}

.search-hint {
  font-size: 0.9rem;
  color: #888;
  margin-top: 0.5rem;
}

.quick-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.quick-links a {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  text-decoration: none;
  color: var(--text-color);
  border: 1px solid var(--border-color);
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.quick-links a:hover {
  border-color: var(--primary-color);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.link-title {
  font-weight: 600;
  color: var(--primary-color);
}

.link-desc {
  font-size: 0.85rem;
  color: #888;
}

/* Verse page */
.verse-page {
  max-width: 900px;
  margin: 0 auto;
}

.verse-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.verse-header h1 {
  font-size: 2rem;
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.surah-info {
  color: #666;
  font-size: 1rem;
}

.verse-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.verse-navigation.bottom {
  margin-top: 1.5rem;
  margin-bottom: 0;
}

.nav-link {
  background: var(--primary-color);
  color: white;
  padding: 0.6rem 1.25rem;
  border-radius: 25px;
  text-decoration: none;
  transition: all 0.3s;
  font-size: 0.95rem;
}

.nav-link:hover {
  background: #0d3d2e;
}

.nav-link.disabled {
  background: #ccc;
  cursor: not-allowed;
}

.nav-link.home {
  background: var(--secondary-color);
}

.verse-indicator {
  font-size: 1rem;
  color: #666;
}

.verse-container {
  background: white;
  border-radius: 20px;
  padding: 3rem;
  box-shadow: 0 10px 40px rgba(0,0,0,0.1);
  border: 1px solid var(--border-color);
  text-align: center;
}

.bismillah {
  font-family: 'Amiri', serif;
  font-size: 1.8rem;
  color: var(--primary-color);
  direction: rtl;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.verse-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: var(--secondary-color);
  color: white;
  border-radius: 50%;
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.verse-text {
  font-family: 'Amiri', serif;
  font-size: 2.5rem;
  line-height: 2.5;
  color: var(--text-color);
  direction: rtl;
}

/* Action buttons */
.action-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 1.5rem 0;
  flex-wrap: wrap;
}

.action-btn {
  padding: 0.875rem 2rem;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s;
  font-size: 1rem;
}

.action-btn.primary {
  background: var(--primary-color);
  color: white;
}

.action-btn.primary:hover {
  background: #0d3d2e;
}

.action-btn.secondary {
  background: white;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.action-btn.secondary:hover {
  background: var(--primary-color);
  color: white;
}

/* Surahs page */
.surahs-page {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.surahs-page h1 {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.surahs-page .subtitle {
  color: #666;
  margin-bottom: 2rem;
}

.surah-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
}

.surah-card {
  background: white;
  padding: 1rem;
  border-radius: 10px;
  text-decoration: none;
  border: 1px solid var(--border-color);
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.surah-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
  border-color: var(--secondary-color);
}

.surah-card.makki {
  border-left: 4px solid #2e7d32;
}

.surah-card.madani {
  border-left: 4px solid #1565c0;
}

.surah-card.makki:hover {
  border-color: #2e7d32;
}

.surah-card.madani:hover {
  border-color: #1565c0;
}

.surah-type {
  font-size: 1rem;
  margin-left: auto;
  opacity: 0.8;
}

.surah-legend {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.legend-item {
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  border: 2px solid #ddd;
  border-radius: 20px;
  background: white;
  cursor: pointer;
  transition: all 0.3s;
}

.legend-item:hover {
  transform: translateY(-2px);
}

.legend-item[data-filter="makki"] {
  border-color: #2e7d32;
  color: #2e7d32;
}

.legend-item[data-filter="madani"] {
  border-color: #1565c0;
  color: #1565c0;
}

.legend-item[data-filter="all"] {
  border-color: var(--secondary-color);
  color: var(--primary-color);
}

.legend-item.active {
  color: white;
}

.legend-item.active[data-filter="makki"] {
  background: #2e7d32;
}

.legend-item.active[data-filter="madani"] {
  background: #1565c0;
}

.legend-item.active[data-filter="all"] {
  background: var(--secondary-color);
}

.surah-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--secondary-color);
  color: white;
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 600;
  flex-shrink: 0;
}

.surah-name {
  color: var(--text-color);
  font-size: 0.95rem;
  text-align: left;
}

/* Surah navigation on verse page */
.surah-navigation {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 1.5rem 0;
  flex-wrap: wrap;
}

.surah-nav-link {
  background: var(--secondary-color);
  color: white;
  padding: 0.6rem 1.25rem;
  border-radius: 25px;
  text-decoration: none;
  transition: all 0.3s;
  font-size: 0.95rem;
}

.surah-nav-link:hover {
  background: #b8962e;
}

.surah-nav-link.disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* Responsive */
@media (max-width: 768px) {
  .verse-text {
    font-size: 1.8rem;
  }
  
  .verse-container {
    padding: 1.5rem;
  }
  
  .nav-link {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
  
  .home-page h1 {
    font-size: 2rem;
  }
}
