/* --- START OF FILE style.css --- */

/* (Keep all your existing font-face, :root, and other styles) */
@font-face {
  font-family: 'FairyMuffinRoundPop';
  src: url('fonts/FairyMuffinRoundPopVF.woff2') format('woff2'),
       url('fonts/FairyMuffinRoundPopVF.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

:root {
  --base: #303446;
  --mantle: #292c3c;
  --crust: #232634;

  --text: #c6d0f5;
  --subtext: #b5bfe2;
  --accent: #ca9ee6;
  --accent-hover: #f4b8e4;

  --surface0: #414559;
  --surface1: #51576d;
  --surface2: #626880;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: var(--base);
  font-family: 'FairyMuffinRoundPop', sans-serif;
  color: var(--text);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}

.container {
  width: 100%;
  max-width: 450px;
}

.card {
  background: var(--mantle);
  border: 1px solid var(--surface1);
  border-radius: 20px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
}

.card:hover {
  transform: scale(1.01);
}

.avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--accent);
  margin-bottom: 20px;
  transition: transform 0.3s ease;
}

.avatar:hover {
  transform:  scale(1.03);
}

h1 {
  font-size: 1.8em;
  color: var(--accent);
}

.subtitle {
  color: var(--subtext);
  font-style: italic;
  margin: 20px 0 20px;
}

.description {
  font-size: 1em;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 25px;
}

/* --- CORRECTED LINK & WIDGET STYLES --- */

/* Style for the REGULAR buttons. Unchanged and correct. */
.links a:not(.lastfm-link) {
  display: block;
  background: var(--surface1);
  color: var(--text);
  text-decoration: none;
  margin: 8px 0;
  padding: 10px 15px;
  border-radius: 12px;
  font-weight: bold;
  transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
}

.links a:hover:not(.lastfm-link) {
  background: var(--accent);
  color: var(--base);
  box-shadow: 0 0 10px var(--accent-hover);
  transform: translateY(-2px);
}

/* The Last.fm widget CONTAINER. We make it LOOK like a button. */
.lastfm-widget {
  background: var(--surface1);
  margin: 8px 0;
  padding: 10px 0px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center; /* Center "Last.fm" text when collapsed */
  overflow: hidden;
  height: 37.5px; /* Set a fixed height to match other buttons */
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.lastfm-widget:hover {
  background: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 0 10px var(--accent-hover);
}

/* The actual "Last.fm" text link inside the widget */
.lastfm-link {
  color: var(--text);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.2s;
  display: block;      /* or flex if you want flex children */
  width: 100%;        /* Make it fill the widget */
  height: 37.5px; /* Match the height of the widget */
  box-sizing: border-box; /* ensures padding/border are included in width */
  text-align: center; /* Center the text */
  line-height: 37.5px; /* Vertically center the text */

}

.lastfm-widget:hover .lastfm-link {
  color: var(--base);
}

/* By default, the nowplaying content is completely hidden */
.nowplaying-content {
  display: none;
  align-items: center;
  gap: 10px;
  width: 100%; /* Take up full width inside the widget */
  padding-left: 10px; /* Add some left padding */
}

/* --- EXPANDED STATE --- */

.lastfm-widget.expanded {
  height: 68px; /* Grow taller */
  justify-content: flex-start; /* Align content to the left */
  cursor: pointer;
}

/* When expanded, hide the simple "Last.fm" link... */
.lastfm-widget.expanded .lastfm-link {
  display: none; /* Hide the link when expanded */
}

/* ...and show the detailed nowplaying content instead. */
.lastfm-widget.expanded .nowplaying-content {
  display: flex;
  animation: fadeIn 0.5s ease-in-out;
}

.nowplaying-content img {
  width: 48px; /* Slightly larger cover */
  height: 48px;
  border-radius: 6px;
  flex-shrink: 0;
}

.nowplaying-content .info {
  display: flex;
  flex-direction: column;
  text-align: left;
  overflow: hidden;
}

.nowplaying-content .track,
.nowplaying-content .artist {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nowplaying-content .track {
  color: var(--accent-hover);
  font-weight: bold;
  font-size: 0.95rem;
}

.lastfm-widget:hover .nowplaying-content .track {
  color: var(--base); /* Change track color on hover */
}

.nowplaying-content .artist {
  color: var(--subtext);
  font-size: 0.85rem;
  transition: color 0.2s;
}

.lastfm-widget:hover .nowplaying-content .artist {
  color: var(--crust); /* Change artist color on hover */
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}