/* ========================================
   iPOD V1 – MAIN STYLESHEET
   ----------------------------------------
   this file controls:
   
   • colors
   • size
   • layout
   • fonts
   • animations

   SAFE TO EDIT:
   
   • colors
   • sizes (width / height)
   • background images
   • fonts

   BE CAREFUL:
   
   • flex / positioning rules
   • marquee animation logic
   ======================================== */

/* ========================================
   GLOBAL PAGE STYLES
   ----------------------------------------
   ⚠️ IMPORTANT – READ BEFORE EDITING ⚠️

   these styles affect the ENTIRE PAGE,
   not just the ipod.

   if you are using this ipod as a WIDGET
   inside an existing website (squarespace,
   carrd, blog layouts, etc.), your page
   may ALREADY define:
   
   • body background
   • global fonts
   • margins / layout

   in that case:
   
   • you may want to REMOVE this section, OR
   • place this stylesheet BEFORE your main
     site stylesheet so it does not override
     your existing design.

   CSS loads top → bottom.
   the LAST rule wins.

   if this file is loaded last, the body
   background and font here WILL override
   your site’s styles. be careful with this!
   ======================================== */

body {
  background: #ddd; /* change page background color */
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ========================================
   OPTIONAL WRAPPER & LABEL
   ----------------------------------------
   used if you want a label above the ipod.
   can be removed safely if unused.
   ======================================== */

.ipod-wrapper {
  position: relative;
  display: inline-block;
}

.ipod-label {
  position: absolute;
  top: -18px;
  left: 0;
  font-size: 12px;
  font-weight: bold;
  color: #333;
}

/* ========================================
   iPOD BODY
   ----------------------------------------
   controls the overall size and shape
   of the ipod.
   ======================================== */

.ipod {
  width: 250px;  /* change to resize iPod */
  height: 130px;
  background: linear-gradient(#f2f2f2, #d6d6d6); /* ipod shell color */
  border-radius: 18px;
  padding: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: inset 0 0 6px rgba(0, 0, 0, .2);
  gap: 10px;
}

/* ========================================
   SCREEN AREA
   ----------------------------------------
   the "display" portion of the ipod.
   ======================================== */

.screen {
  width: 140px;
  height: 100px;
  /* background texture behind album art */
  background-image: url("https://files.catbox.moe/1tttvl.png");
  background-size: 40%;
  border: 2px solid black;
  border-radius: 8px;
  padding: 6px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
  overflow: hidden;
}

/* ========================================
   ALBUM ART
   ----------------------------------------
   album cover image.
   image itself is set via javascript.
   ======================================== */

.album-art {
  width: 45%; /* controls album art size */
  aspect-ratio: 1 / 1;
  background-size: cover;
  background-position: center;
  border-radius: 4px;
  flex-shrink: 0;
}

/* ========================================
   SONG INFO AREA
   ----------------------------------------
   contains song title + artist.
   ======================================== */

.info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 55%;
  overflow: hidden;
}

.now-playing {
  font-size: 9px;
  margin: 0 0 2px;
  opacity: .8;
}

/* ========================================
   SONG TITLE & ARTIST TEXT
   ----------------------------------------
   uses marquee animation for long text.
   ======================================== */

.song-name {
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  position: relative;
  font-size: 11px;
  font-weight: 600;
}

.artist {
  font-size: 10px;
  opacity: .75;
  white-space: nowrap;
  overflow: hidden;
}

/* ========================================
   CLICK WHEEL
   ----------------------------------------
   circular control pad.
   ======================================== */

.wheel {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: #f7f7f7;
  box-shadow: inset 0 0 6px rgba(0, 0, 0, .15);
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  right: 2px;
  z-index: 1;
}

/* ========================================
   WHEEL BUTTONS
   ----------------------------------------
   icons + menu text.
   ======================================== */
 
.wheel-btn {
  position: absolute;
  pointer-events: auto;
  user-select: none;
  color: #aaa; /* icon color */
  transition: color 0.2s ease;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wheel-btn:hover {
  color: #666;
}

/* MENU LABEL */
.top.wheel-btn {
  top: 13px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: bold;
  font-family: sans-serif !important;
}

/* FONT AWESOME ICONS */
i.wheel-btn {
  font-family: "Font Awesome 5 Free" !important;
  font-weight: 900 !important;
  font-size: 10px;
}

/* PLAY / PAUSE ICON */
#ipodPlayPause {
  font-size: 8px !important;
  bottom: 13px;
  left: 50%;
  transform: translateX(-50%);
}

/* BUTTON POSITIONS */
.left {
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
}

.right {
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
}

.bottom {
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
}

/* CENTER BUTTON (visual only) */
.center {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e0e0e0;
  box-shadow: inset 0 0 4px rgba(0, 0, 0, .2);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

/* ========================================
   MARQUEE (SCROLLING TEXT)
   ----------------------------------------
   automatically scrolls long song names.
   ======================================== */

.song-name,
.artist {
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  position: relative;
}

.song-name .marquee-track,
.artist .marquee-track {
  display: inline-block;
  white-space: nowrap;
  gap: 40px;
  animation: marquee-loop 8s linear infinite;
  will-change: transform;
}

.song-name .marquee-track span,
.artist .marquee-track span {
  display: inline-block;
  padding-right: 40px;
}

/* pause animation on hover */
.marquee:hover {
  animation-play-state: paused;
}

/* SCROLL ANIMATION */
@keyframes marquee-loop {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}
