body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background-color: #0a0a0a;
    color: white;
    font-family: ui-sans-serif, sans-serif;
    padding: 2rem;
}



/* Buttons and dropdowns: unified style */
button,
select {
    background-color: #272727 !important;
    color: white !important;
    font-family: ui-sans-serif, sans-serif;
    font-weight: 500;
    border-radius: 0.65rem;
    border: none;
    cursor: pointer;
    padding: 0.75rem 1.5rem;
    transition: background 0.3s ease;
}

button:hover,
select:hover {
    background-color: #3d3d3d !important;
}

/* Headings */
h1 {
    font-family: ui-sans-serif, sans-serif;
    margin-bottom: 2rem;
}

#profiles-wrapper {
    width: 70%;         /* fixed width */
    height: 40vh;         /* fixed height */
    border: 1px solid #737373;
    border-radius: 1rem;
    padding: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #0f0f0f;
    overflow: hidden;       /* optional — hide overflow */
}

#profiles {
    width: 100%;
    height: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-content: flex-start;
    gap: 1.5rem;
    overflow-y: auto;       /* scroll if too many cards */
    padding: 1.5rem;
    box-sizing: border-box;
}


.card {
    width: calc(16% - 1.5rem);
    min-width: 15%;
    max-width: 35%;
    height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    background-color: #1a1a1a;
    border-radius: 0.65rem;
    text-align: center;
    box-sizing: border-box;
    flex: 0 0 auto;
    padding: 0.75rem;
}

.fade-in {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.2s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.fade-out {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.1s ease-in,
    transform 0.1s ease-in;
}

.avatar {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 0.5rem;
}

.card h3 {
    max-height: 3.5em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-word;
    width: 100%;
    min-width: 0;
}

.track-title {
    font-size: 0.75rem;
    color: #ccc;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    width: 100%;
    text-align: center;
}

.artist {
    color: #aaa;
    font-size: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;       /* limit to 2 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;       /* break very long words */
    width: 100%;
}



button:hover,
select:hover {
    background-color: #3d3d3d;
}

#generate-btn {
    margin-top: 1.5rem;
}

#favorites-wrapper {
    width: 100%;
    max-width: 1000px;
    height: 80vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 1rem;
    border: 1px solid #737373;
    border-radius: 1rem;
    background-color: #0f0f0f;
}

.favorite-row {
    display: flex;
    gap: 12px;
    overflow-x: auto;
}

.favorite-row::-webkit-scrollbar {
    height: 8px;
}

.favorite-row::-webkit-scrollbar-thumb {
    background-color: #3d3d3d;
    border-radius: 4px;
}

/* Centered scrollable favorites card */
#favorites-card {
    width: 600px;               /* fixed width for the card */
    height: 80vh;               /* fixed height for scrolling */
    background-color: #1a1a1a;  /* match card style */
    border: 1px solid #737373;
    border-radius: 1rem;
    padding: 1rem;
    overflow-y: auto;           /* vertical scrolling */
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 0 10px #000;
}

/* Center the favorites card on page */
body.favorites-page {
    justify-content: center;  /* vertical centering */
}

/* Optional: scrollbar styling */
#favorites-card::-webkit-scrollbar {
    width: 8px;
}

#favorites-card::-webkit-scrollbar-thumb {
    background-color: #3d3d3d;
    border-radius: 4px;
}

/* Container for favorites chat-like list */
#favorites-container {
    width: 400px;           /* fixed width */
    height: 80vh;           /* take most of viewport height */
    background-color: #0f0f0f;
    border: 1px solid #737373;  /* similar outline as index */
    border-radius: 1rem;
    overflow-y: auto;       /* only container scrolls */
    display: flex;
    flex-direction: column;
    padding: 0;
    margin-top: 2rem;
}



/* Alternating row colors */
.favorite-entry:nth-child(odd) {
    background-color: #1a1a1a;
}

.favorite-entry:nth-child(even) {
    background-color: #272727;
}

/* Mini circular avatar */
.favorite-entry img {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
}

/* Username & optional artist */
.favorite-entry div {
    display: flex;
    flex-direction: column;
}

.favorite-entry div .username {
    color: white;
    font-weight: 500;
}

.favorite-entry div .artist {
    color: #aaa;
    font-size: 0.75rem;
}

/* Remove button on right */
.remove-btn {
    margin-left: auto;
    background-color: #272727;
    color: white;
    border: none;
    border-radius: 0.5rem;
    padding: 2px 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.remove-btn:hover {
    background-color: #3d3d3d;
}


.username, .artist, .track-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    width: 100%;
}


