:root {
  --ink: #1f1b16;
  --ink-soft: #3b332c;
  --tan: #e9ddc8;
  --tan-deep: #d4c2a2;
  --cream: #f9f5ee;
  --accent: #1f3a2d;
  --accent-strong: #15291f;
  --glass: rgba(255, 255, 255, 0.75);
  --stroke: rgba(31, 27, 22, 0.12);
  --shadow: 0 24px 60px rgba(31, 27, 22, 0.18);
}

* {
  box-sizing: border-box;
}

body, html {
  height: 100%;
  width: 100%;
  margin: 0;
  overflow: hidden;
  overflow-x: hidden;
  overflow-y: hidden;
  font-family: "Sora", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 10% 10%, #f4ede2 0%, #e3d3bd 45%, #bfa98b 100%);
}

body {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.top-links {
  position: fixed;
  top: 18px;
  left: 22px;
  right: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85em;
  z-index: 12;
}

.top-links a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}

.page {
  height: 100%;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 32px 18px;
  overflow: hidden;
}

.app-card {
  width: min(520px, 92vw);
  background: var(--glass);
  border: 1px solid var(--stroke);
  border-radius: 28px;
  padding: 34px 30px 28px;
  text-align: center;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  animation: fadeUp 0.8s ease;
  transform: scale(0.765);
  transform-origin: center;
}

@media (max-width: 640px) {
  .app-card {
    transform: scale(0.75);
  }
}

.brand-kicker {
  font-size: 0.85em;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 12px;
}

.logo-button {
  border: none;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.logo-button img {
  max-width: 190px;
}

.tagline {
  font-family: "Fraunces", serif;
  font-size: 1.1em;
  margin: 16px 0 24px;
  color: var(--ink-soft);
}

.mode-card {
  text-align: left;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 18px;
  padding: 16px;
  border: 1px solid rgba(31, 27, 22, 0.08);
  margin-bottom: 20px;
}

.card-title {
  font-size: 0.9em;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  margin-bottom: 10px;
}

select {
  width: 100%;
  color: var(--ink);
  border: 1px solid rgba(31, 27, 22, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  font-size: 1em;
  padding: 12px 14px;
  font-weight: 600;
  font-family: "Sora", sans-serif;
}

.controls {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 24px 0 18px;
}

.control-button {
  border: none;
  border-radius: 16px;
  padding: 16px 16px;
  min-width: 110px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-family: "Sora", sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.control-button img {
  display: block;
}

.control-label {
  font-size: 0.85em;
  color: inherit;
}

.control-button.primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 14px 26px rgba(21, 41, 31, 0.2);
}

.control-button.secondary {
  background: rgba(255, 255, 255, 0.6);
  color: var(--ink);
  border: 1px solid rgba(31, 27, 22, 0.15);
}

.control-button.secondary img {
  filter: brightness(0.25);
}

.control-button:active {
  transform: translateY(2px);
}

.now-playing {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95em;
  color: var(--ink-soft);
  margin-bottom: 20px;
}

.now-label {
  text-transform: uppercase;
  font-size: 0.75em;
  letter-spacing: 0.08em;
}

.now-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.4;
}

.button {
  cursor: pointer;
  border-radius: 12px;
  padding: 10px 18px;
  border: none;
  font-weight: 600;
  font-family: "Sora", sans-serif;
}

.button.secondary {
  background: rgba(255, 255, 255, 0.6);
  color: var(--ink);
  border: 1px solid rgba(31, 27, 22, 0.2);
}

.hidden {
  display: none;
}

.fade {
  border-radius: 12px;
}

.bottom-link {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  z-index: 10;
}

.bottom-link .button {
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.mouse {
  cursor: pointer;
}

.is-playing .logo-button img {
  animation: pulse 1.6s ease-in-out infinite;
}

.is-playing .now-dot {
  opacity: 1;
  animation: pulse 1.6s ease-in-out infinite;
}

.control-button:focus-visible,
select:focus-visible,
.button:focus-visible,
.logo-button:focus-visible {
  outline: 2px solid rgba(31, 58, 45, 0.6);
  outline-offset: 3px;
}

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

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

@media (max-width: 640px) {
  .app-card {
    padding: 28px 20px 24px;
  }

  .tagline {
    font-size: 1em;
  }

  select {
    font-size: 1.05em;
  }

  .control-button {
    min-width: 96px;
  }
}
