@font-face {
  font-family: 'IRANSansWeb';
  src: url('/static/fonts/IRANSansWeb.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'IRANSansWeb';
  src: url('/static/fonts/IRANSansWeb-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;
}

body {
  margin: 0;
  font-family: var(--font-persian);
  background: radial-gradient(circle at top, rgba(37,99,235,0.08), transparent 45%),
    radial-gradient(circle at 20% 80%, rgba(245,158,11,0.1), transparent 40%),
    var(--color-bg);
  color: var(--color-text);
  min-height: 100vh;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

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

a {
  color: var(--color-link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 36px 0;
  background: var(--header-bg);
}

.brand {
  font-weight: 700;
  font-size: 26px;
}

.toggle {
  border: 1px solid var(--color-border);
  background: var(--color-card);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  color: var(--color-text);
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px 60px;
  animation: fadeUp 0.6s ease;
}

.hero.centered {
  min-height: calc(100vh - 160px);
}

.logo {
  font-size: 54px;
  font-weight: 700;
  margin-bottom: 12px;
}

.tagline {
  opacity: 0.7;
  margin-bottom: 32px;
}

.search-box {
  width: min(700px, 90vw);
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 14px 20px;
  font-size: 18px;
  outline: none;
  box-shadow: var(--shadow);
  direction: rtl;
  color: var(--color-text);
}

.search-box::placeholder {
  color: color-mix(in srgb, var(--color-text) 60%, transparent);
}

.suggestions {
  width: min(700px, 90vw);
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 18px;
  margin-top: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  animation: fadeIn 0.2s ease;
  z-index: 10;
}

.suggestion {
  padding: 14px 18px;
  border-bottom: 1px solid var(--color-border);
  cursor: pointer;
}

.suggestion:last-child {
  border-bottom: none;
}

.suggestion:hover {
  background: rgba(37,99,235,0.08);
}

.footer {
  margin-top: auto;
  padding: 24px;
  text-align: center;
  background: var(--footer-bg);
  border-top: 1px solid var(--color-border);
}

.lyric-container {
  max-width: 1100px;
  margin: 40px auto;
  padding: 20px;
}

.lyric-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.lyric-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.lyric-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.sync-wrap {
  display: flex;
  justify-content: center;
  margin: 10px 0 18px;
}

.sync-play {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: var(--color-primary);
  position: relative;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.sync-play::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 52%;
  transform: translate(-50%, -50%);
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 16px solid #fff;
}

.sync-play.playing::before {
  width: 20px;
  height: 18px;
  border: none;
  background: #fff;
  left: 50%;
}
.lyric-rows {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.lyric-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 24px;
  direction: ltr;
}

.lyric-original {
  text-align: left;
  direction: ltr;
  font-family: var(--font-english);
  border-bottom: 1px dashed var(--color-border);
  padding: 6px 8px;
}

.lyric-translation {
  text-align: right;
  direction: rtl;
  border-bottom: 1px dashed var(--color-border);
  padding: 6px 8px;
}

.lyric-row.active .lyric-original,
.lyric-row.active .lyric-translation {
  background: rgba(245,158,11,0.12);
}

.explanation {
  margin-top: 24px;
  background: rgba(37,99,235,0.05);
  border-radius: var(--radius);
  padding: 18px;
}

.loading {
  margin-top: 18px;
  font-size: 16px;
  color: var(--color-text);
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.4);
}

.modal-content {
  background: var(--color-card);
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  min-width: 280px;
}

.modal-content input {
  width: 100%;
  padding: 10px;
  margin-top: 8px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
}

.modal-content button {
  margin-top: 12px;
  padding: 10px 16px;
  border-radius: 8px;
  border: none;
  background: var(--color-primary);
  color: white;
  cursor: pointer;
}

@media (max-width: 900px) {
  .lyric-row {
    grid-template-columns: 1fr;
  }
  .lyric-actions {
    justify-content: center;
  }
  .header {
    padding: 18px 16px 0;
  }
  .logo {
    font-size: 40px;
  }
  .search-box {
    font-size: 16px;
  }
}
