@import url("https://fonts.googleapis.com/css2?family=Comic+Neue:wght@400;700;800&display=swap");

:root {
  --ink: #25162f;
  --paper: #fff8d6;
  --hot-pink: #ff4fd8;
  --acid: #9cff3b;
  --banana: #ffe45c;
  --danger: #ff5a5f;
  --sky: #7df9ff;
  --purple: #7c4dff;
  --soft-shadow: rgba(37, 22, 47, 0.24);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: "Comic Sans MS", "Comic Sans", "Comic Neue", system-ui, sans-serif;
  overflow-x: hidden;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--purple);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 9999;
  transform: translateY(-150%);
  padding: 0.65rem 0.85rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--banana);
  color: var(--ink);
  font-weight: 900;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 0.8rem clamp(1rem, 3vw, 2rem) 0;
}

.nav-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.72rem;
  border: 3px solid var(--ink);
  border-radius: 28px;
  background: rgba(255, 248, 214, 0.88);
  backdrop-filter: blur(10px);
  box-shadow: 5px 5px 0 var(--soft-shadow);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
}

.brand-potato {
  display: inline-grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--banana);
  box-shadow: 3px 3px 0 var(--soft-shadow);
  font-size: 1.35rem;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1.05rem;
  line-height: 1;
}

.brand small {
  max-width: 16rem;
  overflow: hidden;
  color: rgba(37, 22, 47, 0.72);
  font-size: 0.75rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.nav-links > a,
.nav-menu-button {
  display: inline-flex;
  align-items: center;
  min-height: 2.35rem;
  padding: 0.45rem 0.72rem;
  border: 2px solid transparent;
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.52);
  font-weight: 900;
  text-decoration: none;
}

.nav-links > a.active,
.nav-links > a:hover,
.nav-menu-button:hover {
  border-color: var(--ink);
  background: var(--acid);
  box-shadow: 3px 3px 0 var(--soft-shadow);
}

.nav-menu {
  position: relative;
}

.nav-menu-button {
  cursor: pointer;
}

.nav-menu-list {
  position: absolute;
  right: 0;
  top: calc(100% + 0.45rem);
  width: max-content;
  min-width: 13rem;
  display: grid;
  gap: 0.35rem;
  padding: 0.55rem;
  border: 3px solid var(--ink);
  border-radius: 18px;
  background: rgba(255, 248, 214, 0.97);
  box-shadow: 5px 5px 0 var(--soft-shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-0.4rem);
  transition: opacity 150ms ease, transform 150ms ease;
}

.nav-menu:hover .nav-menu-list,
.nav-menu:focus-within .nav-menu-list {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.nav-menu-list a {
  padding: 0.5rem 0.65rem;
  border-radius: 12px;
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
}

.nav-menu-list a:hover,
.nav-menu-list a.active {
  background: var(--hot-pink);
  color: #fff;
}

.potatify-shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(1rem, 2vw, 2rem) 0 4rem;
}

.potatify-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 1rem;
  margin: 1rem 0 1.2rem;
  padding: clamp(1.1rem, 3vw, 2rem);
  border: 4px solid var(--ink);
  border-radius: 34px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.74), rgba(255, 248, 214, 0.9)),
    url("assets/buttonbackground.gif");
  background-size: cover;
  box-shadow: 8px 8px 0 var(--soft-shadow);
}

.eyebrow {
  margin: 0 0 0.35rem;
  color: #6b2676;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0.45rem;
  font-size: clamp(3rem, 9vw, 6.8rem);
  line-height: 0.88;
  letter-spacing: -0.08em;
  text-shadow: 4px 4px 0 rgba(255, 79, 216, 0.35);
}

.hero-copy p:last-child {
  max-width: 58rem;
  margin-bottom: 0;
  font-size: clamp(1rem, 2vw, 1.18rem);
  font-weight: 800;
}

.status-chip {
  justify-self: end;
  padding: 0.45rem 0.8rem;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--banana);
  font-weight: 900;
  box-shadow: 4px 4px 0 var(--soft-shadow);
  transform: rotate(2deg);
}

.status-chip.is-playing {
  background: var(--danger);
  color: #fff;
}

.player-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(18rem, 0.75fr);
  gap: 1rem;
  align-items: stretch;
}

.now-playing-card,
.panel-card,
.library-panel,
.album-card {
  border: 3px solid var(--ink);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 6px 6px 0 var(--soft-shadow);
}

.now-playing-card {
  display: grid;
  grid-template-columns: minmax(9rem, 14rem) minmax(0, 1fr);
  grid-template-areas:
    "cover info"
    "controls controls"
    "timeline timeline"
    "secondary secondary";
  gap: 1rem;
  padding: clamp(1rem, 2.5vw, 1.35rem);
}

.cover-shell {
  grid-area: cover;
  position: relative;
  align-self: start;
}

.cover-art {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: 26px;
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.6), transparent 28%),
    linear-gradient(135deg, var(--hot-pink), var(--banana) 45%, var(--acid));
  position: relative;
  box-shadow: 5px 5px 0 var(--soft-shadow);
}

.cover-art img[data-cover-img] {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.cover-art img[data-cover-img][hidden] {
  display: none !important;
}

.cover-art.has-cover {
  background: var(--paper);
}

.cover-art.has-cover span {
  display: none;
}

.cover-art span {
  font-size: clamp(4rem, 12vw, 7rem);
  filter: drop-shadow(3px 3px 0 rgba(37, 22, 47, 0.22));
}

.cover-badge {
  position: absolute;
  right: -0.35rem;
  bottom: -0.35rem;
  max-width: calc(100% + 0.7rem);
  padding: 0.25rem 0.5rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
}

.track-info {
  grid-area: info;
  min-width: 0;
}

.track-info h2 {
  margin-bottom: 0.3rem;
  font-size: clamp(2rem, 5vw, 4.1rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
}

.track-meta {
  margin-bottom: 0.75rem;
  color: #6b2676;
  font-weight: 900;
}

.track-description {
  margin-bottom: 0.75rem;
  font-weight: 800;
  line-height: 1.45;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tag-pill,
.album-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.22rem 0.48rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  font-size: 0.78rem;
  font-weight: 900;
}

.player-controls {
  grid-area: controls;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding-top: 0.25rem;
}

.play-button,
.round-button,
.big-chaos-button,
.panel-heading button,
.shuffle-actions button,
.selector-grid button,
.track-play-button {
  border: 3px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  background: var(--acid);
  font-weight: 900;
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--soft-shadow);
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.play-button:hover,
.round-button:hover,
.big-chaos-button:hover,
.panel-heading button:hover,
.shuffle-actions button:hover,
.selector-grid button:hover,
.track-play-button:hover {
  transform: translate(-1px, -1px) rotate(-1deg);
  box-shadow: 6px 6px 0 var(--soft-shadow);
}

.play-button {
  min-width: 9.5rem;
  min-height: 3.2rem;
  padding: 0.65rem 1.2rem;
  background: var(--hot-pink);
  color: #fff;
  font-size: 1.05rem;
}

.round-button {
  min-width: 3.2rem;
  min-height: 3.2rem;
  padding: 0.45rem 0.7rem;
  background: var(--banana);
}

.round-button.is-active {
  background: var(--purple);
  color: #fff;
}

.timeline-row {
  grid-area: timeline;
  display: grid;
  grid-template-columns: 3.2rem minmax(0, 1fr) 3.2rem;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.82rem;
  font-weight: 900;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--hot-pink);
  cursor: pointer;
}

.secondary-controls {
  grid-area: secondary;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.volume-control {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-width: min(100%, 18rem);
  padding: 0.45rem 0.65rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  font-weight: 900;
}

.lyrics-button {
  display: inline-flex;
  align-items: center;
  min-height: 2.6rem;
  padding: 0.5rem 0.8rem;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
  box-shadow: 4px 4px 0 var(--soft-shadow);
}

.action-panel {
  display: grid;
  gap: 1rem;
}

.panel-card {
  padding: 1rem;
}

.panel-card h2,
.library-panel h2,
.section-heading h2 {
  margin-bottom: 0.45rem;
  font-size: clamp(1.45rem, 3vw, 2.15rem);
  line-height: 1;
}

.big-chaos-button {
  width: 100%;
  min-height: 3.2rem;
  margin: 0.3rem 0 0.7rem;
  padding: 0.7rem 1rem;
  background: var(--hot-pink);
  color: #fff;
  font-size: 1.05rem;
}

.surprise-output,
.helper-text {
  margin: 0;
  color: rgba(37, 22, 47, 0.74);
  font-size: 0.9rem;
  font-weight: 800;
}

.switch-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.65rem;
  border: 2px solid var(--ink);
  border-radius: 18px;
  background: var(--paper);
  font-weight: 900;
}

.switch-row input {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--hot-pink);
}

.control-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

.library-panel {
  padding: 1rem;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.panel-heading button,
.shuffle-actions button,
.selector-grid button,
.track-play-button {
  min-height: 2.5rem;
  padding: 0.45rem 0.72rem;
  background: var(--banana);
}

.shuffle-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.75rem 0;
}

.album-toggle-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 0.75rem;
}

.album-toggle {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  padding: 0.62rem;
  border: 2px solid var(--ink);
  border-radius: 18px;
  background: rgba(255, 248, 214, 0.78);
  font-weight: 900;
}

.album-toggle input {
  width: 1.08rem;
  height: 1.08rem;
  accent-color: var(--hot-pink);
}

.album-toggle span:last-child {
  overflow: visible;
  white-space: normal;
  text-overflow: clip;
  line-height: 1.2;
}

.selector-grid {
  display: grid;
  grid-template-columns: minmax(14rem, 1fr) minmax(14rem, 1fr) auto;
  gap: 0.65rem;
  align-items: end;
}

.selector-grid label,
.search-box {
  display: grid;
  gap: 0.28rem;
  font-size: 0.84rem;
  font-weight: 900;
}

select,
.search-box input {
  width: 100%;
  min-height: 2.7rem;
  padding: 0.45rem 0.62rem;
  border: 3px solid var(--ink);
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.search-box {
  margin-top: 0.9rem;
}

.library-section {
  margin-top: 1.2rem;
}

.section-heading {
  margin: 0 0 0.75rem;
}

.album-browser {
  display: grid;
  gap: 1rem;
}

.album-card {
  overflow: hidden;
}

.album-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  background: rgba(255, 248, 214, 0.76);
  border-bottom: 3px solid var(--ink);
}

.album-title-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.album-icon {
  display: inline-grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  flex: 0 0 auto;
  border: 3px solid var(--ink);
  border-radius: 18px;
  background: var(--banana);
  box-shadow: 3px 3px 0 var(--soft-shadow);
  font-size: 1.45rem;
}

.album-card h3 {
  margin-bottom: 0.15rem;
  font-size: clamp(1.25rem, 3vw, 2rem);
  line-height: 1;
}

.album-card-header p {
  margin: 0;
  color: rgba(37, 22, 47, 0.72);
  font-weight: 900;
}

.track-list {
  display: grid;
  gap: 0.55rem;
  padding: 1rem;
}

.track-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.68rem;
  border: 2px solid rgba(37, 22, 47, 0.35);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.track-row.is-active {
  border-color: var(--ink);
  background: rgba(156, 255, 59, 0.28);
  box-shadow: 4px 4px 0 rgba(37, 22, 47, 0.14);
}

.track-number {
  display: inline-grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
  font-weight: 900;
}

.track-main {
  min-width: 0;
}

.track-main strong,
.track-main span {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.track-main strong {
  font-size: 1rem;
}

.track-main span {
  color: rgba(37, 22, 47, 0.68);
  font-size: 0.82rem;
  font-weight: 800;
}

.track-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.track-play-button {
  min-height: 2.4rem;
  background: var(--acid);
}

.no-results {
  padding: 1rem;
  border: 3px dashed var(--ink);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.7);
  font-weight: 900;
}

/* Footer styling is handled by index.css so Potatify matches the main site. */

@media (max-width: 940px) {
  .player-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 700px) {
  .site-header {
    padding-inline: 0.75rem;
  }

  .nav-shell {
    align-items: flex-start;
    border-radius: 22px;
  }

  .brand small,
  .nav-links > a[href="lyrics.html"] {
    display: none;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .nav-menu-list {
    right: 0;
    max-width: calc(100vw - 2rem);
  }

  .potatify-shell {
    width: min(100% - 1rem, 1180px);
    padding-bottom: 2rem;
  }

  .potatify-hero {
    grid-template-columns: 1fr;
    border-radius: 26px;
  }

  .status-chip {
    justify-self: start;
  }

  .now-playing-card {
    grid-template-columns: 1fr;
    grid-template-areas:
      "cover"
      "info"
      "controls"
      "timeline"
      "secondary";
    border-radius: 24px;
  }

  .cover-shell {
    width: min(72vw, 15rem);
    justify-self: center;
  }

  .track-info h2 {
    text-align: center;
  }

  .track-meta,
  .track-description,
  .track-info .eyebrow {
    text-align: center;
  }

  .tag-row {
    justify-content: center;
  }

  .timeline-row {
    grid-template-columns: 2.7rem minmax(0, 1fr) 2.7rem;
    gap: 0.4rem;
  }

  .secondary-controls {
    justify-content: center;
  }

  .volume-control {
    width: 100%;
  }

  .album-toggle-grid {
    grid-template-columns: 1fr;
  }

  .panel-heading,
  .album-card-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .track-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .track-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* ===== Potatify v7 polish ===== */

/* Tags were useful during setup, but the player is cleaner without the tag cloud. */
.tag-row,
.tag-pill {
  display: none !important;
}

.now-playing-card {
  grid-template-rows: minmax(14rem, auto) minmax(3.6rem, auto) auto auto;
  align-items: start;
}

.track-info {
  min-height: 14rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.player-controls {
  min-height: 3.6rem;
  padding-top: 0;
}

.play-button,
.round-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.play-button {
  height: 3.2rem;
  min-height: 3.2rem;
}

.round-button {
  width: 3.2rem;
  height: 3.2rem;
  min-width: 3.2rem;
  min-height: 3.2rem;
  padding: 0;
}

.library-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.library-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}

.library-tools button {
  min-height: 2.5rem;
  padding: 0.45rem 0.72rem;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--banana);
  color: var(--ink);
  font-weight: 900;
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--soft-shadow);
}

.release-group-divider {
  margin: 0.35rem 0 -0.2rem;
  padding: 0.45rem 0.8rem;
  width: max-content;
  max-width: 100%;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--acid);
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 4px 4px 0 var(--soft-shadow);
}

details.album-card > summary {
  list-style: none;
  cursor: pointer;
}

details.album-card > summary::-webkit-details-marker {
  display: none;
}

details.album-card:not([open]) > .album-card-header,
details.album-card:not([open]) > summary.album-card-header {
  border-bottom: 0;
}

details.album-card > summary.album-card-header::after {
  content: "Collapse";
  flex: 0 0 auto;
  padding: 0.32rem 0.62rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: #fff;
  font-size: 0.78rem;
  font-weight: 900;
}

details.album-card:not([open]) > summary.album-card-header::after {
  content: "Open";
  background: var(--acid);
}

@media (max-width: 700px) {
  .track-info {
    min-height: auto;
  }

  .library-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .library-tools {
    justify-content: flex-start;
  }

  details.album-card > summary.album-card-header::after {
    align-self: flex-start;
  }
}
