:root {
  --bg-color: #ffffff;      /* Pure white background */
  --text-color: #000000;    /* Pure black text */
  --accent-color: #c0392b;  /* Kept for verse numbers, but you can change to black if you want pure monochrome */
  --card-bg: #f9f9f9;       /* Very light gray for cards */
  --btn-bg: #eeeeee;       /* Light gray for buttons */
  --btn-text: #000000;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-color: #121212;  /* Softer black to prevent eye strain */
    --text-color: #ffffff;/* Pure white text */
    --accent-color: #ff6b6b; /* Brighter red for dark mode contrast */
    --card-bg: #1e1e1e;   /* Slightly lighter dark for cards */
    --btn-bg: #2d2d2d;   /* Dark gray for buttons */
    --btn-text: #ffffff;
  }
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  margin: 0;
  padding: 15px;
  display: flex;
  justify-content: center;
}

/* Common Container */
.container-index, .container-kisah {
  max-width: 600px;
  width: 100%;
}

h1 {
  text-align: center;
  color: var(--text-color); /* Matches text color for pure black/white feel */
  margin-bottom: 5px;
  font-size: 1.8rem;
}

.subtitle {
  text-align: center;
  font-size: 0.9rem;
  opacity: 0.8;
  margin-bottom: 25px;
}

/* Index Page Styles */
.story-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.story-card {
  background: var(--card-bg);
  padding: 15px 18px;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  transition: transform 0.1s ease;
  border: 1px solid rgba(128, 128, 128, 0.2); /* Subtle border adds definition */
}

.story-card:active {
  transform: scale(0.98);
}

.story-title {
  font-weight: bold;
  margin-bottom: 3px;
}

.story-ref {
  font-size: 0.85rem;
  opacity: 0.7;
}

/* Kisah (Story) Page Styles */
.container-kisah {
  background: var(--card-bg);
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  border: 1px solid rgba(128, 128, 128, 0.2);
}

.controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(128, 128, 128, 0.3);
  padding-bottom: 10px;
  margin-bottom: 20px;
  gap: 10px;
}



/* Button Upgrades */
.btn {
  background: var(--btn-bg);
  color: var(--btn-text);
  border: 1px solid rgba(128, 128, 128, 0.4);
  padding: 10px 15px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  touch-action: manipulation;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}

.btn:active {
  opacity: 0.8;
}

/* WhatsApp Branding with High Contrast */
.btn-wa {
  background-color: #25D366 !important; 
  color: #000000 !important; /* Black text often provides better contrast on bright green */
  border: 1px solid rgba(0,0,0,0.2) !important;
  font-weight: 800 !important; /* Extra bold for readability */
}
@media (prefers-color-scheme: dark) {
  .btn-wa {
    background-color: #20b858 !important;
    color: #000000 !important;
  }
}

.btn-wa:active {
  background-color: #1ebd5c !important;
}


/* Action Grid for Share, Download, Copy */
.action-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 20px 0;
}

@media (min-width: 400px) {
  .action-grid {
    grid-template-columns: 1fr 1fr;
  }
  .full-width {
    grid-column: span 2;
  }
}

.audio-player {
  width: 100%;
  margin: 15px 0;
  height: 54px;
  border-radius: 8px;
}

.verse-number {
  font-size: 0.8rem;
  color: var(--accent-color);
  font-weight: bold;
  vertical-align: text-top;
  margin-right: 4px;
}

p {
  line-height: 1.6;
  margin-bottom: 15px;
}

hr.skip {
  margin: -5px 5px;
  margin-right: 50%;
  padding: 0;
  border: none;
  border-bottom: dotted 2px;
  opacity: 0.3;
}
