:root {
  --bg: #ffffff;
  --fg: #000000;
  --muted: #777;
  --accent: #000000;
  --radius: 0;
  --shadow: none;
}

* { box-sizing: border-box; }

.player-shell {
  direction: rtl;
  font-family: "Heebo", "Rubik", Arial, sans-serif;
  background: var(--bg);
  color: var(--fg);
  width: 100%;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
  border: none;
  overflow: hidden;
  padding: 16px;
}

.player-body {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 16px;
  padding: 0;
  align-items: center;
}

@media (max-width: 420px) {
  .player-body {
    grid-template-columns: 72px 1fr;
    gap: 12px;
    padding: 0;
  }
}

/* Artwork container with proper logo positioning */
.artwork {
  width: 100%;
  aspect-ratio: 1/1;
  background: #f5f5f5;
  border-radius: 10px;
  object-fit: contain;
  object-position: center;
  padding: 8px;
}

/* Mobile artwork - smaller border/padding */
@media (max-width: 768px) {
  .artwork {
    padding: 4px;
    border-radius: 8px;
  }
}

.info-and-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.title {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.2;
}

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

/* Simplified play button to match volume knob */
.play-btn {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 2px solid var(--fg);
  background: transparent;
  color: var(--fg);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform .1s ease, background .2s ease;
  flex-shrink: 0;
}

.play-btn:active { transform: scale(0.98); }

.play-icon, .pause-icon {
  width: 22px;
  height: 22px;
  display: none;
}

.playing .play-icon { display: none; }
.playing .pause-icon { display: block; }
.not-playing .play-icon { display: block; }
.not-playing .pause-icon { display: none; }

/* Status text positioned next to play button */
.status {
  color: var(--muted);
  font-size: 0.86rem;
  flex: 1;
  text-align: right;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}

/* Circle preloader animation */
.status .loader {
  width: 12px;
  height: 12px;
  border: 2px solid var(--muted);
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  display: none;
}

.status.connecting .loader {
  display: block;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Volume - modern linear slider */
.volume {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Modern linear volume slider */
.volume-slider {
  position: relative;
  width: 100px;
  height: 6px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 3px;
  cursor: pointer;
  touch-action: none;
  outline: none;
  transition: all 0.2s ease;
}

.volume-slider:hover {
  background: rgba(0, 0, 0, 0.15);
}

.volume-slider:focus {
  box-shadow: 0 0 0 2px var(--accent);
}

/* Volume progress bar */
.volume-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: var(--fg);
  border-radius: 3px;
  transition: width 0.1s ease;
  pointer-events: none;
}

/* Volume thumb */
.volume-thumb {
  position: absolute;
  top: 50%;
  width: 16px;
  height: 16px;
  background: var(--fg);
  border: 2px solid var(--bg);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.2s ease;
  pointer-events: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.volume-slider:hover .volume-thumb {
  transform: translate(-50%, -50%) scale(1.1);
}

.volume-slider:active .volume-thumb {
  transform: translate(-50%, -50%) scale(1.2);
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .volume-slider {
    width: 80px;
    height: 8px;
  }
  
  .volume-thumb {
    width: 18px;
    height: 18px;
  }
}

/* Hide old knob and range fallback */
.knob {
  display: none;
}

.range-fallback {
  display: none;
}

/* Professional Web Audio API visualizer */
.visualizer-section {
    opacity: 0.7;
    margin: -25px 0 0;
    width: 100%;
    padding: 0;
    background: none;
    border: none;
    position: relative;
    overflow: hidden;
}

.visualizer-canvas {
  width: 100%;
  height: 80px;
  display: block;
  border-radius: 4px;
  background: transparent;
}

/* Footer */
.footer {
  border-top: 1px solid #eee;
  padding: 8px 12px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

.footer a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted #bbb;
}