/* Console.fm - Original Design Recreation */

/* Variables */
:root {
  --bg-color: rgb(55, 57, 60);
  --active-top: rgb(75, 158, 219);
  --active-bottom: rgb(31, 119, 217);
  --active-text: rgb(11, 36, 64);
  --nav-bottom: rgb(84, 113, 161);
  --nav-top: rgb(71, 96, 137);
  --dark-text: #36393b;
  --gray-text: #8e969b;
  --light-bg: #f5f5f5;
  --border-color: #cbcbcb;
  --track-border: #ebebeb;
}

/* Reset & Base */
* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-backface-visibility: hidden;
  background-color: var(--bg-color);
}

a, a:hover {
  text-decoration: none;
}

ul {
  padding: 0;
  margin: 0;
  list-style-type: none;
}

h1, h2, h3, h4 {
  margin: 0;
}

/* Container */
.container {
  width: 1200px;
  margin: 0 auto;
  position: relative;
  min-height: 100%;
}

/* Header */
header {
  height: 120px;
  position: relative;
}

header::after {
  content: "";
  display: table;
  clear: both;
}

header #logo {
  float: left;
  margin-top: 40px;
}

header #logo img {
  height: 40px;
  width: auto;
}

header ul#iphone {
  float: right;
  margin: 0;
}

header ul#iphone li {
  padding: 0 12px;
  float: right;
  margin: 40px 0 0 20px;
  height: 30px;
  border-radius: 3px;
  cursor: pointer;
  background: linear-gradient(180deg, var(--nav-bottom) 0%, var(--nav-bottom) 49%, var(--nav-top) 50%, var(--nav-top) 100%);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.36), 0 1px 1px rgba(0,0,0,0.68);
}

header ul#iphone li:active {
  position: relative;
  top: 2px;
}

header ul#iphone li a,
header ul#iphone li span {
  line-height: 30px;
  font-size: 13px;
  color: #0b111d;
  font-weight: bold;
  text-shadow: 0 1px rgba(255,255,255,0.09);
  display: block;
}

/* Content Section - Fixed layout with scrolling playlist */
#content {
  position: relative;
  display: flex;
  height: calc(100vh - 120px);
}

/* Navigation - Fixed on left */
#content nav {
  width: 240px;
  flex-shrink: 0;
  margin-left: -20px;
  padding-left: 20px;
  position: fixed;
  top: 120px;
  height: calc(100vh - 120px);
  overflow-y: auto;
  overflow-x: visible;
}

#content nav h4 {
  margin-left: 0;
  padding-left: 10px;
  color: #fff;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-shadow: 0 1px rgba(0,0,0,0.43);
  margin-bottom: 5px;
  margin-top: 15px;
  font-weight: 600;
}

#content nav h4:first-child {
  margin-top: 0;
}

#content nav ul {
  margin-bottom: 10px;
}

#content nav ul li {
  width: 240px;
  margin-left: -20px;
  padding: 12px 0 12px 30px;
  font-size: 13px;
}


#content nav ul li a,
#content nav ul li button {
  padding-left: 22px;
  text-transform: capitalize;
  color: #888;
  background: none;
  border: none;
  font-size: 13px;
  cursor: pointer;
  display: block;
  text-align: left;
  width: 100%;
  font-family: inherit;
  background-repeat: no-repeat;
  background-position: 0 center;
  background-size: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Crect x='4' y='4' width='6' height='6' fill='%23666' transform='rotate(45 7 7)'/%3E%3C/svg%3E");
}

#content nav ul li a:hover,
#content nav ul li button:hover {
  color: #bbb;
}

/* Star icon for Top */
#content nav ul li#genre-top a {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpolygon points='7,1 8.5,5.5 13,6 9.5,9 10.5,13.5 7,11 3.5,13.5 4.5,9 1,6 5.5,5.5' fill='%23888'/%3E%3C/svg%3E");
}

/* Active state */
#content nav ul li.active {
  background: linear-gradient(180deg, var(--active-top) 0%, var(--active-bottom) 100%);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.36), 0 1px 1px rgba(0,0,0,0.68);
  border-radius: 3px 0 0 3px;
}

#content nav ul li.active a,
#content nav ul li.active button {
  color: var(--active-text);
  font-weight: bold;
  text-shadow: 0 1px rgba(255,255,255,0.16);
}

#content nav ul li#genre-top.active a {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpolygon points='7,1 8.5,5.5 13,6 9.5,9 10.5,13.5 7,11 3.5,13.5 4.5,9 1,6 5.5,5.5' fill='%230b2440'/%3E%3C/svg%3E");
}

#content nav ul li.active a {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Crect x='4' y='4' width='6' height='6' fill='%230b2440' transform='rotate(45 7 7)'/%3E%3C/svg%3E");
}

/* Arrow icons for About, Sitemap */
#content nav ul li.about a,
#content nav ul li.about button,
#content nav ul li.sitemap a {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpolygon points='4,5 10,5 7,10' fill='%23666'/%3E%3C/svg%3E");
}

/* Playlist - Fixed header, scrolling tracks */
#content #playlist {
  width: 700px;
  margin-left: 220px;
  background-color: var(--light-bg);
  box-shadow: 0 5px 5px rgba(0,0,0,0.75);
  border-radius: 3px 3px 0 0;
  height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#content #playlist h1 {
  text-transform: uppercase;
  margin: 0;
  padding: 20px 30px;
  font-size: 13px;
  color: var(--dark-text);
  font-weight: 700;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

#content #playlist h1 span {
  color: var(--gray-text);
  font-weight: 400;
}

#content #playlist .tracks {
  margin: 0 30px 30px;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 3px;
  overflow-y: auto;
  flex: 1;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

#content #playlist .tracks::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

#content #playlist .tracks li {
  border-bottom: 1px solid var(--track-border);
  cursor: pointer;
  padding: 15px 20px;
  display: flex;
  align-items: center;
}

#content #playlist .tracks li:last-child {
  border-bottom: none;
}

#content #playlist .tracks li:hover {
  background: #fafafa;
}

#content #playlist .tracks li.active-track {
  background: linear-gradient(180deg, rgba(75, 158, 219, 0.12) 0%, #fff 60%, #fff 100%);
}

#content #playlist .tracks li img {
  width: 50px;
  height: 50px;
  border-radius: 3px;
  margin-right: 15px;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
  background-color: #d0d0d0;
}

#content #playlist .tracks li .track-info {
  flex: 1;
  min-width: 0;
}

#content #playlist .tracks li h2 {
  font-size: 14px;
  color: var(--dark-text);
  line-height: 1.4;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

#content #playlist .tracks li h3 {
  font-size: 12px;
  color: var(--gray-text);
  font-weight: normal;
  line-height: 1.3;
}

#content #playlist .tracks li .duration {
  font-size: 12px;
  color: var(--gray-text);
  margin-left: 15px;
  flex-shrink: 0;
}

#content #playlist .tracks li.empty-track-list {
  justify-content: center;
  padding: 40px;
  color: var(--gray-text);
  cursor: default;
}

.console-tracks {
  margin: 0 30px 30px;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 3px;
  overflow: hidden;
}

.console-track-link {
  display: flex;
  align-items: center;
  width: 100%;
  color: inherit;
  text-decoration: none;
}

.console-track {
  border-bottom: 1px solid var(--track-border);
  cursor: pointer;
  padding: 15px 20px;
  display: flex;
  align-items: center;
}

.console-track:last-child {
  border-bottom: none;
}

.console-track:hover {
  background: #fafafa;
}

.console-track.active-track {
  background: linear-gradient(180deg, rgba(75, 158, 219, 0.12) 0%, #fff 60%, #fff 100%);
}

.console-track-art {
  width: 50px;
  height: 50px;
  border-radius: 3px;
  margin-right: 15px;
  flex-shrink: 0;
  object-fit: cover;
  background: #ddd;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.console-track-art-large {
  width: 100px;
  height: 100px;
}

.artist-avatar {
  background: linear-gradient(135deg, var(--active-top) 0%, var(--active-bottom) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 20px;
}

.console-track-info {
  flex: 1;
  min-width: 0;
}

.console-track-info h2 {
  font-size: 14px;
  color: var(--dark-text);
  line-height: 1.4;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.console-track-info h3,
.console-track-duration,
.track-metadata {
  font-size: 12px;
  color: var(--gray-text);
  font-weight: normal;
  line-height: 1.3;
}

.console-track-duration {
  margin-left: 15px;
  flex-shrink: 0;
}

.track-metadata {
  margin-top: 10px;
}

#content #playlist h1.section-heading {
  margin-top: 10px;
}

/* Player - Fixed on right side with proper spacing */
#content #player {
  position: fixed;
  top: 120px;
  width: 240px;
  right: calc(50% - 600px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.5);
  border-radius: 3px;
  overflow: hidden;
}

#content #player #track-art {
  height: 240px;
  width: 240px;
  background-color: #e0e0e0;
  position: relative;
}

#content #player #track-art .img {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-image: url("https://picsum.photos/seed/consolefm/240/240");
}

#content #player #track-art .fullscreen-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0,0,0,0.5);
  border: none;
  border-radius: 3px;
  padding: 5px 8px;
  cursor: pointer;
  color: #fff;
  font-size: 12px;
}

#content #player #now_playing {
  padding: 20px;
  background: linear-gradient(180deg, var(--active-top) 0%, var(--active-bottom) 100%);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.36);
}

#content #player #now_playing h2 {
  padding-left: 20px;
  font-size: 14px;
  color: #fff;
  text-shadow: 0 1px rgba(0,0,0,0.1);
  margin-bottom: 6px;
  font-weight: 600;
  position: relative;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#content #player #now_playing h2::before {
  content: "♪";
  position: absolute;
  left: 0;
  font-size: 14px;
}

#content #player #now_playing h3 {
  padding-left: 20px;
  font-size: 12px;
  color: var(--active-text);
  text-shadow: 0 1px rgba(255,255,255,0.16);
  margin-bottom: 6px;
  font-weight: normal;
  position: relative;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#content #player #now_playing h3::before {
  content: "♫";
  position: absolute;
  left: 0;
  font-size: 12px;
}

#content #player #now_playing .album-name {
  padding-left: 20px;
  font-size: 11px;
  color: var(--active-text);
  opacity: 0.8;
  position: relative;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 12px;
}

#content #player #now_playing .album-name::before {
  content: "●";
  position: absolute;
  left: 0;
  font-size: 8px;
  top: 2px;
}

/* Progress Bar */
#content #player .statusbar {
  margin: 15px 0;
  width: 100%;
  height: 6px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border-radius: 10px;
  background: rgba(0,0,0,0.25);
}

#content #player .statusbar .position {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: #fff;
  border-radius: 10px;
  width: 0;
  box-shadow: 0 0 2px rgba(0,0,0,0.3);
}

#content #player .statusbar:hover .position {
  background: #00d4ff;
}

/* Player Controls - Horizontal layout */
#content #player .controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
  flex-wrap: wrap;
}

#content #player .controls button {
  background: rgba(255,255,255,0.2);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: all 0.15s ease;
}

#content #player .controls button:hover {
  background: rgba(255,255,255,0.35);
}

#content #player .controls button:active {
  transform: scale(0.95);
}

#content #player .controls button svg {
  fill: currentColor;
}

#content #player .controls button.active {
  background: rgba(255,255,255,0.2);
  border-radius: 4px;
}

#content #player .controls button.active svg {
  fill: #00d4ff;
}

/* Large play/pause button */
#content #player .controls #play,
#content #player .controls #pause {
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,0.25);
  order: 1;
}

#content #player .controls #play {
  display: none;
}

#content #player .controls #play svg,
#content #player .controls #pause svg {
  width: 22px;
  height: 22px;
}

/* Prev/next buttons */
#content #player .controls #previous {
  width: 34px;
  height: 34px;
  order: 2;
}

#content #player .controls #next {
  width: 34px;
  height: 34px;
  order: 3;
}

#content #player .controls #previous svg,
#content #player .controls #next svg {
  width: 14px;
  height: 14px;
}

/* Repeat/shuffle controls */
#content #player .controls #repeat,
#content #player .controls #shuffle {
  width: 26px;
  height: 26px;
  background: transparent;
  opacity: 0.7;
}

#content #player .controls #repeat {
  order: 4;
}

#content #player .controls #shuffle {
  order: 5;
}

#content #player .controls #repeat:hover,
#content #player .controls #shuffle:hover {
  opacity: 1;
  background: transparent;
}

#content #player .controls #repeat svg,
#content #player .controls #shuffle svg {
  width: 16px;
  height: 16px;
}

#content #player .controls #repeat.active,
#content #player .controls #shuffle.active {
  opacity: 1;
  color: #fff;
}

/* Favorite button in player */
#content #player #now_playing .favorite-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--active-text);
  opacity: 0.7;
  font-size: 18px;
}

#content #player #now_playing .favorite-btn:hover {
  opacity: 1;
}

.track-item.loading {
  opacity: 0.6;
}

/* Flash */
.flash {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  padding: 12px 24px;
  color: white;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  cursor: pointer;
}

.flash-notice {
  background: linear-gradient(180deg, #4ade80 0%, #22c55e 100%);
}

.flash-alert {
  background: linear-gradient(180deg, #f87171 0%, #ef4444 100%);
}

/* Modal */
.reveal-modal-bg {
  position: fixed;
  height: 100%;
  width: 100%;
  background: rgba(0,0,0,0.45);
  z-index: 40;
  display: none;
  top: 0;
  left: 0;
}

.reveal-modal-bg.show {
  display: block;
}

.reveal-modal {
  background: white;
  display: none;
  top: 100px;
  left: 50%;
  margin-left: -260px;
  width: 520px;
  position: fixed;
  z-index: 41;
  padding: 30px;
  border-radius: 4px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
}

.reveal-modal.show {
  display: block;
}

.reveal-modal h3 {
  color: var(--dark-text);
  font-size: 21px;
  line-height: 1.3;
  margin-bottom: 15px;
}

.reveal-modal p {
  color: var(--gray-text);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 15px;
}

.reveal-modal hr {
  margin: 20px 0;
  border: 0;
  border-top: 1px solid #eee;
}

.reveal-modal .close-reveal-modal {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 22px;
  cursor: pointer;
  color: var(--gray-text);
  background: none;
  border: none;
}

/* Clearfix */
.clearfix::after {
  content: "";
  display: table;
  clear: both;
}

/* ============================================
   SIMPLE TRANSITIONS (No excessive animations)
   ============================================ */

/* Basic hover transitions */
#content #playlist .tracks li {
  transition: background-color 0.15s ease;
}

#content #playlist .tracks li:hover {
  background: #fafafa;
}

/* Active track highlight */
#content #playlist .tracks li.active-track {
  background: linear-gradient(180deg, rgba(75, 158, 219, 0.12) 0%, #fff 50%);
}

/* Nav transitions */
#content nav ul li a,
#content nav ul li button {
  transition: color 0.15s ease;
}

/* Player button interactions */
#content #player .controls button {
  transition: background-color 0.15s ease, opacity 0.15s ease;
}

#content #player .controls button:hover {
  background: rgba(255,255,255,0.35);
}

#content #player .controls button:active {
  opacity: 0.8;
}

/* Player album art fade */
#content #player #track-art .img {
  transition: opacity 0.2s ease;
}

/* Progress bar */
#content #player .statusbar .position {
  transition: width 0.1s linear;
}

/* Modal transitions */
.reveal-modal {
  transition: opacity 0.15s ease;
  opacity: 0;
}

.reveal-modal.show {
  opacity: 1;
}

.reveal-modal-bg {
  transition: opacity 0.15s ease;
  opacity: 0;
}

.reveal-modal-bg.show {
  opacity: 1;
}

/* Secondary genres */

/* Modal avatars */
.reveal-modal .avatars {
  margin-top: 15px;
  text-align: center;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.reveal-modal .avatars img {
  width: 60px;
  height: 60px;
  border-radius: 4px;
  object-fit: cover;
}

.reveal-modal small p {
  font-size: 12px;
  line-height: 1.5;
}

/* Responsive */
@media (max-width: 1240px) {
  .container {
    width: 100%;
    padding: 0 20px;
  }
  
  #content nav {
    margin-left: 0;
    padding-left: 0;
  }
  
  #content nav ul li {
    margin-left: 0;
    width: 220px;
  }
  
  #content #player {
    display: none;
  }
  
  #content #playlist {
    width: calc(100% - 240px);
  }
}
