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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    height: 100vh;
    overflow: hidden;
    color: #e0e0e0;
}

/* Setup Page Styles */
body.setup-page {
    display: flex;
    align-items: center;
    justify-content: center;
}

.setup-container {
    background: rgba(255,255,255,0.05);
    border-radius: 20px;
    padding: 40px;
    backdrop-filter: blur(10px);
    max-width: 500px;
    width: 90%;
    position: relative;
}

.setup-logout {
    position: absolute;
    top: 16px;
    right: 20px;
    color: rgba(255,255,255,0.4);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}
.setup-logout:hover {
    color: rgba(255,255,255,0.8);
}

.setup-container h1 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #fff;
}

.subtitle {
    color: #888;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    background: rgba(255,255,255,0.05);
    color: #fff;
    font-size: 1rem;
    transition: border-color 0.3s;
}

input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
}

input[type="text"]::placeholder {
    color: #666;
}

.hint {
    font-size: 0.85rem;
    color: #666;
    margin-top: 8px;
    margin-bottom: 12px;
}

.setup-container button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.setup-container button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.setup-container button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.setup-container .hint {
    color: rgba(255,255,255,0.7);
    text-align: center;
    line-height: 1.6;
    margin-top: 20px;
    padding: 16px 20px;
    background: rgba(255,100,100,0.12);
    border: 1px solid rgba(255,100,100,0.2);
    border-radius: 10px;
}

.setup-container .browser-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    margin-top: 6px;
    border-radius: 6px;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    transition: background 0.15s;
}

.setup-container .browser-link:hover {
    background: rgba(255,255,255,0.1);
}

/* Profile Page */
.profile-section {
    margin-bottom: 16px;
}
.profile-label {
    display: block;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.4);
    margin-bottom: 4px;
}
.profile-value {
    color: #fff;
    font-size: 1rem;
}
.profile-subheading {
    font-size: 1.2rem;
    color: #fff;
    margin-bottom: 16px;
}
.profile-field {
    margin-bottom: 12px;
}
.profile-input {
    width: 100%;
    padding: 10px 12px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    color: #fff;
    font-size: 0.95rem;
    font-family: inherit;
}
.profile-input:focus {
    outline: none;
    border-color: rgba(255,255,255,0.5);
}
.profile-divider {
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin: 24px 0;
}
.profile-message {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 16px;
}
.profile-message-error {
    background: rgba(220,60,60,0.15);
    color: #f88;
}
.profile-message-success {
    background: rgba(60,180,80,0.15);
    color: #8f8;
}
.profile-logout-btn {
    display: block;
    text-align: center;
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}
.profile-logout-btn:hover {
    color: rgba(255,255,255,0.9);
}
.profile-hint {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.4);
    margin-bottom: 12px;
}
.profile-lang-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 16px;
}
.profile-lang-option {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
    cursor: pointer;
}
.profile-lang-option input[type="checkbox"] {
    accent-color: #667eea;
    width: 16px;
    height: 16px;
}

.profile-option-link {
    display: block;
    color: rgba(255,255,255,0.4);
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 8px;
    transition: color 0.2s;
}
.profile-option-link:hover {
    color: rgba(255,255,255,0.7);
}
.profile-option-danger {
    color: rgba(180,50,50,0.6);
    margin-top: 16px;
}
.profile-option-danger:hover {
    color: rgba(220,60,60,0.9);
}
.profile-danger-zone {
    margin-top: 32px;
    padding: 20px;
    border: 1px solid rgba(220,60,60,0.3);
    border-radius: 12px;
    background: rgba(220,60,60,0.05);
}
.profile-closable-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.profile-danger-heading {
    color: #e55;
}
.profile-danger-close {
    color: rgba(255,255,255,0.3);
    text-decoration: none;
    font-size: 1.4rem;
    line-height: 1;
    transition: color 0.2s;
}
.profile-danger-close:hover {
    color: rgba(255,255,255,0.6);
}
.profile-danger-text {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
    margin-bottom: 16px;
}
.profile-danger-btn {
    width: 100%;
    padding: 12px;
    background: rgba(220,60,60,0.15);
    border: 1px solid rgba(220,60,60,0.4);
    border-radius: 10px;
    color: #e55;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}
.profile-danger-btn:hover {
    background: rgba(220,60,60,0.25);
    border-color: rgba(220,60,60,0.6);
}

.setup-divider {
    text-align: center;
    margin: 24px 0;
    position: relative;
}

.setup-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255,255,255,0.15);
}

.setup-divider span {
    position: relative;
    background: rgba(26, 26, 46, 0.9);
    padding: 0 16px;
    color: #666;
    font-size: 0.85rem;
}

/* Local mode scan overlay */
.local-scan-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.local-scan-content {
    background: rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 40px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    backdrop-filter: blur(10px);
}

.local-scan-content h2 {
    margin-bottom: 20px;
    color: #e0e0e0;
    font-size: 1.2rem;
}

.local-scan-bar {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 12px;
}

.local-scan-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s ease;
}

.local-scan-text {
    color: #999;
    font-size: 0.85rem;
}

.error {
    background: rgba(255, 100, 100, 0.2);
    border: 1px solid rgba(255, 100, 100, 0.4);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    color: #ff9999;
}

.folder-structure {
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
    font-family: monospace;
    font-size: 0.85rem;
    color: #888;
}

.folder-structure .folder {
    color: #667eea;
}

.folder-structure .file {
    color: #888;
}

/* Main Player Styles */
.container {
    max-width: 1500px;
    margin: 0 auto;
    padding: 20px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.main-content {
    display: flex;
    gap: 30px;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.main-content.three-column {
    gap: 20px;
}

/* Folder Sidebar */
.folder-sidebar {
    position: relative;
    flex: 0 0 25%;
    min-width: 250px;
    max-width: 500px;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255,255,255,0.1);
    padding-right: 15px;
    margin-right: 5px;
    transition: flex 0.2s ease, min-width 0.2s ease, max-width 0.2s ease, opacity 0.2s ease, padding 0.2s ease, margin 0.2s ease;
}

/* Sidebar Toggle */
.sidebar-toggle {
    width: 16px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: rgba(255,255,255,0.03);
    transition: background 0.2s;
    margin-right: 8px;
}

.sidebar-toggle:hover {
    background: rgba(255,255,255,0.08);
}

.toggle-arrow {
    color: #555;
    font-size: 16px;
    transition: transform 0.2s, color 0.2s;
    transform: rotate(180deg);
}

.sidebar-toggle:hover .toggle-arrow {
    color: #888;
}

/* Collapsed sidebar state */
.main-content.sidebar-collapsed .folder-sidebar {
    flex: 0 0 0;
    min-width: 0;
    max-width: 0;
    overflow: hidden;
    padding: 0;
    margin: 0;
    border: none;
    opacity: 0;
}

.main-content.sidebar-collapsed .sidebar-toggle .toggle-arrow {
    transform: rotate(0deg);
}

/* Filter input */
.filter-container {
    position: relative;
    padding: 0 0 10px 0;
    flex-shrink: 0;
}

.filter-input {
    width: 100%;
    padding: 8px 28px 8px 10px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    color: #ddd;
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
    box-sizing: border-box;
}

.filter-input:focus {
    background: rgba(255,255,255,0.12);
    border-color: rgba(102, 126, 234, 0.5);
}

.filter-input::placeholder {
    color: #666;
}

.filter-clear {
    position: absolute;
    right: 8px;
    top: 8px;
    color: #666;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    display: none;
    padding: 2px;
}

.filter-clear:hover {
    color: #aaa;
}

.filter-container.has-value .filter-clear {
    display: block;
}

.filter-match {
    color: #667eea;
    font-weight: 600;
}

.folder-list {
    overflow-y: auto;
    position: relative;
}

.folder-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 2px 0;
    color: #888;
    font-size: 0.85rem;
    cursor: pointer;
    transition: color 0.1s;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
}

.folder-item:hover {
    color: #ccc;
}

.folder-item.active {
    color: #fff;
}

.folder-count {
    font-size: 0.7rem;
    color: #666;
    margin-left: 8px;
    flex-shrink: 0;
}

.folder-item.active .folder-count {
    color: #667eea;
}

.main-content.three-column .song-list-section {
    flex: 1;
    min-width: 0;
}

.main-content.three-column:has(.cover-display:not(.active)) .song-list-section {
    flex: 2;
}

.main-content.three-column .cover-display {
    flex: 1;
}

.song-list-section {
    flex: 1;
    min-width: 0;
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: none;
}

.song-list-section::-webkit-scrollbar {
    display: none;
}

.cover-display {
    display: none;
    width: 45%;
    flex-shrink: 0;
    min-height: 0;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    overflow-y: auto;
}

.cover-display.active {
    display: flex;
}

.cover-display.hidden {
    display: none !important;
}

.cover-controls {
    display: flex;
    justify-content: center;
    padding: 10px;
    margin-bottom: 10px;
}

.repeat-btn {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 50%;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s, color 0.3s;
    position: relative;
}

.repeat-btn:hover {
    background: rgba(255,255,255,0.2);
    color: #888;
}

.repeat-btn svg {
    width: 18px;
    height: 18px;
}

.repeat-btn .repeat-one {
    display: none;
    position: absolute;
    font-size: 9px;
    font-weight: bold;
    bottom: 2px;
    right: 2px;
    background: #667eea;
    color: #fff;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    line-height: 14px;
    text-align: center;
}

.repeat-btn.repeat-all {
    color: #667eea;
    background: rgba(102, 126, 234, 0.2);
}

.repeat-btn.repeat-all:hover {
    background: rgba(102, 126, 234, 0.3);
}

.repeat-btn.repeat-one {
    color: #667eea;
    background: rgba(102, 126, 234, 0.2);
}

.repeat-btn.repeat-one:hover {
    background: rgba(102, 126, 234, 0.3);
}

.repeat-btn.repeat-one .repeat-one {
    display: block;
}

.stop-btn {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 50%;
    color: #666;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: background 0.3s, color 0.3s;
    margin-left: 10px;
}

.stop-btn:hover {
    background: rgba(255,255,255,0.2);
    color: #888;
}

.stop-btn svg {
    width: 20px;
    height: 20px;
}

.stop-btn.visible {
    display: flex;
}

.edit-btn {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 50%;
    color: #666;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: background 0.3s, color 0.3s;
    margin-left: 10px;
}

.edit-btn:hover {
    background: rgba(255,255,255,0.2);
    color: #888;
}

.edit-btn svg {
    width: 16px;
    height: 16px;
}

.edit-btn.visible {
    display: flex;
}

.edit-btn.active {
    display: flex;
    color: #667eea;
    background: rgba(102, 126, 234, 0.2);
}

.folder-btn {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 50%;
    color: #666;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: background 0.3s, color 0.3s;
    margin-left: 10px;
}

.folder-btn:hover {
    background: rgba(255,255,255,0.2);
    color: #888;
}

.folder-btn svg {
    width: 16px;
    height: 16px;
}

.folder-btn.visible {
    display: flex;
}

.metadata-edit-form {
    display: none;
    width: 100%;
    max-width: 500px;
    margin-top: 15px;
    padding: 15px;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
}

.metadata-edit-form.visible {
    display: block;
}

.edit-field {
    margin-bottom: 12px;
}

.edit-field-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.edit-field-row .edit-field {
    margin-bottom: 0;
}

.edit-field-album {
    flex: 1;
}

.edit-field-track,
.edit-field-disc {
    width: 70px;
    flex-shrink: 0;
}

.edit-field label {
    display: block;
    font-size: 0.75rem;
    color: #888;
    margin-bottom: 4px;
}

.edit-field input {
    width: 100%;
    padding: 8px 10px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    color: #fff;
    font-size: 0.9rem;
}

.edit-field input:focus {
    outline: none;
    border-color: #667eea;
}

.edit-field input[type="number"] {
    width: 100%;
}

.edit-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.edit-cancel-btn,
.edit-save-btn {
    flex: 1;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.edit-cancel-btn {
    background: rgba(255,255,255,0.1);
    color: #999;
}

.edit-cancel-btn:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

.edit-save-btn {
    background: #667eea;
    color: #fff;
}

.edit-save-btn:hover {
    background: #7b8ff0;
}

.cover-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cover-display img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    cursor: pointer;
}

.cover-info {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #fff;
    background: rgba(0,0,0,0.6);
    padding: 6px 12px;
    border-radius: 6px;
    opacity: 0;
    transition: opacity 0.2s;
}

.cover-wrapper:hover .cover-info {
    opacity: 1;
}

.cover-dimensions {
    pointer-events: none;
}

.cover-fullsize-link {
    color: #8af;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s;
}

.cover-fullsize-link:hover {
    color: #bdf;
    text-decoration: underline;
}

/* Full size cover overlay */
/* Expand button */
.expand-btn {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 50%;
    color: #666;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: background 0.3s, color 0.3s;
    margin-right: 10px;
}

.expand-btn:hover {
    background: rgba(255,255,255,0.2);
    color: #888;
}

.expand-btn svg {
    width: 16px;
    height: 16px;
}

.expand-btn.visible {
    display: flex;
}

.share-btn {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 50%;
    color: #666;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: background 0.3s, color 0.3s;
    margin-right: 6px;
}

.share-btn:hover {
    background: rgba(255,255,255,0.2);
    color: #888;
}

.share-btn svg {
    width: 16px;
    height: 16px;
}

.share-btn.visible {
    display: flex;
}

/* Expanded cover overlay */
.expanded-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 20, 0.97);
    z-index: 9000;
    display: none;
    flex-direction: row;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.expanded-overlay.active {
    display: flex;
    opacity: 1;
}


.expanded-playlist-col {
    flex: 0 0 auto;
    width: auto;
    min-width: 250px;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255,255,255,0.08);
}

.expanded-playlist-col .expanded-close {
    flex-shrink: 0;
    padding: 16px 20px 10px;
    color: rgba(255,255,255,0.4);
    text-decoration: none;
    font-size: 0.8rem;
    transition: color 0.2s;
    text-align: center;
}

.expanded-playlist-col .expanded-close:hover {
    color: rgba(255,255,255,0.7);
}

.expanded-artist-name {
    flex-shrink: 0;
    padding: 0 20px 14px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    text-align: center;
}

.expanded-playlist {
    flex: 1;
    overflow-y: auto;
    padding: 10px 20px 30px;
}

.expanded-playlist .exp-album-block {
    margin-bottom: 20px;
}

.expanded-playlist .exp-album-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #b1bfff;
    padding: 6px 10px;
    margin-bottom: 4px;
}

.expanded-playlist .exp-song {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.15s;
    color: rgba(255,255,255,0.7);
    font-size: 0.85rem;
}

.expanded-playlist .exp-song:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

.expanded-playlist .exp-song.playing {
    background: rgba(102, 126, 234, 0.2);
    color: #fff;
}

.expanded-playlist .exp-song-number {
    flex: 0 0 24px;
    text-align: right;
    color: rgba(255,255,255,0.35);
    font-size: 0.8rem;
}

.expanded-playlist .exp-song.playing .exp-song-number {
    color: #667eea;
}

.expanded-playlist .exp-song-title {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.expanded-playlist .exp-song-artist-inline {
    color: rgba(255,255,255,0.35);
    font-size: 0.8rem;
}

.expanded-cover-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 18px;
    min-width: 0;
}

.expanded-cover-frame {
    flex: 1 1 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 0;
    overflow: hidden;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    user-select: none;
    outline: none;
}

.cover-file-path {
    color: #555;
    font-size: 90%;
    text-align: center;
    margin-top: 2.4em;
    word-break: break-all;
    user-select: text;
}

.expanded-cover-border {
    display: none;
    border: 2px solid #666;
    border-radius: 8px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
    max-width: 100%;
    max-height: 100%;
    cursor: pointer;
    line-height: 0;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    user-select: none;
}

.expanded-cover-border.visible {
    display: inline-block;
    position: relative;
}

.expanded-cover-img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    border-radius: 6px;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    user-select: none;
    pointer-events: none;
}

.expanded-cover-border.fitted .expanded-cover-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.expanded-cover-img.hidden {
    display: none;
}

/* Play/Pause state indicator animation */
.play-state-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    z-index: 20;
}

.play-state-indicator svg {
    width: 80px;
    height: 80px;
    fill: #fff;
    display: none;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}

.play-state-indicator .indicator-play {
    margin-left: 8px;
}

.play-state-indicator.show-play .indicator-play,
.play-state-indicator.show-pause .indicator-pause {
    display: block;
}

.play-state-indicator.animate {
    animation: playStatePopup 1.5s ease-out forwards;
}

@keyframes playStatePopup {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    60% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.5);
    }
}

.expanded-no-cover {
    display: none;
    width: 400px;
    height: 400px;
    max-width: 100%;
    max-height: 100%;
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    align-items: center;
    justify-content: center;
    font-size: 8rem;
    color: #333;
    cursor: pointer;
}

.expanded-no-cover.visible {
    display: flex;
}

.expanded-loading {
    display: none;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    animation: expanded-pulse 2s ease-in-out infinite;
}

.expanded-loading.visible {
    display: block;
}

@keyframes expanded-pulse {
    0%, 100% { background-color: rgba(255,255,255,0.03); }
    50% { background-color: rgba(255,255,255,0.08); }
}

/* Share Mode Player Controls */
.share-player-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 24px;
    padding: 0 20px;
    width: 100%;
    max-width: 400px;
}

.share-play-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.15s, background 0.15s;
}

.share-play-btn:hover {
    transform: scale(1.1);
}

.share-play-btn svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.share-play-icon {
    margin-left: 3px;
}

.share-progress-container {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.share-time {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.5);
    min-width: 36px;
    text-align: center;
}

.share-progress-bar {
    flex: 1;
    height: 18px;
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.share-progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s linear;
}

/* Expanded Lyrics Column */
.expanded-lyrics-col {
    display: none;
    flex: 1 0 400px;
    flex-direction: column;
    border-left: 1px solid rgba(255,255,255,0.08);
    overflow: hidden;
}

.expanded-lyrics-col.visible {
    display: flex;
}

.lyrics-header {
    display: none;
}

.lyrics-header-title {
    font-weight: 600;
    color: rgba(255,255,255,0.7);
}

.expanded-lyrics-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px 40px;
    mask-image: linear-gradient(to bottom, black 90%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 90%, transparent 100%);
}

.expanded-lyrics-content.scrolled {
    mask-image: linear-gradient(to bottom, transparent 0%, black 10%, black 90%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 10%, black 90%, transparent 100%);
}

.lyrics-line {
    padding: 4px 0;
    color: rgba(255,255,255,0.3);
    font-size: 0.95rem;
    line-height: 1.6;
    transition: color 0.3s, font-weight 0.3s;
}

.lyrics-line[data-time] {
    cursor: pointer;
}

.lyrics-line.pending {
    color: rgba(255,255,255,0.4);
    font-weight: 600;
    font-size: 2em;
    transition: font-size 0.3s ease, color 0.3s ease;
}

.lyrics-line.active {
    color: #fff;
    font-weight: 600;
    font-size: 2em;
    transition: font-size 0.3s ease, color 0.3s ease;
}

.lyrics-line.near {
    color: rgba(255,255,255,0.5);
    font-size: 1.5em;
    transition: font-size 0.3s ease;
}

.expanded-lyrics-col.unsynced .lyrics-line {
    color: rgba(255,255,255,0.7);
}

.lyrics-line-untimed {
    color: rgba(255,255,255,0.35) !important;
    font-size: 1em !important;
    font-weight: 400 !important;
}

/* Split lyrics (original + translation) */
.expanded-lyrics-content.has-translation .lyrics-line {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.lyrics-text-original {
    text-align: right;
}

.lyrics-text-translated {
    text-align: left;
    opacity: 0.6;
}

.lyrics-line.active .lyrics-text-translated {
    opacity: 0.85;
}

.lyrics-footer {
    padding: 8px 24px 16px;
    text-align: center;
    flex-shrink: 0;
}

.lyrics-delete-link {
    color: rgba(255,255,255,0.3);
    font-size: 0.8rem;
    cursor: pointer;
    text-decoration: none;
    border: none;
    background: none;
    padding: 0;
}

.lyrics-delete-link + .lyrics-delete-link::before {
    content: "\00b7";
    margin: 0 6px;
    pointer-events: none;
    text-decoration: none;
    display: inline-block;
}

.lyrics-delete-link:hover {
    color: rgba(255,255,255,0.55);
    text-decoration: underline;
}

.lyrics-lang-switch {
    display: inline-flex;
    gap: 2px;
    margin-right: 8px;
    background: rgba(255,255,255,0.08);
    border-radius: 4px;
    padding: 2px;
}
.lyrics-lang-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.35);
    font-size: 0.75rem;
    padding: 3px 8px;
    cursor: pointer;
    border-radius: 3px;
    font-family: inherit;
}
.lyrics-lang-btn:hover {
    color: rgba(255,255,255,0.6);
}
.lyrics-lang-btn.active {
    background: rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.85);
}

.api-key-input {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.25);
    color: #fff;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 13px;
    width: 320px;
    max-width: 100%;
    font-family: inherit;
}
.api-key-input:focus {
    outline: none;
    border-color: rgba(255,255,255,0.5);
}

.lyrics-acquire-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 16px;
    padding: 24px;
}

.lyrics-acquire-btn {
    padding: 10px 28px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    background: rgba(255,255,255,0.08);
    color: #e0e0e0;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.lyrics-acquire-btn:hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.3);
}

.lyrics-acquire-btn:disabled {
    opacity: 0.5;
    cursor: default;
}

.lyrics-status {
    color: rgba(255,255,255,0.5);
    font-size: 0.85rem;
}

.lyrics-acquire-heading {
    color: rgba(255,255,255,0.7);
    font-size: 1.3rem;
    font-weight: 500;
}

.lyrics-search-link {
    color: rgba(255,255,255,0.6);
    font-size: 0.85rem;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.3);
    transition: color 0.2s, border-color 0.2s;
    margin-bottom: 4px;
}
.lyrics-search-link:hover {
    color: rgba(255,255,255,0.9);
    border-color: rgba(255,255,255,0.6);
}

.lyrics-paste-area {
    width: 100%;
    min-height: 180px;
    max-height: 60vh;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    color: #e0e0e0;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.5;
    padding: 12px;
    resize: none;
    overflow-y: auto;
    box-sizing: border-box;
}
.lyrics-paste-area:focus {
    outline: none;
    border-color: rgba(255,255,255,0.5);
}
.lyrics-paste-area::placeholder {
    color: rgba(255,255,255,0.3);
}

.fullsize-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, background 0.3s ease;
}

.fullsize-overlay.active {
    opacity: 1;
    visibility: visible;
    background: rgba(0, 0, 0, 0.85);
}

.fullsize-cover {
    max-width: none;
    max-height: none;
    border: 1px solid #666;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
    transform: scale(0.8);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.fullsize-overlay.active .fullsize-cover {
    transform: scale(1);
    opacity: 1;
}

.cover-drop-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(102, 126, 234, 0.9);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 500;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    pointer-events: none;
}

.cover-wrapper.drag-over .cover-drop-overlay {
    opacity: 1;
    visibility: visible;
}

.cover-message {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    max-width: 90%;
    text-align: center;
    z-index: 10;
}

.cover-message.visible {
    opacity: 1;
    visibility: visible;
}

.cover-message.success {
    background: rgba(46, 125, 50, 0.9);
}

.cover-message.error {
    background: rgba(198, 40, 40, 0.9);
}

.album-cover-prompt {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.9);
    color: #fff;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    max-width: 90%;
    text-align: center;
    z-index: 10;
}

.album-cover-prompt.visible {
    display: flex;
}

.album-cover-prompt-buttons {
    display: flex;
    gap: 10px;
}

.album-cover-prompt button {
    padding: 6px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.2s;
}

#albumCoverYes {
    background: #4a90d9;
    color: #fff;
}

#albumCoverYes:hover {
    background: #3a7bc8;
}

#albumCoverNo {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

#albumCoverNo:hover {
    background: rgba(255,255,255,0.3);
}

.cover-wrapper.uploading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.cover-display .no-cover-large {
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 6rem;
    color: #555;
    cursor: pointer;
}


.cover-song-info {
    text-align: center;
    margin-top: 20px;
    max-width: 100%;
}

.cover-song-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
}

.cover-song-artist {
    font-size: 1.1rem;
    color: #888;
}

.cover-song-album {
    font-size: 0.95rem;
    color: #666;
    margin-top: 4px;
}

header {
    text-align: center;
    padding: 40px 20px;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.5rem;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.songs-container {
    background: rgba(255,255,255,0.08);
    border-radius: 20px;
    padding: 20px;
}

.song-list {
    list-style: none;
}

.album-header {
    font-size: 1.2rem;
    font-weight: 600;
    color: #b1bfff;
    padding: 20px 0 8px 0;
    margin-bottom: 5px;
    border-bottom: 1px solid rgba(102, 126, 234, 0.2);
}

.album-header:first-child {
    padding-top: 0;
}

/* Album block layout for multi-track albums */
.album-block {
    margin-bottom: 25px;
}

.album-block-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
}

.album-block-cover {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.album-block-cover:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.album-block-cover.no-cover {
    width: 120px;
    height: 120px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #555;
    cursor: pointer;
}

.album-block-cover.no-cover:hover {
    background: rgba(255,255,255,0.15);
}

.album-block-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.album-block-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #b1bfff;
}

.album-block-artist {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
    margin-top: 2px;
}

.album-block-tracks {
    list-style: none;
    padding: 0;
    margin: 0;
}

.album-block-tracks .song-item.album-track {
    display: flex;
    align-items: center;
    padding: 0 15px;
    margin-bottom: 2px;
    background: rgba(255,255,255,0.03);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    height: 32px;
    border-left: 3px solid transparent;
}

.album-block-tracks .song-item.album-track:hover {
    background: rgba(255,255,255,0.08);
}

.album-block-tracks .song-item.album-track.playing {
    background: rgba(102, 126, 234, 0.2);
    border-left-color: #667eea;
}

.album-block-tracks .song-number {
    width: 30px;
    text-align: right;
    margin-right: 15px;
    color: #666;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.album-block-tracks .song-title {
    color: #ddd;
    font-size: 0.95rem;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.album-block-tracks .song-item.album-track.playing .song-title {
    color: #fff;
}

/* Track covers - hidden by default, no space reserved */
.album-block-tracks .song-item.album-track .song-cover {
    width: 0;
    height: 32px;
    border-radius: 4px;
    margin: 0;
    padding: 0;
    opacity: 0;
    overflow: hidden;
    transition: width 0.2s ease, opacity 0.2s ease, margin 0.2s ease;
    flex-shrink: 0;
}

.album-block-tracks .song-item.album-track .song-cover.no-cover {
    font-size: 1rem;
    align-items: center;
    justify-content: center;
}

/* When show-track-covers is active, show all track covers */
.album-block.show-track-covers .album-block-tracks .song-item.album-track .song-cover {
    width: 32px;
    margin-right: 10px;
    opacity: 1;
}

.album-block.show-track-covers .album-block-tracks .song-item.album-track .song-cover.no-cover {
    display: flex;
}

/* Show track covers when hovering over album cover */
.album-block:has(.album-block-cover:hover) .album-block-tracks .song-item.album-track .song-cover {
    width: 32px;
    margin-right: 10px;
    opacity: 1;
}

.album-block:has(.album-block-cover:hover) .album-block-tracks .song-item.album-track .song-cover.no-cover {
    display: flex;
}

/* Cover update animation */
.song-item.album-track .song-cover.updating,
.album-block-cover.updating {
    animation: coverUpdate 0.5s ease-out;
}

@keyframes coverUpdate {
    0% {
        transform: scale(1.3);
        opacity: 0.5;
        box-shadow: 0 0 15px rgba(102, 126, 234, 0.8);
    }
    100% {
        transform: scale(1);
        opacity: 1;
        box-shadow: none;
    }
}

.song-item {
    display: flex;
    align-items: center;
    padding: 0 20px 0 0;
    margin-bottom: 10px;
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.3s ease, border-left 0.3s ease;
    position: relative;
    overflow: hidden;
}

.song-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: var(--progress, 0%);
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.4) 0%, rgba(118, 75, 162, 0.3) 100%);
    z-index: 0;
    transition: width 0.1s linear;
}

.song-item > * {
    position: relative;
    z-index: 1;
}

.song-item:hover {
    background: rgba(255,255,255,0.1);
}

.song-item.playing {
    background: rgba(255,255,255,0.05);
    border-left: 4px solid #667eea;
}

.song-item.playing:hover {
    background: rgba(255,255,255,0.08);
}

.song-item.loading {
    animation: loadingPulse 1.5s ease-in-out infinite;
}

@keyframes loadingPulse {
    0%, 100% { background: rgba(255,255,255,0.02); }
    50% { background: rgba(102, 126, 234, 0.1); }
}

.song-number {
    width: 50px;
    text-align: center;
    color: #888;
    font-size: 0.9rem;
    flex-shrink: 0;
    cursor: pointer;
}

.song-number:hover {
    color: #fff;
}

.song-number-input {
    width: 28px;
    text-align: center;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 3px;
    color: #fff;
    font-size: 0.9rem;
    padding: 1px 2px;
    margin: 0;
    box-sizing: border-box;
}

.song-number-input:focus {
    outline: none;
    border-color: #4a90d9;
    background: rgba(255,255,255,0.2);
}

.song-cover {
    width: 60px;
    height: 60px;
    border-radius: 0;
    object-fit: cover;
    background: rgba(255,255,255,0.1);
    flex-shrink: 0;
}

.song-cover.no-cover {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    font-size: 1.5rem;
}

.song-info {
    flex: 1;
    margin-left: 15px;
}

.song-title {
    font-size: 1rem;
    color: #fff;
    margin-bottom: 4px;
}

.song-artist {
    font-size: 0.8rem;
    color: #888;
}

.now-playing {
    font-size: 0.85rem;
    color: #667eea;
    white-space: nowrap;
    display: inline-block;
    overflow: hidden;
    height: 1.4em;
    line-height: 1.4em;
}

.now-playing .letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(100%);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.now-playing .letter.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Player Bar */
.player-bar {
    flex-shrink: 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 15px 20px;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.3);
    display: none;
    position: relative;
    z-index: 9500;
}

.player-bar.active {
    display: block;
}

.player-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
}

.player-song-info {
    flex: 1;
    min-width: 0;
}

.player-song-title {
    font-size: 1rem;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-song-year {
    font-size: 0.8rem;
    color: #888;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.control-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.control-btn:hover {
    background: rgba(255,255,255,0.1);
}

.control-btn.main-play {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.control-btn.main-play:hover {
    transform: scale(1.1);
}

.control-btn svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.progress-container {
    flex: 2;
    display: flex;
    align-items: center;
    gap: 10px;
}

.progress-bar {
    flex: 1;
    height: 18px;
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
}

.progress-buffer {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: rgba(255,255,255,0.15);
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s ease;
    z-index: 1;
}

.progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 3px;
    width: 0%;
    z-index: 2;
}

.time {
    font-size: 0.8rem;
    color: #888;
    min-width: 45px;
}

.volume-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.volume-slider {
    width: 80px;
    height: 6px;
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
}

.volume-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 3px;
    width: 100%;
}

.year-section {
    display: none;
}

.year-section.active {
    display: block;
}

.empty-message {
    text-align: center;
    padding: 40px;
    color: #888;
}

body.player-active {
    /* Player bar is now part of flex layout, no padding needed */
}

/* Settings trigger - positioned at bottom of folder sidebar */
.settings-trigger {
    width: 36px;
    height: 36px;
    margin: 20px auto;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s;
    flex-shrink: 0;
}

.settings-trigger:hover {
    background: rgba(255,255,255,0.2);
}

.settings-trigger svg {
    width: 20px;
    height: 20px;
    color: #666;
    transition: color 0.3s;
}

.settings-trigger:hover svg {
    color: #888;
}

/* Settings menu - inline below trigger, expands when active */
.settings-menu {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.2s, opacity 0.2s, padding 0.2s;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.settings-menu.active {
    max-height: 200px;
    opacity: 1;
    padding: 10px 0;
}

.settings-menu form {
    margin: 0;
}

.settings-menu button,
.settings-menu-link {
    display: inline-block;
    padding: 10px 20px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 8px;
    color: #ccc;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
    text-decoration: none;
}

.settings-menu button:hover,
.settings-menu-link:hover {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

/* Responsive */
@media (max-width: 1200px) {
    .main-content.three-column .cover-display {
        display: none !important;
    }

    .main-content.three-column {
        gap: 15px;
    }

    .main-content.three-column .song-list-section {
        flex: 2;
    }
}

@media (max-width: 968px) {
    .cover-display {
        display: none !important;
    }

    .main-content {
        display: block;
    }

    .main-content.three-column {
        display: flex;
    }
}

@media (max-width: 768px) {
    header h1 {
        font-size: 1.8rem;
    }

    .player-content {
        flex-wrap: wrap;
    }

    .progress-container {
        order: 3;
        flex-basis: 100%;
    }

    .volume-container,
    .timing-volume {
        display: none;
    }

    .player-song-info {
        max-width: 150px;
    }

    .main-content.three-column .folder-sidebar {
        width: 140px;
    }

    .folder-item {
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    .folder-count {
        font-size: 0.7rem;
        padding: 2px 6px;
    }
}

/* Mobile expanded view info (hidden on desktop) */
.expanded-mobile-info {
    display: none;
}

.cover-info-overlay {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 60px 20px 16px;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 100%);
    text-align: center;
    z-index: 10;
    pointer-events: none;
    border-radius: 0 0 6px 6px;
    line-height: 1.4;
}

.cover-info-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
}

.cover-info-artist {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.7);
    margin-top: 6px;
}

.expanded-close-mobile {
    display: none;
}

@media (max-width: 600px) {
    .expanded-overlay.active {
        flex-direction: column;
        overflow-y: auto;
    }

    .expanded-playlist-col {
        display: none;
    }

    .expanded-cover-area {
        flex: none;
        padding: 30px 20px 16px;
    }

    .expanded-cover-frame {
        flex: none;
        max-height: 45vh;
    }

    .expanded-cover-border.visible {
        max-height: 45vh;
    }

    .expanded-cover-img {
        max-height: 45vh;
    }

    .expanded-no-cover {
        width: 200px;
        height: 200px;
        font-size: 5rem;
    }

    .expanded-mobile-info {
        display: none;
    }

    .expanded-cover-border {
        position: relative;
    }

    .cover-info-overlay {
        display: block;
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 40px 16px 12px;
        background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 100%);
        text-align: center;
        z-index: 10;
        pointer-events: none;
        border-radius: 0 0 6px 6px;
        line-height: 1.4;
    }

    .cover-info-title {
        font-size: 1.1rem;
        font-weight: 600;
        color: #fff;
    }

    .cover-info-artist {
        font-size: 0.9rem;
        color: rgba(255,255,255,0.7);
        margin-top: 2px;
    }

    .share-player-controls {
        margin-top: 12px;
        padding: 0 12px;
        max-width: 100%;
        gap: 12px;
    }

    .share-play-btn {
        width: 40px;
        height: 40px;
    }

    .share-play-btn svg {
        width: 18px;
        height: 18px;
    }

    .share-progress-container {
        gap: 8px;
    }

    .share-time {
        font-size: 0.7rem;
        min-width: 32px;
    }

    .share-progress-bar {
        height: 18px;
    }

    .expanded-lyrics-col {
        flex: 1 1 0 !important;
        min-height: 0;
        border-left: none;
        flex-basis: 0 !important;
    }

    .expanded-lyrics-col.visible {
        display: flex !important;
    }

    .expanded-lyrics-col .lyrics-header {
        padding: 10px 20px 4px;
        font-size: 1.1rem;
    }

    .expanded-lyrics-col .expanded-lyrics-content {
        padding: 10px 20px 30px;
    }

    .expanded-lyrics-col .lyrics-line {
        font-size: 0.85rem;
        line-height: 1.5;
    }


    .expanded-lyrics-col .lyrics-footer {
        padding: 4px 20px 10px;
    }

    .expanded-lyrics-content.has-translation .lyrics-line {
        grid-template-columns: 1fr;
        gap: 2px;
    }


    .expanded-lyrics-content.has-translation .lyrics-text-original {
        text-align: left;
    }

    .expanded-lyrics-content.has-translation .lyrics-text-translated {
        color: #8fa4ff;
        font-size: 0.8em;
    }

    .expanded-close-mobile {
        display: block;
        position: fixed;
        top: 10px;
        right: 10px;
        z-index: 10;
        padding: 4px 12px;
        background: rgba(0,0,0,0.5);
        border-radius: 20px;
        font-size: 1.4rem;
        color: rgba(255,255,255,0.5);
        text-decoration: none;
        line-height: 1;
    }

    .expanded-overlay.active {
        bottom: 0 !important;
    }

    body.expanded-open .player-bar {
        display: none !important;
    }

    .main-content.three-column {
        flex-direction: column;
        position: relative;
        overflow-y: auto;
        overflow-x: hidden;
    }

    /* Mobile: Show sidebar full screen by default */
    .main-content.three-column .folder-sidebar {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
        height: 100%;
        background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
        z-index: 100;
        border-right: none;
        padding: 10px 15px;
        margin: 0;
        opacity: 1;
        overflow-y: auto;
        transition: transform 0.3s ease, opacity 0.3s ease;
    }

    /* Mobile: Hide sidebar when content is shown */
    .main-content.three-column.mobile-show-content .folder-sidebar {
        transform: translateX(-100%);
        opacity: 0;
        pointer-events: none;
    }

    /* Mobile: Song list section - no independent scroll, flows with cover */
    .main-content.three-column .song-list-section {
        flex: none;
        width: 100%;
        min-height: auto;
        overflow-y: visible;
    }

    /* Mobile: Artist view container - no independent scroll */
    .main-content.three-column .artist-view-container {
        overflow-y: visible;
    }

    /* Mobile: Now playing icons instead of text */
    .now-playing {
        font-size: 1rem;
        min-width: 1.5em;
        text-align: center;
    }

    /* Mobile: Show cover display below content */
    .main-content.three-column .cover-display {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        position: static;
        width: 100% !important;
        max-width: 100%;
        min-width: 100%;
        height: auto !important;
        min-height: auto;
        max-height: none;
        padding: 20px;
        padding-bottom: 40px;
        margin-top: 20px;
        flex-shrink: 0;
        overflow: visible !important;
    }

    .main-content.three-column .cover-display.hidden {
        display: none !important;
    }

    .main-content.three-column .cover-display.active {
        display: flex !important;
        overflow: visible !important;
    }

    .main-content.three-column .cover-display .cover-wrapper {
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
    }

    .main-content.three-column .cover-display img#largeCover {
        max-width: 100%;
        max-height: none;
        height: auto;
        width: 100%;
    }

    .main-content.three-column .cover-display .no-cover-large {
        width: 200px;
        height: 200px;
    }

    /* Mobile: Sidebar toggle - always visible, positioned at top */
    .main-content.three-column .sidebar-toggle {
        position: fixed;
        top: 10px;
        left: 10px;
        z-index: 200;
        width: 40px;
        height: 40px;
        background: rgba(30, 30, 50, 0.9);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    }

    .main-content.three-column .sidebar-toggle .toggle-arrow {
        transform: rotate(180deg);
        font-size: 18px;
    }

    /* When content is shown, arrow points right (to go back) */
    .main-content.three-column.mobile-show-content .sidebar-toggle .toggle-arrow {
        transform: rotate(0deg);
    }

    /* Hide toggle when sidebar is visible (on mobile) */
    .main-content.three-column:not(.mobile-show-content) .sidebar-toggle {
        display: none;
    }

    /* Override desktop sidebar-collapsed behavior on mobile */
    .main-content.three-column.sidebar-collapsed .folder-sidebar {
        flex: unset;
        min-width: 100% !important;
        max-width: 100% !important;
        overflow: visible;
        padding: 10px 15px;
        margin: 0;
        border: none;
        opacity: 1;
    }

    .main-content.three-column.sidebar-collapsed.mobile-show-content .folder-sidebar {
        transform: translateX(-100%);
        opacity: 0;
        pointer-events: none;
    }

    /* Artist list full height on mobile */
    .main-content.three-column .artist-list {
        max-height: calc(100vh - 200px);
    }

    /* View tabs styling on mobile */
    .main-content.three-column .view-mode-tabs {
        display: flex;
    }

    .folder-list {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        padding-right: 0;
    }

    .folder-item {
        width: auto;
        flex: 0 0 auto;
    }
}

/* Artist List */
.artist-list {
    overflow-y: auto;
    position: relative;
    flex: 1;
    min-height: 0;
    padding-right: 8px;
}

.artist-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 4px 0;
    color: #888;
    font-size: 0.85rem;
    cursor: pointer;
    transition: color 0.1s;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
}

.artist-item:hover {
    color: #ccc;
}

.artist-item.active {
    color: #fff;
}

.artist-item.active .folder-count {
    color: #667eea;
}

.artist-name {
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

/* Artist View */
.artist-view-container {
    overflow-y: auto;
    scrollbar-width: none;
}

.artist-view-container::-webkit-scrollbar {
    display: none;
}

.artist-view-header {
    padding: 15px 0;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.artist-view-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 5px;
}

.artist-view-stats {
    font-size: 0.85rem;
    color: #888;
}

/* Tracks from other artists in album view */
.artist-view-song.other-artist {
    opacity: 0.6;
}

.artist-view-song.other-artist:hover {
    opacity: 1;
}

.song-artist-inline {
    color: #888;
    font-size: 0.85em;
}

.artist-view-content {
    padding-bottom: 20px;
}

/* Show song-info for non-album tracks in artist view */
.artist-view-container .song-list .song-item .song-info {
    display: block !important;
}

/* View Mode Tabs */
.sidebar-app-name {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,0.35);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 6px 2px 8px;
    flex-shrink: 0;
}

.view-mode-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 10px;
    flex-shrink: 0;
}

.view-tab {
    flex: 1;
    padding: 8px 12px;
    background: rgba(255,255,255,0.05);
    border: none;
    color: #888;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.view-tab:first-child {
    border-radius: 6px 0 0 6px;
}

.view-tab:last-child {
    border-radius: 0 6px 6px 0;
}

.view-tab:hover {
    background: rgba(255,255,255,0.1);
    color: #ccc;
}

.view-tab.active {
    background: rgba(102, 126, 234, 0.3);
    color: #fff;
}

/* Albums Grid Container */
.albums-grid-container {
    overflow-y: auto;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.album-filter-container {
    position: relative;
    padding: 10px 15px;
    flex-shrink: 0;
}

.album-filter-input {
    width: 100%;
    padding: 8px 30px 8px 12px;
    border: 1px solid #333;
    border-radius: 4px;
    background: #1a1a2e;
    color: #fff;
    font-size: 0.9rem;
}

.album-filter-input:focus {
    outline: none;
    border-color: #667eea;
}

.album-filter-clear {
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    cursor: pointer;
    font-size: 1.2rem;
    display: none;
}

.album-filter-container.has-value .album-filter-clear {
    display: block;
}

.album-filter-clear:hover {
    color: #fff;
}

.albums-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
    padding: 5px;
}

.album-grid-item {
    aspect-ratio: 1;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
}

.album-grid-item:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
}

.album-grid-cover {
    width: 100%;
    height: 100%;
    position: relative;
}

.album-grid-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.album-grid-no-cover {
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    background: #1a1a2e;
    color: #444;
    font-size: 4rem;
}

.album-grid-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px;
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,1));
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 1;
}

.album-grid-item:hover .album-grid-info {
    opacity: 1;
}

.album-grid-tracks {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.88);
    display: none;
    flex-direction: column;
    z-index: 2;
    overflow: hidden;
}

.album-grid-item:hover .album-grid-tracks.populated {
    display: flex;
}

.album-grid-tracks-header {
    padding: 10px 12px 6px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    flex-shrink: 0;
}

.album-grid-tracks-header .album-grid-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.album-grid-tracks-header .album-grid-artist {
    font-size: 0.75rem;
    color: #aaa;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.album-grid-tracks-list {
    flex: 1;
    overflow-y: auto;
    padding: 4px 0;
}

.album-grid-track-item {
    padding: 5px 12px;
    font-size: 0.78rem;
    color: #ccc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background 0.15s, color 0.15s;
}

.album-grid-track-item:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.album-grid-track-item .track-number {
    color: #666;
    margin-right: 8px;
    font-size: 0.7rem;
    display: inline-block;
    min-width: 1.5em;
    text-align: right;
}

.album-grid-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.album-grid-artist {
    font-size: 0.75rem;
    color: #aaa;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

/* Album sort options */
.album-sort-options {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: transparent;
    cursor: default;
}

.album-sort-options:hover {
    transform: none;
    box-shadow: none;
}

.album-sort-link {
    color: #667eea;
    text-decoration: none;
    font-size: 1.2rem;
    padding: 10px 15px;
    text-align: center;
    transition: color 0.2s;
}

.album-sort-link:hover {
    color: #8fa4ff;
}

.album-sort-link.active {
    color: #fff;
    font-weight: 600;
}

/* Responsive adjustments for view mode tabs */
@media (max-width: 600px) {
    .view-mode-tabs {
        display: none;
    }
}

/* Cache Progress Indicator */
.cache-progress {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(30, 30, 50, 0.95);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 12px;
    padding: 16px 20px;
    min-width: 320px;
    max-width: 450px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 1000;
}

.cache-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.cache-progress-title {
    font-weight: 600;
    color: #fff;
    font-size: 0.95rem;
}

.cache-progress-close {
    cursor: pointer;
    color: #888;
    font-size: 1.4rem;
    line-height: 1;
    padding: 0 4px;
    transition: color 0.2s;
}

.cache-progress-close:hover {
    color: #fff;
}

.cache-progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 10px;
}

.cache-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s ease;
}

.cache-progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #aaa;
}

#cacheProgressText {
    flex: 1;
}

#cacheProgressEta {
    color: #667eea;
    font-weight: 500;
}

/* Playlist Styles */
.playlist-item {
    position: relative;
    justify-content: flex-start;
}

.playlist-item .folder-count {
    margin-left: auto;
}

.playlist-icon {
    color: #667eea;
    margin-right: 6px;
    font-size: 0.9em;
    flex-shrink: 0;
}

.artist-list-divider {
    height: 1px;
    background: rgba(102, 126, 234, 0.3);
    margin: 8px 0;
}

/* Playlist View */
.playlist-view-header {
    padding: 15px 0;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.playlist-view-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
}

.playlist-view-name .playlist-icon {
    font-size: 1.2rem;
}

.playlist-view-stats {
    font-size: 0.85rem;
    color: #888;
}

/* Songs not found in playlist - greyed out but clickable */
.playlist-song-not-found {
    opacity: 0.4;
    cursor: pointer;
}

.playlist-song-not-found:hover {
    opacity: 0.6;
}

.playlist-song-not-found .song-title,
.playlist-song-not-found .song-artist {
    color: #666;
}

.playlist-song-not-found .song-cover {
    filter: grayscale(100%);
}

.playlist-song-not-found.searching {
    opacity: 0.6;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.7; }
}

/* Playlist reload button */
.playlist-reload-btn {
    background: none;
    border: none;
    color: #666;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 2px 8px;
    margin-left: 8px;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
    vertical-align: middle;
}

.playlist-reload-btn:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

.playlist-reload-btn:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.playlist-reload-btn.spinning {
    animation: spin 0.8s linear infinite;
}

/* Timing Editor Overlay */
.timing-editor-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, background 0.3s ease;
}

.timing-editor-overlay.active {
    opacity: 1;
    visibility: visible;
    background: rgba(0, 0, 0, 0.95);
}

.timing-editor {
    background: #1a1a1a;
    border-radius: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    transform: scale(0.9);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.timing-editor-overlay.active .timing-editor {
    transform: scale(1);
    opacity: 1;
}

.timing-editor-header {
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    position: relative;
    flex-shrink: 0;
}

.timing-editor-song {
    font-size: 1.3rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 2px;
    padding-right: 40px;
}

.timing-editor-artist {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.6);
}

.timing-editor-hint {
    font-size: 1.6rem;
    color: rgba(255,255,255,0.35);
    text-align: center;
    padding: 8px 0;
    margin-bottom: 16px;
}

.timing-editor-hint kbd {
    display: inline-block;
    padding: 2px 8px;
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1.6rem;
    color: rgba(255,255,255,0.5);
}

.timing-editor-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 28px;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
}

.timing-editor-close:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.timing-zoom-controls {
    position: absolute;
    top: 12px;
    right: 56px;
    display: flex;
    gap: 4px;
}

.timing-zoom-btn {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.6);
    font-size: 20px;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
    line-height: 1;
}

.timing-zoom-btn:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

.timing-zoom-btn:active {
    background: rgba(255,255,255,0.2);
}

.timing-editor-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    overflow: hidden;
    padding: 20px 24px;
}

/* Timeline Section */
.timing-timeline-section {
    flex-shrink: 0;
}

.timing-timeline-container {
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-color: rgba(255,255,255,0.3) rgba(255,255,255,0.08);
}

.timing-timeline-container::-webkit-scrollbar {
    height: 14px;
}

.timing-timeline-container::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.08);
    border-radius: 7px;
}

.timing-timeline-container::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 7px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.timing-timeline-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.45);
    border: 2px solid transparent;
    background-clip: padding-box;
}

.timing-timeline-container::-webkit-scrollbar-thumb:active {
    background: rgba(255,255,255,0.55);
    border: 2px solid transparent;
    background-clip: padding-box;
}

.timing-timeline-wrapper {
    min-width: 100%;
}

.timing-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 8px;
}

.timing-timeline {
    flex: 1;
    position: relative;
    height: 400px;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    overflow: visible;
    cursor: pointer;
    min-width: 0;
}

.timing-grid {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 0;
}

.timing-grid-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    background: rgba(255,255,255,0.06);
}

.timing-grid-line.major {
    width: 2px;
    background: rgba(255,255,255,0.12);
}

.timing-grid-label {
    position: absolute;
    bottom: 4px;
    font-size: 18px;
    color: rgba(255,255,255,0.25);
    transform: translateX(-50%);
    white-space: nowrap;
    user-select: none;
    background: #1a1a1a;
    padding: 0 4px;
}

.timing-timeline-track {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 16px;
    background: rgba(255,255,255,0.15);
    border-radius: 8px;
    transform: translateY(-50%);
}

.timing-timeline-progress {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background: #4CAF50;
    border-radius: 8px;
}

.timing-timeline-playhead {
    position: absolute;
    top: 50%;
    left: 0%;
    width: 4px;
    height: 48px;
    background: #fff;
    border-radius: 2px;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 8px rgba(255,255,255,0.5);
    z-index: 10;
}

/* Markers */
.timing-markers {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    pointer-events: none;
}

.timing-marker {
    position: absolute;
    transform: translateX(-50%);
    pointer-events: auto;
    cursor: grab;
    z-index: 5;
}

.timing-marker-top {
    top: calc(50% - 16px);
}

.timing-marker-bottom {
    top: 50%;
}

.timing-marker:active {
    cursor: grabbing;
}

.timing-marker-dot {
    width: 16px;
    height: 16px;
    background: rgba(255,255,255,0.6);
    border-radius: 50%;
    border: 2px solid #1a1a1a;
    transition: transform 0.15s, background 0.5s ease;
}

.timing-marker:hover .timing-marker-dot,
.timing-marker.dragging .timing-marker-dot {
    transform: scale(1.3);
    background: #fff;
}

.timing-marker.played .timing-marker-dot {
    background: #4CAF50;
}

.timing-marker-line {
    position: absolute;
    left: 50%;
    width: 1px;
    background: rgba(255,255,255,0.2);
    transform: translateX(-50%);
    transition: background 0.5s ease;
}

.timing-marker.played .timing-marker-line {
    background: rgba(76, 175, 80, 0.4);
}

.timing-marker-line-top {
    bottom: 100%;
}

.timing-marker-line-bottom {
    top: 100%;
}

/* Tier-based line heights: line from dot to label */
.timing-tier-1 .timing-marker-line-top,
.timing-tier-1 .timing-marker-line-bottom { height: 20px; }
.timing-tier-2 .timing-marker-line-top,
.timing-tier-2 .timing-marker-line-bottom { height: 46px; }
.timing-tier-3 .timing-marker-line-top,
.timing-tier-3 .timing-marker-line-bottom { height: 72px; }
.timing-tier-4 .timing-marker-line-top,
.timing-tier-4 .timing-marker-line-bottom { height: 98px; }

/* Lyric text label with inline time: anchored at the connecting line, extends right */
.timing-marker-label {
    position: absolute;
    left: 50%;
    font-size: 1.3rem;
    line-height: 1;
    color: rgba(255,255,255,0.7);
    white-space: nowrap;
    transition: color 0.5s ease;
}

.timing-marker-label-text {
    cursor: text;
    padding: 2px 4px;
    border: 1px solid transparent;
    border-radius: 3px;
    transition: border-color 0.15s;
}

.timing-marker-label-text:hover {
    border-color: rgba(255,255,255,0.25);
}

.timing-marker-label-text.editing {
    border-color: rgba(255,255,255,0.5);
    background: rgba(0,0,0,0.4);
    outline: none;
    color: #fff;
}

.timing-marker-time {
    color: rgba(255,255,255,0.35);
    transition: color 0.5s ease;
}

.timing-marker-label-top { bottom: calc(100% + 22px); }
.timing-marker-label-bottom { top: calc(100% + 22px); }
.timing-tier-2 .timing-marker-label-top { bottom: calc(100% + 48px); }
.timing-tier-2 .timing-marker-label-bottom { top: calc(100% + 48px); }
.timing-tier-3 .timing-marker-label-top { bottom: calc(100% + 74px); }
.timing-tier-3 .timing-marker-label-bottom { top: calc(100% + 74px); }
.timing-tier-4 .timing-marker-label-top { bottom: calc(100% + 100px); }
.timing-tier-4 .timing-marker-label-bottom { top: calc(100% + 100px); }

.timing-marker.played .timing-marker-label {
    color: #4CAF50;
}

.timing-marker.played .timing-marker-time {
    color: #4CAF50;
}

.timing-marker.active .timing-marker-label {
    color: #b71c1c;
}

.timing-marker.active .timing-marker-time {
    color: #b71c1c;
}

.timing-marker.active .timing-marker-dot {
    background: #b71c1c;
}

.timing-marker.active .timing-marker-line {
    background: rgba(183, 28, 28, 0.5);
}

/* Play Button */
.timing-play-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #4CAF50;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.15s, background 0.15s;
}

.timing-play-btn:hover {
    background: #45a049;
    transform: scale(1.05);
}

.timing-play-btn:active {
    transform: scale(0.95);
}

.timing-play-btn svg {
    width: 24px;
    height: 24px;
    fill: #fff;
}

.timing-stop-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.15s, background 0.15s;
}

.timing-stop-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.05);
}

.timing-stop-btn:active {
    transform: scale(0.95);
}

.timing-stop-btn svg {
    width: 18px;
    height: 18px;
    fill: #fff;
}

.timing-play-icon {
    display: block;
}

.timing-pause-icon {
    display: none;
}

.timing-play-btn.playing .timing-play-icon {
    display: none;
}

.timing-play-btn.playing .timing-pause-icon {
    display: block;
}

.timing-time-display {
    color: rgba(255,255,255,0.5);
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
}

.timing-volume {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.timing-volume-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
}

.timing-volume-btn svg {
    width: 18px;
    height: 18px;
    fill: rgba(255,255,255,0.5);
    transition: fill 0.15s;
}

.timing-volume-btn:hover svg {
    fill: rgba(255,255,255,0.8);
}

.timing-volume-slider {
    width: 70px;
    height: 6px;
    background: rgba(255,255,255,0.15);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
}

.timing-volume-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 3px;
    width: 100%;
    pointer-events: none;
}

/* Lyrics Panel */
.timing-lyrics-panel {
    display: none;
}

.timing-editor-overlay.active .timing-lyrics-panel {
    display: block;
    flex: 1;
    overflow-y: auto;
}

.timing-lyric-row {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    gap: 12px;
    transition: background 0.15s;
    cursor: pointer;
    position: relative;
    z-index: 1;
}

.timing-untimed-delete {
    flex-shrink: 0;
    width: 20px;
    text-align: center;
    font-size: 1.4em;
    color: transparent;
    cursor: pointer;
    transition: color 0.15s;
    line-height: 1;
    user-select: none;
}

.timing-lyric-row.untimed:hover .timing-untimed-delete {
    color: rgba(255,80,80,0.5);
}

.timing-untimed-delete:hover {
    color: rgba(255,80,80,1) !important;
}

.timing-lyric-row:hover {
    background: rgba(255,255,255,0.05);
}

.timing-lyric-row.active {
    background: rgba(76, 175, 80, 0.15);
}

.timing-lyric-row.played {
    opacity: 0.6;
}

.timing-lyric-row.played.active {
    opacity: 1;
}

.timing-lyric-row.untimed {
    opacity: 0.35;
    padding: 6px 16px;
    line-height: 1.3em;
    gap: 10px;
}

.timing-lyric-row.untimed:first-child,
.timing-lyric-row:not(.untimed) + .timing-lyric-row.untimed {
    margin-top: 4px;
}

.timing-lyric-row.timing-just-timed {
    opacity: 1;
    padding: 6px 16px;
    line-height: 1.3em;
    gap: 10px;
    background: rgba(255,255,255,0.08);
}

.timing-lyric-row.timing-just-timed .timing-lyric-content .timing-lyric-text {
    color: #b71c1c;
    font-weight: 300;
}

.timing-lyric-row.untimed.tap-next {
    opacity: 1;
}

.timing-lyric-row.untimed.tap-next .timing-lyric-content .timing-lyric-text {
    color: #fff;
}

.timing-lyric-row.tap-next {
    outline: 1px solid rgba(255,255,255,0.4);
    outline-offset: -1px;
    border-radius: 6px;
    animation: tap-pulse 1.5s ease-in-out infinite;
}

.timing-marker.tap-next .timing-marker-dot {
    animation: tap-pulse-dot 1.5s ease-in-out infinite;
}

@keyframes tap-pulse {
    0%, 100% { outline-color: rgba(255,255,255,0.15); }
    50% { outline-color: rgba(255,255,255,0.5); }
}

@keyframes tap-pulse-dot {
    0%, 100% { box-shadow: 0 0 0 2px rgba(255,255,255,0.15); }
    50% { box-shadow: 0 0 0 4px rgba(255,255,255,0.5); }
}

.timing-lyric-time {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.4);
    min-width: 50px;
    font-variant-numeric: tabular-nums;
    font-family: monospace;
}

.timing-lyric-row.played .timing-lyric-time {
    color: #4CAF50;
}

.timing-lyric-text {
    color: rgba(255,255,255,0.8);
    font-size: 0.95rem;
    cursor: text;
    padding: 2px 4px;
    margin: -2px -4px;
    border-radius: 4px;
    transition: background 0.15s;
    display: inline-block;
}

.timing-lyric-text:hover {
    background: rgba(255,255,255,0.05);
}

.timing-lyric-row.active .timing-lyric-text {
    color: #fff;
    font-weight: 500;
}

.timing-lyric-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex-shrink: 0;
}

.timing-lyric-modified {
    font-size: 0.7rem;
    color: #ff9800;
    padding: 2px 6px;
    background: rgba(255, 152, 0, 0.15);
    border-radius: 3px;
}

.timing-lyric-action {
    background: none;
    border: none;
    color: rgba(255,255,255,0.3);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 3px;
    line-height: 1;
    transition: color 0.15s, background 0.15s;
}

.timing-lyric-action:hover {
    color: #ff5252;
    background: rgba(255, 82, 82, 0.15);
}

.timing-insert-row {
    padding: 0 16px;
    height: 0;
    overflow: hidden;
    position: relative;
    z-index: 2;
    background: rgba(0,0,0,0.4);
}

.timing-lyric-row:hover + .timing-insert-row,
.timing-insert-row:hover {
    height: 32px;
    padding: 6px 16px;
}

.timing-insert-btn {
    background: none;
    border: 1px dashed rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.4);
    font-size: 0.75rem;
    padding: 4px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
    width: 100%;
}

.timing-insert-btn:hover {
    border-color: rgba(76, 175, 80, 0.5);
    color: #4CAF50;
    background: rgba(76, 175, 80, 0.1);
}

.timing-lyric-text[contenteditable="true"],
.timing-trans-text[contenteditable="true"] {
    background: rgba(255,255,255,0.1);
    padding: 2px 8px;
    border-radius: 4px;
    outline: none;
    min-width: 100px;
}

.timing-lyric-content {
    flex: 1;
    min-width: 0;
}

.timing-trans-entries {
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.timing-trans-entry {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
}

.timing-trans-lang {
    color: rgba(255,255,255,0.4);
    font-size: 0.7rem;
    min-width: 50px;
    text-transform: uppercase;
}

.timing-trans-text {
    color: rgba(255,255,255,0.55);
    cursor: text;
    padding: 2px 4px;
    margin: -2px -4px;
    border-radius: 4px;
    transition: background 0.15s;
    flex: 1;
}

.timing-trans-text:hover {
    background: rgba(255,255,255,0.05);
}

.timing-trans-entry .timing-lyric-modified {
    font-size: 0.65rem;
    padding: 1px 4px;
}

/* Footer */
.timing-editor-footer {
    padding: 16px 24px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    flex-shrink: 0;
}

.timing-editor-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.timing-editor-btn:active {
    transform: scale(0.98);
}

.timing-editor-reset {
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7);
    margin-right: auto;
}

.timing-editor-reset:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

.timing-editor-cancel {
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7);
}

.timing-editor-cancel:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

.timing-editor-save-only {
    background: rgba(76, 175, 80, 0.25);
    color: #4CAF50;
    border: 1px solid rgba(76, 175, 80, 0.4);
}

.timing-editor-save-only:hover {
    background: rgba(76, 175, 80, 0.4);
    color: #fff;
}

.timing-editor-save-only:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.timing-editor-save {
    background: #4CAF50;
    color: #fff;
}

.timing-editor-save:hover {
    background: #45a049;
}

.timing-editor-save:disabled {
    background: rgba(76, 175, 80, 0.5);
    cursor: not-allowed;
}

/* Share Modal */
.share-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    z-index: 10002;
    opacity: 0;
    visibility: hidden;
    overflow-y: auto;
    transition: opacity 0.3s ease, background 0.3s ease;
}

.share-overlay.active {
    opacity: 1;
    visibility: visible;
    background: rgba(0, 0, 0, 0.9);
}

.share-modal {
    background: #1a1a1a;
    width: 100%;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.share-overlay.active .share-modal {
    opacity: 1;
}

.share-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

.share-modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #fff;
}

.share-modal-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 28px;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
}

.share-modal-close:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.share-modal-body {
    padding: 24px;
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

.share-album-info {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.share-album-name {
    font-size: 1.1rem;
    color: #fff;
    font-weight: 500;
    margin-bottom: 4px;
}

.share-album-artist {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.6);
}

.share-link-section {
    margin-bottom: 24px;
}

.share-link-section label {
    display: block;
    color: rgba(255,255,255,0.7);
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.share-link-row {
    display: flex;
    align-items: center;
    gap: 0;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    overflow: hidden;
}

.share-link-base {
    padding: 10px 2px 10px 14px;
    color: rgba(255,255,255,0.5);
    font-size: 0.85rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.share-code-input {
    flex: 1;
    min-width: 80px;
    padding: 10px 4px;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 0.9rem;
    font-family: monospace;
}

.share-code-input:focus {
    outline: none;
}

.share-save-btn,
.share-copy-btn {
    padding: 10px 16px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-left: 1px solid rgba(255,255,255,0.15);
    color: #fff;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.2s;
    flex-shrink: 0;
}

.share-save-btn:hover,
.share-copy-btn:hover {
    background: rgba(255,255,255,0.2);
}

.share-save-btn {
    background: rgba(76, 175, 80, 0.3);
}

.share-save-btn:hover {
    background: rgba(76, 175, 80, 0.5);
}

.share-copy-status {
    margin-top: 8px;
    font-size: 0.85rem;
    color: #4CAF50;
    min-height: 1.2em;
}

.share-chart-section {
    display: none;
    margin-bottom: 20px;
}

.share-chart-section.has-stats {
    display: block;
}

.share-chart-section h4 {
    margin: 0 0 12px;
    font-size: 0.95rem;
    color: rgba(255,255,255,0.7);
    font-weight: 500;
}

.share-chart-total {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.4);
    font-weight: 400;
}

.share-chart {
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
    padding: 12px 8px 4px;
}

.share-chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 60px;
}

.share-chart-bar-col {
    flex: 1;
    min-width: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    position: relative;
}

.share-chart-count {
    font-size: 0.55rem;
    color: rgba(255,255,255,0.35);
    margin-bottom: 2px;
    line-height: 1;
    opacity: 0;
    transition: opacity 0.15s;
}

.share-chart-bar-col:hover .share-chart-count {
    opacity: 1;
}

.share-chart-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #222;
    color: #fff;
    font-size: 0.7rem;
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 10;
    text-align: center;
    line-height: 1.4;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.share-chart-bar-col:hover .share-chart-tooltip {
    display: block;
}

.share-chart-count-total {
    color: rgba(255,255,255,0.2);
}

.share-chart-bar-stack {
    width: 100%;
    flex: 1;
    position: relative;
    display: flex;
    align-items: flex-end;
}

.share-chart-bar {
    position: absolute;
    bottom: 0;
    width: 100%;
    min-height: 1px;
    border-radius: 2px 2px 0 0;
    transition: background 0.15s;
}

.share-chart-bar-total {
    background: rgba(255, 255, 255, 0.08);
}

.share-chart-bar-unique {
    background: rgba(76, 175, 80, 0.6);
}

.share-chart-bar-col:hover .share-chart-bar-total {
    background: rgba(255, 255, 255, 0.15);
}

.share-chart-bar-col:hover .share-chart-bar-unique {
    background: rgba(76, 175, 80, 1);
}

.share-stats-section {
    display: none;
}

.share-stats-section.has-stats {
    display: block;
}

.share-stats-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.share-stats-header h4 {
    margin: 0;
    font-size: 0.95rem;
    color: rgba(255,255,255,0.7);
    font-weight: 500;
}

.share-stats-toggle {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    text-align: right;
}

.share-stats-toggle input {
    margin: 0;
    cursor: pointer;
    accent-color: #4CAF50;
    background: #111;
    -webkit-appearance: none;
    appearance: none;
    width: 13px;
    height: 13px;
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 3px;
    position: relative;
}

.share-stats-toggle input:checked {
    background: #4CAF50;
    border-color: #4CAF50;
}

.share-stats-toggle input:checked::after {
    content: '';
    position: absolute;
    left: 3px;
    top: 0px;
    width: 4px;
    height: 8px;
    border: solid #fff;
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg);
}

.share-stats-list {
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
}

.share-stat-item {
    padding: 6px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 0.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.share-stat-item:last-child {
    border-bottom: none;
}

.share-stat-repeat {
    opacity: 0.35;
}

.share-stat-date-dim {
    color: rgba(255,255,255,0.2);
}

.share-stat-time {
    color: rgba(255,255,255,0.6);
}

.share-stat-location {
    color: rgba(255,255,255,0.4);
    font-size: 0.7rem;
    flex: 1;
    text-align: right;
}

.share-stat-flag {
    font-size: 0.85rem;
    flex-shrink: 0;
    width: 24px;
    text-align: center;
    filter: saturate(0.4);
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.share-stat-dot {
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #888;
}

.share-stats-empty {
    padding: 20px;
    text-align: center;
    color: rgba(255,255,255,0.4);
    font-size: 0.85rem;
}

.share-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    max-width: 1200px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.share-modal-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s;
}

.share-delete-btn {
    background: rgba(255, 82, 82, 0.2);
    color: #ff5252;
}

.share-delete-btn:hover {
    background: rgba(255, 82, 82, 0.3);
}

.share-close-btn {
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7);
}

.share-close-btn:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

/* Share Mode Styles */
body.share-mode .container,
body.share-mode .sidebar,
body.share-mode .header,
body.share-mode .expanded-close,
body.share-mode .cover-controls,
body.share-mode .songs-header,
body.share-mode .metadata-edit-form,
body.share-mode .player-bar {
    display: none !important;
}

body.share-mode .main {
    margin-left: 0;
}

body.share-mode .expanded-overlay {
    display: flex !important;
    opacity: 1 !important;
}

body.share-mode .expanded-playlist {
    padding-top: 20px;
}

/* Share cover info overlay - hidden by default */
.share-cover-info {
    display: none;
}

/* In share mode mobile, show info over the cover */
@media (max-width: 600px) {
    body.share-mode .expanded-mobile-info {
        display: none !important;
    }

    body.share-mode .lyrics-header {
        display: none !important;
    }

    body.share-mode .expanded-cover-border {
        position: relative;
    }

    body.share-mode .share-cover-info {
        display: flex;
        flex-direction: column;
        align-items: center;
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 40px 16px 12px;
        background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 100%);
        text-align: center;
        z-index: 10;
        pointer-events: none;
        border-radius: 0 0 6px 6px;
        line-height: 1.4;
    }

    body.share-mode .share-cover-title {
        font-size: 1.1rem;
        font-weight: 600;
        color: #fff;
    }

    body.share-mode .share-cover-artist {
        font-size: 0.9rem;
        color: rgba(255,255,255,0.7);
        margin-top: 4px;
    }
}

/* Share mode desktop - show title on cover, hide lyrics header */
@media (min-width: 601px) {
    body.share-mode .expanded-mobile-info {
        display: none !important;
    }

    body.share-mode .lyrics-header {
        display: none !important;
    }

    body.share-mode .expanded-cover-border {
        position: relative;
    }

    body.share-mode .share-cover-info {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-end;
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 60px 20px 16px;
        background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 100%);
        text-align: center;
        z-index: 10;
        pointer-events: none;
        border-radius: 0 0 6px 6px;
        line-height: 1.4;
    }

    body.share-mode .share-cover-title {
        font-size: 1.5rem;
        font-weight: 600;
        color: #fff;
    }

    body.share-mode .share-cover-artist {
        font-size: 1.1rem;
        color: rgba(255,255,255,0.7);
        margin-top: 6px;
    }
}
