* {
  box-sizing: border-box;
}

:root {
  --record-size: 50vmin; /* Reduced size */
  --label-padding: 5vmin; /* Smaller padding */
  --record-color: #000;
  --record-groove-color: #141414;
  --arm-base-size: calc(var(--record-size) / 7); /* Adjusted proportion */
  --arm-angle: 0deg;
  --arm-transition-duration: 0;
  --body-bg: #d7d7d5;
  --border-color: rgba(0, 0, 0, 0.15);
  --box-shadow: 2px 2px 2px rgba(0, 0, 0, .1), inset 2px 2px 6px rgba(255, 255, 255, .5); /* Reduced shadow sizes */
  --text-color: #222;
}

html {
  height: 100%;
}

body {
  width: 100%;
  height: 100%;
  padding: 5vmin;
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  background-color: var(--body-bg);
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 12px;
  color: var(--text-color);
}

#buttons {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: 8em;
  height: 100%;
  margin-right: calc(var(--arm-base-size) / 4);
  z-index: 10;
  padding-bottom: 80px;
}

#track {
  width: 8em;
  margin-bottom: 1em;
}

#volume {
  position: relative;
  display: flex;
  justify-content: center;
  width: 8em;
  height: 7.5em;
  margin-bottom: 1em;
}

#volume .slider {
  transform: rotate(270deg);
}

#speed {
  display: flex;
  margin-bottom: 1em;
  width: 8em;
}

#power {
  width: 8em;
  height: 8em;
}

.button {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  background-color: rgba(255, 255, 255, .8);
  border: 1px solid var(--border-color);
  cursor: pointer;
  user-select: none;
  text-transform: uppercase;
  box-shadow: var(--box-shadow);
}

.button:active {
  box-shadow: inset 3px 3px 3px rgba(0, 0, 0, .1);
}

.button .label {
  pointer-events: none;
}

.indicator {
  display: inline-block;
  width: 10px;
  height: 5px;
  margin-left: 10px;
  background-color: rgba(0, 0, 0, .2);
  pointer-events: none;
}

[data-speed="33"] #speed33 .indicator,
[data-speed="45"] #speed45 .indicator {
  background-color: #e74c3c;
}

#brand {
  margin-top: 20px;
  text-align: center;
}

#brand > a {
  font-family: 'Yesteryear', cursive;
  font-size: 1.6rem;
  color: var(--text-color);
  text-decoration: none;
}

#brand .banner {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 3rem;
  font-size: 1em;
  background-color: rgba(255, 255, 255, .95);
  text-transform: uppercase;
}

#brand:hover .banner, 
#brand:focus-within .banner {
  display: block;
}

#brand .banner a {
  color: var(--text-color);
}

#brand .title {
  font-weight: bold;
  text-decoration: none;
}

#turntable {
  display: flex;
}

#record-inner {
  animation: spin 5.1428s infinite linear;
  animation-play-state: paused;
}

[data-speed="45"] .play #record-inner {
  animation-play-state: running;
}

#record {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: var(--record-size);
  height: var(--record-size);
  background-color: var(--record-color);
  background: repeating-radial-gradient(var(--record-color), var(--record-groove-color) 3px, var(--record-groove-color) 3px);
  border: 20px solid var(--record-groove-color);
  border-radius: 50%;
  box-shadow: 3px 3px 15px rgb(0, 0, 0, .3), -3px -3px 15px rgb(0, 0, 0, .3);
  animation: spin 1.8s infinite linear;
  transform-origin: calc(var(--record-size)/2 + 1px);
}

.pause #record {
  animation-play-state: paused;
}

#shine {
  position: absolute;
  left: auto;
  top: auto;
  width: var(--record-size);
  height: var(--record-size);
  background: conic-gradient(transparent 20deg,
                              rgba(255, 255, 255, .1) 40deg,
                              rgba(255, 255, 255, .1) 50deg,
                              transparent 60deg,
                              transparent 200deg,
                              rgba(255, 255, 255, .08) 220deg,
                              rgba(255, 255, 255, .08) 240deg,
                              transparent 250deg,
                              transparent 340deg);
  border-radius: 50%;
  pointer-events: none;
}

#label {
  width: calc(var(--record-size) / 3);
  height: calc(var(--record-size) / 3);
  background-color: var(--record-color);
  border: 5px solid var(--record-groove-color);
  border-radius: 50%;
  overflow: hidden;
  -webkit-mask-image: -webkit-radial-gradient(white, black);
}

#label iframe {
  width: calc(var(--record-size) / 3 + var(--label-padding) * 2);
  height: calc(var(--record-size) / 3 + var(--label-padding) * 2);
  margin-left: calc(var(--label-padding) * -1);
  margin-top: calc(var(--label-padding) * -1);
}

#arm {
  position: relative;
  border-radius: 50%;
  padding: 1rem;
}

#arm .base {
  position: relative;
  width: var(--arm-base-size);
  height: var(--arm-base-size);
  background-color: #d7d7d7;
  border-radius: 50%;
  box-shadow: 5px 5px 8px rgba(0, 0, 0, .2), inset 5px 5px 5px rgba(255, 255, 255, .3), inset -2px -2px 5px rgba(0, 0, 0, .3);
  z-index: 5;
}

#arm .arm {
  position: absolute;
  top: calc(var(--arm-base-size) / 2 + .5rem + 4px);
  right: calc(var(--arm-base-size) / 2 + .5rem + 4px);
  width: 10px;
  height: calc(var(--arm-base-size) * 3.9);
  background-color: #eee;
  background: linear-gradient(to right, #d7d7d6, #eee, #a5a5a3);
  box-shadow: 5px 5px 10px rgba(0, 0, 0, .3);
  transform: rotate(var(--arm-angle));
  transform-origin: top center;
  transition: var(--arm-transition-duration) transform linear;
}

#arm .head {
  position: absolute;
  bottom: 0;
  left: -10px;
  width: 30px;
  height: 50px;
  background-color: #f7f7f7;
  box-shadow: 5px 5px 10px rgba(0, 0, 0, .4), inset 3px 3px 3px rgba(255, 255, 255, .9), inset -3px -3px 3px rgba(0, 0, 0, .1);
  border-radius: 8px;
  cursor: pointer;
}

.pulse {
  animation: pulse 1s infinite linear;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(359deg);
  }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); } 
}

@media (max-width: 1100px) {
  :root {
    --record-size: 65vmin;
  }

  body {
    flex-direction: column-reverse;
  }

  #turntable {
    margin-left: var(--arm-base-size);
  }

  #buttons {
    width: 80%;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    height: auto;
    margin-top: 4em;
    margin-right: 0;
    font-size: 1.5rem;
  }

  #power {
    order: -1;
  }

  #volume {
    margin-bottom: 0;
  }

  #brand {
    width: 100%;
    margin-top: 6rem;
  }

  #brand > a {
    font-size: 4rem;
  }
}

@media (prefers-color-scheme: dark) {
  body {
    background-color: #363538;
  }

  #brand > a {
    color: #ccc;
  }

  #arm .base {
    background-color: #464548;
    box-shadow: 5px 5px 8px rgba(0, 0, 0, .2), inset 5px 5px 5px rgba(255, 255, 255, .3), inset -2px -2px 10px rgba(0, 0, 0, .3);
  }

  #brand .banner {
    background-color: rgba(0, 0, 0, .9);
    color: #ccc;
  }

  #brand .banner a {
    color: #ccc;
  }
}

.my-contents {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
}
