:root {
  --main-bg: #e3e6e8;
  --accent: #d32f2f;
  --font: 'Segoe UI', Arial, sans-serif;
}
[data-theme="dark"] {
  --main-bg: #222;
  --accent: #ff9800;
  --font: 'Orbitron', 'Segoe UI', Arial, sans-serif;
}
[data-theme="classic"] {
  --main-bg: #f7f3e9;
  --accent: #1976d2;
  --font: 'Bangers', 'Segoe UI', Arial, sans-serif;
}
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}
body {
  background: var(--main-bg);
  font-family: var(--font);
  color: #222;
  min-height: 100vh;
  transition: background 0.3s, color 0.3s, font-family 0.3s;
}
.container {
  display: grid;
  grid-template-areas:
    "header header"
    "player settings"
    "playlist playlist";
  grid-template-columns: 2fr 1fr;
  grid-template-rows: auto 1fr auto;
  gap: 24px;
  max-width: 900px;
  margin: 32px auto;
  padding: 24px;
  background: rgba(255,255,255,0.85);
  border-radius: 18px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.12);
}
header {
  grid-area: header;
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 8px;
}
.logo {
  width: 120px;
  height: 100px;
  border-radius: 30%;
  object-fit: fill;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.title {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 2px;
  font-family: var(--font);
}
.player {
  grid-area: player;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  padding: 24px;
}
.settings {
  grid-area: settings;
  background: #f5f6fa;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.playlist {
  grid-area: playlist;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  padding: 18px;
  margin-top: 12px;
}
.theme-btns button {
  margin-right: 8px;
  padding: 8px 18px;
  border-radius: 8px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.theme-btns button:last-child {
  margin-right: 0;
}
.theme-btns button.active {
  background: #333;
  color: var(--accent);
}
.setting-group {
  margin-bottom: 10px;
}
label {
  font-size: 1rem;
  font-weight: 500;
  margin-right: 8px;
}
input[type="text"], select {
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #bbb;
  font-size: 1rem;
  font-family: var(--font);
  margin-top: 4px;
}
.audio-controls {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}
.audio-controls button {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.2s;
}
.audio-controls button:active {
  background: #333;
  color: var(--accent);
}
.playlist-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.playlist-list li {
  padding: 8px 0;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  transition: background 0.2s;
}
.playlist-list li:last-child {
  border-bottom: none;
}
.playlist-list li.active {
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
}
@media (max-width: 700px) {
  .container {
    grid-template-areas:
      "header"
      "player"
      "settings"
      "playlist";
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto;
    padding: 10px;
    gap: 14px;
  }
  .player, .settings, .playlist {
    padding: 12px;
  }
  .title {
    font-size: 1.4rem;
  }
}
@media (max-width: 480px) {
  .container {
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 2vw;
  }
  .logo {
    width: 40px;
    height: 40px;
  }
  .title {
    font-size: 1.1rem;
  }
}
.character-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 20px;
  margin-top: 18px;
}
.character-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 8px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, border 0.15s;
  border: 2px solid transparent;
  min-height: 180px;
  position: relative;
}
.character-card.active,
.character-card:active {
  border: 2px solid var(--accent);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  transform: scale(1.04);
}
.character-img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: 50%;
  margin-bottom: 10px;
  background: #eee;
}
.character-name {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--accent);
  text-align: center;
}
.character-card.favorite {
  border: 2px solid gold;
  box-shadow: 0 6px 20px rgba(255,215,0,0.12);
}
.favorite-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: gold;
  color: #111;
  padding: 4px 6px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.8rem;
}
@media (max-width: 700px) {
  .character-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
  }
  .character-img {
    width: 60px;
    height: 60px;
  }
}