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

:root {
    --bg-primary: #121212;
    --bg-secondary: #181818;
    --bg-elevated: #282828;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --accent: #1db954;
    --accent-hover: #1ed760;
    --highlight: rgba(29, 185, 84, 0.3);
    --selection: rgba(29, 185, 84, 0.5);
    --danger: #ff6b6b;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-tap-highlight-color: transparent;
}

#app {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.view {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.hidden {
    display: none !important;
}

/* =====================
   BUTTONS
   ===================== */
.btn-primary, .btn-secondary {
    border: none;
    border-radius: 500px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--accent);
    color: var(--bg-primary);
    padding: 14px 32px;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: scale(1.02);
}

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

.btn-primary:disabled {
    background-color: var(--bg-elevated);
    color: var(--text-secondary);
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--text-secondary);
    padding: 10px 24px;
    font-size: 14px;
}

.btn-secondary:hover {
    border-color: var(--text-primary);
    background-color: rgba(255,255,255,0.1);
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.btn-icon:hover {
    background-color: var(--bg-elevated);
}

.btn-icon:active {
    background-color: var(--bg-secondary);
}

.btn-control {
    background-color: var(--bg-elevated);
    color: var(--text-primary);
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-control:hover {
    background-color: #404040;
}

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

.btn-play {
    background-color: var(--accent);
    color: var(--bg-primary);
    width: 64px;
    height: 64px;
}

.btn-play:hover {
    background-color: var(--accent-hover);
    transform: scale(1.05);
}

.btn-loop-restart {
    background-color: var(--accent);
    color: var(--bg-primary);
}

.btn-loop-restart:hover {
    background-color: var(--accent-hover);
}

/* =====================
   IMPORT VIEW
   ===================== */
.import-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.import-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 400px;
    width: 100%;
}

.import-container h1 {
    font-size: 32px;
    margin-bottom: 8px;
    text-align: center;
}

.import-container .subtitle {
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-size: 14px;
}

.import-section {
    width: 100%;
    margin-bottom: 16px;
}

.import-box {
    width: 100%;
    padding: 24px 20px;
    background-color: var(--bg-secondary);
    border: 2px dashed var(--bg-elevated);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.import-box:hover, .import-box:active {
    border-color: var(--accent);
    background-color: var(--bg-elevated);
}

.import-box.drag-over {
    border-color: var(--accent);
    background-color: rgba(29, 185, 84, 0.1);
}

.import-box.has-file {
    border-color: var(--accent);
    border-style: solid;
}

.import-box svg {
    color: var(--text-secondary);
}

.import-box.has-file svg {
    color: var(--accent);
}

.import-label {
    font-weight: 600;
    font-size: 14px;
}

.import-hint {
    color: var(--text-secondary);
    font-size: 12px;
}

.import-status {
    color: var(--text-secondary);
    font-size: 11px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.import-box.has-file .import-status {
    color: var(--accent);
}

.import-section-lrc .import-box {
    padding: 16px;
    opacity: 0.7;
    border-style: dotted;
}

.import-section-lrc .import-box:hover,
.import-section-lrc .import-box.has-file {
    opacity: 1;
}

/* Import Tabs */
.import-tabs {
    display: flex;
    width: 100%;
    background-color: var(--bg-secondary);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 16px;
    gap: 4px;
}

.import-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    background: none;
    border: none;
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.import-tab:hover {
    color: var(--text-primary);
    background-color: var(--bg-elevated);
}

.import-tab.active {
    background-color: var(--bg-elevated);
    color: var(--text-primary);
    font-weight: 600;
}

.import-tab svg {
    flex-shrink: 0;
}

.import-tab-content {
    display: none;
    width: 100%;
}

.import-tab-content.active {
    display: block;
}

/* Search Section */
.search-section {
    width: 100%;
}

.search-input-group {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.search-input {
    flex: 1;
    background-color: var(--bg-secondary);
    border: 2px solid var(--bg-elevated);
    border-radius: 12px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.search-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.search-input:focus {
    border-color: var(--accent);
}

.btn-search {
    background-color: var(--accent);
    color: var(--bg-primary);
    border: none;
    border-radius: 12px;
    width: 48px;
    min-width: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-search:hover {
    background-color: var(--accent-hover);
    transform: scale(1.02);
}

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

.search-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 12px;
    background-color: var(--bg-elevated);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 13px;
}

.search-results {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Search Result Card */
.search-card {
    display: flex;
    gap: 12px;
    padding: 12px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--bg-elevated);
    border-radius: 12px;
    transition: all 0.2s ease;
    align-items: center;
}

.search-card:hover {
    border-color: var(--accent);
    background-color: var(--bg-elevated);
}

.search-card-thumb {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    object-fit: cover;
    background-color: var(--bg-elevated);
    flex-shrink: 0;
}

.search-card-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.search-card-title {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-card-channel {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-card-duration {
    font-size: 11px;
    color: var(--text-secondary);
}

.search-card-action {
    flex-shrink: 0;
}

.btn-download {
    background-color: var(--accent);
    color: var(--bg-primary);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-download:hover {
    background-color: var(--accent-hover);
    transform: scale(1.1);
}

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

.btn-download:disabled {
    background-color: var(--bg-elevated);
    color: var(--text-secondary);
    cursor: not-allowed;
    transform: none;
}

.btn-download .spinner {
    width: 18px;
    height: 18px;
    border-width: 2px;
}

.search-empty {
    color: var(--text-secondary);
    font-size: 13px;
    text-align: center;
    padding: 24px 16px;
}

/* Model Selector */
.model-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding: 12px 16px;
    background-color: var(--bg-secondary);
    border-radius: 12px;
    width: 100%;
    justify-content: center;
}

.model-selector label {
    font-size: 13px;
    color: var(--text-secondary);
}

.model-selector select {
    background-color: var(--bg-elevated);
    color: var(--text-primary);
    border: 1px solid var(--bg-elevated);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    cursor: pointer;
    outline: none;
}

.model-selector select:focus {
    border-color: var(--accent);
}

/* Transcribe Status */
.transcribe-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 16px;
    background-color: var(--bg-elevated);
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 14px;
    width: 100%;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--bg-secondary);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* =====================
   HISTORY PANEL
   ===================== */
.btn-history-toggle {
    position: fixed;
    right: 16px;
    top: 16px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--bg-elevated);
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.btn-history-toggle:hover {
    background-color: var(--accent);
}

.history-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background-color: var(--accent);
    color: var(--bg-primary);
    font-size: 11px;
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.history-panel {
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    width: 300px;
    background-color: var(--bg-secondary);
    border-left: 1px solid var(--bg-elevated);
    z-index: 200;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.history-panel.open {
    transform: translateX(0);
}

.history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--bg-elevated);
}

.history-header h2 {
    font-size: 18px;
}

.btn-history-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
}

.btn-history-close:hover {
    background-color: var(--bg-elevated);
    color: var(--text-primary);
}

.history-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.history-empty {
    color: var(--text-secondary);
    font-size: 13px;
    text-align: center;
    padding: 32px 16px;
}

.history-item {
    padding: 12px 14px;
    background-color: var(--bg-elevated);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 8px;
}

.history-item:hover, .history-item:active {
    background-color: #333;
}

.history-item-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 6px;
}

.history-item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: var(--text-secondary);
}

.history-item-plays {
    display: flex;
    align-items: center;
    gap: 4px;
}

.history-item-plays svg {
    width: 12px;
    height: 12px;
}

.history-item-delete {
    opacity: 0.5;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
}

.history-item:hover .history-item-delete {
    opacity: 1;
}

.history-item-delete:hover {
    color: var(--danger);
    background-color: rgba(255, 107, 107, 0.1);
}

.history-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0,0,0,0.5);
    z-index: 150;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.history-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

/* Desktop: Always show history panel */
@media (min-width: 900px) {
    .btn-history-toggle {
        display: none;
    }

    .history-panel {
        transform: translateX(0);
        position: relative;
        z-index: 1;
    }

    .btn-history-close {
        display: none;
    }

    .history-overlay {
        display: none;
    }

    #view-import {
        flex-direction: row;
    }

    .import-main {
        flex: 1;
    }

    .import-container h1 {
        padding-right: 0;
    }
}

/* =====================
   PLAYER VIEW
   ===================== */
#view-player {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.header {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--bg-elevated);
    flex-shrink: 0;
}

.track-info {
    flex: 1;
    text-align: center;
    padding: 0 8px;
    min-width: 0;
}

#track-title {
    font-weight: 600;
    font-size: 14px;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

#track-title:hover {
    background-color: var(--bg-elevated);
}

.track-title-input {
    font-weight: 600;
    font-size: 14px;
    background-color: var(--bg-elevated);
    border: 1px solid var(--accent);
    border-radius: 4px;
    color: var(--text-primary);
    padding: 2px 6px;
    text-align: center;
    width: 100%;
    max-width: 200px;
    outline: none;
}

/* Lyrics Container */
.lyrics-container {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.lyrics {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-bottom: 100px;
}

.lyrics-line {
    padding: 10px 14px;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.lyrics-line:active {
    background-color: var(--bg-elevated);
}

.lyrics-line.active {
    color: var(--text-primary);
    font-weight: 600;
    background-color: var(--bg-elevated);
}

.lyrics-line.in-loop {
    background-color: var(--highlight);
    color: var(--text-primary);
}

.lyrics-line.selected {
    background-color: var(--selection);
    color: var(--text-primary);
}

.lyrics-line.selecting {
    background-color: rgba(29, 185, 84, 0.2);
}

.lyrics .loading,
.lyrics .error,
.lyrics .no-lyrics {
    text-align: center;
    color: var(--text-secondary);
    padding: 48px 16px;
}

.lyrics .error {
    color: var(--danger);
}

/* Lyrics Hidden State */
.lyrics-container.lyrics-hidden .lyrics {
    opacity: 0.1;
    filter: blur(8px);
    pointer-events: none;
}

.lyrics-container.lyrics-hidden::after {
    content: 'Paroles masquées';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-secondary);
    font-size: 16px;
    font-weight: 500;
    pointer-events: none;
}

.lyrics-container {
    position: relative;
}

/* Player Controls - Sticky Bottom */
.player-controls {
    background-color: var(--bg-secondary);
    padding: 12px 16px;
    padding-bottom: calc(12px + var(--safe-bottom));
    border-top: 1px solid var(--bg-elevated);
    flex-shrink: 0;
}

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

#current-time, #duration {
    font-size: 12px;
    color: var(--text-secondary);
    min-width: 36px;
    font-variant-numeric: tabular-nums;
}

#duration {
    text-align: right;
}

.progress-bar {
    flex: 1;
    height: 6px;
    background-color: var(--bg-elevated);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    touch-action: none;
}

.progress {
    height: 100%;
    background-color: var(--accent);
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s linear;
    pointer-events: none;
}

.controls {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
}

/* Zone gauche des contrôles */
.controls-left {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

/* Zone droite des contrôles */
.controls-right {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
}

/* Boutons de contrôle: taille fixe pour éviter la déformation */
.controls .btn-control {
    flex-shrink: 0;
}

/* Masquer le bouton restart (garder le code) */
#btn-restart {
    display: none;
}

/* Loop Controls */
.loop-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
    padding: 8px 16px;
    background-color: var(--highlight);
    border-radius: 10px;
}

.loop-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--accent);
    font-weight: 500;
}

.btn-loop-action {
    background-color: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.btn-loop-action:hover {
    background-color: var(--accent);
    color: var(--bg-primary);
}

.btn-loop-action:active {
    transform: scale(0.95);
}

.btn-loop-cancel {
    border-color: var(--text-secondary);
    color: var(--text-secondary);
}

.btn-loop-cancel:hover {
    background-color: var(--text-secondary);
    border-color: var(--text-secondary);
    color: var(--bg-primary);
}

/* Volume Control */
.volume-control {
    position: relative;
}

.volume-popup {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    padding: 16px 10px;
    background-color: var(--bg-elevated);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    z-index: 110;
    display: flex;
    align-items: center;
    justify-content: center;
}

.volume-slider {
    -webkit-appearance: none;
    appearance: none;
    writing-mode: vertical-lr;
    direction: rtl;
    width: 6px;
    height: 120px;
    background: var(--bg-secondary);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    border: none;
}

.volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    border: none;
}

.volume-slider::-webkit-slider-runnable-track {
    background: var(--bg-secondary);
    border-radius: 3px;
}

.volume-slider::-moz-range-track {
    background: var(--bg-secondary);
    border-radius: 3px;
}

/* Speed Control */
.speed-control {
    position: static;
}

#speed-label {
    font-size: 13px;
    font-weight: 600;
}

.speed-options {
    position: fixed;
    bottom: auto;
    left: 50%;
    transform: translateX(-50%);
    bottom: 140px;
    display: flex;
    gap: 6px;
    padding: 10px 12px;
    background-color: var(--bg-elevated);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    z-index: 100;
}

.speed-option {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.speed-option:hover {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.speed-option.active {
    background-color: var(--accent);
    color: var(--bg-primary);
}

/* =====================
   END VIEW
   ===================== */
.end-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px;
    text-align: center;
}

.end-container h2 {
    margin-bottom: 12px;
}

#end-track-info {
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.end-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

/* =====================
   MODAL
   ===================== */
.modal {
    position: fixed;
    inset: 0;
    background-color: rgba(0,0,0,0.7);
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-content {
    background-color: var(--bg-secondary);
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--bg-elevated);
}

.modal-header h3 {
    font-size: 18px;
}

.modal-body {
    flex: 1;
    padding: 16px 20px;
    overflow-y: auto;
}

#lyrics-editor {
    width: 100%;
    min-height: 300px;
    background-color: var(--bg-elevated);
    border: 1px solid var(--bg-elevated);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.8;
    padding: 16px;
    resize: vertical;
    font-family: inherit;
}

#lyrics-editor:focus {
    outline: none;
    border-color: var(--accent);
}

.modal-footer {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid var(--bg-elevated);
    justify-content: flex-end;
}

.modal-footer .btn-primary,
.modal-footer .btn-secondary {
    padding: 10px 20px;
    font-size: 14px;
}

.modal-content-small {
    max-width: 320px;
}

/* Music Info Modal */
.music-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--bg-elevated);
}

.music-info-row:last-child {
    border-bottom: none;
}

/* Trim Modal */
.trim-hint {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 16px;
    line-height: 1.5;
}

.trim-inputs {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.trim-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.trim-input-group label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.trim-time-input {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 16px;
    color: var(--text-secondary);
}

.trim-time-field {
    width: 50px;
    padding: 8px 10px;
    background-color: var(--bg-elevated);
    border: 1px solid var(--bg-elevated);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    text-align: center;
    -moz-appearance: textfield;
}

.trim-time-field::-webkit-outer-spin-button,
.trim-time-field::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.trim-time-field:focus {
    outline: none;
    border-color: var(--accent);
}

.btn-trim-current {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: none;
    border: 1px solid var(--text-secondary);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    align-self: flex-start;
}

.btn-trim-current:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.trim-preview {
    margin-top: 16px;
    padding: 12px;
    background-color: var(--bg-elevated);
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    text-align: center;
}

.music-info-label {
    color: var(--text-secondary);
    font-size: 14px;
}

.music-info-value {
    font-weight: 500;
    font-size: 14px;
    text-align: right;
    max-width: 60%;
    word-break: break-word;
}

/* =====================
   INFO PANEL (Side Menu)
   ===================== */
.info-panel {
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    width: 260px;
    background-color: var(--bg-secondary);
    border-left: 1px solid var(--bg-elevated);
    z-index: 200;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.info-panel.open {
    transform: translateX(0);
}

.info-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--bg-elevated);
}

.info-panel-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.info-panel-content {
    padding: 12px;
}

.info-panel-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    border-radius: 10px;
    transition: background-color 0.2s;
    text-align: left;
}

.info-panel-item:hover {
    background-color: var(--bg-elevated);
}

.info-panel-item:active {
    background-color: var(--bg-primary);
}

.info-panel-item svg {
    color: var(--text-secondary);
    flex-shrink: 0;
}

.info-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0,0,0,0.5);
    z-index: 150;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.info-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

/* =====================
   SCROLLBAR
   ===================== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--bg-elevated);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* =====================
   MOBILE OPTIMIZATIONS
   ===================== */
@media (max-width: 480px) {
    .import-container h1 {
        font-size: 26px;
    }

    /* Compact LRC import on small screens */
    .import-section-lrc .import-box {
        flex-direction: row;
        padding: 10px 14px;
        gap: 10px;
    }

    .import-section-lrc .import-box svg {
        width: 24px;
        height: 24px;
        flex-shrink: 0;
    }

    .import-section-lrc .import-hint,
    .import-section-lrc .import-status {
        display: none;
    }

    .import-section-lrc .import-label {
        font-size: 13px;
    }

    .lyrics-line {
        font-size: 16px;
        padding: 10px 12px;
    }

    .btn-play {
        width: 56px;
        height: 56px;
    }

    .controls {
        gap: 16px;
    }

    .speed-options {
        bottom: 130px;
    }

    .loop-controls {
        flex-wrap: wrap;
        gap: 10px;
    }
}

/* Tablet */
@media (min-width: 481px) and (max-width: 899px) {
    .history-panel {
        width: 320px;
    }
}

/* Large screens */
@media (min-width: 1200px) {
    .import-container {
        max-width: 450px;
    }

    .lyrics-line {
        font-size: 22px;
        padding: 12px 20px;
    }
}
