* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #10131a;
  color: #fff;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  padding-bottom: 135px;
}

main {
  padding: 18px;
  max-width: 720px;
  margin: auto;
}

header {
  position: sticky;
  top: 0;
  background: #10131a;
  z-index: 5;
  padding-bottom: 12px;
}

h1 {
  margin: 4px 0 2px;
  font-size: 30px;
}

p {
  margin: 0 0 14px;
  color: #aab0c0;
}

input {
  width: 100%;
  padding: 15px;
  border-radius: 16px;
  border: 1px solid #2d3548;
  background: #181d29;
  color: white;
  font-size: 17px;
}

nav {
  display: flex;
  overflow-x: auto;
  gap: 9px;
  margin: 14px 0 18px;
  padding-bottom: 4px;
}

.tab {
  white-space: nowrap;
  border: 0;
  padding: 11px 15px;
  border-radius: 999px;
  background: #1b2130;
  color: white;
  font-size: 15px;
}

.tab.active {
  background: #0b78ff;
}

#stations {
  display: grid;
  gap: 12px;
}

.station {
  width: 100%;
  text-align: left;
  border: 1px solid #2c3549;
  background: #181e2b;
  color: white;
  border-radius: 18px;
  padding: 18px;
  font-size: 18px;
  min-height: 74px;
}

.station small {
  display: block;
  color: #aab0c0;
  margin-top: 5px;
  font-size: 13px;
}

.station.active {
  border-color: #0b78ff;
  background: #102d55;
}

#playerBar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: #07090f;
  border-top: 1px solid #2a3348;
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
  z-index: 20;
}

#playerBar div {
  max-width: 720px;
  margin: auto;
}

#now {
  display: block;
  font-weight: 700;
  font-size: 16px;
}

#status {
  color: #aab0c0;
}

audio {
  width: 100%;
  margin-top: 8px;
}

.station {
  display: flex;
  align-items: center;
  gap: 14px;
}

.stationIcon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: #232b3d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.stationText {
  flex: 1;
}

.stationText strong {
  display: block;
}

.fav {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: #7e879a;
  background: #222a3b;
  flex-shrink: 0;
}

.fav.on {
  color: #ffd54a;
}

.empty {
  color: #aab0c0;
  text-align: center;
  padding: 35px 10px;
}

.stationLogo {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: white;
  padding: 5px;
  object-fit: contain;
  flex-shrink: 0;
}

.stationLogoWrap {
  position: relative;
  width: 58px;
  height: 58px;
  flex-shrink: 0;
}

.stationLogo {
  width: 58px;
  height: 58px;
}

.playBadge {
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #0b78ff;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,.35);
}

#playerBar audio {
  display: none;
}

#playerBar {
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
}

.playBadge {
  font-size: 13px;
  font-weight: 800;
}

#carModeBtn {
  width: 100%;
  margin-top: 10px;
  border: 1px solid #2d3548;
  background: #1b2130;
  color: white;
  border-radius: 16px;
  padding: 14px;
  font-size: 17px;
  font-weight: 700;
}

#carModeBtn.active {
  background: #0b78ff;
  border-color: #0b78ff;
}

.stationLogo {
  image-rendering: auto;
}

.carMode nav,
.carMode #search,
.carMode header p {
  display: none;
}

.carMode main {
  padding: 14px;
}

.carMode h1 {
  font-size: 24px;
  margin-bottom: 10px;
}

.carMode #stations {
  gap: 14px;
}

.carMode .station {
  min-height: 96px;
  padding: 18px;
  border-radius: 22px;
}

.carMode .stationLogoWrap {
  width: 72px;
  height: 72px;
}

.carMode .stationLogo {
  width: 72px;
  height: 72px;
  border-radius: 18px;
}

.carMode .playBadge {
  width: 34px;
  height: 34px;
  font-size: 15px;
}

.carMode .stationText strong {
  font-size: 21px;
}

.carMode .stationText small {
  display: none;
}

.carMode .fav {
  display: none;
}

.carMode #playerBar {
  padding-top: 14px;
}
