/* Homepage Specific Styles */
.container {
  max-width: 600px;
  width: 100%;
  padding: 30px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Language Toggle */
.lang-container { display: flex; justify-content: flex-end; margin-bottom: 10px; }
.lang-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex; align-items: center; gap: 6px;
}
.lang-btn:hover { border-color: var(--accent); color: var(--accent); }
.lang-btn.active { background: rgba(209, 169, 84, 0.1); border-color: var(--accent); color: var(--accent); font-weight: 600; }

/* Hero */
.hero { text-align: center; margin-bottom: 40px; padding-top: 10px; }
.brand-name { font-size: 2.2rem; letter-spacing: -0.02em; margin-bottom: 6px; }
.brand-subtitle { color: var(--accent); font-size: 1rem; font-weight: 500; opacity: 0.8; }

/* Book Card */
.book-card {
  display: flex; background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: 36px; overflow: hidden; margin-bottom: 30px; position: relative;
}
.book-cover-container { width: 140px; flex-shrink: 0; padding: 12px; display: flex; align-items: center; justify-content: center; }
.cover-link { display: block; width: 100%; }
.book-cover { width: 100%; height: auto; object-fit: cover; border-radius: 16px; box-shadow: 0 8px 20px rgba(0,0,0,0.6); filter: brightness(0.9); transition: transform 0.2s ease; }
.book-cover:hover { transform: scale(1.03); }
.book-info { padding: 24px 20px; display: flex; flex-direction: column; justify-content: center; flex: 1; }
.book-title { font-size: 1.1rem; color: #fff; margin-bottom: 6px; line-height: 1.3; }
.book-desc { font-size: 0.85rem; margin-bottom: 16px; line-height: 1.4; color: #bbb; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Buttons */
.card-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-action {
  padding: 10px 16px; border-radius: 999px; font-size: 0.75rem; font-weight: 600;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  gap: 4px; transition: background 0.2s; flex: 1; white-space: nowrap;
}
.btn-listen { background: rgba(209, 169, 84, 0.15); border: 1px solid var(--accent-dim); color: var(--accent); flex: 2; }
.btn-listen:active { background: rgba(209, 169, 84, 0.3); }
.btn-secondary { background: transparent; border: 1px solid var(--border-subtle); color: var(--text-muted); }
.btn-secondary:active { background: rgba(255,255,255,0.05); color: #fff; }

/* About & Footer */
.about-section { text-align: center; margin-top: 20px; padding-top: 30px; border-top: 1px solid var(--border-subtle); }
.author-photo { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; border: 2px solid var(--accent-dim); margin-bottom: 16px; filter: brightness(0.7); }
.bio-text { font-size: 0.9rem; text-align: left; margin-bottom: 0; }
.btn-text-toggle { background: none; border: none; color: var(--accent); font-size: 0.85rem; font-weight: 500; cursor: pointer; padding: 5px; margin-top: 4px; display: inline-block; text-decoration: underline; opacity: 0.9; }
.footer { text-align: center; padding: 30px; font-size: 0.75rem; color: var(--text-muted); opacity: 0.5; }
/* Homepage Specific Styles */
.container {
  max-width: 700px; /* Slightly wider to breathe */
  width: 100%;
  padding: 30px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Language Toggle */
.lang-container { display: flex; justify-content: flex-end; margin-bottom: 10px; }
.lang-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex; align-items: center; gap: 6px;
}
.lang-btn:hover { border-color: var(--accent); color: var(--accent); }
.lang-btn.active { background: rgba(209, 169, 84, 0.1); border-color: var(--accent); color: var(--accent); font-weight: 600; }

/* Hero */
.hero { text-align: center; margin-bottom: 40px; padding-top: 10px; }
.brand-name { font-size: 2.2rem; letter-spacing: -0.02em; margin-bottom: 6px; }
.brand-subtitle { color: var(--accent); font-size: 1rem; font-weight: 500; opacity: 0.8; }

/* Books Grid Container */
.books-grid {
  display: flex;
  flex-direction: column;
  gap: 30px; /* Space between books */
  margin-bottom: 40px;
}

/* Book Card */
.book-card {
  display: flex; 
  background: var(--bg-card); 
  border: 1px solid var(--border-subtle);
  border-radius: 24px; 
  overflow: hidden; 
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.book-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  border-color: var(--accent-dim);
}

.book-cover-container { 
  width: 160px; 
  flex-shrink: 0; 
  padding: 20px; 
  display: flex; 
  align-items: flex-start; 
  justify-content: center; 
  background: var(--bg-card-soft); /* Subtle contrast for image area */
}

.cover-link { display: block; width: 100%; }
.book-cover { 
  width: 100%; 
  height: auto; 
  object-fit: cover; 
  border-radius: 12px; 
  box-shadow: 0 8px 15px rgba(0,0,0,0.4); 
}

.book-info { 
  padding: 24px 24px; 
  display: flex; 
  flex-direction: column; 
  justify-content: center; 
  flex: 1; 
}

.book-title { font-size: 1.25rem; color: #fff; margin-bottom: 8px; line-height: 1.3; }
.book-desc { font-size: 0.9rem; margin-bottom: 20px; line-height: 1.5; color: #bbb; }

/* Buttons */
.card-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-action {
  padding: 10px 18px; border-radius: 999px; font-size: 0.8rem; font-weight: 600;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; transition: background 0.2s; white-space: nowrap; text-decoration: none;
}
.btn-listen { background: rgba(209, 169, 84, 0.15); border: 1px solid var(--accent-dim); color: var(--accent); flex-grow: 1; text-align: center;}
.btn-listen:hover { background: rgba(209, 169, 84, 0.25); border-color: var(--accent); }
.btn-secondary { background: transparent; border: 1px solid var(--border-subtle); color: var(--text-muted); }
.btn-secondary:hover { border-color: var(--text-muted); color: var(--text-main); }

/* About & Footer */
.about-section { text-align: center; margin-top: 20px; padding-top: 30px; border-top: 1px solid var(--border-subtle); }
.author-photo { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; border: 2px solid var(--accent-dim); margin-bottom: 16px; filter: brightness(0.9); }
.bio-text { font-size: 0.9rem; text-align: left; margin-bottom: 0; }
.btn-text-toggle { background: none; border: none; color: var(--accent); font-size: 0.85rem; font-weight: 500; cursor: pointer; padding: 5px; margin-top: 4px; display: inline-block; text-decoration: underline; opacity: 0.9; }
.footer { text-align: center; padding: 30px; font-size: 0.75rem; color: var(--text-muted); opacity: 0.5; }

/* --- Mobile / Responsive Tweaks --- */
@media (max-width: 600px) {
  .book-card {
    flex-direction: column; /* Stack vertically on mobile */
  }

  .book-cover-container {
    width: 100%;
    height: 220px; /* Slightly taller to fit image nicely */
    align-items: center; /* Center vertically */
    justify-content: center; /* Center horizontally */
    background: linear-gradient(to bottom, var(--bg-card-soft), var(--bg-card));
    padding: 20px 0 0 0;
  }

  .cover-link {
    /* This ensures the anchor tag itself centers the image inside it */
    display: flex;
    justify-content: center;
    width: 100%; 
  }

  .book-cover {
    width: auto;
    height: 100%;
    max-height: 180px; /* Limit height so it doesn't overflow */
    max-width: 200px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    transform: translateY(10px); /* Push it slightly down to overlap text area */
  }

  .book-info {
    padding: 30px 20px 24px 20px;
    text-align: center;
  }

  .card-actions {
    justify-content: center;
  }

  .btn-action {
    flex: 1 1 100%; /* Full width buttons on mobile */
  }

  .btn-secondary {
    flex: 1 1 45%; /* Split secondary buttons */
  }
}