/* Reset & Global */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html, body {
  background-color: #d4d4d4;
  height: 100%;
  flex-direction: column;
  font-family: monospace;
}

/* Remove purple visited + blue outline */
a,
a:visited {
  color: white;
  text-decoration: none;
}
a:focus {
  outline: none;
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #111;
  padding: 10px 20px;
}
header a, footer a {
  margin: 0 10px;
  color: white;
  font-weight: bold;
  transition: color 0.3s, text-decoration 0.3s;
}
header a:hover, footer a:hover {
  color: #ff4444;
  text-decoration: underline;
  text-decoration-color: #ff4444;
}
header img {
  width: 30px;
  height: auto;
}

/* Nav links */
.nav-links {
  display: flex;
  gap: 15px;
}
.nav-links a:hover {
  color: #ff4444;
  text-decoration: underline;
}

/* Header controls (search + pfp + dashboard) */
.header-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Profile picture */
#pfp {
  width: 30px;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.25s ease;
}
#pfp:hover {
  transform: scale(1.1);
}

/* Dashboard */
#dashboardBtn {
  width: 40px;
  cursor: pointer;
  transition: transform 0.25s ease;
}
#dashboardBtn:hover {
  transform: scale(1.1);
}
.dashboard-menu {
  position: fixed;
  top: 60px;
  right: 20px;
  background: rgba(0,0,0,0.95);
  border-radius: 10px;
  display: none;
  flex-direction: column;
  min-width: 200px;
  padding: 10px 0;
  z-index: 9999;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}
.dashboard-menu a {
  padding: 12px 16px;
  color: white;
  display: block;
  transition: color 0.3s, background 0.3s;
}
.dashboard-menu a:hover {
  color: #ff4444;
  text-decoration: underline;
  background: rgba(255, 255, 255, 0.1);
}

/* Search box */
.search-box {
  display: flex;
  align-items: center;
  background: #f0f0f0;
  border-radius: 25px;
  padding: 4px 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}
.search-box input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 15px;
  flex: 1;
  padding: 8px;
  color: #333;
}
.search-box input::placeholder {
  color: #888;
}
.search-box button {
  background: #333;
  border: none;
  border-radius: 50%;
  padding: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background 0.2s ease;
}
.search-box button img {
  width: 16px;
  height: 16px;
}
.search-box button:hover {
  background: #555;
  transform: scale(1.1);
}

/* Music Library Grid */
#musicLibrary {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  padding: 20px;
  background-color: #d3d3d3;
  justify-items: center;
  align-items: start;   /* keep cards at the top */
}

/* Album Card */
.album-card {
  width: 220px;
  background: #222;
  color: white;
  text-align: center;
  border-radius: 12px;
  padding: 15px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
}
.album-card img {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 10px;
  transition: transform 0.3s ease;
}
.album-card h3 {
  font-size: 1rem;
  margin-bottom: 5px;
}
.album-card p {
  font-size: 0.9rem;
  color: #bbb;
}
.album-card:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}
.album-card:hover img {
  transform: scale(1.05);
}
.album-card:hover h3,
.album-card:hover p {
  color: #ff4444;
}

/* Back to Top */
#toTopBtn {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: none;
  padding: 12px 20px;
  font-size: 16px;
  border: none;
  border-radius: 8px;
  background: #000;
  color: white;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0,0,0,0.5);
  opacity: 0.6;
  transition: opacity 0.3s;
}
#toTopBtn:hover {
  opacity: 0.85;
  color: #ff4444;
  text-decoration: underline;
}

/* Footer */
footer {
  margin-top: auto;
  background: #555;
  text-align: center;
  padding: 30px;
}
footer a {
  margin: 0 10px;
}

/* Theme */
body.dark {
  background: #1e1e1e;
  color: #f4f4f4;
}
body.light {
  background: #f4f4f4;
  color: #111;
}
