/* Base layout */
:root {
  color-scheme: only light;
  font-family: "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
  --color-primary: #005daa;
  --color-primary-light: #3a6dcc;
  --color-bg: #f6f8fc;
  --color-card: #ffffff;
  --color-border: rgba(18, 44, 84, 0.12);
  --color-text: #14213d;
  --color-muted: #4a566e;
  --color-success: #0f9d58;
  --shadow-soft: 0 20px 35px rgba(30, 50, 100, 0.07);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top, rgba(39, 77, 140, 0.14), transparent),
    var(--color-bg);
  color: var(--color-text);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 32px 16px;
}

.page {
  width: min(640px, 100%);
  margin: 0 auto;
}

.player-card {
  background: var(--color-card);
  border-radius: 16px;
  padding: 32px 28px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--color-border);
  display: grid;
  gap: 24px;
}

.player-header {
  text-align: center;
  display: grid;
  gap: 12px;
}

.player-logo {
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

.player-title {
  font-size: clamp(1.75rem, 2vw + 1rem, 2.25rem);
  margin: 0;
  color: var(--color-primary);
}

.player-subtitle {
  margin: 0;
  color: var(--color-muted);
  font-weight: 500;
}

.player-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.button {
  appearance: none;
  border: 0;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.button-primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 10px 20px rgba(39, 77, 140, 0.25);
}

.button-primary:hover:not(:disabled),
.button-primary:focus-visible {
  background: var(--color-primary-light);
  transform: translateY(-1px);
}

.button-ghost {
  background: rgba(39, 77, 140, 0.1);
  color: var(--color-primary);
}

.button-ghost:hover:not(:disabled),
.button-ghost:focus-visible {
  background: rgba(39, 77, 140, 0.18);
}

.player-status {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 10px;
  background: rgba(39, 77, 140, 0.08);
  border: 1px solid rgba(39, 77, 140, 0.12);
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex: 0 0 12px;
  background: var(--color-muted);
  box-shadow: 0 0 8px rgba(20, 33, 61, 0.2);
  transition: background 180ms ease;
}

.status-message {
  margin: 0;
  font-weight: 600;
  color: var(--color-muted);
}

.status--idle .status-dot {
  background: var(--color-muted);
}

.status--playing .status-dot {
  background: var(--color-success);
}

.status--loading .status-dot {
  background: #fbbc05;
}

.status--error .status-dot {
  background: #ea4335;
}

.player-info {
  padding: 0;
  background: none;
  border: 0;
}

.info-accordion {
  border-radius: 12px;
  border: 1px solid rgba(39, 77, 140, 0.14);
  background: rgba(39, 77, 140, 0.04);
  overflow: hidden;
  transition: background 150ms ease;
}

.info-accordion[open] {
  background: rgba(39, 77, 140, 0.08);
}

.info-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 14px 18px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.info-summary:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: -4px;
  border-radius: 12px;
}

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

.info-summary::after {
  content: "+";
  font-size: 1.25rem;
  color: var(--color-primary);
  transition: transform 160ms ease, color 160ms ease;
}

.info-accordion[open] .info-summary::after {
  content: "−";
  color: var(--color-text);
}

.info-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-primary);
}

.info-list {
  margin: 0;
  padding: 8px 18px 18px 34px;
  color: var(--color-muted);
}

.info-list li {
  margin-bottom: 6px;
}

.info-list a {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
}

.info-list a:hover,
.info-list a:focus-visible {
  text-decoration: underline;
}

.player-social {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  padding: 4px 0 0;
}

.social-link {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.social-link:hover,
.social-link:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(39, 77, 140, 0.2);
}

.social-icon {
  width: 30px;
  height: 30px;
  display: block;
}

.sr-only {
  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: 480px) {
  body {
    padding: 24px 12px;
  }

  .player-card {
    padding: 24px;
  }
}
