/* ============================================================
   KurdNote — Kurdish Music Notes Library
   Design System & Complete Stylesheet
   Theme: Dark & Elegant
   ============================================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Noto+Sans+Arabic:wght@400;500;600;700;800&display=swap');

/* --- Design Tokens (CSS Custom Properties) --- */
:root {
  --bg: #0A0A0F;
  --surface: #12121A;
  --card: #1A1A2E;
  --gold: #D4AF37;
  --text: #E8DCC8;
  --text-secondary: #8A8A8A;
  --border: rgba(212, 175, 55, 0.08);
  --border-hover: rgba(212, 175, 55, 0.15);
  --border-mid: rgba(212, 175, 55, 0.12);
  --font-en: 'Inter', sans-serif;
  --font-ku: 'Noto Sans Arabic', 'Inter', sans-serif;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --transition: 0.2s ease;
}

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

/*
 * Mobile horizontal-overflow defense.
 *
 * Both <html> and <body> use overflow-x: hidden. This is the most reliable
 * cross-browser way to prevent any element from forcing the page wider than
 * the viewport. The navbar is position: sticky — works fine because sticky
 * only requires that no ANCESTOR has overflow set, and html/body are sticky's
 * containing block here, but we use overflow-x specifically (not overflow on
 * both axes), which on the html/body element is a special case that does NOT
 * break sticky in modern browsers.
 *
 * We deliberately avoid:
 *   - 100vw widths (vw includes scrollbar in some browsers, causing 1-2px overflow)
 *   - position: relative on body (creates a containing block that can trap
 *     position: fixed elements like the mobile menu)
 */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  width: 100%;
}

body {
  font-family: var(--font-en);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}

/* min-width: 0 fixes the classic flexbox/grid overflow where text doesn't
   wrap because flex items default to min-width: auto (= content size). */
*, *::before, *::after {
  min-width: 0;
}

img, svg, video, canvas, iframe {
  max-width: 100%;
  height: auto;
}

pre, code {
  max-width: 100%;
  overflow-x: auto;
  word-wrap: break-word;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
}

ul, ol {
  list-style: none;
}

input, textarea, select {
  font-family: inherit;
}

/* --- RTL Support --- */
html[dir="rtl"] {
  font-family: var(--font-ku);
}

html[dir="rtl"] body {
  font-family: var(--font-ku);
}

html[dir="rtl"] .search-icon {
  margin-right: 0;
  margin-left: 10px;
}

html[dir="rtl"] .back-link {
  flex-direction: row-reverse;
}

html[dir="rtl"] .nav-links {
  flex-direction: row-reverse;
}

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

html[dir="rtl"] .footer-bottom {
  flex-direction: row-reverse;
}

html[dir="rtl"] .social-link-card {
  flex-direction: row-reverse;
}

html[dir="rtl"] .download-btn {
  flex-direction: row-reverse;
}

html[dir="rtl"] .audio-player {
  flex-direction: row-reverse;
}

/* --- Typography System --- */
h1 {
  font-size: 38px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}

h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

h3 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

h4 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

h5 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

h6 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.5;
}

p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
  letter-spacing: 0.3px;
}

label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ============================================================
   6. Navigation
   ============================================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  height: 60px;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-size: 17px;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition);
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--text);
}

.nav-link.active {
  color: var(--gold);
}

.lang-toggle {
  font-size: 12px;
  font-weight: 600;
  color: var(--gold);
  background: transparent;
  border: 1px solid rgba(212, 175, 55, 0.3);
  padding: 5px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.lang-toggle:hover {
  background: rgba(212, 175, 55, 0.1);
  border-color: rgba(212, 175, 55, 0.5);
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* ============================================================
   7. Mobile Navigation
   ============================================================ */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 10, 15, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-20px);
  transition: all 0.35s ease;
}

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

.mobile-menu .nav-link {
  font-size: 20px;
  font-weight: 600;
}

.mobile-menu .lang-toggle {
  font-size: 14px;
  padding: 8px 22px;
  margin-top: 10px;
}

.mobile-menu-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.mobile-menu-close {
  position: absolute;
  top: 18px;
  right: 20px;
  font-size: 28px;
  color: var(--gold);
  cursor: pointer;
  background: none;
  border: none;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================================
   8. Hero Section
   ============================================================ */
.hero {
  background: linear-gradient(160deg, #0A0A0F 0%, #12121A 30%, #1A1A2E 65%, #16213E 100%);
  text-align: center;
  padding: 80px 30px;
  position: relative;
  overflow: hidden;
}

.hero-subtitle {
  font-size: 13px;
  font-weight: 600;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 4px;
  margin-bottom: 16px;
}

.hero-title {
  font-size: 38px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 16px;
  line-height: 1.2;
}

.hero-desc {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto 30px;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 14px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--gold);
  color: #0A0A0F;
  font-size: 13px;
  font-weight: 700;
  padding: 11px 26px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
}

.btn-primary:hover {
  background: #E0BF4A;
  transform: translateY(-1px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  color: var(--gold);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 24px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(212, 175, 55, 0.3);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
}

.btn-secondary:hover {
  background: rgba(212, 175, 55, 0.08);
  border-color: rgba(212, 175, 55, 0.5);
  transform: translateY(-1px);
}

/* ============================================================
   9. Decorative Notes
   ============================================================ */
.hero-decoration {
  position: absolute;
  color: var(--gold);
  opacity: 0.06;
  font-size: 48px;
  pointer-events: none;
  user-select: none;
}

.hero-decoration:nth-child(1) {
  top: 15%;
  left: 8%;
  font-size: 56px;
  transform: rotate(-15deg);
}

.hero-decoration:nth-child(2) {
  top: 25%;
  right: 10%;
  font-size: 40px;
  transform: rotate(10deg);
}

.hero-decoration:nth-child(3) {
  bottom: 20%;
  left: 15%;
  font-size: 44px;
  transform: rotate(20deg);
}

.hero-decoration:nth-child(4) {
  bottom: 15%;
  right: 12%;
  font-size: 52px;
  transform: rotate(-10deg);
}

.hero-decoration:nth-child(5) {
  top: 50%;
  left: 3%;
  font-size: 36px;
  transform: rotate(25deg);
}

/* ============================================================
   10. Stats Bar
   ============================================================ */
.stats-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 60px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 28px 30px;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 28px;
  font-weight: 800;
  color: var(--gold);
  line-height: 1.2;
}

.stat-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

/* ============================================================
   11. Section Headers
   ============================================================ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.section-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--gold);
}

.section-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.view-all {
  font-size: 13px;
  font-weight: 500;
  color: var(--gold);
  text-decoration: none;
  transition: opacity var(--transition);
  white-space: nowrap;
}

.view-all:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* ============================================================
   12. Horizontal Scroll Row
   ============================================================ */
.scroll-row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 10px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.scroll-row::-webkit-scrollbar {
  display: none;
}

/* ============================================================
   13. Note Cards
   ============================================================ */
.note-card {
  min-width: 180px;
  max-width: 180px;
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition), border-color var(--transition);
}

.note-card:hover {
  transform: translateY(-4px);
  border-color: rgba(212, 175, 55, 0.25);
}

.note-card-image {
  width: 100%;
  height: 140px;
  object-fit: cover;
}

.note-card-body {
  padding: 14px;
}

.note-card-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.note-card-dialect {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 3px;
}

.format-badges {
  display: flex;
  gap: 5px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.format-badge {
  background: rgba(212, 175, 55, 0.1);
  color: var(--gold);
  padding: 2px 7px;
  border-radius: 3px;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* ============================================================
   14. Book Cards
   ============================================================ */
.book-card {
  min-width: 170px;
  max-width: 170px;
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition), border-color var(--transition);
}

.book-card:hover {
  transform: translateY(-4px);
  border-color: rgba(212, 175, 55, 0.25);
}

.book-card-image {
  width: 100%;
  height: 180px;
  object-fit: contain;
  padding: 15px;
  background: linear-gradient(135deg, #2A1A3E, #1A1A2E);
}

.book-card-body {
  padding: 14px;
}

.book-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.book-card-author {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 3px;
}

/* ============================================================
   15. Category Tiles
   ============================================================ */
.categories {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  max-width: 600px;
  margin: 0 auto;
}

.category-tile {
  background: rgba(212, 175, 55, 0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
}

.category-tile:hover {
  border-color: rgba(212, 175, 55, 0.25);
  background: rgba(212, 175, 55, 0.1);
}

.category-tile-icon {
  font-size: 28px;
  margin-bottom: 10px;
}

.category-tile-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.category-tile-count {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ============================================================
   16. Footer
   ============================================================ */
.footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 36px 30px 24px;
}

.footer-content {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
}

.footer-brand {
  max-width: 280px;
}

.footer-brand-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--gold);
  margin-bottom: 8px;
}

.footer-brand-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.footer-social {
  display: flex;
  gap: 10px;
}

.social-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--gold);
  font-size: 14px;
  text-decoration: none;
  transition: all var(--transition);
}

.social-icon:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: rgba(212, 175, 55, 0.3);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 16px;
  font-size: 11px;
  color: var(--text-secondary);
}

.footer-bottom a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition);
}

.footer-bottom a:hover {
  color: var(--gold);
}

/* ============================================================
   17. Browse Page Grid
   ============================================================ */
.browse-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.browse-grid.books-grid {
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}

.browse-grid .note-card,
.browse-grid .book-card {
  min-width: unset;
  max-width: unset;
  width: 100%;
}

/* ============================================================
   18. Search Bar
   ============================================================ */
.search-bar {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  margin-bottom: 24px;
  transition: border-color var(--transition);
}

.search-bar:focus-within {
  border-color: rgba(212, 175, 55, 0.3);
}

.search-icon {
  color: var(--gold);
  margin-right: 10px;
  font-size: 16px;
  flex-shrink: 0;
}

.search-input {
  background: transparent;
  border: none;
  color: var(--text);
  flex: 1;
  font-size: 14px;
  outline: none;
  width: 100%;
}

.search-input::placeholder {
  color: var(--text-secondary);
}

/* ============================================================
   19. Filter Buttons
   ============================================================ */
.filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.filter-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 6px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: all var(--transition);
  white-space: nowrap;
}

.filter-btn:hover {
  border-color: rgba(212, 175, 55, 0.2);
  color: var(--text);
}

.filter-btn.active {
  background: rgba(212, 175, 55, 0.15);
  color: var(--gold);
  border-color: rgba(212, 175, 55, 0.3);
}

/* ============================================================
   20. Detail Page
   ============================================================ */
.detail-hero {
  padding: 40px 0;
}

.detail-title {
  font-size: 32px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 10px;
}

.detail-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: var(--gold);
  border: 1px solid rgba(212, 175, 55, 0.3);
  padding: 3px 10px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-secondary);
}

.sheet-image {
  max-width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  margin: 24px 0;
}

.detail-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 30px;
}

.detail-description {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin: 20px 0;
}

/* ============================================================
   21. Audio Player
   ============================================================ */
.audio-player {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 20px 0;
}

.play-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  border: none;
  transition: background var(--transition);
}

.play-btn:hover {
  background: #E0BF4A;
}

.play-icon {
  color: #0A0A0F;
  font-size: 18px;
  line-height: 1;
}

.audio-info {
  flex: 1;
  min-width: 0;
}

.audio-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.progress-container {
  flex: 1;
}

.progress-bar {
  background: rgba(212, 175, 55, 0.1);
  height: 4px;
  border-radius: 2px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  /* Audio timeline always runs left-to-right (0:00 on left, end on right),
     even on RTL pages — matches universal media-player UX (YouTube, Spotify, etc.)
     and keeps the click-to-seek math consistent with the visual fill direction. */
  direction: ltr;
}

.progress-fill {
  background: var(--gold);
  height: 100%;
  border-radius: 2px;
  width: 0%;
  transition: width 0.1s linear;
}

.audio-time {
  font-size: 12px;
  color: var(--text-secondary);
  flex-shrink: 0;
  white-space: nowrap;
  margin-top: 6px;
}

/* ============================================================
   22. Download Buttons
   ============================================================ */
.download-section {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 24px 0;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
  border: none;
}

.download-btn.primary {
  background: var(--gold);
  color: #0A0A0F;
}

.download-btn.primary:hover {
  filter: brightness(1.1);
}

.download-btn.secondary {
  background: rgba(212, 175, 55, 0.12);
  color: var(--gold);
  border: 1px solid rgba(212, 175, 55, 0.3);
}

.download-btn.secondary:hover {
  background: rgba(212, 175, 55, 0.2);
  filter: brightness(1.05);
}

/* ============================================================
   23. Related Items Section
   ============================================================ */
.related-section {
  padding: 50px 0;
  border-top: 1px solid var(--border);
}

.related-section .section-title {
  margin-bottom: 18px;
}

.related-grid {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.related-grid::-webkit-scrollbar {
  display: none;
}

/* ============================================================
   24. About & Contact Pages
   ============================================================ */
.content-page {
  max-width: 700px;
  margin: 0 auto;
  padding: 60px 30px;
}

.content-page h1 {
  font-size: 32px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 16px;
}

.content-page h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-top: 32px;
  margin-bottom: 12px;
}

.content-page p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
}

.coming-soon-section {
  text-align: center;
  padding: 60px 20px;
  margin-top: 40px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.coming-soon-icon {
  font-size: 64px;
  margin-bottom: 20px;
}

.coming-soon-section h2 {
  font-size: 28px;
  font-weight: 800;
  color: var(--gold);
  margin-top: 0;
  margin-bottom: 16px;
}

.coming-soon-section p {
  max-width: 500px;
  margin: 0 auto;
  color: var(--text-secondary);
}

.social-links-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 24px;
}

/* --- Contact page: form + direct info --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 32px;
  margin-top: 32px;
  align-items: start;
}

.contact-grid h2 {
  font-size: 20px;
  margin: 0 0 18px;
  color: var(--text-primary);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.contact-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contact-form label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  width: 100%;
  padding: 11px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.15s, background 0.15s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(0, 0, 0, 0.35);
}

.contact-form textarea {
  resize: vertical;
  min-height: 130px;
}

.contact-form .hp-field {
  /* Visually hidden but accessible to bots (so honeypot still works).
     Uses the clip pattern instead of left: -9999px — that off-screen trick
     extends the document's scroll area on mobile and breaks horizontal layout. */
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.contact-submit-btn {
  align-self: flex-start;
  padding: 12px 28px;
  border-radius: 999px;
  border: 1px solid var(--gold);
  background: var(--gold);
  color: #1a1a1a;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.contact-submit-btn:hover {
  background: #e4b94a;
}

.contact-submit-btn:active {
  transform: translateY(1px);
}

.contact-direct-intro {
  margin: 0 0 16px;
  color: var(--text-secondary);
  font-size: 14px;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  margin-bottom: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-primary);
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
}

.contact-card:hover {
  border-color: var(--gold);
  background: rgba(0, 0, 0, 0.3);
  transform: translateY(-1px);
}

.contact-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(214, 164, 65, 0.15);
  color: var(--gold);
  flex-shrink: 0;
}

.contact-card-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.contact-card-label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.contact-card-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  word-break: break-word;
}

.contact-card-sub {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 1px;
}

.contact-social-heading {
  margin-top: 40px;
  font-size: 20px;
}

/* RTL tweaks */
html[dir="rtl"] .contact-card-label {
  letter-spacing: 0;
}

@media (max-width: 760px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .contact-form .form-row {
    grid-template-columns: 1fr;
  }
}

/* --- Thank-you page --- */
.thank-you-page {
  display: flex;
  justify-content: center;
  padding: 40px 0;
}

.thank-you-card {
  max-width: 520px;
  text-align: center;
  padding: 48px 32px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.2);
}

.thank-you-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: rgba(92, 232, 144, 0.12);
  color: #5ce890;
  margin-bottom: 20px;
}

.thank-you-card h1 {
  margin: 0 0 12px;
  font-size: 26px;
}

.thank-you-card p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 28px;
}

.thank-you-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.thank-you-btn {
  padding: 11px 22px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.15s, border-color 0.15s;
}

.thank-you-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
}

.thank-you-btn-primary {
  background: var(--gold);
  border-color: var(--gold);
  color: #1a1a1a;
}

.thank-you-btn-primary:hover {
  background: #e4b94a;
  border-color: #e4b94a;
}

.social-link-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  transition: all var(--transition);
}

.social-link-card:hover {
  border-color: rgba(212, 175, 55, 0.25);
}

.social-link-card-icon {
  font-size: 22px;
  color: var(--gold);
  flex-shrink: 0;
}

.social-link-card-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.social-link-card-handle {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* ============================================================
   25. Back Link
   ============================================================ */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  margin-bottom: 24px;
  transition: opacity var(--transition);
}

.back-link:hover {
  text-decoration: underline;
  opacity: 0.85;
}

/* ============================================================
   26. No Results
   ============================================================ */
.no-results {
  text-align: center;
  padding: 40px;
  color: var(--text-secondary);
  font-size: 15px;
}

.no-results-icon {
  font-size: 48px;
  opacity: 0.3;
  margin-bottom: 16px;
}

/* ============================================================
   27. Responsive Breakpoints
   ============================================================ */

/* --- Tablet & Small Desktop (768px) --- */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-links {
    display: none;
  }

  .hero {
    padding: 50px 20px;
  }

  .hero-title {
    font-size: 28px;
  }

  .hero-desc {
    font-size: 14px;
  }

  .stats-bar {
    flex-wrap: wrap;
    gap: 30px;
    padding: 24px 20px;
  }

  .stat-item {
    flex: 0 0 calc(50% - 15px);
  }

  .browse-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .browse-grid.books-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .detail-content {
    padding: 0 16px;
  }

  .detail-title {
    font-size: 26px;
  }

  .categories {
    grid-template-columns: 1fr;
    max-width: 100%;
  }

  .footer-content {
    flex-direction: column;
    gap: 20px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .note-card {
    min-width: 160px;
    max-width: 160px;
  }

  .book-card {
    min-width: 150px;
    max-width: 150px;
  }

  .social-links-grid {
    grid-template-columns: 1fr;
  }

  .content-page {
    padding: 40px 20px;
  }

  .audio-player {
    flex-wrap: wrap;
  }

  .container {
    padding: 0 16px;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

/* --- Small Mobile (480px) --- */
@media (max-width: 480px) {
  .hero-title {
    font-size: 24px;
  }

  .hero-subtitle {
    font-size: 11px;
    letter-spacing: 3px;
  }

  .stats-bar {
    gap: 20px;
    padding: 20px 16px;
  }

  .stat-number {
    font-size: 22px;
  }

  .note-card {
    min-width: 150px;
    max-width: 150px;
  }

  .book-card {
    min-width: 140px;
    max-width: 140px;
  }

  .browse-grid {
    grid-template-columns: 1fr;
  }

  .browse-grid.books-grid {
    grid-template-columns: 1fr;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .download-section {
    flex-direction: column;
  }

  .download-btn {
    justify-content: center;
    width: 100%;
  }

  .filter-bar {
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 4px;
  }

  .filter-bar::-webkit-scrollbar {
    display: none;
  }
}

/* ============================================================
   28. Utility Classes
   ============================================================ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 30px;
}

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

.text-center {
  text-align: center;
}

.mt-1 {
  margin-top: 8px;
}

.mt-2 {
  margin-top: 16px;
}

.mt-3 {
  margin-top: 24px;
}

.mt-4 {
  margin-top: 32px;
}

.mb-1 {
  margin-bottom: 8px;
}

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

.mb-3 {
  margin-bottom: 24px;
}

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

.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hidden {
  display: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ============================================================
   29. Music Generation Page
   ============================================================ */
.music-gen-hero-section {
  padding: 60px 0 40px;
  text-align: center;
}

.music-gen-title {
  font-size: 36px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 12px;
}

.music-gen-desc {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.7;
}

.music-gen-main {
  padding-bottom: 80px;
}

.music-gen-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 720px;
  margin: 0 auto 28px;
}

.music-gen-card .form-group {
  margin-bottom: 20px;
}

.music-gen-card label {
  display: block;
  margin-bottom: 8px;
}

.gen-input,
.gen-textarea,
.gen-select {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  padding: 12px 16px;
  outline: none;
  transition: border-color var(--transition);
  -webkit-appearance: none;
  appearance: none;
}

.gen-input:focus,
.gen-textarea:focus,
.gen-select:focus {
  border-color: rgba(212, 175, 55, 0.4);
}

.gen-input::placeholder,
.gen-textarea::placeholder {
  color: var(--text-secondary);
  opacity: 0.7;
}

.gen-textarea {
  resize: vertical;
  min-height: 80px;
}

.gen-select option {
  background: var(--card);
  color: var(--text);
}

.form-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.gen-toggle-group {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.gen-toggle-btn {
  flex: 1;
  padding: 11px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
}

.gen-toggle-btn.active {
  background: rgba(212, 175, 55, 0.15);
  color: var(--gold);
}

.gen-submit-btn {
  width: 100%;
  padding: 14px;
  font-size: 15px;
  font-weight: 700;
  margin-top: 8px;
  border-radius: var(--radius-md);
  justify-content: center;
}

.gen-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* Status bar */
.gen-status {
  max-width: 720px;
  margin: 0 auto 24px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 500;
}

.gen-status-loading {
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.2);
  color: var(--gold);
}

.gen-status-success {
  background: rgba(50, 200, 100, 0.08);
  border: 1px solid rgba(50, 200, 100, 0.25);
  color: #5ce890;
}

.gen-status-error {
  background: rgba(200, 50, 50, 0.08);
  border: 1px solid rgba(200, 50, 50, 0.3);
  color: #e87878;
}

.gen-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(212, 175, 55, 0.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: gen-spin 0.8s linear infinite;
  flex-shrink: 0;
}

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

/* Results */
.gen-results-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--gold);
  max-width: 720px;
  margin: 0 auto 16px;
}

.gen-tracks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  max-width: 720px;
  margin: 0 auto;
}

.gen-track {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition);
}

.gen-track:hover {
  border-color: rgba(212, 175, 55, 0.2);
}

.gen-track-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

.gen-track-img-placeholder {
  width: 100%;
  height: 160px;
  background: linear-gradient(135deg, #2A1A3E, #1A1A2E);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 52px;
  color: var(--gold);
  opacity: 0.35;
}

.gen-track-body {
  padding: 16px;
}

.gen-track-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.gen-track-tags {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.gen-no-audio {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 12px 0;
  font-style: italic;
}

.gen-download-btn {
  margin-top: 10px;
  font-size: 12px;
  padding: 7px 14px;
}

.gen-track-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.gen-use-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition);
}

.gen-use-btn:hover {
  background: rgba(212, 175, 55, 0.1);
  border-color: rgba(212, 175, 55, 0.4);
  color: var(--gold);
}

/* File upload input */
.file-upload-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.file-upload-row input[type="file"] {
  flex: 1;
  min-width: 200px;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 13px;
  padding: 10px 12px;
  cursor: pointer;
}

.file-upload-row input[type="file"]::-webkit-file-upload-button {
  background: rgba(212, 175, 55, 0.15);
  color: var(--gold);
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  margin-right: 10px;
}

.file-upload-status {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* --- Breadcrumbs --- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.breadcrumb a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s;
}

.breadcrumb a:hover {
  color: var(--gold);
}

.breadcrumb [aria-current="page"] {
  color: var(--text-primary);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 60ch;
}

.breadcrumb-sep {
  color: var(--text-secondary);
  opacity: 0.5;
  user-select: none;
}

html[dir="rtl"] .breadcrumb-sep {
  transform: scaleX(-1);
  display: inline-block;
}

/* --- Artists --- */
.artists-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.artist-card {
  display: block;
  padding: 22px 22px 24px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  text-decoration: none;
  color: var(--text-primary);
  transition: border-color 0.15s, transform 0.15s, background 0.15s;
}

.artist-card:hover {
  border-color: var(--gold);
  background: rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

.artist-card-meta {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 8px;
}

.artist-card-name {
  margin: 0 0 10px;
  font-size: 22px;
  letter-spacing: -0.01em;
}

.artist-card-bio {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.artist-hub-page {
  max-width: 880px;
}

.artist-hub-header {
  margin: 24px 0 28px;
}

.artist-hub-meta {
  margin-bottom: 14px;
}

.artist-hub-header h1 {
  margin: 0 0 8px;
  font-size: 38px;
  letter-spacing: -0.015em;
}

.artist-alt-names {
  margin: 4px 0;
  font-size: 14px;
  color: var(--text-secondary);
  font-style: italic;
}

.artist-region {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--text-secondary);
}

.artist-hub-bio {
  margin: 0 0 36px;
  padding: 22px 24px;
  background: rgba(0, 0, 0, 0.18);
  border-left: 3px solid var(--gold);
  border-radius: 8px;
  font-size: 16px;
  line-height: 1.7;
}

html[dir="rtl"] .artist-hub-bio {
  border-left: none;
  border-right: 3px solid var(--gold);
}

.artist-hub-bio h2 {
  font-size: 20px;
  margin: 0 0 12px;
}

.artist-hub-bio p {
  margin: 0;
  color: var(--text-secondary);
}

.artist-hub-notes,
.artist-hub-blog,
.artist-hub-cta {
  margin: 0 0 40px;
}

.artist-hub-notes-intro {
  color: var(--text-secondary);
  margin: 0 0 16px;
}

.artist-hub-empty {
  padding: 28px;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  text-align: center;
}

.artist-hub-blog-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.artist-blog-link {
  display: block;
  padding: 14px 16px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text-primary);
  transition: border-color 0.15s;
}

.artist-blog-link:hover {
  border-color: var(--gold);
}

.artist-blog-link-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  line-height: 1.4;
}

.artist-hub-cta {
  padding: 24px 28px;
  background: rgba(214, 164, 65, 0.08);
  border: 1px solid rgba(214, 164, 65, 0.2);
  border-radius: 14px;
  text-align: center;
}

/* --- Artist YouTube section --- */
.artist-hub-youtube {
  margin: 0 0 40px;
}

.artist-hub-youtube-intro {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 22px;
  max-width: 65ch;
}

.yt-group {
  margin: 0 0 28px;
}

.yt-group-title {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  font-weight: 700;
  margin: 0 0 14px;
}

.yt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.yt-video {
  display: flex;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text-primary);
  transition: border-color 0.15s, transform 0.15s;
}

.yt-video:hover {
  border-color: rgba(214, 164, 65, 0.5);
  transform: translateY(-2px);
}

.yt-video-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
}

.yt-video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.yt-video:hover .yt-video-thumb img {
  transform: scale(1.05);
}

.yt-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
  opacity: 0.92;
  transition: opacity 0.15s;
}

.yt-video:hover .yt-play-icon {
  opacity: 1;
}

.yt-duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.02em;
}

.yt-video-channel {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 4px;
  opacity: 0.85;
}

.yt-badge {
  display: inline-block;
  padding: 2px 8px;
  margin-left: 6px;
  background: rgba(214, 164, 65, 0.18);
  color: var(--gold);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  border-radius: 4px;
  vertical-align: middle;
}

.yt-video-playlist {
  grid-column: span 2;
}

.yt-video-playlist iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  display: block;
  background: #000;
}

@media (max-width: 760px) {
  .yt-video-playlist {
    grid-column: span 1;
  }
}

.yt-video-search {
  padding: 16px;
  flex-direction: row;
  align-items: center;
  gap: 14px;
}

.yt-video-search-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 0, 0, 0.1);
  border-radius: 50%;
  color: #ff5e5e;
}

.yt-video-body {
  padding: 14px 16px 16px;
  flex: 1;
  min-width: 0;
}

.yt-video-search .yt-video-body {
  padding: 0;
}

.yt-video-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 4px;
  word-break: break-word;
}

.yt-video-note {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 4px;
}

.yt-video-meta {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold);
  font-weight: 600;
}

.artist-hub-youtube-channel-link {
  margin-top: 18px;
  text-align: center;
  font-size: 14px;
}

.artist-hub-youtube-channel-link a {
  color: var(--gold);
  text-decoration: none;
  font-weight: 600;
}

.artist-hub-youtube-channel-link a:hover {
  text-decoration: underline;
}

.artist-hub-cta h2 {
  font-size: 18px;
  margin: 0 0 8px;
}

.artist-hub-cta p {
  color: var(--text-secondary);
  margin: 0 0 16px;
  font-size: 14px;
}

/* --- Music Theory / Maqamat --- */
.maqam-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.maqam-card {
  display: block;
  padding: 22px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  text-decoration: none;
  color: var(--text-primary);
  transition: border-color 0.15s, transform 0.15s;
}

.maqam-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}

.maqam-card-family {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 8px;
}

.maqam-card-name {
  margin: 0 0 10px;
  font-size: 22px;
  letter-spacing: -0.01em;
}

.maqam-card-intervals {
  display: block;
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-size: 12px;
  color: var(--text-secondary);
  background: rgba(0, 0, 0, 0.3);
  padding: 8px 12px;
  border-radius: 6px;
  margin: 0 0 12px;
  word-break: break-word;
}

.maqam-card-mood {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.maqam-page {
  max-width: 860px;
}

.maqam-header {
  margin: 24px 0 28px;
}

.maqam-header h1 {
  margin: 12px 0 10px;
  font-size: 36px;
  letter-spacing: -0.01em;
}

.maqam-mood {
  margin: 0;
  font-size: 16px;
  color: var(--text-secondary);
}

.maqam-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 0 0 32px;
}

.maqam-info-card {
  padding: 18px 20px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}

.maqam-info-card h3 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin: 0 0 8px;
  font-weight: 700;
}

.maqam-info-card p {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.maqam-intervals {
  display: block;
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-size: 14px;
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.3);
  padding: 10px 12px;
  border-radius: 6px;
  margin: 0 0 8px;
  word-break: break-word;
}

.maqam-info-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 0;
}

.maqam-description,
.maqam-examples,
.maqam-related-notes,
.maqam-other {
  margin: 0 0 36px;
}

.maqam-description p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.maqam-examples-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.maqam-example-link {
  padding: 8px 16px;
  background: rgba(214, 164, 65, 0.1);
  border: 1px solid rgba(214, 164, 65, 0.3);
  border-radius: 999px;
  color: var(--gold);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.15s;
}

.maqam-example-link:hover {
  background: rgba(214, 164, 65, 0.2);
}

.maqam-nav-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.maqam-nav-pill {
  padding: 8px 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.15s, border-color 0.15s;
}

.maqam-nav-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--gold);
  color: var(--gold);
}

@media (max-width: 760px) {
  .artist-hub-header h1, .maqam-header h1 {
    font-size: 26px;
  }
}

/* --- Blog --- */
.blog-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
  margin: 24px 0 28px;
}

.blog-header h1 {
  margin: 0;
  font-size: 32px;
  letter-spacing: -0.01em;
}

.blog-intro {
  margin: 0;
  color: var(--text-secondary);
  font-size: 15px;
  max-width: 65ch;
  line-height: 1.6;
}

.blog-rss-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--gold);
  text-decoration: none;
  border: 1px solid var(--gold);
  padding: 5px 12px;
  border-radius: 999px;
  transition: background 0.15s;
}

.blog-rss-link:hover {
  background: rgba(214, 164, 65, 0.1);
}

.blog-tag-back {
  margin: 0 0 24px;
}

.blog-tag-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 28px;
}

.blog-tag-filter {
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}

.blog-tag-filter:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
}

.blog-tag-filter.active {
  background: var(--gold);
  border-color: var(--gold);
  color: #1a1a1a;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.blog-card {
  display: flex;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.15s, transform 0.15s;
}

.blog-card:hover {
  border-color: rgba(214, 164, 65, 0.5);
  transform: translateY(-2px);
}

.blog-card-image-link {
  display: block;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
}

.blog-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.blog-card:hover .blog-card-image {
  transform: scale(1.04);
}

.blog-card-body {
  padding: 18px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.blog-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

.blog-meta-sep {
  opacity: 0.5;
}

.blog-card-title {
  margin: 0;
  font-size: 19px;
  line-height: 1.3;
  letter-spacing: -0.005em;
}

.blog-card-title a {
  color: var(--text-primary);
  text-decoration: none;
}

.blog-card-title a:hover {
  color: var(--gold);
}

.blog-card-excerpt {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.blog-tag-pill {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(214, 164, 65, 0.12);
  color: var(--gold);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background 0.15s;
}

.blog-tag-pill:hover {
  background: rgba(214, 164, 65, 0.22);
}

/* Blog post detail */
.blog-post-page {
  max-width: 760px;
}

.blog-article-header {
  margin: 24px 0 28px;
}

.blog-article-header h1 {
  margin: 12px 0 8px;
  font-size: 36px;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.blog-subtitle {
  margin: 0 0 14px;
  color: var(--text-secondary);
  font-size: 17px;
  line-height: 1.5;
}

.blog-article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}

.blog-article-image {
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 14px;
  margin-bottom: 32px;
}

.blog-article-body {
  font-size: 17px;
  line-height: 1.75;
  color: var(--text-primary);
  /* Aggressive text wrapping prevents long unbreakable strings (URLs, hyphenated
     numbers like "~50,000-500,000", etc.) from forcing horizontal overflow on mobile. */
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Markdown tables — wrap in horizontal-scroll container so they never break mobile layout */
.blog-article-body .table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 0 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
}

.blog-article-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.blog-article-body th,
.blog-article-body td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-align: left;
  vertical-align: top;
}

html[dir="rtl"] .blog-article-body th,
html[dir="rtl"] .blog-article-body td {
  text-align: right;
}

.blog-article-body th {
  background: rgba(214, 164, 65, 0.08);
  color: var(--gold);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.blog-article-body tr:last-child td {
  border-bottom: 0;
}

.blog-article-body h2 {
  font-size: 26px;
  margin: 36px 0 14px;
  letter-spacing: -0.01em;
}

.blog-article-body h3 {
  font-size: 21px;
  margin: 28px 0 12px;
}

.blog-article-body p {
  margin: 0 0 18px;
}

.blog-article-body a {
  color: var(--gold);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.blog-article-body a:hover {
  text-decoration-thickness: 2px;
}

.blog-article-body ul,
.blog-article-body ol {
  margin: 0 0 18px;
  padding-left: 22px;
}

html[dir="rtl"] .blog-article-body ul,
html[dir="rtl"] .blog-article-body ol {
  padding-left: 0;
  padding-right: 22px;
}

.blog-article-body ul {
  list-style: disc;
}

.blog-article-body ol {
  list-style: decimal;
}

.blog-article-body li {
  margin: 0 0 6px;
}

.blog-article-body blockquote {
  border-left: 3px solid var(--gold);
  margin: 24px 0;
  padding: 4px 18px;
  color: var(--text-secondary);
  font-style: italic;
}

html[dir="rtl"] .blog-article-body blockquote {
  border-left: none;
  border-right: 3px solid var(--gold);
}

.blog-article-body code {
  background: rgba(255, 255, 255, 0.07);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.92em;
  font-family: 'SF Mono', Menlo, Consolas, monospace;
}

.blog-article-body pre {
  background: rgba(0, 0, 0, 0.4);
  padding: 16px 18px;
  border-radius: 10px;
  overflow-x: auto;
  margin: 0 0 24px;
}

.blog-article-body pre code {
  background: none;
  padding: 0;
}

.blog-article-body img {
  max-width: 100%;
  border-radius: 12px;
  margin: 18px 0;
  height: auto;
}

.blog-article-body hr {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin: 32px 0;
}

.blog-article-footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.blog-related {
  max-width: 1100px;
  margin: 60px auto 0;
}

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

.blog-related-card {
  display: flex;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text-primary);
  transition: border-color 0.15s;
}

.blog-related-card:hover {
  border-color: rgba(214, 164, 65, 0.5);
}

.blog-related-card img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.blog-related-body {
  padding: 12px 14px 14px;
}

.blog-related-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  line-height: 1.4;
}

@media (max-width: 760px) {
  .blog-article-header h1 {
    font-size: 28px;
  }
  .blog-article-body {
    font-size: 16px;
  }
  .blog-article-body h2 {
    font-size: 22px;
  }
}

/* --- Song meta block on famous note pages --- */
.song-meta-block {
  margin: 32px 0;
  padding: 24px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
}

.song-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.song-meta-card {
  padding: 14px 16px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
}

.song-meta-card h3 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  font-weight: 700;
  margin: 0 0 6px;
}

.song-meta-card p {
  margin: 0;
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 600;
}

.song-meta-card code {
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 13px;
}

.song-meta-link {
  color: var(--gold);
  text-decoration: none;
  font-weight: 600;
}

.song-meta-link:hover {
  text-decoration: underline;
}

.song-lyrics {
  margin: 16px 0;
  padding: 16px 18px;
  background: rgba(214, 164, 65, 0.06);
  border-left: 3px solid var(--gold);
  border-radius: 6px;
}

html[dir="rtl"] .song-lyrics {
  border-left: none;
  border-right: 3px solid var(--gold);
}

.song-lyrics h3,
.song-lyrics-note h3 {
  margin: 0 0 8px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold);
  font-weight: 700;
}

.song-lyrics-text {
  margin: 0;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-wrap: break-word;
}

.song-lyrics-note {
  margin: 16px 0;
}

.song-lyrics-note p {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.song-meta-yt-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 10px 18px;
  background: rgba(255, 0, 0, 0.08);
  border: 1px solid rgba(255, 0, 0, 0.25);
  border-radius: 8px;
  color: #ff5e5e;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.15s;
}

.song-meta-yt-link:hover {
  background: rgba(255, 0, 0, 0.16);
}

/* --- Playlists --- */
.playlist-tracks {
  margin: 32px 0;
}

.playlist-track-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.playlist-track {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.18);
  text-decoration: none;
  color: var(--text-primary);
  transition: border-color 0.15s, background 0.15s;
}

.playlist-track:hover {
  border-color: var(--gold);
  background: rgba(0, 0, 0, 0.28);
}

.playlist-track-num {
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-size: 14px;
  color: var(--gold);
  font-weight: 700;
  min-width: 28px;
  text-align: center;
}

.playlist-track-body {
  flex: 1;
  min-width: 0;
}

.playlist-track-name {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 2px;
}

.playlist-track-meta {
  font-size: 12px;
  color: var(--text-secondary);
}

.playlist-track-formats {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

/* --- Newsletter signup --- */
.newsletter {
  max-width: 920px;
  margin: 60px auto 40px;
  padding: 0 20px;
}

.newsletter.newsletter-footer {
  margin-top: 80px;
}

.newsletter-body {
  background: linear-gradient(135deg, rgba(214, 164, 65, 0.08), rgba(214, 164, 65, 0.02));
  border: 1px solid rgba(214, 164, 65, 0.18);
  border-radius: 16px;
  padding: 32px 28px;
  text-align: center;
}

.newsletter-title {
  margin: 0 0 8px;
  font-size: 22px;
  letter-spacing: -0.01em;
}

.newsletter-subtitle {
  margin: 0 auto 22px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.55;
  max-width: 52ch;
}

.newsletter-form {
  max-width: 480px;
  margin: 0 auto;
}

.newsletter-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.newsletter-row input[type="email"] {
  flex: 1;
  min-width: 0;
  padding: 11px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.15s, background 0.15s;
}

.newsletter-row input[type="email"]:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(0, 0, 0, 0.45);
}

.newsletter-submit-btn {
  padding: 11px 22px;
  border-radius: 8px;
  border: 1px solid var(--gold);
  background: var(--gold);
  color: #1a1a1a;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}

.newsletter-submit-btn:hover {
  background: #e4b94a;
}

.newsletter-privacy {
  display: block;
  margin-top: 12px;
  color: var(--text-secondary);
  font-size: 12px;
  opacity: 0.75;
}

.newsletter .hp-field {
  /* Same clip pattern as .contact-form .hp-field — see comment there. */
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 540px) {
  .newsletter-row {
    flex-direction: column;
  }
  .newsletter-submit-btn {
    width: 100%;
  }
}

/* --- 404 page --- */
.not-found-page {
  padding-top: 24px;
}

.not-found-card {
  max-width: 620px;
  margin: 0 auto 48px;
  text-align: center;
  padding: 40px 32px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.2);
}

.not-found-code {
  font-size: 72px;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 8px;
}

.not-found-card h1 {
  margin: 0 0 10px;
  font-size: 24px;
}

.not-found-card p {
  color: var(--text-secondary);
  margin: 0 0 24px;
}

.not-found-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.not-found-search {
  margin: 24px auto;
  max-width: 480px;
  text-align: left;
}

.not-found-search input[type="search"] {
  width: 100%;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.3);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.15s;
}

.not-found-search input[type="search"]:focus {
  outline: none;
  border-color: var(--gold);
}

.not-found-suggestions {
  margin-top: 14px;
  padding: 14px 16px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
}

.not-found-suggestions-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 8px;
}

.not-found-suggestions ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.not-found-suggestions li {
  margin: 0;
}

.not-found-suggestions li a {
  display: block;
  padding: 8px 12px;
  color: var(--text-primary);
  text-decoration: none;
  border-radius: 6px;
  font-size: 14px;
  transition: background 0.15s;
}

.not-found-suggestions li a:hover {
  background: rgba(214, 164, 65, 0.1);
  color: var(--gold);
}

.not-found-suggestions-heading {
  font-size: 18px;
  margin: 32px 0 16px;
  text-align: center;
  color: var(--text-secondary);
}

.file-upload-status.is-loading { color: var(--gold); }
.file-upload-status.is-success { color: #5ce890; }
.file-upload-status.is-error { color: #e87878; }

/* --- Audio recorder --- */
.recorder-box {
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.recorder-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.rec-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.rec-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
}

.rec-btn-primary {
  background: var(--gold);
  border-color: var(--gold);
  color: #1a1a1a;
}

.rec-btn-primary:hover {
  background: #e4b94a;
  border-color: #e4b94a;
}

.rec-btn.is-recording {
  background: #e74c3c;
  border-color: #e74c3c;
  color: #fff;
}

.rec-btn.is-recording:hover {
  background: #c0392b;
  border-color: #c0392b;
}

.rec-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  display: inline-block;
}

.rec-btn-primary .rec-dot {
  background: #1a1a1a;
}

.rec-btn.is-recording .rec-dot {
  background: #fff;
  animation: rec-pulse 1.1s ease-in-out infinite;
}

@keyframes rec-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.8); }
}

.rec-meter {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  color: var(--text-secondary);
}

.rec-time {
  color: var(--text-primary);
  font-weight: 600;
}

.rec-time-sep {
  opacity: 0.5;
}

.rec-time-max {
  opacity: 0.7;
}

.rec-progress {
  flex: 1;
  min-width: 120px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.rec-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--gold);
  transition: width 0.2s linear;
}

.rec-btn.is-recording ~ .rec-progress .rec-progress-fill,
.recorder-controls .rec-btn.is-recording + .rec-meter + .rec-progress .rec-progress-fill {
  background: #e74c3c;
}

.recorder-preview {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

.recorder-preview audio {
  width: 100%;
  height: 38px;
}

.recorder-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

/* Divider between upload methods */
.form-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 4px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.6;
}

.form-divider::before,
.form-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

/* RTL adjustments for music gen */
html[dir="rtl"] .gen-toggle-group {
  flex-direction: row-reverse;
}

/* --- Extended studio: tabs, sliders, advanced, results --- */
.gen-credits {
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-secondary);
  opacity: 0.85;
}

.gen-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 720px;
  margin: 0 auto 20px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.gen-tab {
  flex: 1 1 auto;
  min-width: 110px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: calc(var(--radius-md) - 4px);
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
  text-align: center;
  white-space: nowrap;
}

.gen-tab:hover {
  color: var(--text);
}

.gen-tab.active {
  background: rgba(212, 175, 55, 0.12);
  color: var(--gold);
}

.gen-panel {
  display: none;
}

.gen-panel.active {
  display: block;
}

.gen-panel-intro {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.6;
}

.gen-subcard-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 6px;
}

.gen-hint {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  opacity: 0.7;
  margin-top: 6px;
}

.gen-mode-toggle {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 18px;
}

.gen-mode-toggle .gen-toggle-btn {
  flex: 1;
}

.form-row-3col {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 18px;
}

/* Advanced settings */
.gen-advanced {
  margin: 16px 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.01);
}

.gen-advanced summary {
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
  list-style: none;
}

.gen-advanced summary::-webkit-details-marker { display: none; }

.gen-advanced summary::before {
  content: '▸ ';
  color: var(--gold);
  display: inline-block;
  transition: transform var(--transition);
}

.gen-advanced[open] summary::before {
  transform: rotate(90deg);
}

.gen-advanced[open] summary {
  color: var(--gold);
  border-bottom: 1px solid var(--border);
}

.gen-advanced-body {
  padding: 16px;
}

/* Sliders */
.gen-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: var(--surface);
  border-radius: 2px;
  outline: none;
  padding: 0;
  border: 1px solid var(--border);
  cursor: pointer;
}

.gen-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  background: var(--gold);
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

.gen-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: var(--gold);
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

.gen-slider-val {
  font-size: 11px;
  font-weight: 500;
  color: var(--gold);
  margin-left: 6px;
  opacity: 0.9;
}

/* Recent tracks dropdown wrapper */
.recent-tracks-wrap:empty { display: none; }
.recent-tracks-wrap .form-group {
  margin-bottom: 18px;
}

/* Lyrics / boost result cards */
.lyrics-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  max-width: 720px;
  margin: 0 auto 16px;
}

.lyrics-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 10px;
}

.lyrics-text {
  font-family: inherit;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
  white-space: pre-wrap;
  word-wrap: break-word;
  margin: 0 0 14px;
  max-height: 480px;
  overflow-y: auto;
}

.copy-btn {
  font-size: 12px;
  padding: 7px 16px;
}

/* Timestamped lyrics */
.timestamp-box {
  max-width: 720px;
  margin: 0 auto;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  line-height: 2.4;
  font-size: 15px;
}

.ts-word {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  transition: background var(--transition);
  cursor: default;
}

.ts-word:hover {
  background: rgba(212, 175, 55, 0.15);
  color: var(--gold);
}

/* Track meta */
.gen-ids-hint {
  max-width: 720px;
  margin: 0 auto 12px;
  font-size: 11px;
  color: var(--text-secondary);
  opacity: 0.7;
}

.gen-ids-hint code,
.gen-track-ids code {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-family: 'Courier New', monospace;
  color: var(--text-secondary);
}

.gen-track-ids {
  margin: 6px 0;
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Video result */
.gen-video {
  display: block;
  width: 100%;
  max-width: 720px;
  margin: 0 auto 16px;
  border-radius: var(--radius-lg);
  background: #000;
}

/* Cover art grid */
.cover-art-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  max-width: 720px;
  margin: 0 auto;
}

.cover-art-cell {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  padding-bottom: 14px;
  text-align: center;
}

.cover-art-cell img {
  width: 100%;
  display: block;
}

.cover-art-cell .download-btn {
  margin-top: 12px;
  font-size: 12px;
  display: inline-block;
}

/* Credits display on Tools tab */
.credits-display {
  margin-top: 14px;
  font-size: 16px;
  font-weight: 600;
  color: var(--gold);
  text-align: center;
}

/* RTL */
html[dir="rtl"] .gen-slider-val {
  margin-left: 0;
  margin-right: 6px;
}

html[dir="rtl"] .gen-advanced summary::before {
  margin-left: 6px;
}

/* Responsive */
@media (max-width: 768px) {
  .form-row-2col,
  .form-row-3col {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .music-gen-card {
    padding: 20px 16px;
  }

  .music-gen-title {
    font-size: 26px;
  }

  .gen-tracks {
    grid-template-columns: 1fr;
  }

  .gen-tabs {
    gap: 4px;
    padding: 4px;
  }

  .gen-tab {
    min-width: 90px;
    font-size: 12px;
    padding: 9px 10px;
  }
}
