:root {
  color-scheme: dark;
  --gold: #f5b301;
  --bg: #000000;
  --card: #1c1e22;
  --text: #f2f2f2;
  --muted: #9a9ea6;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

header {
  display: flex;
  justify-content: flex-end;
  padding: max(12px, env(safe-area-inset-top)) 16px 8px;
}

main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 16px;
}

.hidden { display: none !important; }

#ratingCard {
  width: 100%;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.transport {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  justify-content: center;
}

.icon-button {
  background: var(--card);
  color: var(--text);
  border: 1px solid #333;
  border-radius: 999px;
  padding: 14px 20px;
  font-size: 1.1rem;
  min-height: 52px;
  min-width: 52px;
  cursor: pointer;
}

.icon-button.small {
  font-size: 0.95rem;
  padding: 10px 16px;
  min-height: 44px;
}

.icon-button:active {
  transform: scale(0.96);
}

.stars {
  display: flex;
  gap: 4vw;
  justify-content: center;
  touch-action: none;
}

.star {
  background: none;
  border: none;
  font-size: min(18vw, 96px);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 2px var(--muted);
  cursor: pointer;
  padding: 8px;
}

.star.filled {
  color: var(--gold);
  -webkit-text-stroke: 2px var(--gold);
}

.skip-button {
  background: transparent;
  color: var(--muted);
  border: 1px solid #333;
  border-radius: 999px;
  padding: 14px 36px;
  font-size: 1.1rem;
  min-height: 52px;
  cursor: pointer;
}

.tap-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

#tapToPlay {
  font-size: 1.4rem;
  padding: 24px 40px;
  border-radius: 999px;
  border: none;
  background: var(--gold);
  color: #111;
  cursor: pointer;
}

#doneMessage {
  text-align: center;
  color: var(--muted);
  font-size: 1.2rem;
  padding: 0 24px;
}

.sidebar {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 100%);
  background: var(--card);
  padding: max(16px, env(safe-area-inset-top)) 20px 20px;
  overflow-y: auto;
  z-index: 30;
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.4);
  transform: translateX(0);
  transition: transform 0.2s ease;
}

.sidebar.hidden {
  display: block !important;
  transform: translateX(105%);
  pointer-events: none;
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 20;
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

#favoritesList {
  list-style: decimal;
  padding-left: 22px;
  margin: 0;
}

#favoritesList li {
  margin-bottom: 16px;
}

#favoritesList a {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px dotted var(--muted);
}

#favoritesList a:hover {
  color: var(--gold);
}

.fav-score {
  color: var(--gold);
  margin-left: 6px;
  white-space: nowrap;
}

#progressFooter {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px max(10px, env(safe-area-inset-bottom));
}

#progressBar {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: #ffffff;
  overflow: hidden;
}

#progressFill {
  height: 100%;
  width: 0%;
  background: #3ecf5e;
  border-radius: 999px;
  transition: width 0.2s ease;
}

#progressLabel {
  color: var(--muted);
  font-size: 0.85rem;
  white-space: nowrap;
}

