@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=VT323&display=swap');

body {
    background-image: url('/twitch-playlist/images/path2237-8-4-3.png');
    background-repeat: repeat;
    font-family: 'VT323', monospace; /* A good retro/pixel font */
    color: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    background-size:100%;
    overflow: hidden; /* Prevents scrollbars */
}

.main-panel {
    background: #1a0005;
    border: 3px solid #6b0010;
box-shadow: 0 0 15px #000, 0 0 10px #8b001f inset;
    border-radius: 10px;
    width: 900px;
    transition: opacity 0.5s, transform 0.5s;
}

.panel-header {
    background: #3e000c;
    padding: 10px 20px;
font-size: small;
    font-family: 'Press Start 2P', cursive;
    text-align: center;
    border-bottom: 3px solid #6b0010;
    border-radius: 7px 7px 0 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.panel-content {
    display: flex;
    justify-content: space-between;
    padding: 20px;
    gap: 20px;
}

/* Column 1: Album Art */
.column-left {
text-align: center;
  width: 30%;
  z-index: 1;
  position: relative;
}

.album-art-container {
    position: relative;
    width: 220px;
    margin: 0 auto;
}

.album-art-container img {
    width: 100%;
    border-radius: 5px;
    border: 2px solid #333;
}

.album-rank {
  position: absolute;
  bottom: 7px;
  left: 2px;
  background: #831722;
  color: #eb1f2f;
  font-size: 2em;
  padding: 5px 15px;
  border-left: 3px solid #54151d;
border-radius: 0px 15px 0px 0px;
  border-bottom: 3px solid #54151d;
  border-right: 3px solid #31161d;
  border-top: 3px solid #31161d;
  text-shadow: 0px 3px 0px #000,3px 3px 0px #0000,3px 0px 0px #000,2px 2px 0px #0000,1px 2px 0px #0000,2px 1px 0px #0000,2px 0px 0px #0000,0px 2px 0px #0000,1px 1px 0px #0000,3px 2px 0px #0000,2px 3px 0px #0000,1px 3px 0px #0000,3px 1px 0px #0000,0px -3px 0px #000,-3px -3px 0px #0000,-3px 0px 0px #000,-2px -2px 0px #0000,-1px -2px 0px #0000,-2px -1px 0px #0000,-2px 0px 0px #0000,0px -2px 0px #0000,-1px -1px 0px #0000,-3px -2px 0px #0000,-2px -3px 0px #0000,-1px -3px 0px #0000,-3px -1px 0px #0000;
}

.album-title {
margin-top: -55px;
  font-size: 1em;
  z-index: 9;
  position: relative;
  margin-left: 50px;
  padding-bottom: 12px;
}
.album-title p {
    margin: 2px 0;
}

/* Column 2: Playlist */
.column-center {
    width: 40%;
    position: relative;
}

.vinyl-container {
position: absolute;
  right: 246px;
  top: 4px;
  z-index: 0 !important;
}

.vinyl-record {
width: 220px;
    opacity: 0.8;
}

.playlist-container {
    background: rgba(0, 0, 0, 0.4);
    padding: 15px;
    border-radius: 5px;
    position: relative;
    z-index: 1; /* Ensure playlist is above the vinyl */
}

.playlist-header {
    margin-bottom: 10px;
}

#playlist-select {
    background: #333;
    color: white;
    border: 1px solid #555;
    font-family: 'VT323', monospace;
    font-size: 1em;
}

#playlist {
    list-style: none;
    padding: 0;
    font-size: 1.1em;
}
#playlist li {
    padding: 4px 0;
    border-bottom: 1px solid #444;
}
#playlist li:last-child {
    border: none;
}
.song-number {
    color: #ff4d6a;
    margin-right: 10px;
}


/* Column 3: Tools */
.column-right {
    width: 30%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.local-tools h3 {
    text-align: center;
    margin-top: 0;
}

.tool-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.tool-item i {
    font-size: 2em;
    color: #ff4d6a;
}

.credits-and-character {
    display: flex;
    align-items: flex-end;
    gap: 15px;
}

.credits {
    font-size: 1em;
}

.credits p {
    margin: 0;
}

.credit-name {
    color: #ff4d6a;
}

.fa-heart {
    color: #ff4d6a;
}

.pixel-character {

    height: 64px;
    image-rendering: pixelated; /* Keeps the pixel art sharp */
}

#playlist-ul li.active-song {
    color: #ff4d6a;
    font-weight: bold;
}


/* --- Additions & Modifications to your existing style.css --- */

/* Player Controls Wrapper */
#player-controls {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 100;
}

#play-pause-btn {
    background: #6b0010;
    border: 2px solid #ff003c;
    color: white;
    padding: 0;
    width: 45px;
    height: 45px;
    border-radius: 50%; /* Make it circular */
    cursor: pointer;
    font-size: 1.2em;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 15px #000, 0 0 10px #8b001f inset;
}

/* Hide pause icon by default */
#play-pause-btn .fa-pause {
    display: none;
}

/* When playing, hide play icon and show pause icon */
#play-pause-btn.playing .fa-play {
    display: none;
}

#play-pause-btn.playing .fa-pause {
    display: block;
}


/* Adjust original global controls to fit in the new wrapper */
.global-volume-container, #minimize-btn {
    position: static; /* Remove fixed positioning */
    background: #6b0010;
    border: 2px solid #ff003c;
    color: white;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;box-shadow: 0 0 15px #000, 0 0 10px #8b001f inset;
}

.global-volume-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Logic to hide UI elements when minimized */
body.minimized #ui-container {
    opacity: 0;
    transform: scale(0.9);
    pointer-events: none;
}

body.minimized #player-controls {
    display: none;
}

body:not(.minimized) .minimized-ui {
    display: none;
}

/* --- Add these restored styles to your style.css file --- */

.minimized-ui {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 600px;
    text-align: center;
}

.hover-area {
    height: 60px; /* Area at the top to hover */
}

.minimized-controls {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #ff003c;
    border-radius: 10px;
    padding: 10px;
    visibility: hidden; /* Hidden until hover */
    opacity: 0;
    transition: opacity 0.3s, visibility 0.3s;
    display: inline-block;
}

.hover-area:hover .minimized-controls {
    visibility: visible;
    opacity: 1;
}

#minimized-song-name {
    font-size: 1.8em;
    font-family: 'Press Start 2P', cursive;
    padding: 10px;
    background: rgba(0,0,0,0.6);
    border-radius: 8px;
    display: inline-block;
    margin-top: -20px; /* Overlap with hover area slightly */
    color: #f0f0f0;
    text-shadow: 2px 2px 3px #000;
}
/* --- Add these styles to your style.css --- */

/* Add a spinner icon for the loading state */
#play-pause-btn .fa-spinner {
    display: none;
    animation: fa-spin 2s infinite linear;
}

/* When loading, show the spinner and hide play/pause */
#play-pause-btn.loading .fa-play,
#play-pause-btn.loading .fa-pause {
    display: none;
}

#play-pause-btn.loading .fa-spinner {
    display: block;
}
/* Make the header a positioning container */
.panel-header {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* The progress bar element */
#progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%; /* Starts at 0% width */
    background-color: #ff003c; /* Progress bar color */
    opacity: 0.4;
    transition: width 0.1s linear; /* Smooths the update */
    z-index: 1;
}

/* The song title text */
#song-title-text {
    position: relative;
    z-index: 2; /* Ensures text is on top of the progress bar */
}

#play-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 200; /* Ensures it's on top of everything */
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: opacity 0.5s ease-out;
}

#play-overlay.hidden {
    opacity: 0;
    pointer-events: none; /* Allows clicks to go through after it's hidden */
}

.overlay-content {
    text-align: center;
    color: white;
    font-family: 'Press Start 2P', cursive;
}

.overlay-content .fa-play {
    font-size: 4em;
    margin-bottom: 20px;
}

.overlay-content span {
    display: block;
    font-size: 1.5em;
}