@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

/* --- THEME DEFINITIONS --- */
/* Default Theme (Futuristic Cyan) */
body.theme-default {
    --background-main: #121212;
    --text-primary: #F5F5F5;
    --text-secondary: #A0A0A0;
    --item-bg: #282828;
    --item-bg-hover: #303030;
    --accent-primary: #00FFFF; /* Cyan */
    --accent-secondary: #BF40BF; /* Magenta */
    --slider-track: #333333;
    --slider-thumb: #E0E0E0;
    --danger: #dc3545;
    /* Glass Effect */
    --glass-bg: rgba(30, 30, 30, 0.5);
    --glass-border: rgba(255, 255, 255, 0.1);
}

/* Dark Theme (Discord-like) */
body.theme-dark {
    --background-main: #202225;
    --text-primary: #FFFFFF;
    --text-secondary: #b9bbbe;
    --item-bg: #36393f;
    --item-bg-hover: #40444b;
    --accent-primary: #5865F2; /* Discord Blurple */
    --accent-secondary: #b9bbbe;
    --slider-track: #40444b;
    --slider-thumb: #FFFFFF;
    --danger: #ed4245;
    /* Glass Effect */
    --glass-bg: rgba(47, 49, 54, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
}

/* Ultra Dark Theme (Obsidian/AMOLED) */
body.theme-ultra-dark {
    --background-main: #000000;
    --text-primary: #F5F5F5;
    --text-secondary: #a7a7a7;
    --item-bg: #28282A;
    --item-bg-hover: #363638;
    --accent-primary: #00FFFF;
    --accent-secondary: #a7a7a7;
    --slider-track: #2a2a2a;
    --slider-thumb: #FFFFFF;
    --danger: #ff453a;
    /* Glass Effect */
    --glass-bg: rgba(28, 28, 30, 0.7);
    --glass-border: rgba(255, 255, 255, 0.12);
}

/* Light Theme */
body.theme-light {
    --background-main: #F4F4F4;
    --text-primary: #121212;
    --text-secondary: #535353;
    --item-bg: #FFFFFF;
    --item-bg-hover: #EAEAEA;
    --accent-primary: #1D89E4; /* Blue */
    --accent-secondary: #535353;
    --slider-track: #d3d3d3;
    --slider-thumb: #121212;
    --danger: #d93025;
    /* Glass Effect */
    --glass-bg: rgba(255, 255, 255, 0.5);
    --glass-border: rgba(0, 0, 0, 0.1);
}


body {
    background-color: var(--background-main);
    color: var(--text-primary);
    font-family: 'Inter', Arial, sans-serif;
    font-weight: normal;
    margin: 0;
    overflow-x: hidden;
}
/* --- Sidebar --- */
.left-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 80px; /* Collapsed width */
    background-color: var(--background-main); 
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-top: 15px;
    box-sizing: border-box;
    z-index: 1100;
    transition: width 0.3s ease;
    overflow: hidden; /* Hide text initially */
}

.left-sidebar:hover {
    width: 220px; /* Expanded width */
}

.left-sidebar .logo {
    margin-bottom: 1px;
    padding: 0 16px; 
    box-sizing: border-box;
    width: 100%;
}
.left-sidebar .logo img {
    height: 75px;
    width: 75px;
}

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    cursor: pointer;
    text-decoration: none;
    color: var(--text-secondary);
    transition: color 0.3s, background-color 0.3s;
    padding: 12px 26px;
    border-radius: 6px;
    width: 100%;
    box-sizing: border-box;
    gap: 20px;
    white-space: nowrap;
}
.left-sidebar:hover .nav-item {
    padding: 12px 20px; /* Adjust padding when expanded */
}

.nav-item.active {
    color: var(--accent-primary);
    text-shadow: 0 0 8px var(--accent-primary);
}
.nav-item:hover {
    color: var(--text-primary);
}
.nav-item svg {
    width: 28px;
    height: 28px;
    stroke: currentColor;
    flex-shrink: 0;
}
.nav-text {
     font-weight: 600;
     opacity: 0; 
     transition: opacity 0.2s ease-in-out;
}

.left-sidebar:hover .nav-text {
    opacity: 1;
    transition-delay: 0.15s; 
}


.nav-item .tooltip {
    display: none; 
}

/* --- Page Content Wrapper --- */
.page-content-wrapper {
    width: 100%;
    padding-left: 80px; 
    box-sizing: border-box;
    transition: padding-left 0.3s ease;
    padding-bottom: 90px;
}
.left-sidebar:hover ~ .page-content-wrapper {
    padding-left: 220px;
}

.account-btn {
    background: transparent;
    color: var(--text-secondary);
    border: 2px solid var(--text-secondary);
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}
.account-btn:hover {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    box-shadow: 0 0 10px var(--accent-primary);
}
.delete-btn {
    background: transparent !important;
    color: var(--text-secondary) !important;
    border-color: var(--danger) !important;
}
.delete-btn:hover {
    color: var(--text-primary) !important;
    background-color: var(--danger) !important;
    border-color: var(--danger) !important;
    box-shadow: 0 0 10px var(--danger) !important;
}

#create-playlist-btn {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}
#create-playlist-btn:hover {
    background-color: var(--accent-primary);
    color: var(--background-main);
    box-shadow: 0 0 10px var(--accent-primary);
}


.main-container {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    width: 100%;
    max-width: 1400px;
    margin: 20px auto 0 auto;
    align-items: start;
}
.sidebar { /* For right sidebar */
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 10px;
    gap: 25px;
    width: 80px;
    position: sticky;
    top: 20px;
    height: fit-content;
}
.social-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    text-decoration: none;
    color: var(--text-secondary);
    transition: color 0.3s;
}
.social-item:hover {
    color: var(--text-primary);
}
.social-item svg {
    width: 32px;
    height: 32px;
    fill: currentColor;
}
.content-area {
    padding: 0 20px;
    margin-top: 50px;
}
.view-container {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
    transform: translateY(10px);
}
.view-container.active {
    opacity: 1;
    transform: translateY(0);
}

#main-tabs-container.active {
    display: block;
}

#artist-profile-view.active,
#playlist-view.active {
    display: flex;
}

.page {
    display: none;
    opacity: 0;
}

.page.active {
    display: block;
    animation: fadeIn 0.4s ease-in-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.welcome-title {
    font-size: 3em;
    margin-bottom: 5px;
    text-align: center;
    font-weight: 700;
}
.welcome-subtitle {
    font-size: 1.1em;
    font-weight: normal;
    color: var(--text-secondary);
    margin-bottom: 40px;
    text-align: center;
}
.stats-container {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 40px;
}
.stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.stat-card svg {
    width: 48px;
    height: 48px;
    stroke: var(--text-primary);
    margin-bottom: 10px;
}
.stat-number {
    font-size: 2.5em;
    margin: 0;
    font-weight: 700;
}
.stat-label {
    font-size: 1em;
    font-weight: normal;
    color: var(--text-secondary);
    margin: 0;
}
.info-section {
    background-color: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 25px;
    margin: 0 auto 25px auto;
    width: 100%;
    max-width: 600px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    box-sizing: border-box;
    text-align: center;
    position: relative;
}
.add-song-link {
    position: absolute;
    top: 25px;
    right: 25px;
    color: var(--text-secondary);
    transition: color 0.3s;
}
.add-song-link:hover {
    color: var(--text-primary);
}
.add-song-link svg {
    width: 24px;
    height: 24px;
}
.add-song-link .tooltip, .download-all-link .tooltip {
    position: absolute;
    top: 100%;
    right: 0;
    transform: translateY(5px);
    background-color: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
    pointer-events: none;
    z-index: 10;
}
.add-song-link:hover .tooltip, .download-all-link:hover .tooltip {
    opacity: 1;
    visibility: visible;
}
.download-all-link {
    position: absolute;
    top: 25px;
    right: 60px;
    color: var(--text-secondary);
    transition: color 0.3s;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    cursor: pointer;
}
.download-all-link:hover {
    color: var(--text-primary);
}
.download-all-link svg {
    width: 24px;
    height: 24px;
}
.download-all-link span { /* For percentage text */
    font-size: 0.8em;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}
#artist-path-header {
    text-align: left;
    word-break: break-all;
}
#artist-path-header a {
    color: var(--text-primary);
    text-decoration: none;
    cursor: pointer;
}
#artist-path-header a:hover {
    color: var(--accent-primary);
}
.info-section h2, .update-group h3 {
    margin-top: 0;
    font-size: 1.8em;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 10px;
    margin-bottom: 15px;
    font-weight: 600;
}
.info-section p, .info-section ul {
    font-weight: normal;
    color: var(--text-secondary);
    line-height: 1.6;
    word-wrap: break-word;
}
.info-section ul {
    list-style: none;
    padding: 0;
}
.info-section ul li {
    margin-bottom: 10px;
}
.info-section a.text-link {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
}
.info-section a.text-link:hover {
    text-decoration: underline;
}
#spotlight-section a {
    color: var(--accent-secondary);
}
#spotlight-section a:hover {
    text-decoration: underline;
}

#library-grid, #playlist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
    width: 100%;
}
.artist-card {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: 12px;
    aspect-ratio: 1 / 1;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: var(--item-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}
.artist-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 0 20px color-mix(in srgb, var(--accent-primary) 30%, transparent);
}
.artist-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.artist-card .default-icon {
    width: 50%;
    height: 50%;
    stroke: var(--text-secondary);
    max-width: 80px;
    max-height: 80px;
}
.artist-card .overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    padding: 1.25rem;
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    text-align: left;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.8);
    opacity: 1;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.6) 50%, rgba(0,0,0,0.85) 100%);
    height: 60%;
    transition: all 0.3s ease;
}
.artist-card:hover .overlay {
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.7) 60%, rgba(0,0,0,0.95) 100%);
}

#artist-profile-view, #playlist-view {
    flex-direction: column;
    align-items: center;
    width: 100%;
}

#back-to-library-btn, .back-to-playlists-btn, .back-btn {
    align-self: flex-start;
    display: inline-block;
    margin-bottom: 30px;
    background: var(--item-bg);
    border: none;
    color: var(--text-secondary);
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}
#back-to-library-btn:hover, .back-to-playlists-btn:hover, .back-btn:hover {
    background-color: var(--text-secondary);
    color: var(--background-main);
    box-shadow: 0 0 10px var(--text-secondary);
}
#artist-profile-view img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    margin-bottom: 20px;
}
#artist-content-container { 
    width: 100%;
    max-width: 600px;
    text-align: left;
}
.update-group {
     margin-bottom: 25px;
}
.update-group ul {
    list-style-type: none;
    padding-left: 0;
}
.update-group li {
    background-color: var(--item-bg);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.update-time {
    font-size: 0.9em;
    color: var(--text-secondary);
    flex-shrink: 0;
    margin-left: 20px;
}
.song-item, .folder-item {
    display: flex;
    align-items: center;
    background-color: var(--item-bg);
    border-radius: 8px;
    margin-bottom: 15px;
    padding: 15px;
    gap: 15px;
    transition: background-color 0.2s;
}
.folder-item {
    font-weight: 600;
    font-size: 1.1em;
    color: var(--text-primary);
    cursor: pointer;
}
.folder-item:hover, .song-item:hover {
    background-color: var(--item-bg-hover);
}
.folder-item svg {
    width: 32px;
    height: 32px;
    stroke: var(--text-primary);
    fill: none;
    flex-shrink: 0;
}
.song-item .play-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: var(--text-primary);
}
.song-item .play-btn svg {
    width: 32px;
    height: 32px;
    fill: currentColor;
}
.song-title {
    font-size: 1.1em;
    font-weight: 600;
    flex-grow: 1;
    text-align: left;
}
.song-artist-name {
    font-size: 0.9em;
    color: var(--text-secondary);
    margin-left: auto;
    margin-right: 15px;
    flex-shrink: 0;
}
.song-action-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    cursor: pointer;
}
.song-action-btn:hover {
    color: var(--accent-primary);
    filter: drop-shadow(0 0 4px var(--accent-primary));
}
.song-action-btn.delete-song-from-playlist-btn:hover {
    color: var(--danger);
    filter: drop-shadow(0 0 4px var(--danger));
}
.song-action-btn svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
}
#search-input {
    width: 100%;
    padding: 15px;
    font-size: 1.2em;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background-color: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--text-primary);
    box-sizing: border-box;
    margin-bottom: 20px;
}

#search-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 10px var(--accent-primary);
}

#search-results {
    width: 100%;
}

/* --- Global Player Bar --- */
#global-player-bar {
    position: fixed;
    bottom: -100px;
    left: 0;
    width: 100%;
    height: 80px;
    background-color: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    box-sizing: border-box;
    z-index: 2000;
    transition: bottom 0.3s ease-in-out;
}
#global-player-bar.active {
    bottom: 0;
}
.player-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    min-width: 0;
}
.player-disc {
    width: 56px;
    height: 56px;
    color: var(--text-secondary);
    flex-shrink: 0;
}
.player-disc.spinning {
    animation: spin 4s linear infinite;
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.player-song-details {
    display: flex;
    flex-direction: column;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
#global-song-title, #global-artist-name {
     white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
#global-song-title {
    font-size: 1em;
    font-weight: 600;
}
#global-artist-name {
    font-size: 0.8em;
    color: var(--text-secondary);
}
.player-main-controls {
    flex: 1.5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
}
.player-main-controls-buttons {
    display: flex;
    align-items: center;
    gap: 20px;
}
.player-control-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    transition: all 0.2s;
}
.player-control-btn:hover {
    color: var(--text-primary);
    filter: drop-shadow(0 0 6px var(--accent-primary));
}
.player-control-btn.active {
    color: var(--accent-primary);
}
.player-control-btn svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
}
#global-play-pause-btn {
    background: transparent;
    color: var(--text-primary);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 0 6px var(--accent-primary));
    transition: all 0.2s;
}
#global-play-pause-btn:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 0 10px var(--accent-primary));
}
 #global-play-pause-btn svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    stroke-width: 2px;
 }
 #global-play-pause-btn .play-icon-svg {
    fill: none;
 }
 #global-play-pause-btn .pause-icon-svg {
    fill: none;
    stroke: currentColor;
 }
.player-timeline {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 500px;
}
.player-right-controls {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}
.volume-container {
    display: flex;
    align-items: center;
    gap: 5px;
}
.volume-container button {
    background: none; border: none; color: var(--text-secondary); cursor: pointer;
}
.volume-container button:hover {
    color: var(--text-primary);
}
.volume-container button svg {
    width: 20px; height: 20px; stroke: currentColor;
}
.time-display {
    font-size: 0.9em;
    color: var(--text-secondary);
    min-width: 40px;
    text-align: center;
}
.seek-slider, .volume-slider {
    flex-grow: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 5px;
    background: var(--slider-track);
    outline: none;
    border-radius: 3px;
    cursor: pointer;
}
.seek-slider::-webkit-slider-thumb, .volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 15px;
    height: 15px;
    background: var(--slider-thumb);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.2s, box-shadow 0.2s;
}
.seek-slider::-webkit-slider-thumb:hover, .volume-slider::-webkit-slider-thumb:hover {
    background: var(--accent-primary);
    box-shadow: 0 0 10px var(--accent-primary);
}

.seek-slider::-moz-range-thumb, .volume-slider::-moz-range-thumb {
    width: 15px;
    height: 15px;
    background: var(--slider-thumb);
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s, box-shadow 0.2s;
}
.seek-slider::-moz-range-thumb:hover, .volume-slider::-moz-range-thumb:hover {
    background: var(--accent-primary);
    box-shadow: 0 0 10px var(--accent-primary);
}
.volume-slider {
     width: 100px;
}

/* Auth Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}
.modal-content {
    background-color: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 30px;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    width: 90%;
    max-width: 450px;
    text-align: left;
}
.modal-content h2 {
    text-align: center;
    margin-top: 0;
}
.form-group {
    margin-bottom: 20px;
}
.form-label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-secondary);
}
.form-input {
    width: 100%;
    padding: 10px;
    background-color: var(--item-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    border-radius: 5px;
    box-sizing: border-box;
}
.form-submit-btn {
    width: 100%;
    padding: 12px;
    background-color: var(--accent-primary);
    color: var(--background-main);
    border: none;
    border-radius: 5px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s, box-shadow 0.2s;
}
.form-submit-btn:hover {
    box-shadow: 0 0 10px var(--accent-primary);
}
.form-submit-btn:disabled {
    background-color: var(--item-bg);
    color: var(--text-secondary);
    cursor: not-allowed;
    box-shadow: none;
}
.auth-switch-link {
    color: var(--accent-primary);
    cursor: pointer;
    text-decoration: underline;
}
#recovery-key-group {
    display: flex;
    gap: 10px;
    align-items: center;
}
#recovery-key-group input { flex-grow: 1; }
 #captcha-group {
    display: flex;
    align-items: center;
    gap: 10px;
}
#captcha-group input {
    width: 80px;
}

.tos-group {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9em;
}

.tos-group label {
    margin: 0;
    color: var(--text-secondary);
}

#playlist-list {
    list-style: none;
    padding: 0;
}
#playlist-list li {
    background-color: var(--item-bg);
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 10px;
    cursor: pointer;
}
#playlist-list li:hover {
    background-color: var(--item-bg-hover);
}
#add-to-playlist-modal ul {
    list-style: none;
    padding: 0;
    max-height: 200px;
    overflow-y: auto;
}
#add-to-playlist-modal li {
    padding: 10px;
    cursor: pointer;
    border-radius: 4px;
}
#add-to-playlist-modal li:hover {
    background-color: var(--item-bg-hover);
}
.playlist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 20px;
    width: 100%;
    max-width: 600px;
    box-sizing: border-box;
}
.playlist-header h1 { margin: 0; }
.playlist-header .delete-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: auto;
    flex-shrink: 0;
}
.playlist-header .delete-btn svg {
    width: 18px;
    height: 18px;
}

#open-add-song-modal-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    width: 100%;
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

#open-add-song-modal-btn:hover {
    background-color: var(--accent-primary) !important;
    color: var(--background-main) !important;
    box-shadow: 0 0 10px var(--accent-primary) !important;
}

#playlist-add-search-results {
    max-height: 40vh;
    overflow-y: auto;
    padding-right: 5px; /* for scrollbar */
}
#playlist-add-search-results .song-item {
    padding: 10px;
    margin-bottom: 10px;
}
#playlist-add-search-results .song-item .song-title {
    font-size: 1em;
}

#playlist-add-search-results .song-item .add-song-from-modal-btn {
    background: transparent;
    color: var(--accent-primary);
    border: 2px solid var(--accent-primary);
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    margin-left: auto;
    flex-shrink: 0;
}

#playlist-add-search-results .song-item .add-song-from-modal-btn:hover {
    color: var(--background-main);
    background: var(--accent-primary);
    box-shadow: 0 0 8px var(--accent-primary);
}

#playlist-add-search-results .song-item .add-song-from-modal-btn:disabled {
    border-color: #28a745;
    background: #28a745;
    color: var(--text-primary);
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.7;
}

/* --- New Login/Account Page Styles --- */
.login-page-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}
.account-welcome {
    font-size: 1.2em;
    margin-bottom: 10px;
}
.member-since {
    color: var(--text-secondary);
    font-weight: normal;
    margin-top: 0;
    margin-bottom: 25px;
}
.account-settings {
    margin-top: 30px;
    border-top: 1px solid var(--glass-border);
    padding-top: 20px;
    text-align: left;
}
.account-settings h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.2em;
}
.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.setting-item label {
    color: var(--text-secondary);
}
#theme-selector {
    background-color: var(--item-bg);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    border-radius: 5px;
    padding: 5px 10px;
}

/* --- Fullscreen Mobile Player --- */
#mobile-player-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--background-main);
    z-index: 2200;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

#mobile-player-fullscreen.active {
    transform: translateY(0);
}

.mpf-header {
    position: absolute;
    top: 20px;
    left: 20px;
    width: calc(100% - 40px);
}

.mpf-album-art {
    width: 80%;
    max-width: 300px;
    aspect-ratio: 1 / 1;
    background-color: var(--item-bg);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mpf-album-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.mpf-album-art .player-disc {
    width: 60%;
    height: 60%;
    color: var(--text-secondary);
}

.mpf-album-art .player-disc.spinning {
    animation: spin 4s linear infinite;
}

.mpf-song-details {
    text-align: center;
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
}

.mpf-song-details h2 {
    font-size: 1.5em;
    font-weight: 700;
    margin: 0 0 5px 0;
    color: var(--text-primary);
}

.mpf-song-details a {
    text-decoration: none;
}

.mpf-song-details p {
    font-size: 1em;
    font-weight: 600;
    margin: 0;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.mpf-song-details a:hover p {
    color: var(--text-primary);
}

.mpf-timeline {
    width: 90%;
    max-width: 400px;
}

.mpf-timeline .seek-slider {
    width: 100%;
}

.mpf-time-display {
    display: flex;
    justify-content: space-between;
    font-size: 0.8em;
    color: var(--text-secondary);
    margin-top: 5px;
}

.mpf-main-controls {
    display: flex;
    justify-content: space-around;
    align-items: center;
    width: 100%;
    max-width: 400px;
}

.mpf-control-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    transition: all 0.2s;
}

.mpf-control-btn.active {
    color: var(--accent-primary);
}

.mpf-main-controls .mpf-control-btn svg {
    width: 28px;
    height: 28px;
}

.mpf-main-controls .play-pause-main {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--text-primary);
    color: var(--background-main);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mpf-main-controls .play-pause-main svg {
     width: 32px;
    height: 32px;
}

#close-mobile-player-btn svg {
    width: 32px;
    height: 32px;
    stroke: var(--text-secondary);
}
#close-mobile-player-btn:hover svg {
    stroke: var(--text-primary);
}

#open-mobile-player-btn {
    display: none; /* Hide on desktop by default */
}

/* Donation Page Styles */
.donation-buttons-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 30px;
}

.donation-btn {
    display: block;
    padding: 20px;
    text-align: center;
    background-color: var(--item-bg);
    color: var(--text-primary);
    font-size: 1.5em;
    font-weight: 700;
    text-decoration: none;
    border-radius: 8px;
    border: 2px solid var(--glass-border);
    transition: all 0.2s ease-in-out;
}

.donation-btn:hover {
    --money-green: #85BB65;
    color: var(--money-green);
    border-color: var(--money-green);
    box-shadow: 0 0 15px var(--money-green);
    transform: translateY(-5px);
}


 @media (max-width: 768px) {
    body {
        /* Add safe-area padding for mobile browsers with bottom UI */
        padding-bottom: calc(80px + env(safe-area-inset-bottom));
    }
    .left-sidebar {
        top: auto;
        bottom: 0;
        width: 100%; /* FIX: Ensure sidebar takes full width */
        height: calc(80px + env(safe-area-inset-bottom));
        flex-direction: row;
        justify-content: space-around;
        align-items: center;
        border-top: 1px solid var(--glass-border);
        padding-top: 0;
        padding-bottom: env(safe-area-inset-bottom);
        z-index: 2100;
        background-color: var(--glass-bg);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }
    /* This hover rule is no longer necessary for the mobile layout */
    .left-sidebar:hover {
        width: 100%;
        align-items: center;
    }
    .nav-item {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2px;
        padding: 4px;
        height: 100%;
        flex-grow: 1;
        flex-basis: 0;
        min-width: 0;
        text-align: center;
    }
    .nav-item svg {
        width: 24px;
        height: 24px;
    }
    .nav-text {
        display: block;
        opacity: 1;
        font-size: 12px;
        transition: none;
        transition-delay: 0s;
    }
    .left-sidebar .logo {
        display: none;
    }
    .page-content-wrapper {
        padding-left: 0;
        padding-bottom: calc(80px + 80px + 10px + env(safe-area-inset-bottom));
    }
    .left-sidebar:hover ~ .page-content-wrapper {
        padding-left: 0;
    }
    #global-player-bar.active {
        bottom: calc(80px + env(safe-area-inset-bottom));
    }

    .main-container {
        grid-template-columns: 1fr;
        margin-top: 10px;
    }
    .sidebar {
        display: none;
    }
     .content-area {
         order: 2;
         padding: 0 10px;
     }

     #library-grid, #playlist-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }

    .account-section {
        display: none;
    }

    #global-player-bar .player-info {
        cursor: pointer;
    }

    .player-main-controls .player-timeline,
    .player-main-controls-buttons #global-shuffle-btn,
    .player-main-controls-buttons #global-skip-back-btn,
    .player-main-controls-buttons #global-skip-forward-btn,
    .player-main-controls-buttons #global-loop-btn,
    .player-right-controls {
        display: none;
    }
    
    #open-mobile-player-btn {
        display: block;
    }

    #global-player-bar .player-info {
        flex: 1;
    }

    #global-player-bar .player-main-controls {
        flex: 0 0 auto;
    }
    
    .player-main-controls-buttons {
       gap: 15px;
    }

    .donation-buttons-container {
        grid-template-columns: 1fr; /* Stack buttons on mobile */
    }
}

