/* ========================================
   OLEVITA - Separação de Faixas Musicais
   Dark Theme Styles
   ======================================== */

:root {
    --bg-primary: #0A1F33;
    --bg-secondary: #0F2A44;
    --bg-sidebar: #0A1F33;
    --bg-card: #132F4C;
    --bg-hover: #173A5E;
    --bg-active: #1E4971;
    --text-primary: #FFFFFF;
    --text-secondary: #C9D1D9;
    --text-muted: #8B949E;
    --accent: #EEAB47;
    --accent-hover: #EEAB47;
    --accent-light: rgba(238, 171, 71, 0.18);
    --border: #1F4468;
    --border-light: #2A5E8D;
    --tech-purple: #7B61FF;
    --tech-cyan: #00D4FF;
    --danger: #ff5555;
    --warning: #ffaa00;
    --waveform-bg: rgba(0, 200, 180, 0.1);
    --waveform-active: #00c8b4;
    --waveform-blue: #4FC3F7;
    --track-vocals: #00c8b4;
    --track-drums: #4FC3F7;
    --track-keyboard: #00c8b4;
    --track-guitar: #00c8b4;
    --track-bass: #4FC3F7;
    --track-piano: #FF7043;
    --track-original: #00c8b4;
    --track-other: #4FC3F7;
    --sidebar-width: 240px;
    --player-height: 120px;
}

/* Generic hidden utility */
.hidden {
    display: none !important;
}

/* ========================================
   AUTH SCREEN
   ======================================== */

.auth-screen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-screen.hidden {
    display: none;
}

.auth-container {
    width: 100%;
    max-width: 400px;
    padding: 24px;
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 32px;
}

.auth-logo h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.auth-form {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 28px 24px;
    border: 1px solid var(--border);
}

.auth-form.hidden {
    display: none;
}

.auth-form h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    text-align: center;
}

.auth-field {
    margin-bottom: 16px;
}

.auth-field label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.auth-field input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

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

.auth-error {
    background: rgba(255, 85, 85, 0.12);
    border: 1px solid rgba(255, 85, 85, 0.3);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
    color: #ff7777;
    margin-bottom: 12px;
}

.auth-error.hidden {
    display: none;
}

.auth-btn-primary {
    width: 100%;
    padding: 11px;
    border-radius: 8px;
    border: none;
    background: var(--accent);
    color: #000;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s;
}

.auth-btn-primary:hover {
    background: var(--accent-hover);
}

.auth-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: var(--text-muted);
    font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth-google-btn-container {
    display: flex;
    justify-content: center;
}

.auth-switch {
    text-align: center;
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 16px;
}

.auth-switch a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.auth-switch a:hover {
    text-decoration: underline;
}

.auth-forgot {
    text-align: center;
    font-size: 13px;
    margin-top: 10px;
    margin-bottom: -8px;
}

.auth-forgot a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 12px;
}

.auth-forgot a:hover {
    color: var(--accent);
    text-decoration: underline;
}

.auth-forgot-desc {
    font-size: 13px;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 16px;
    line-height: 1.4;
}

.auth-success {
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
    color: #4ade80;
    margin-bottom: 12px;
}

.auth-success.hidden {
    display: none;
}

.btn-logout {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    font-size: 14px;
    transition: color 0.2s, background 0.2s;
}

.btn-logout:hover {
    color: var(--danger);
    background: rgba(255, 85, 85, 0.1);
}

/* ========================================
   BASE / RESET
   ======================================== */

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

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background:
        radial-gradient(1200px 620px at 8% -12%, rgba(0, 212, 255, 0.12) 0%, rgba(0, 212, 255, 0) 64%),
        radial-gradient(920px 560px at 92% 6%, rgba(123, 97, 255, 0.16) 0%, rgba(123, 97, 255, 0) 60%),
        linear-gradient(145deg, #0A1F33 0%, #0F2A44 52%, #132F4C 100%);
    color: var(--text-primary);
    display: flex;
}

body.resizing-panels {
    cursor: col-resize !important;
    user-select: none !important;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #1a3d5c;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #2a5070;
}

/* ========== SIDEBAR ========== */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow-y: auto;
    overflow-x: hidden;
    transition: width 0.25s ease;
}

.sidebar.collapsed {
    width: 60px;
}

.sidebar.collapsed .logo-text,
.sidebar.collapsed .nav-item span,
.sidebar.collapsed .section-title,
.sidebar.collapsed .setlist-item .setlist-info,
.sidebar.collapsed .user-details,
.sidebar.collapsed #new-favorite-btn span {
    display: none;
}

.sidebar.collapsed .sidebar-header {
    padding: 20px 14px;
}

.sidebar.collapsed .sidebar-nav {
    padding: 0 6px;
}

.sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 10px 0;
    gap: 0;
}

.sidebar.collapsed .nav-item i {
    width: auto;
    font-size: 18px;
}

.sidebar.collapsed .sidebar-section {
    padding: 16px 6px 8px;
}

.sidebar.collapsed #new-favorite-btn {
    justify-content: center;
    padding: 10px 0;
    gap: 0;
}

.sidebar.collapsed .setlist-item {
    justify-content: center;
    padding: 8px 0;
    gap: 0;
}

.sidebar.collapsed .setlist-thumb {
    width: 32px;
    height: 32px;
}

.sidebar.collapsed .sidebar-footer {
    padding: 12px 6px;
}

.sidebar.collapsed .user-info {
    justify-content: center;
}

.sidebar.collapsed .sidebar-footer {
    padding: 12px 6px;
}

/* Sidebar toggle button */
.sidebar-toggle-btn {
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.sidebar-toggle-btn:hover {
    transform: scale(1.1);
}

.sidebar.collapsed .sidebar-toggle-btn {
    justify-content: center;
}

.sidebar-header {
    padding: 20px 16px;
}

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

.logo-icon {
    flex-shrink: 0;
}

.logo-text {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.sidebar-nav {
    padding: 0 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 400;
    transition: all 0.2s;
    cursor: pointer;
}

.sidebar-nav .nav-item[hidden] {
    display: none !important;
}

.sidebar-nav .nav-item[data-page="library"] {
    display: none !important;
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--bg-active);
    color: var(--text-primary);
    font-weight: 500;
}

.nav-item i {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

.sidebar-section {
    padding: 24px 8px 8px;
}

.section-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0 12px 8px;
}

.sidebar-footer {
    margin-top: auto;
    padding: 16px;
    border-top: 1px solid var(--border);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 13px;
    font-weight: 500;
}

.user-plan {
    font-size: 11px;
    color: var(--accent);
    font-weight: 600;
}

.setlist-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.setlist-item:hover {
    background: var(--bg-hover);
}

.setlist-thumb {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.setlist-thumb i {
    color: var(--text-muted);
    font-size: 14px;
}

.setlist-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.setlist-name {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-primary);
}

.setlist-author {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.setlist-empty {
    font-size: 12px;
    color: var(--text-muted);
    padding: 8px 12px;
}

.setlist-menu-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.15s, background 0.15s;
    margin-left: auto;
    flex-shrink: 0;
}

.setlist-item:hover .setlist-menu-btn {
    opacity: 1;
}

.setlist-menu-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* ========== PLAYLIST DETAIL PAGE ========== */
.playlist-detail-header {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.playlist-detail-header .header-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.btn-back {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    font-size: 18px;
    transition: background 0.15s, color 0.15s;
}

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

.playlist-player-bar {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 16px;
    margin: 16px 0;
    gap: 16px;
    flex-shrink: 0;
}

.playlist-player-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    min-width: 0;
    max-width: 240px;
}

.playlist-player-thumb {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: var(--bg-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--text-muted);
}

.playlist-player-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

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

.playlist-player-artist {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playlist-player-right {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 4px;
    min-width: 0;
}

.playlist-player-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-shrink: 0;
}

.playlist-player-controls .control-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
    font-size: 14px;
}

.playlist-player-controls .control-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.playlist-player-controls .play-btn {
    width: 44px;
    height: 44px;
    background: var(--accent);
    color: #fff;
    font-size: 16px;
}

.playlist-player-controls .play-btn:hover {
    filter: brightness(1.15);
}

.playlist-player-controls .control-btn.active {
    color: var(--accent);
}

/* Volume */
.playlist-volume-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
}

.playlist-volume-slider {
    width: 80px;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--border);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

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

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

/* Timeline */
.playlist-timeline {
    display: flex;
    align-items: center;
    gap: 8px;
}

.playlist-time {
    font-size: 11px;
    color: var(--text-muted);
    min-width: 32px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.playlist-timeline-slider {
    flex: 1;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--border);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

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

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

/* Playlist tracks list */
.playlist-tracks-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.playlist-track-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
}

.playlist-track-row:hover {
    background: var(--bg-hover);
}

.playlist-track-row.active {
    background: var(--bg-active);
}

.playlist-track-row.active .playlist-track-title {
    color: var(--accent);
}

.playlist-track-num {
    width: 24px;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.playlist-track-thumb {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
    font-size: 14px;
}

.playlist-track-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex: 1;
    min-width: 0;
}

.playlist-track-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playlist-track-artist {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playlist-track-duration {
    font-size: 13px;
    color: var(--text-muted);
    flex-shrink: 0;
    margin-left: auto;
}

.playlist-track-remove {
    opacity: 0;
    transition: opacity 0.15s;
    flex-shrink: 0;
}

.playlist-track-row:hover .playlist-track-remove {
    opacity: 1;
}

.playlist-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

/* Add to playlist modal item */
.playlist-add-track-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-primary);
    transition: background 0.15s;
}

.playlist-add-track-item:hover {
    background: var(--bg-hover);
}

.playlist-add-track-item input[type="checkbox"] {
    flex-shrink: 0;
}

/* ========== MAIN CONTENT ========== */
.main-content {
    flex: 1;
    height: 100vh;
    overflow-y: auto;
    position: relative;
}

.page {
    padding: 32px;
    min-height: 100%;
}

#page-playlist {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

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

.page.hidden {
    display: none !important;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.page-header h1 {
    font-size: 28px;
    font-weight: 700;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 4px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Search Box */
.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 16px;
    min-width: 200px;
}

.search-box i {
    color: var(--text-muted);
    font-size: 14px;
}

.search-box input {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    width: 100%;
    font-family: inherit;
}

.search-box input::placeholder {
    color: var(--text-muted);
}

/* Buttons */
.btn-primary {
    background: var(--accent);
    color: #000;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
    font-family: inherit;
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-light);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    font-family: inherit;
}

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

.btn-icon {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.2s;
}

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

.btn-icon.danger:hover {
    color: var(--danger);
}

.btn-send {
    background: var(--accent);
    color: #000;
    border: none;
    padding: 12px 28px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
    font-family: inherit;
}

.btn-send:hover {
    background: var(--accent-hover);
}

.btn-export {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    font-family: inherit;
}

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

/* Filter Tabs */
.filter-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

.filter-tab {
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.filter-tab:hover {
    border-color: var(--text-muted);
}

.filter-tab.active {
    background: var(--text-primary);
    color: var(--bg-primary);
    border-color: var(--text-primary);
}

/* Sort Bar */
.sort-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.music-count {
    font-size: 13px;
    color: var(--text-secondary);
}

.sort-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
}

.sort-btn:hover {
    color: var(--text-primary);
}

/* Tracks Table */
.tracks-table {
    width: 100%;
}

.table-header {
    display: grid;
    grid-template-columns: 40px 2fr 1.5fr 1fr 80px 80px 80px 40px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.table-body {
    max-height: calc(100vh - 280px);
    overflow-y: auto;
}

.track-row {
    display: grid;
    grid-template-columns: 40px 2fr 1.5fr 1fr 80px 80px 80px 40px;
    padding: 10px 12px;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s;
}

.track-row:hover {
    background: var(--bg-hover);
}

.col-check {
    display: flex;
    align-items: center;
}

.col-check input[type="checkbox"] {
    accent-color: var(--accent);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.col-title {
    display: flex;
    align-items: center;
    gap: 12px;
    overflow: hidden;
}

.track-thumb {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.track-thumb i {
    color: var(--text-muted);
    font-size: 16px;
}

.track-thumb.ai-created {
    background: var(--accent) !important;
}
.track-thumb.ai-created i {
    color: #1a2733;
}

.library-card-thumb.ai-created {
    background: var(--accent) !important;
    color: #1a2733;
}

.track-title-wrap {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

.track-title-text {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-artist-text {
    display: none; /* shown on mobile */
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-separation-inline {
    margin-top: 6px;
    width: min(320px, 100%);
}

.track-separation-text {
    display: block;
    color: var(--text-secondary);
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.track-separation-progress {
    width: 100%;
    height: 6px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255,255,255,0.1);
}

.track-separation-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #EEAB47 0%, #EEAB47 100%);
    transition: width 0.25s ease;
}

.track-separation-inline.failed .track-separation-text {
    color: #ff7e7e;
}

.col-artist {
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.col-genre {
    color: var(--text-muted);
}

.col-bpm, .col-key, .col-duration {
    color: var(--text-secondary);
    text-align: center;
}

.col-actions {
    display: flex;
    justify-content: flex-end;
}

/* ========== UPLOAD PAGE ========== */
.upload-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    margin-bottom: 32px;
}

.upload-tab {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    padding: 12px 24px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    font-family: inherit;
}

.upload-tab:hover {
    color: var(--text-primary);
}

.upload-tab.active {
    color: var(--text-primary);
    border-bottom-color: var(--text-primary);
}

.upload-area {
    display: flex;
    justify-content: center;
    padding: 40px 0;
}

.upload-dropzone {
    width: 100%;
    max-width: 700px;
    border: 2px dashed var(--border-light);
    border-radius: 16px;
    padding: 80px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
    border-color: var(--accent);
    background: var(--accent-light);
}

.dropzone-icon {
    font-size: 40px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.dropzone-text {
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.dropzone-formats {
    font-size: 13px;
    color: var(--text-muted);
}

.dropzone-file-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 12px;
    max-height: 200px;
    overflow-y: auto;
    width: 100%;
    max-width: 400px;
}

.dropzone-file-name {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--bg-hover);
    border-radius: 6px;
}

.dropzone-file-name i {
    color: var(--accent);
    font-size: 12px;
}

.upload-status {
    position: fixed;
    bottom: 0;
    left: var(--sidebar-width);
    right: 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 16px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.upload-status.hidden {
    display: none;
}

.status-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-primary);
}

.status-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* ========== TRACK SELECTION ========== */
.separation-section {
    max-width: 800px;
    margin: 0 auto;
}

.section-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-label i {
    font-size: 14px;
    color: var(--text-muted);
    cursor: pointer;
}

.track-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 32px;
}

.track-option {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
}

.track-option:hover {
    border-color: var(--text-muted);
    background: var(--bg-hover);
}

.track-option.selected {
    border-color: var(--accent);
    color: var(--text-primary);
}

.track-option i:first-child,
.track-option .track-svg-icon {
    font-size: 20px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.track-svg-icon {
    color: currentColor;
}

.expand-icon {
    margin-left: auto;
    font-size: 12px !important;
    width: auto !important;
    color: var(--text-muted);
}

.separation-footer {
    position: fixed;
    bottom: 0;
    left: var(--sidebar-width);
    right: 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 16px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

/* ========== PLAYER PAGE ========== */
#page-player {
    padding: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    position: relative;
}

.player-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.btn-back {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s;
}

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

.track-info-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
}

.track-info-header i {
    color: var(--accent);
}

.player-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.pitch-control {
    position: relative;
}

.bpm-display, .key-display, .time-sig-display {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
}

.bpm-display.is-interactive,
.key-display.is-interactive {
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

.bpm-display.is-interactive:hover,
.key-display.is-interactive:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}

.bpm-display i, .key-display i {
    color: var(--text-muted);
    font-size: 12px;
}

.key-popover {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 300px;
    background: #122a42;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px;
    z-index: 25;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

.key-popover.hidden {
    display: none;
}

.key-popover h4 {
    text-align: center;
    margin-bottom: 12px;
    font-size: 24px;
    color: var(--text-primary);
}

.key-tuning-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    margin-bottom: 14px;
}

.key-tuning-row select {
    background: transparent;
    color: var(--text-primary);
    border: none;
    font-size: 16px;
    font-weight: 600;
}

.key-stepper {
    display: grid;
    grid-template-columns: 58px 1fr 58px;
    gap: 12px;
    margin-bottom: 12px;
}

.key-stepper button,
#key-popover-value {
    height: 58px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #163350;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
}

.key-stepper button {
    cursor: pointer;
    transition: border-color 0.2s;
}

.key-stepper button:hover {
    border-color: var(--accent);
}

#key-popover-value {
    font-size: 36px;
    font-weight: 700;
}

.key-reset-btn {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 24px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 0;
}

/* Separation Progress */
.separation-progress {
    padding: 12px 24px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.separation-progress.hidden {
    display: none;
}

/* Pitch Loading Overlay */
.pitch-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 17, 20, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    backdrop-filter: blur(4px);
}

.pitch-loading-overlay.hidden {
    display: none;
}

/* Playback loading indicator (above timeline) */
.playback-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(56, 152, 236, 0.12);
    border-radius: 6px;
    margin: 0 auto;
    width: fit-content;
    position: absolute;
    top: -32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    animation: playback-loading-pulse 1.5s ease-in-out infinite;
}

.playback-loading.hidden {
    display: none;
}

.playback-loading span {
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
}

.playback-loading-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(56, 152, 236, 0.3);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes playback-loading-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.pitch-loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.pitch-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.pitch-loading-text {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
}

.pitch-loading-bar-container {
    width: 200px;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
}

.pitch-loading-bar {
    height: 100%;
    width: 0%;
    background: var(--accent);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.progress-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-secondary);
}

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

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

/* Export Progress Overlay */
.export-progress-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 12, 15, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(6px);
}

.export-progress-overlay.hidden {
    display: none;
}

.export-progress-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 40px 60px;
    background: var(--card-bg, #122a42);
    border-radius: 16px;
    border: 1px solid var(--border, #1a3350);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    min-width: 320px;
}

.export-progress-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border, #1a3350);
    border-top-color: var(--accent, #EEAB47);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.export-progress-text {
    color: var(--text-primary, #fff);
    font-size: 16px;
    font-weight: 600;
    text-align: center;
}

.export-progress-bar-container {
    width: 280px;
    height: 6px;
    background: var(--border, #1a3350);
    border-radius: 3px;
    overflow: hidden;
}

.export-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent, #EEAB47), var(--accent-hover, #EEAB47));
    border-radius: 3px;
    transition: width 0.4s ease;
}

.export-progress-percent {
    color: var(--accent, #EEAB47);
    font-size: 24px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.export-cancel-btn {
    margin-top: 8px;
    font-size: 13px;
    padding: 6px 20px;
}

/* ========== PLAYER BODY (split layout) ========== */
.player-body {
    flex: 1;
    display: flex;
    overflow: hidden;
    position: relative;
    min-height: 0;
}

/* Tracks Area */
.tracks-area {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    min-width: 0;
    transition: width 0.25s ease, min-width 0.25s ease, flex 0.25s ease;
}

/* When center panel or sections are visible, tracks shrink */
.player-body.has-center .tracks-area {
    flex: 0 0 auto;
    width: 230px;
    min-width: 120px;
    max-width: 50%;
    border-right: none;
}

.player-body.has-center .tracks-area .track-waveform-container {
    display: none;
}

.player-body.has-center .tracks-area .speed-control {
    display: none;
}

/* Collapsed left panel */
.player-body.has-center .tracks-area.collapsed {
    width: 0px !important;
    min-width: 0 !important;
    max-width: 0 !important;
    overflow: hidden;
    padding: 0;
    border: none;
}

/* ========== RESIZE HANDLES ========== */
.resize-handle {
    width: 5px;
    cursor: col-resize;
    background: var(--border);
    flex-shrink: 0;
    position: relative;
    z-index: 5;
    transition: background 0.15s;
}
.resize-handle:hover,
.resize-handle.dragging {
    background: var(--accent);
}
.resize-handle.hidden {
    display: none;
}

/* ========== PANEL COLLAPSE BUTTONS ========== */
.panel-collapse-btn {
    position: relative;
    z-index: 6;
    width: 20px;
    flex-shrink: 0;
    border: none;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    padding: 0;
    transition: background 0.15s, color 0.15s;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
}
.panel-collapse-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}
.panel-collapse-btn.hidden {
    display: none;
}

/* Center Panel (Lyrics + Chords) */
.center-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 100px;
    min-height: 0;
}

.center-panel.hidden {
    display: none;
}

.lyrics-view {
    flex: 1 1 0;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 12px 28px 8px;
}

.lyrics-view.hidden {
    display: none;
}

.lyrics-view-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
}

/* Chords View (right panel) */
.chords-panel {
    width: 280px;
    min-width: 280px;
    border-left: 1px solid var(--border);
    background: var(--bg-secondary);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow-y: auto;
}

.chords-panel.hidden {
    display: none;
}

.chords-view {
    padding: 16px 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.chords-view.hidden {
    display: none;
}

.chord-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.chord-diagram {
    position: relative;
    display: flex;
    justify-content: center;
}

.chord-diagram svg {
    display: block;
}

.chord-name {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
}

/* Chord carousel: prev | current | next */
.chord-carousel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    flex-wrap: nowrap;
}

.chord-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.chord-item.chord-active {
    transform: scale(1);
    opacity: 1;
}

.chord-item.chord-active .chord-name {
    font-size: 28px;
    color: #ffffff;
}

.chord-item.chord-side {
    transform: scale(0.86);
    opacity: 0.75;
}

.chord-item.chord-side .chord-name {
    font-size: 22px;
    color: var(--text-muted);
}

/* Hover preview: enlarged chord diagram from cifra line */
.cifra-chord-hover-preview {
    position: fixed;
    z-index: 450;
    pointer-events: none;
    background: rgba(12, 14, 18, 0.96);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 16px 10px;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px) scale(0.96);
    transition: opacity 0.12s ease, transform 0.12s ease, visibility 0.12s ease;
}

.cifra-chord-hover-preview.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.cifra-chord-hover-preview .chord-name {
    font-size: 34px !important;
    color: #fff;
}

.lyrics-refresh-btn {
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-secondary);
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
}

.lyrics-refresh-btn:hover {
    color: var(--text-primary);
    border-color: var(--text-muted);
}

.lyrics-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ============ CIFRA VIEW ============ */
.cifra-view {
    flex: 1 1 0;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 12px 28px 8px;
    position: relative;
}

.cifra-view.hidden {
    display: none;
}

.cifra-view-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
    gap: 12px;
    flex-wrap: wrap;
}

.cifra-header-main {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.cifra-header-title {
    color: var(--text-primary);
    letter-spacing: 0.02em;
}

.cifra-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cifra-fullscreen-tabs {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border: 1px solid rgba(34, 68, 102, 0.8);
    border-radius: 999px;
    background: rgba(11, 25, 41, 0.92);
}

.cifra-fullscreen-tabs.hidden {
    display: none;
}

.cifra-fullscreen-tab {
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s ease, color 0.2s ease;
}

.cifra-fullscreen-tab:hover {
    color: var(--text-primary);
}

.cifra-fullscreen-tab.active {
    background: var(--accent);
    color: #091525;
}

.cifra-fullscreen-btn-label {
    display: inline;
}

#btn-edit-cifra,
#btn-refresh-cifra,
#btn-ai-adjust-sections {
    display: none !important;
}

.cifra-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    font-family: 'Courier New', 'Consolas', monospace;
    font-size: 30px;
    line-height: 1.7;
    white-space: pre;
    box-sizing: border-box;
    --cifra-left-inset: 22px;
    padding-top: 18px;
    padding-left: 22px;
    padding-right: 10px;
    padding-bottom: 24px;
}

.cifra-content.show-diagrams {
    line-height: 1.9;
}

.cifra-content.hidden {
    display: none;
}

.cifra-empty {
    color: var(--text-muted);
    font-size: 13px;
    padding: 16px 0;
}

.cifra-empty.hidden {
    display: none;
}

/* Cifra loading overlay with progress bar */
.cifra-loading-overlay {
    position: absolute;
    inset: 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px 20px;
    background: rgba(10, 25, 47, 0.92);
}

.cifra-loading-overlay.hidden {
    display: none;
}

.cifra-loading-spinner {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 3px solid rgba(240, 160, 48, 0.25);
    border-top-color: var(--accent);
    animation: track-open-spin 0.8s linear infinite;
}

.cifra-loading-text {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
}

.cifra-loading-progress {
    width: 220px;
    max-width: 80%;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
}

.cifra-loading-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), var(--accent-hover));
    border-radius: 3px;
    transition: width 0.4s ease;
}

.cifra-loading-percent {
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 400;
}

.cifra-line {
    min-height: 1.5em;
    max-width: 100%;
}

.cifra-section-header {
    color: #EEAB47;
    font-weight: 700;
    font-size: 26px;
    margin-top: 16px;
    margin-bottom: 4px;
    font-family: inherit;
}

.cifra-chord {
    color: #ff6b35;
    font-weight: 700;
}

/* Inline chord diagram wrappers */
.cifra-chord-wrap {
    display: inline;
}

.cifra-chord-dia {
    display: none;
}

/* When Acordes is active, show inline diagrams above each chord */
.cifra-content.show-diagrams .cifra-chord-wrap {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    vertical-align: bottom;
}

.cifra-content.show-diagrams .cifra-chord-dia {
    display: block;
    line-height: 0;
    margin-bottom: 2px;
}

.cifra-content.show-diagrams .cifra-chord-dia svg {
    display: block;
    margin: 0 auto;
}

.cifra-content.show-diagrams .cifra-chord-line,
.cifra-content.show-diagrams .cifra-mixed-line {
    line-height: 1.25;
}

.cifra-content.show-diagrams .cifra-chord-line.cifra-chord-line {
    margin-bottom: 6px;
}

.cifra-content.show-diagrams .cifra-lyrics-line.cifra-lyrics-line {
    line-height: 1.35;
    margin-bottom: 36px;
}

.cifra-chord-line {
    color: #ff6b35;
    font-weight: 700;
}

.cifra-chord-spacer {
    visibility: hidden;
    pointer-events: none;
    -webkit-user-select: none;
    user-select: none;
}

/* Standalone chord-only lines (solos/instrumental) — equal spacing, left-aligned */
.cifra-chord-only {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 24px;
    white-space: normal;
}

.cifra-lyrics-line {
    color: var(--text-primary);
    margin-bottom: 16px;
}

.cifra-mixed-line {
    color: var(--text-primary);
    margin-bottom: 16px;
}

.cifra-empty-line {
    height: 0.75em;
}

/* Instrumental section indicator */
.cifra-instrumental-line {
    color: #EEAB47;
    font-style: italic;
    font-weight: 500;
    font-size: 20px;
    padding: 4px 0;
    opacity: 0.85;
    font-family: inherit;
}

.cifra-instrumental-line.cifra-active {
    /* no highlight change */
}

/* Difficulty level selector */
.cifra-level-selector {
    display: flex;
    gap: 2px;
    background: var(--bg-card);
    border-radius: 6px;
    padding: 2px;
    border: 1px solid var(--border);
}

.cifra-level-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-weight: 500;
}

.cifra-level-btn:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.05);
}

.cifra-level-btn.active {
    background: var(--accent);
    color: #fff;
    font-weight: 600;
}

/* Active cifra line (currently playing) */
.cifra-line.cifra-active {
    position: relative;
    z-index: 0;
    background: transparent;
    border-radius: 3px;
}

/* When chord-line + lyrics-line are both active, merge them visually */
.cifra-chord-line.cifra-active,
.cifra-content.show-diagrams .cifra-chord-line.cifra-chord-line.cifra-active {
    border-radius: 3px 3px 0 0;
    margin-bottom: 0 !important;
    padding-bottom: 4px;
}

.cifra-content.show-diagrams .cifra-chord-line.cifra-chord-line.cifra-active {
    position: relative;
    z-index: 0;
    overflow: visible;
    background: transparent;
}

.cifra-chord-line.cifra-active + .cifra-lyrics-line.cifra-active {
    border-radius: 0 0 3px 3px;
    margin-top: 0;
    padding-top: 2px;
}

.cifra-lyrics-line.cifra-active,
.cifra-mixed-line.cifra-active {
    /* keep default color — no karaoke dimming */
}

/* Word-level highlighting in cifra */
.cifra-word {
    display: inline;
    transition: color 0.12s ease, font-weight 0.12s ease, text-shadow 0.12s ease;
}

.cifra-char {
    display: inline;
    cursor: text;
}

.cifra-word.cifra-word-spoken {
    /* no visual change for spoken words */
}

.cifra-word.cifra-word-active {
    /* no karaoke highlight */
}

/* Cifra editor (reuses lyrics editor styling) */
.cifra-editor {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.cifra-editor.hidden {
    display: none;
}

.cifra-editor textarea {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: 'Courier New', 'Consolas', monospace;
    font-size: 13px;
    padding: 12px;
    resize: none;
    outline: none;
    line-height: 1.5;
}

.cifra-editor textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(56, 152, 236, 0.15);
}

.cifra-editor-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    justify-content: flex-end;
}

/* Lyrics editor overlay */
.lyrics-editor {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 8px 0;
}

.lyrics-editor.hidden {
    display: none;
}

.lyrics-editor textarea {
    width: 100%;
    min-height: 220px;
    max-height: 50vh;
    resize: vertical;
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    line-height: 1.7;
    padding: 12px;
    box-sizing: border-box;
}

.lyrics-editor textarea::placeholder {
    color: var(--text-muted);
}

.lyrics-editor textarea:focus {
    outline: none;
    border-color: var(--accent, #4a9eff);
}

.lyrics-editor-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.lyrics-editor-btn {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 7px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
}

.lyrics-editor-save {
    background: #2a7d4f;
    color: #fff;
    border-color: #2a7d4f;
}

.lyrics-editor-save:hover {
    background: #33956a;
}

.lyrics-editor-cancel {
    background: var(--bg-card);
    color: var(--text-secondary);
}

.lyrics-editor-cancel:hover {
    color: var(--text-primary);
    border-color: var(--text-muted);
}

.lyrics-loading,
.lyrics-empty {
    color: var(--text-muted);
    font-size: 14px;
    padding: 10px 4px;
}

.lyrics-loading.hidden,
.lyrics-empty.hidden {
    display: none;
}

.lyrics-lines {
    flex: 1;
    overflow-y: auto;
    padding-right: 10px;
}

.lyrics-lines.hidden {
    display: none;
}

.lyrics-line {
    font-size: 26px;
    line-height: 1.5;
    color: #6e7480;
    margin: 0 0 14px 0;
    transition: color 0.2s ease;
}

.lyrics-line.active-line {
    color: #9aa0ad;
}

/* Word-level highlighting */
.lyrics-word {
    display: inline;
    transition: color 0.15s ease, font-weight 0.15s ease;
    cursor: default;
}

.lyrics-word.spoken {
    color: #b0b6c3;
}

.lyrics-word.active {
    color: #ffffff;
    font-weight: 700;
    text-shadow: 0 0 8px rgba(255,255,255,0.25);
}

/* Sections panel is now inside the flex flow, not absolute */
.player-side-panel {
    width: 230px;
    min-width: 230px;
    border-left: 1px solid var(--border);
    background: var(--bg-secondary);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.player-side-panel.hidden {
    display: none;
}

.player-side-panel-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.sections-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-icon-btn {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}

.section-icon-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.24);
}

.section-icon-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.section-icon-btn.loading i {
    animation: track-open-spin 0.8s linear infinite;
}

.section-ai-btn {
    padding: 4px 10px;
    border: 1px solid var(--accent);
    border-radius: 6px;
    background: transparent;
    color: var(--accent);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
}

.section-ai-btn:hover {
    background: var(--accent);
    color: #000;
}

.section-ai-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.section-ai-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.sections-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 32px 16px;
    color: var(--text-muted);
    font-size: 13px;
    font-style: italic;
}
.sections-loading i {
    font-size: 18px;
    color: #EEAB47;
}

.section-row.section-header-row {
    background: rgba(238, 171, 71, 0.08);
    border-bottom: 1px solid rgba(238, 171, 71, 0.2);
    padding: 8px 12px 8px 16px;
}

.section-row.section-header-row .section-name {
    color: #EEAB47;
    font-weight: 700;
    font-size: 13px;
}

.section-row .section-lyrics-preview {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
    display: block;
    margin-top: 1px;
}

.section-row .section-lyrics-preview.section-lyrics-main {
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 500;
    max-width: 220px;
    margin-top: 0;
}

.sections-list {
    flex: 1;
    overflow-y: auto;
}

.section-row {
    width: 100%;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    background: transparent;
    color: var(--text-secondary);
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    column-gap: 8px;
    align-items: center;
    padding: 12px 12px 12px 16px;
    cursor: pointer;
    text-align: left;
}

.section-check-col {
    width: 24px;
    min-width: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0;
}

.section-repeat-checkbox {
    width: 14px;
    height: 14px;
    accent-color: var(--accent);
    cursor: pointer;
}

.section-row:hover {
    background: var(--bg-hover);
}

.section-row.active {
    background: rgba(255, 255, 255, 0.08);
}

.section-row.loop-enabled .section-lyrics-main::after {
    content: '•';
    color: var(--accent);
    margin-left: 6px;
}

.section-name {
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.section-row .section-name-col {
    display: flex;
    flex-direction: column;
    min-width: 0;
    width: 100%;
}

.section-time {
    font-size: 12px;
    color: var(--text-muted);
    width: 48px;
    min-width: 48px;
    max-width: 48px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.section-row-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.section-time-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.section-capture-time-btn {
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 5px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.section-capture-time-btn:hover {
    background: var(--bg-card);
    color: var(--accent);
}

.section-actions-btn {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-actions-btn:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.section-menu {
    position: fixed;
    min-width: 140px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    z-index: 80;
    padding: 6px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.section-menu.hidden {
    display: none;
}

.section-menu-item {
    width: 100%;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-primary);
    padding: 8px 10px;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-menu-item:hover {
    background: var(--bg-hover);
}

.section-time-input-row {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 6px;
}
.section-time-input-row.hidden,
.section-lyrics-input-row.hidden {
    display: none;
}
.section-lyrics-input-row {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 6px;
}
.section-lyrics-input {
    width: 160px;
    padding: 4px 6px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-main);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 13px;
    outline: none;
}
.section-lyrics-input:focus {
    border-color: var(--accent);
}
.section-time-input {
    width: 50px;
    padding: 4px 6px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-main);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 13px;
    text-align: center;
    outline: none;
}
.section-time-input:focus {
    border-color: var(--accent);
}
.section-time-ok,
.section-time-cancel {
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
    font-size: 13px;
}
.section-time-ok:hover {
    color: var(--accent);
    background: var(--bg-hover);
}
.section-time-cancel:hover {
    color: #f44;
    background: var(--bg-hover);
}

.track-lane {
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    height: 70px;
    position: relative;
}

.track-lane.track-muted {
    opacity: 0.45;
}

.track-lane.track-hidden-by-solo {
    display: none;
}

.track-controls {
    width: 250px;
    min-width: 250px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-right: 1px solid var(--border);
    height: 100%;
    flex-shrink: 0;
}

.track-icon-slot {
    width: 22px;
    min-width: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    flex-shrink: 0;
}

.track-icon {
    display: none; /* hidden on desktop */
}

.track-controls .track-svg-icon.track-icon {
    display: block;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.track-btn {
    width: 22px;
    height: 22px;
    border-radius: 3px;
    border: 1px solid var(--border-light);
    background: none;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-family: inherit;
}

.track-btn:hover {
    border-color: var(--text-secondary);
    color: var(--text-secondary);
}

.track-btn.active-mute {
    background: var(--danger);
    border-color: var(--danger);
    color: white;
}

.track-btn.active-solo {
    background: var(--warning);
    border-color: var(--warning);
    color: #000;
}

.track-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    min-width: 100px;
    width: 100px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.track-label-text {
    min-width: 0;
}

.track-volume-container {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.track-volume {
    -webkit-appearance: none;
    appearance: none;
    width: 60px;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

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

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

.track-pan-knob {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--border-light);
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
}

.track-pan-knob::after {
    content: '';
    width: 2px;
    height: 8px;
    background: var(--text-muted);
    border-radius: 1px;
    position: absolute;
    top: 4px;
}

.track-waveform-container {
    flex: 1;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.track-waveform {
    width: 100%;
    height: 100%;
    display: block;
}

/* ========== PLAYER CONTROLS ========== */
.player-controls {
    border-top: 1px solid var(--border);
    padding: 16px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    background: var(--bg-secondary);
    position: relative;
}

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

.volume-control {
    position: relative;
    display: flex;
    align-items: center;
}

.volume-popover {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px;
    min-width: 150px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    z-index: 40;
}

.volume-popover.hidden {
    display: none;
}

.volume-slider {
    -webkit-appearance: none;
    appearance: none;
    flex: 1;
    height: 4px;
    background: var(--border);
    border-radius: 999px;
    outline: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--text-primary);
    border: none;
}

.volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--text-primary);
    border: none;
}

.volume-value {
    font-size: 11px;
    color: var(--text-muted);
    min-width: 36px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.control-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover {
    color: var(--text-primary);
}

.control-btn.active-loop {
    color: var(--accent);
}

.speed-btn {
    font-size: 13px;
    font-weight: 700;
    font-family: inherit;
    min-width: 36px;
}
.speed-btn.speed-active {
    color: var(--accent);
}

.repeat-mode-btn {
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-secondary);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.repeat-mode-btn:hover {
    color: var(--text-primary);
    border-color: var(--text-muted);
}

.repeat-mode-btn.active {
    border-color: var(--accent);
    color: var(--accent);
}

.play-btn {
    background: var(--text-primary) !important;
    color: var(--bg-primary) !important;
    font-size: 16px;
    width: 44px;
    height: 44px;
}

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

.timeline {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 600px;
}

.time-current, .time-total {
    font-size: 12px;
    color: var(--text-muted);
    min-width: 40px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.timeline-slider {
    -webkit-appearance: none;
    appearance: none;
    flex: 1;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.timeline-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--text-primary);
    cursor: pointer;
}

.timeline-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--text-primary);
    cursor: pointer;
    border: none;
}

.controls-right {
    position: absolute;
    right: 24px;
    top: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 44px;
}

/* Controls-right no longer needs offset for sections panel */

.btn-feature {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-feature:hover {
    border-color: var(--text-muted);
    color: var(--text-primary);
}

.btn-feature.active {
    background: var(--text-primary);
    color: var(--bg-primary);
    border-color: var(--text-primary);
}

.btn-feature.pro-locked {
    opacity: 0.65;
    cursor: pointer;
    border-style: dashed;
}

.btn-feature.pro-locked::after {
    content: 'PRO';
    font-size: 9px;
    font-weight: 700;
    margin-left: 6px;
    color: #000;
    background: var(--accent);
    border-radius: 4px;
    padding: 1px 5px;
    line-height: 1.3;
}

/* ========== LIBRARY PAGE ========== */
.library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.library-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.library-card:hover {
    background: var(--bg-hover);
    transform: translateY(-2px);
}

.library-card-thumb {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    background: var(--bg-active);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    font-size: 32px;
    color: var(--accent);
}

.library-card-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.library-card-artist {
    font-size: 12px;
    color: var(--text-muted);
}

.library-separation-inline {
    margin-top: 10px;
}

.library-separation-inline > span {
    display: block;
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.library-separation-progress {
    width: 100%;
    height: 6px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255,255,255,0.1);
}

.library-separation-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #EEAB47 0%, #EEAB47 100%);
    transition: width 0.25s ease;
}

.library-separation-inline.failed {
    color: #ff7e7e;
    font-size: 11px;
}

/* ========== EMPTY STATE ========== */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
}

.empty-state p {
    color: var(--text-muted);
    font-size: 16px;
    margin-bottom: 20px;
}

/* ========== CREATE MUSIC PLACEHOLDER ========== */
.create-music-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 16px;
}

/* ========== CREATE MUSIC PAGE ========== */
.create-music-container {
    max-width: 720px;
    margin: 0 auto;
    padding: 40px 20px 80px;
    position: relative;
}
.create-music-header {
    text-align: center;
    margin-bottom: 16px;
    padding-top: 48px;
}
.create-music-title {
    font-size: 32px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}
.create-music-subtitle {
    font-size: 15px;
    color: var(--text-muted);
}

#page-feed .create-music-header,
#page-my-creations .create-music-header {
    padding-top: 56px;
}

/* Top bar: Profile + Credits */
.create-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    z-index: 10;
}
.create-profile-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 20px;
    padding: 4px 12px 4px 4px;
    color: var(--text);
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: background 0.2s;
}
.create-profile-btn:hover {
    background: rgba(255,255,255,0.14);
}
.create-profile-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #fff;
    overflow: hidden;
}
.create-profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
.create-profile-name {
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Credits Display */
.create-credits-display {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 16px;
    background: rgba(238, 171, 71, 0.15);
    color: #EEAB47;
    font-size: 11px;
    font-weight: 600;
    margin: 0;
    cursor: pointer;
}
.create-credits-display i {
    font-size: 11px;
}
.create-credits-buy-btn {
    background: none;
    border: none;
    color: #EEAB47;
    cursor: pointer;
    font-size: 13px;
    padding: 0 0 0 2px;
    transition: color 0.2s;
}
.create-credits-buy-btn:hover {
    color: #EEAB47;
}

/* Credit Packages */
.credit-packages {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.credit-package {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-radius: 12px;
    border: 2px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.03);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}
.credit-package:hover {
    border-color: rgba(238, 171, 71, 0.4);
}
.credit-package-selected {
    border-color: #EEAB47;
    background: rgba(238, 171, 71, 0.08);
}
.credit-pkg-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.credit-pkg-amount {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}
.credit-pkg-gens {
    font-size: 12px;
    color: var(--text-muted);
}
.credit-pkg-price {
    font-size: 18px;
    font-weight: 700;
    color: #EEAB47;
}
.credit-pkg-badge {
    position: absolute;
    top: -8px;
    right: 12px;
    background: #2ecc40;
    color: #000;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 8px;
    text-transform: uppercase;
}

/* Tabs */
.create-tabs-row {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.create-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.15);
    background: transparent;
    color: #ccc;
    font-size: 13px;
    cursor: pointer;
    transition: all .2s;
    position: relative;
    white-space: nowrap;
}
.create-tab:hover {
    border-color: var(--accent);
    color: #fff;
}
.create-tab.active {
    background: rgba(240, 160, 48, 0.15);
    border-color: var(--accent);
    color: var(--accent);
}
.create-pro-badge {
    font-size: 9px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 4px;
    background: var(--accent);
    color: #000;
    position: absolute;
    top: -6px;
    right: -4px;
}

/* Panels */
.create-panel {
    margin-bottom: 20px;
}
.create-panel.hidden {
    display: none;
}

/* Textarea */
.create-textarea-wrap {
    position: relative;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    background: rgba(255,255,255,0.04);
    margin-bottom: 12px;
    transition: border-color .2s;
}
.create-textarea-wrap:focus-within {
    border-color: var(--accent);
}
.create-textarea-wrap textarea {
    width: 100%;
    min-height: 140px;
    padding: 16px;
    padding-bottom: 32px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    outline: none;
    box-sizing: border-box;
}
.create-textarea-wrap textarea::placeholder {
    color: rgba(255,255,255,0.35);
}
.create-char-counter {
    position: absolute;
    right: 14px;
    bottom: 10px;
    font-size: 11px;
    color: rgba(255,255,255,0.3);
}

/* Lyrics toolbar row (Minhas Letras + Sugestão de IA side by side) */
.lyrics-toolbar-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

/* AI Lyrics Suggestion Button */
.ai-lyrics-suggest-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.ai-lyrics-suggest-btn:hover,
.ai-lyrics-suggest-btn:active {
    background: rgba(240, 160, 48, 0.15);
    border-color: var(--accent);
    color: var(--accent);
}
.ai-lyrics-suggest-btn i {
    font-size: 14px;
}

/* AI Lyrics Modal */
.ai-lyrics-modal-content {
    max-width: 560px !important;
    max-height: 90vh !important;
}
.ai-lyrics-intro {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 16px;
    line-height: 1.5;
}
.ai-lyrics-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    margin-top: 14px;
}
.ai-lyrics-label:first-of-type {
    margin-top: 0;
}
.ai-lyrics-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    background: rgba(255,255,255,0.04);
    color: #fff;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
.ai-lyrics-input:focus {
    border-color: var(--accent);
}
.ai-lyrics-input::placeholder {
    color: rgba(255,255,255,0.3);
}
.ai-lyrics-input-wrap {
    position: relative;
    width: 100%;
}
.ai-lyrics-input-wrap .ai-lyrics-input {
    padding-right: 44px;
}
.ai-lyrics-mic-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.6);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.ai-lyrics-mic-btn:hover {
    background: rgba(255,255,255,0.14);
    color: #fff;
}
.ai-lyrics-mic-btn.recording {
    background: #e0245e;
    color: #fff;
    animation: mic-pulse 1s infinite;
}
.ai-lyrics-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.ai-lyrics-chip {
    padding: 6px 14px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 20px;
    background: rgba(255,255,255,0.04);
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}
.ai-lyrics-chip:hover {
    background: rgba(255,255,255,0.08);
}
.ai-lyrics-chip.selected {
    border-color: var(--accent);
    background: rgba(240, 160, 48, 0.15);
    color: var(--accent);
}
.ai-lyrics-preview-textarea {
    width: 100%;
    min-height: 280px;
    padding: 14px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px;
    color: #fff;
    font-size: 14px;
    font-family: inherit;
    line-height: 1.7;
    resize: vertical;
    outline: none;
    box-sizing: border-box;
}
.ai-lyrics-preview-textarea:focus {
    border-color: var(--accent);
}

/* Options Row */
.create-options-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    padding: 10px 12px;
    background: rgba(255,255,255,0.04);
}
.create-option-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.05);
    font-size: 13px;
    color: #ccc;
    white-space: nowrap;
}
.create-option-pill select,
.create-option-pill input {
    background: transparent;
    border: none;
    color: #ccc;
    font-size: 13px;
    outline: none;
    cursor: pointer;
    font-family: inherit;
}
.create-option-pill select option {
    background: var(--bg-primary);
    color: #fff;
}
.create-option-pill .option-flag {
    font-size: 16px;
}
.create-genre-pill {
    flex: 1;
    min-width: 160px;
    position: relative;
}
.create-genre-pill input {
    flex: 1;
    min-width: 80px;
}
.create-genre-tags {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}
.create-genre-tag {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 12px;
    background: var(--accent);
    color: #000;
    font-size: 11px;
    font-weight: 600;
}
.create-genre-tag .remove-tag {
    cursor: pointer;
    font-size: 10px;
    opacity: 0.7;
}
.create-genre-tag .remove-tag:hover {
    opacity: 1;
}
.create-genre-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    max-height: 180px;
    overflow-y: auto;
    z-index: 50;
    margin-top: 4px;
}
.create-genre-dropdown.hidden {
    display: none;
}
.create-genre-dropdown-item {
    padding: 8px 14px;
    font-size: 13px;
    color: #ccc;
    cursor: pointer;
}
.create-genre-dropdown-item:hover {
    background: rgba(240, 160, 48, 0.15);
    color: #fff;
}

/* Wizard */
.wizard-step {
    text-align: center;
    padding: 20px 0;
}
.wizard-step.hidden {
    display: none;
}
.wizard-question {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 20px;
}
.wizard-input {
    width: 100%;
    padding: 14px 18px;
    padding-right: 48px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.04);
    color: #fff;
    font-size: 15px;
    outline: none;
    font-family: inherit;
    box-sizing: border-box;
}
.wizard-input:focus {
    border-color: var(--accent);
}
.wizard-input::placeholder {
    color: rgba(255,255,255,0.35);
}
.wizard-input-wrap {
    position: relative;
    width: 100%;
}
.wizard-topic-textarea {
    resize: none;
    min-height: 120px;
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
}
.wizard-mic-btn {
    position: absolute;
    right: 8px;
    top: 12px;
    transform: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.6);
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.wizard-mic-btn:hover {
    background: rgba(255,255,255,0.14);
    color: #fff;
}
.wizard-mic-btn.recording {
    background: #e0245e;
    color: #fff;
    animation: mic-pulse 1s infinite;
}
@keyframes mic-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(224,36,94,0.4); }
    50% { box-shadow: 0 0 0 8px rgba(224,36,94,0); }
}
.wizard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    max-width: 500px;
    margin: 0 auto;
}
.wizard-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 10px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.04);
    color: #ccc;
    font-size: 13px;
    cursor: pointer;
    transition: all .2s;
}
.wizard-option i {
    font-size: 22px;
}
.wizard-option:hover {
    border-color: var(--accent);
    color: #fff;
}
.wizard-option.selected {
    border-color: var(--accent);
    background: rgba(240, 160, 48, 0.15);
    color: var(--accent);
}
.wizard-option-outro {
    border-style: dashed;
}

/* Expanded genre list */
.wizard-genre-expanded {
    max-width: 600px;
    margin: 16px auto 0;
    max-height: 260px;
    overflow-y: auto;
    padding: 12px;
    border-radius: 12px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
}
.wizard-genre-expanded-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.wizard-genre-tag {
    padding: 6px 14px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.05);
    color: #bbb;
    font-size: 13px;
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
}
.wizard-genre-tag:hover {
    border-color: rgba(240,160,48,0.5);
    color: #fff;
}
.wizard-genre-tag.selected {
    border-color: var(--accent);
    background: rgba(240,160,48,0.2);
    color: var(--accent);
    font-weight: 600;
}

.wizard-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.08);
}
.wizard-back-btn, .wizard-next-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 8px;
    border: none;
    font-size: 13px;
    cursor: pointer;
    transition: all .2s;
}
.wizard-back-btn {
    background: transparent;
    color: #ccc;
    border: 1px solid rgba(255,255,255,0.15);
}
.wizard-back-btn:hover {
    color: #fff;
    border-color: rgba(255,255,255,0.3);
}
.wizard-back-btn.hidden {
    visibility: hidden;
}
.wizard-next-btn {
    background: var(--accent);
    color: #000;
    font-weight: 600;
}
.wizard-next-btn:hover {
    filter: brightness(1.1);
}
.wizard-dots {
    display: flex;
    gap: 6px;
}
.wizard-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    transition: background .2s;
}
.wizard-dot.active {
    background: var(--accent);
}

/* Create Button */
.btn-create-song {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 280px;
    margin: 28px auto 0;
    padding: 14px 32px;
    border-radius: 30px;
    border: none;
    background: var(--accent);
    color: #000;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s;
}
.btn-create-song:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}
.btn-create-song:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Progress */
.create-progress {
    text-align: center;
    padding: 32px 0;
}
.create-progress.hidden {
    display: none;
}
.create-spinner {
    font-size: 36px;
    color: var(--accent);
    margin-bottom: 16px;
}
.create-progress-text {
    color: #ccc;
    font-size: 14px;
    margin-bottom: 16px;
}
.create-progress-bar-wrap {
    width: 100%;
    max-width: 400px;
    height: 6px;
    border-radius: 3px;
    background: rgba(255,255,255,0.1);
    margin: 0 auto;
    overflow: hidden;
}
.create-progress-bar {
    height: 100%;
    border-radius: 3px;
    background: var(--accent);
    width: 0%;
    transition: width .4s ease;
}

/* Result */
.create-result {
    padding: 20px 0;
}
.create-result.hidden {
    display: none;
}
.create-result-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: 12px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 16px;
}
.create-result-art {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #000;
    flex-shrink: 0;
}
.create-result-info h3 {
    font-size: 16px;
    color: #fff;
    margin-bottom: 4px;
}
.create-result-info p {
    font-size: 12px;
    color: var(--text-muted);
}
.create-audio-player {
    width: 100%;
    height: 48px;
    border-radius: 8px;
    margin-bottom: 16px;
}
.create-result-lyrics-box {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    max-height: 300px;
    overflow-y: auto;
}
.create-result-lyrics-box.hidden {
    display: none;
}
.create-result-lyrics-box h4 {
    font-size: 14px;
    color: var(--accent);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.create-result-lyrics-box pre {
    font-size: 13px;
    color: #ccc;
    white-space: pre-wrap;
    font-family: inherit;
    line-height: 1.6;
    margin: 0;
}
.saved-lyrics-toolbar {
    margin-bottom: 10px;
}
.saved-lyrics-open-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.05);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}
.saved-lyrics-open-btn:hover,
.saved-lyrics-open-btn:active {
    background: rgba(240, 160, 48, 0.15);
    border-color: var(--accent);
    color: var(--accent);
}
.saved-lyrics-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}
.saved-lyrics-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid rgba(240, 160, 48, 0.55);
    background: rgba(240, 160, 48, 0.08);
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}
.saved-lyrics-action-btn:hover {
    background: rgba(240, 160, 48, 0.16);
    border-color: var(--accent);
}
/* Saved Lyrics Modal */
.saved-lyrics-modal-content {
    max-width: 520px;
    max-height: 85vh;
}
.saved-lyrics-modal-content .modal-body {
    padding: 16px;
    overflow-y: auto;
    max-height: calc(85vh - 56px);
}
.saved-lyrics-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.saved-lyrics-empty {
    text-align: center;
    color: #888;
    padding: 32px 0;
    font-size: 14px;
}
.saved-lyrics-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    cursor: pointer;
    transition: all 0.18s;
}
.saved-lyrics-card:hover {
    background: rgba(240, 160, 48, 0.08);
    border-color: rgba(240, 160, 48, 0.35);
}
.saved-lyrics-card-icon {
    font-size: 20px;
    color: var(--accent);
    flex-shrink: 0;
}
.saved-lyrics-card-info {
    flex: 1;
    min-width: 0;
}
.saved-lyrics-card-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.saved-lyrics-row-btn {
    width: 30px;
    height: 30px;
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 8px;
    background: rgba(255,255,255,0.03);
    color: #8ea0b4;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}
.saved-lyrics-row-btn i {
    pointer-events: none;
    font-size: 12px;
}
.saved-lyrics-row-btn:hover {
    color: var(--accent);
    border-color: rgba(240, 160, 48, 0.55);
    background: rgba(240, 160, 48, 0.12);
}
.saved-lyrics-row-delete:hover {
    color: #ff6b6b;
    border-color: rgba(255, 107, 107, 0.5);
    background: rgba(255, 107, 107, 0.12);
}
.saved-lyrics-card-title {
    font-size: 14px;
    font-weight: 600;
    color: #eee;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.saved-lyrics-card-preview {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.saved-lyrics-card-arrow {
    color: #666;
    font-size: 14px;
    flex-shrink: 0;
}
/* Edit view */
.saved-lyrics-edit-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.saved-lyrics-back-btn {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 14px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.15s;
}
.saved-lyrics-back-btn:hover {
    background: rgba(240, 160, 48, 0.12);
}
.saved-lyrics-edit-title {
    font-size: 15px;
    font-weight: 600;
    color: #eee;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.saved-lyrics-edit-title-input {
    flex: 1;
    min-width: 0;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 8px;
    background: rgba(255,255,255,0.04);
    color: #eee;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 10px;
    outline: none;
}
.saved-lyrics-edit-title-input:focus {
    border-color: var(--accent);
}
.saved-lyrics-edit-textarea {
    width: 100%;
    min-height: 200px;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(0,0,0,0.25);
    color: #e0e0e0;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    font-family: inherit;
    box-sizing: border-box;
}
.saved-lyrics-edit-textarea:focus {
    border-color: var(--accent);
    outline: none;
}
.saved-lyrics-edit-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}
.saved-lyrics-use-btn,
.saved-lyrics-save-edit-btn {
    flex: 1;
    min-width: 120px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}
.saved-lyrics-use-btn {
    border: 1px solid rgba(240, 160, 48, 0.55);
    background: rgba(240, 160, 48, 0.10);
    color: var(--accent);
}
.saved-lyrics-use-btn:hover {
    background: rgba(240, 160, 48, 0.22);
}
.saved-lyrics-save-edit-btn {
    border: 1px solid rgba(76, 175, 80, 0.55);
    background: rgba(76, 175, 80, 0.10);
    color: #4caf50;
}
.saved-lyrics-save-edit-btn:hover {
    background: rgba(76, 175, 80, 0.22);
}
.saved-lyrics-delete-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid rgba(244, 67, 54, 0.45);
    background: rgba(244, 67, 54, 0.08);
    color: #f44336;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}
.saved-lyrics-delete-btn:hover {
    background: rgba(244, 67, 54, 0.18);
}
.saved-lyrics-select {
    width: 100%;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.06);
    color: #ccc;
    font-size: 13px;
    cursor: pointer;
    appearance: auto;
}
.saved-lyrics-select:focus {
    border-color: var(--accent);
    outline: none;
}
.saved-lyrics-select option {
    background: #ffffff;
    color: #1a2b3d;
}
.create-result-actions-primary {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}
.create-result-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}
.btn-save-created {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 10px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    background: var(--accent);
    color: #000;
}
.btn-save-created:hover {
    filter: brightness(1.1);
}
.btn-save-lyrics {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.15);
    background: transparent;
    color: #aaa;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all .2s;
    margin-left: 12px;
    vertical-align: middle;
}
.btn-save-lyrics:hover {
    color: var(--accent);
    border-color: var(--accent);
}
.btn-save-lyrics.saved {
    color: var(--accent);
    border-color: var(--accent);
}
.btn-create-variation {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 20px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.15);
    background: transparent;
    color: #ccc;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    flex: 1;
    max-width: 200px;
    text-align: center;
    line-height: 1.3;
}
.btn-create-variation small {
    font-size: 11px;
    font-weight: 400;
    opacity: 0.7;
}
.btn-create-variation:hover {
    color: #fff;
    border-color: rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.05);
}

/* Mobile responsive */
@media (max-width: 600px) {
    .create-music-container {
        padding: 20px 14px 80px;
    }
    .create-music-header {
        margin-bottom: 6px;
    }
    .create-music-title {
        font-size: 24px;
        margin-bottom: 2px;
    }
    .create-music-subtitle {
        display: none;
    }
    .create-tabs-row {
        gap: 6px;
        margin-bottom: 16px;
        flex-wrap: nowrap;
    }
    .create-tab {
        padding: 8px 14px;
        font-size: 13px;
        gap: 5px;
    }
    .wizard-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    .wizard-option {
        padding: 10px 4px;
        font-size: 11px;
        gap: 4px;
    }
    .wizard-option i {
        font-size: 18px;
    }
    .create-options-row {
        flex-direction: column;
    }
    .create-result-actions {
        flex-direction: column;
    }
    .btn-save-created {
        justify-content: center;
        width: 100%;
    }
    .btn-create-variation {
        max-width: none;
    }
}

/* ========== MODAL ========== */
.modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.7);
}

.modal-content {
    position: relative;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
}

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

.modal-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.btn-close-modal {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
}

.btn-close-modal:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
}

.library-download-modal {
    max-width: 420px;
}

.library-download-modal-text {
    margin: 0 0 14px;
    color: var(--text-secondary);
    font-size: 14px;
}

.library-download-modal-actions {
    display: grid;
    gap: 10px;
}

.library-download-modal-actions .btn-primary,
.library-download-modal-actions .btn-outline {
    width: 100%;
    justify-content: center;
}

.text-modal-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-main);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    outline: none;
}

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

.text-modal-select {
    -webkit-appearance: none;
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, rgba(148, 163, 184, 0.9) 50%),
        linear-gradient(135deg, rgba(148, 163, 184, 0.9) 50%, transparent 50%);
    background-position: calc(100% - 18px) calc(50% - 3px), calc(100% - 12px) calc(50% - 3px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 42px;
    background-color: var(--bg-main);
    color: var(--text-primary);
}

.text-modal-select option {
    background: #0f2742;
    color: #e5edf8;
}

.text-modal-select option:checked {
    background: #15406b;
    color: #ffffff;
}

.metadata-modal-grid {
    display: grid;
    gap: 12px;
}

.metadata-modal-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.metadata-modal-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

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

.cloud-import-modal-body {
    display: grid;
    gap: 14px;
}

.cloud-import-modal-content {
    max-width: 520px;
}

.cloud-import-copy {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.5;
}

.cloud-import-note {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-muted);
}

.cloud-import-error {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 107, 107, 0.35);
    background: rgba(127, 29, 29, 0.35);
    color: #fecaca;
    font-size: 13px;
    line-height: 1.45;
}

.cloud-import-error.hidden {
    display: none;
}

.cloud-import-results {
    max-height: 340px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
    border-radius: 10px;
    padding: 4px;
}

.cloud-import-results.hidden {
    display: none;
}

.cloud-import-searching {
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    padding: 16px 0;
    margin: 0;
}

.cloud-import-no-results {
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    padding: 16px 0;
    margin: 0;
}

.cloud-search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
}

.cloud-search-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.cloud-search-item.selected {
    background: var(--accent-light, rgba(238, 171, 71, 0.12));
    box-shadow: 0 0 0 1.5px var(--accent, #EEAB47);
}

.cloud-search-thumb {
    width: 56px;
    height: 42px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.05);
}

.cloud-search-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

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

.cloud-search-meta {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Cache compartilhado badge */
.cloud-cache-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    font-weight: 600;
    color: #22c55e;
    background: rgba(34, 197, 94, 0.12);
    border-radius: 4px;
    padding: 1px 6px;
    vertical-align: middle;
    white-space: nowrap;
}

.cloud-cache-badge i {
    font-size: 9px;
}

.cloud-search-item.cached {
    border-left: 2px solid rgba(34, 197, 94, 0.5);
}

.export-options h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-secondary);
}

.format-options {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
}

.radio-option {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.radio-option:hover {
    border-color: var(--text-muted);
}

.radio-option.selected {
    border-color: var(--accent);
    background: var(--accent-light);
}

.radio-option input {
    accent-color: var(--accent);
}

.export-track-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.export-track-item input {
    accent-color: var(--accent);
    width: 16px;
    height: 16px;
}

.export-track-item label {
    font-size: 14px;
    cursor: pointer;
}

/* ========== TOAST ========== */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    z-index: 2000;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    animation: toast-in 0.3s ease;
}

.toast.hidden {
    display: none;
}

.toast i {
    color: var(--accent);
}

.track-open-loader {
    position: fixed;
    inset: 0;
    background: rgba(5, 16, 32, 0.78);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2500;
}

.track-open-loader.hidden {
    display: none;
}

.track-open-loader-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: rgba(10, 34, 61, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 16px 20px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.35);
    min-width: 240px;
}

.track-open-loader-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.track-open-loader-spinner {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(240, 160, 48, 0.35);
    border-top-color: var(--accent);
    animation: track-open-spin 0.8s linear infinite;
    margin-top: 2px;
    flex-shrink: 0;
}

.track-open-loader-progress {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.track-open-loader-progress-bar {
    height: 100%;
    width: 0%;
    background: var(--accent);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.track-open-loader-detail {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 400;
}

@keyframes track-open-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* ========== RESPONSIVE ========== */
/* ========== MOBILE-ONLY ELEMENTS (hidden on desktop) ========== */

/* Plans Modal */
.plans-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    backdrop-filter: blur(4px);
}
.plans-modal {
    background: var(--bg-primary);
    border-radius: 20px;
    padding: 36px 32px;
    max-width: 820px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    border: 1px solid var(--border);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.plans-modal-v2 {
    max-width: 440px;
}
.plans-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 8px;
    transition: background 0.2s;
}
.plans-modal-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}
.plans-modal-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 24px;
    text-align: center;
}
@media (max-width: 768px) {
    .plans-modal {
        padding: 24px 16px;
        max-height: 95vh;
    }
}

/* Plans Page */
.plans-page-container {
    padding: 24px;
    max-width: 800px;
    margin: 0 auto;
}
.plans-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
@media (max-width: 768px) {
    .plans-grid {
        grid-template-columns: 1fr;
    }
}
.plan-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px 24px;
    position: relative;
}
.plan-card-pro {
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(255, 179, 0, 0.15);
}
.plan-badge-popular {
    position: absolute;
    top: -12px;
    right: 20px;
    background: var(--accent);
    color: #000;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.plan-badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    background: var(--bg-tertiary, #1e293b);
    color: var(--text-secondary);
    letter-spacing: 1px;
}
.plan-badge-pro {
    background: var(--accent);
    color: #000;
}
.plan-price {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 16px 0 4px;
}
.plan-price-cents {
    font-size: 20px;
    vertical-align: super;
}
.plan-price-period {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-muted);
}
.plan-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
}
.plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
}
.plan-features li {
    padding: 6px 0;
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.feature-yes i {
    color: #22c55e;
    width: 16px;
    text-align: center;
}
.feature-no i {
    color: #ef4444;
    width: 16px;
    text-align: center;
}
.feature-no {
    opacity: 0.5;
}
.plan-btn {
    width: 100%;
    padding: 14px;
    border-radius: 10px;
    border: none;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 8px;
    transition: opacity 0.2s;
}
.plan-btn:hover { opacity: 0.9; }
.plan-btn-current {
    background: var(--bg-tertiary, #1e293b);
    color: var(--text-muted);
    cursor: default;
}
.plan-btn-pro {
    background: var(--accent);
    color: #000;
}
.plan-btn-pix {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

/* Plans Modal V2 — Vertical Layout */
.plans-title-highlight {
    color: var(--accent);
}
.plan-features-v2 {
    margin-bottom: 24px;
    padding-left: 0;
}
.plan-features-v2 li {
    padding: 5px 0;
    font-size: 14px;
}
.plan-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}
.plan-option {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: 14px;
    padding: 18px 20px;
    cursor: pointer;
    position: relative;
    transition: border-color 0.2s, background 0.2s;
}
.plan-option:hover {
    border-color: var(--accent);
}
.plan-option-selected {
    border-color: var(--accent);
    background: rgba(255, 179, 0, 0.06);
}
.plan-option-radio {
    width: 22px;
    height: 22px;
    min-width: 22px;
    border-radius: 50%;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s;
}
.plan-option-selected .plan-option-radio {
    border-color: var(--accent);
}
.plan-option-radio-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: transparent;
    transition: background 0.2s;
}
.plan-option-selected .plan-option-radio-dot {
    background: var(--accent);
}
.plan-option-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}
.plan-option-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}
.plan-option-price {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
}
.plan-option-price .plan-price-period {
    font-size: 14px;
    font-weight: 400;
}
.plan-option-sub {
    font-size: 12px;
    color: var(--text-muted);
}
.plan-option-discount {
    background: #22c55e;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    white-space: nowrap;
}
.plan-cta-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.plan-cta-note {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    margin: 4px 0 0;
}

/* Coupon Section */
.plan-coupon-section {
    text-align: center;
    margin-top: 4px;
}

.plan-coupon-toggle {
    color: var(--text-muted);
    font-size: 13px;
    text-decoration: none;
    cursor: pointer;
}

.plan-coupon-toggle:hover {
    color: var(--accent);
    text-decoration: underline;
}

.plan-coupon-form {
    margin-top: 10px;
}

.plan-coupon-input-row {
    display: flex;
    gap: 8px;
}

.plan-coupon-input {
    flex: 1;
    padding: 9px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    text-transform: uppercase;
}

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

.plan-coupon-btn {
    padding: 9px 16px;
    border-radius: 8px;
    border: 1px solid var(--accent);
    background: transparent;
    color: var(--accent);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.plan-coupon-btn:hover {
    background: rgba(255, 179, 0, 0.1);
}

.plan-coupon-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.plan-coupon-msg {
    font-size: 13px;
    margin-top: 8px;
    padding: 8px 10px;
    border-radius: 8px;
}

.plan-coupon-success {
    background: rgba(34, 197, 94, 0.12);
    color: #4ade80;
}

.plan-coupon-error {
    background: rgba(255, 85, 85, 0.12);
    color: #ff7777;
}

/* Profile Plan Section */
.profile-plan-section {
    width: 100%;
    max-width: 320px;
    margin-top: 16px;
}
.profile-plan-card {
    background: var(--bg-tertiary, #1e293b);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}
.profile-plan-card.plan-pro {
    border: 1px solid var(--accent);
}
.profile-plan-label {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}
.profile-plan-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin: 8px 0;
}
.profile-upgrade-btn {
    margin-top: 8px;
    padding: 10px 24px;
    border-radius: 8px;
    border: none;
    background: var(--accent);
    color: #000;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}
.profile-upgrade-btn:hover { opacity: 0.9; }

/* Locked Stem PRO badge */
.stem-pro-badge {
    display: inline-block;
    background: var(--accent);
    color: #000;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
    margin-left: 0;
    cursor: pointer;
    vertical-align: middle;
    letter-spacing: 0.5px;
}
.track-lane-locked {
    opacity: 1;
    pointer-events: none;
}
.track-lane-locked .stem-pro-badge {
    pointer-events: auto;
    opacity: 1;
}
.track-lane-locked .track-btn,
.track-lane-locked .track-volume,
.track-lane-locked .track-pan-knob {
    opacity: 1;
}

/* PIX Modal */
.pix-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pix-modal {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 32px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    position: relative;
}
.pix-modal h3 {
    color: var(--text-primary);
    margin: 0 0 16px;
}
.pix-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
}
.pix-qr-img {
    width: 200px;
    height: 200px;
    margin: 0 auto 16px;
    display: block;
    border-radius: 8px;
}
.pix-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.pix-code-box {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}
.pix-code-input {
    flex: 1;
    background: var(--bg-tertiary, #1e293b);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px;
    color: var(--text-primary);
    font-size: 11px;
}
.pix-copy-btn {
    padding: 10px 16px;
    background: var(--accent);
    color: #000;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.pix-status {
    font-size: 14px;
    color: var(--accent);
}

/* Profile Page */
.profile-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 24px;
    gap: 8px;
}
.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--bg-tertiary, #1e293b);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.profile-name {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}
.profile-email {
    font-size: 14px;
    color: var(--text-muted);
}
.profile-role-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    background: var(--bg-tertiary, #1e293b);
    color: var(--text-secondary);
    margin-top: 4px;
}
.profile-role-badge.role-admin {
    background: var(--accent);
    color: #000;
}
.profile-admin-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding: 8px 18px;
    border-radius: 8px;
    background: rgba(245,166,35,0.12);
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}
.profile-admin-link:hover {
    background: rgba(245,166,35,0.22);
}
.profile-admin-link.hidden {
    display: none;
}
.profile-actions {
    margin-top: 32px;
    width: 100%;
    max-width: 320px;
}
.profile-logout-btn {
    width: 100%;
    padding: 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: transparent;
    color: #ef4444;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background 0.2s;
}
.profile-logout-btn:hover {
    background: rgba(239, 68, 68, 0.1);
}
.profile-app-info {
    margin-top: 48px;
    font-size: 12px;
    color: var(--text-muted);
    opacity: 0.5;
}

.mobile-bottom-nav,
.mobile-player-nav {
    display: none;
}

.mobile-chord-bar,
.mobile-instrument-chips {
    display: none;
}

.mobile-key-sheet-overlay,
.mobile-key-sheet {
    display: none;
}

.mobile-key-btn {
    display: none;
}

.mobile-clef-icon {
    display: none;
}

@media (max-width: 768px) {

    /* ==========================================================
       MOBILE REDESIGN — Competitor-style layout
       ========================================================== */

    /* --- Hide desktop sidebar completely --- */
    .sidebar {
        display: none !important;
    }
    .main-content {
        width: 100% !important;
        margin-left: 0 !important;
        padding-bottom: 60px; /* space for bottom nav */
    }
    /* When player is active, lock main-content scroll to prevent address bar resize */
    body.player-active .main-content {
        overflow: hidden;
        padding-bottom: 0;
    }

    /* --- Mobile bottom navigation bar --- */
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 56px;
        background: var(--bg-primary);
        border-top: 1px solid var(--border);
        z-index: 1000;
        align-items: center;
        justify-content: space-around;
        padding: 0;
    }
    .mobile-nav-tab {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        background: none;
        border: none;
        color: var(--text-muted);
        font-size: 10px;
        font-family: inherit;
        cursor: pointer;
        padding: 6px 16px;
        transition: color 0.2s;
        position: relative;
    }
    .mobile-nav-tab i {
        font-size: 20px;
    }
    .mobile-nav-tab.active {
        color: var(--accent);
    }

    /* --- Mobile player bottom nav (Cifra/Acordes/Seções) --- */
    .mobile-player-nav {
        display: none; /* shown via JS when player is active */
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 50px;
        background: var(--bg-primary);
        border-top: 1px solid var(--border);
        z-index: 1001;
        align-items: center;
        justify-content: space-around;
        padding: 0;
    }
    .mobile-player-nav.visible {
        display: flex;
    }
    .mobile-player-tab {
        display: flex;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        color: var(--text-muted);
        font-size: 22px;
        cursor: pointer;
        padding: 8px 24px;
        border-radius: 20px;
        transition: all 0.2s;
        font-family: inherit;
    }
    .mobile-player-tab.active {
        color: var(--accent);
        background: rgba(240, 160, 48, 0.12);
    }

    .mobile-player-tab.pro-locked {
        opacity: 0.65;
    }

    /* When player is active, hide main bottom nav */
    body.player-active .mobile-bottom-nav {
        display: none;
    }
    body.player-active .mobile-player-nav {
        display: flex;
    }

    /* ==========================================================
       LIBRARY PAGE — List-style (like competitor)
       ========================================================== */

    .page-header {
        padding: 16px 16px 8px;
        align-items: center;
    }
    .page-header h1 {
        font-size: 24px;
        font-weight: 700;
    }
    .header-actions {
        flex-direction: row;
        gap: 8px;
        margin-top: 0;
    }
    .search-box {
        display: none; /* hide inline search, show icon in header */
    }
    /* Mobile search icon */
    .page-header .header-actions .search-box {
        display: none;
    }

    .btn-primary {
        padding: 10px 16px;
        font-size: 13px;
        border-radius: 20px;
    }

    .filter-tabs {
        display: none; /* hide tabs, use sort-bar for count */
    }
    .sort-bar {
        padding: 8px 16px;
        font-size: 13px;
    }
    .music-count {
        font-size: 13px;
    }

    /* Table → List view */
    .table-header {
        display: none;
    }
    .tracks-table {
        padding: 0;
    }
    .track-row {
        display: flex !important;
        align-items: center;
        padding: 10px 16px;
        gap: 12px;
        border-bottom: 1px solid rgba(255,255,255,0.06);
        grid-template-columns: none !important;
    }
    .col-check {
        display: none;
    }
    .col-title {
        flex: 1;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 12px;
        min-width: 0;
    }
    .track-thumb {
        width: 44px;
        height: 44px;
        border-radius: 8px;
        flex-shrink: 0;
    }
    .track-title-text {
        font-size: 15px;
        font-weight: 500;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .col-artist {
        display: none;
    }
    .col-genre, .col-bpm, .col-key, .col-duration {
        display: none;
    }
    .col-actions {
        flex-shrink: 0;
    }
    .col-actions .btn-icon {
        padding: 8px;
    }
    .track-artist-text {
        display: block;
    }

    /* ==========================================================
       PLAYER PAGE — Full mobile redesign
       ========================================================== */

    /* Player header: minimal top bar */
    .player-header {
        padding: 10px 12px;
        gap: 8px;
        flex-wrap: nowrap;
        align-items: center;
        border-bottom: 1px solid var(--border);
    }
    .btn-back {
        padding: 4px;
        font-size: 18px;
    }
    .btn-back i::before {
        content: "\f053"; /* chevron-left */
    }
    .track-info-header {
        font-size: 14px;
        font-weight: 600;
        flex: 1;
        min-width: 0;
        overflow: hidden;
    }
    .track-info-header i {
        display: none;
    }
    .track-info-header span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .player-actions {
        gap: 6px;
    }
    .player-actions .btn-outline,
    .player-actions .bpm-display,
    .player-actions .key-display,
    .player-actions .time-sig-display,
    .player-actions .btn-export {
        display: none;
    }
    .player-actions .btn-icon {
        font-size: 16px;
    }

    /* ==========================================================
       MOBILE CHORD BEAT COUNTER BAR
       ========================================================== */
    .mobile-chord-bar {
        display: none;
    }
    .mobile-chord-bar::-webkit-scrollbar { display: none; }
    .mobile-rhythm-wrap {
        display: flex;
        flex-direction: column;
        gap: 6px;
    }
    .mobile-rhythm-visual {
        display: flex;
        align-items: flex-end;
        gap: 3px;
        height: 30px;
        padding: 5px 8px;
        border: 1px solid var(--border-light);
        border-radius: 10px;
        background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.03));
    }
    .mobile-rhythm-bar {
        flex: 1 1 0;
        min-width: 0;
        height: 100%;
        border-radius: 999px;
        background: linear-gradient(180deg, rgba(79,195,247,0.95), rgba(0,200,180,0.65));
        transform-origin: bottom center;
        transform: scaleY(var(--amp, 0.25));
        transition: transform 90ms linear, background 120ms ease;
    }
    .mobile-rhythm-bar.is-accent {
        background: linear-gradient(180deg, rgba(240,160,48,0.98), rgba(255,112,67,0.78));
    }
    .mobile-rhythm-bar.is-downbeat {
        background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(240,160,48,0.92));
    }
    .mobile-rhythm-meta {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
    }
    .mobile-rhythm-chord {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 56px;
        padding: 2px 10px;
        border-radius: 999px;
        border: 1px solid var(--border-light);
        background: rgba(255,255,255,0.06);
        color: var(--text-primary);
        font-size: 12px;
        font-weight: 700;
        letter-spacing: 0.02em;
    }
    .mobile-rhythm-bpm {
        color: var(--text-muted);
        font-size: 11px;
        font-weight: 600;
    }

    /* ==========================================================
       MOBILE INSTRUMENT SOLO CHIPS
       ========================================================== */
    .mobile-instrument-chips {
        display: flex;
        gap: 8px;
        padding: 8px 12px;
        overflow-x: auto;
        flex-shrink: 0;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .mobile-instrument-chips::-webkit-scrollbar { display: none; }
    .mobile-instrument-chip {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 6px 14px;
        border: 1px solid var(--border-light);
        border-radius: 20px;
        background: transparent;
        color: var(--text-secondary);
        font-size: 13px;
        font-weight: 500;
        white-space: nowrap;
        cursor: pointer;
        transition: all 0.2s;
        flex-shrink: 0;
    }
    .mobile-instrument-chip.active {
        background: var(--accent);
        color: var(--bg-primary);
        border-color: var(--accent);
    }
    .mobile-instrument-chip i {
        font-size: 14px;
    }

    /* ==========================================================
       MOBILE KEY CHANGE BOTTOM SHEET
       ========================================================== */
    .mobile-key-sheet-overlay {
        display: block;
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 2000;
    }
    .mobile-key-sheet-overlay.hidden { display: none; }
    .mobile-key-sheet {
        display: flex;
        flex-direction: column;
        align-items: center;
        position: fixed;
        bottom: 0; left: 0; right: 0;
        background: var(--bg-secondary);
        border-radius: 16px 16px 0 0;
        padding: 12px 24px 32px;
        z-index: 2001;
        gap: 16px;
        max-width: 100vw;
    }
    .mobile-key-sheet.hidden { display: none; }
    .mobile-key-sheet-handle {
        width: 40px;
        height: 4px;
        border-radius: 2px;
        background: var(--text-muted);
    }
    .mobile-key-sheet h3 {
        margin: 0;
        font-size: 16px;
        font-weight: 600;
        color: var(--text-primary);
    }
    .mobile-key-sheet-current {
        width: 48px;
        height: 48px;
        border-radius: 50%;
        background: var(--text-primary);
        color: var(--bg-primary);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 18px;
        font-weight: 700;
    }
    .mobile-key-sheet-stepper {
        display: flex;
        align-items: center;
        gap: 24px;
    }
    .mobile-key-step-btn {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        border: 1px solid var(--border-light);
        background: none;
        color: var(--text-primary);
        font-size: 20px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .mobile-key-sheet-label {
        font-size: 14px;
        color: var(--text-secondary);
        min-width: 80px;
        text-align: center;
    }
    .mobile-key-reset-btn {
        background: none;
        border: none;
        color: var(--text-muted);
        font-size: 13px;
        cursor: pointer;
        padding: 8px;
    }

    /* Mobile treble clef decorative icon */
    .mobile-clef-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 18px;
        color: var(--text-secondary);
        padding: 4px;
        white-space: nowrap;
        cursor: pointer;
        background: none;
        border: none;
        width: 32px;
        height: 32px;
        border-radius: 50%;
        transition: color 0.2s, background 0.2s;
    }
    .mobile-clef-icon.active {
        color: var(--accent);
        background: rgba(240,160,48,0.15);
    }
    .mobile-clef-icon.beat-pulse {
        animation: beatPulse 0.15s ease-out;
    }
    @keyframes beatPulse {
        0% { transform: scale(1); }
        50% { transform: scale(1.3); }
        100% { transform: scale(1); }
    }

    /* Mobile key button in transport controls */
    .mobile-key-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        color: var(--text-secondary);
        font-size: 18px;
        font-weight: 700;
        cursor: pointer;
        padding: 6px 8px;
        white-space: nowrap;
        min-width: 36px;
        min-height: 36px;
    }

    /* Player body: vertical stack */
    .player-body {
        flex-direction: column;
        padding-bottom: 0;
        flex: 1;
        min-height: 0;
    }
    .player-body.has-sections {
        padding-bottom: 0;
    }

    /* Tracks area: full width, vertical list */
    .tracks-area {
        flex: 0 0 auto;
        overflow-y: auto;
        overflow-x: hidden;
        max-height: none;
        width: 100% !important;
        max-width: 100% !important;
    }
    /* Hide tracks/chips/chord-bar when a feature tab is active on mobile */
    .mobile-hidden {
        display: none !important;
    }
    .player-body.has-center .tracks-area {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0;
        max-height: none;
        flex: 0 0 auto;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    .player-body.has-center .tracks-area.collapsed {
        max-height: 0 !important;
        overflow: hidden;
        width: 100% !important;
    }

    /* Track lanes: slider-focused layout */
    .track-lane {
        height: 52px;
        padding: 0 12px;
    }
    .track-controls {
        width: 100%;
        min-width: 0;
        padding: 4px 0;
        gap: 0;
        display: grid;
        grid-template-columns: 30px 112px minmax(0, 1fr) 24px;
        align-items: center;
        column-gap: 10px;
        border-right: none;
    }
    .track-waveform-container {
        display: none; /* hide waveforms on mobile, show sliders only */
    }
    .track-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 18px;
        width: 20px;
        flex-shrink: 0;
    }
    .track-icon-slot {
        width: 30px;
        min-width: 30px;
        grid-column: 1;
        justify-self: center;
    }
    .track-controls .track-svg-icon.track-icon {
        display: block;
        width: 20px;
        height: 20px;
    }
    .track-btn {
        width: 20px;
        height: 20px;
        font-size: 9px;
        display: none; /* hide M/S buttons on mobile */
    }
    .track-label {
        font-size: 13px;
        min-width: 0;
        width: 112px;
        font-weight: 500;
        text-align: left;
        grid-column: 2;
        gap: 5px;
    }
    .track-volume-container {
        flex: 1;
        min-width: 0;
        grid-column: 3;
    }
    .track-volume {
        width: 100%;
    }
    .track-pan-knob {
        width: 24px;
        height: 24px;
        font-size: 11px;
        grid-column: 4;
    }
    .track-reset-btn {
        display: none;
    }

    /* Resize handle and collapse button: hide */
    .resize-handle,
    .panel-collapse-btn {
        display: none;
    }

    /* --- Center panel (cifra/lyrics): full screen overlay --- */
    .center-panel {
        flex: 1;
        min-width: 0;
        min-height: 0;
        width: 100%;
    }
    .cifra-view-header,
    .lyrics-view-header {
        display: none; /* hide headers on mobile, feature tabs handle switching */
    }
    #page-player.cifra-fullscreen-active .cifra-view-header {
        display: flex;
    }
    .cifra-content {
        font-size: 20px;
        line-height: 1.6;
        padding: 14px 4px 80px 4px;
        --cifra-left-inset: 4px;
        overflow-x: auto;
        white-space: pre;
    }
    .cifra-section-header {
        font-size: 18px;
    }
    .cifra-bar {
        padding: 6px 10px;
        gap: 6px;
    }
    .cifra-level-btn {
        padding: 4px 10px;
        font-size: 11px;
    }
    .lyrics-view {
        padding: 14px 8px 80px 6px;
    }
    .lyrics-line {
        font-size: 22px;
        line-height: 1.5;
        margin: 0 0 16px 0;
        color: var(--text-muted);
    }
    .lyrics-line.active-line {
        color: var(--text-primary);
    }

    /* Chords panel: full width */
    .chords-panel {
        width: 100%;
        min-width: 0;
        border-left: none;
        border-top: 1px solid var(--border);
        max-height: none;
        flex: 1;
        overflow-y: auto;
    }

    /* Sections panel: full width */
    .player-side-panel {
        width: 100%;
        min-width: 0;
        border-left: none;
        border-top: 1px solid var(--border);
        max-height: none;
        flex: 1;
        overflow-y: auto;
    }
    #sections-panel.player-side-panel {
        margin-top: 0;
        max-height: 24vh;
        min-height: 110px;
        margin-bottom: 0;
        flex: 0 0 auto;
        background: #10263e;
        border: 1px solid #1d3a57;
        border-radius: 10px 10px 0 0;
        overflow: hidden;
    }
    .player-body.has-sections #sections-panel.player-side-panel {
        margin-top: 0;
    }
    #sections-panel .player-side-panel-header {
        padding: 8px 12px;
        background: rgba(5, 20, 34, 0.35);
    }
    #sections-panel .sections-header-actions {
        gap: 6px;
    }
    #sections-panel .sections-list {
        flex: 0 1 auto;
        max-height: calc(24vh - 34px);
        background: rgba(8, 29, 47, 0.35);
    }
    #sections-panel .section-check-col {
        width: 30px;
        min-width: 30px;
    }
    #sections-panel .section-repeat-checkbox {
        width: 18px;
        height: 18px;
    }
    .section-row {
        padding: 10px 16px;
    }
    .section-name {
        font-size: 13px;
        max-width: none;
    }

    /* ==========================================================
       PLAYER CONTROLS — Transport bar (competitor style)
       ========================================================== */
    .player-controls {
        margin-top: 0;
        padding: 8px 16px 6px;
        gap: 6px;
        background: var(--bg-primary);
        border-top: none;
        margin-bottom: 50px; /* space for mobile player nav */
        flex-shrink: 0;
    }

    /* Hide feature buttons from controls (moved to mobile-player-nav) */
    .controls-right {
        display: none !important;
    }

    /* Transport controls */
    .controls-center {
        gap: 16px;
        order: 2;
    }
    .control-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
        padding: 4px;
        background: none;
        border: none;
    }
    .play-btn {
        width: 56px;
        height: 56px;
        font-size: 22px;
        background: var(--text-primary);
        color: var(--bg-primary);
        border-radius: 50%;
    }
    .repeat-mode-btn {
        display: none;
    }
    #btn-loop {
        display: none; /* hide loop on mobile, use key button instead */
    }
    .volume-control {
        display: none; /* hide volume button on mobile */
    }

    /* Timeline */
    .timeline {
        gap: 8px;
        max-width: 100%;
        order: 1;
    }
    .time-current, .time-total {
        font-size: 12px;
        min-width: 36px;
    }

    /* Playback loading */
    .playback-loading {
        order: 0;
    }

    /* Speed control */
    .speed-control {
        position: static;
        margin-top: 4px;
    }
    .speed-btn {
        padding: 2px 8px;
        font-size: 10px;
    }

    /* ==========================================================
       MISC MOBILE OVERRIDES
       ========================================================== */

    /* Upload page */
    .upload-status,
    .separation-footer {
        left: 0;
        bottom: 56px; /* above mobile bottom nav */
    }
    .upload-area {
        padding: 20px 16px;
    }

    /* Context menu */
    .context-menu {
        max-width: calc(100vw - 20px);
    }

    /* Key/pitch popover */
    .key-popover {
        width: calc(100vw - 40px);
        right: -10px;
    }

    /* Chord hover preview */
    .cifra-chord-hover-preview {
        display: none !important;
    }

    /* Playback footer */
    .playback-footer {
        padding: 6px 8px;
        bottom: 56px; /* above bottom nav */
    }
    .playback-footer .track-info-header {
        font-size: 11px;
    }

    /* Separation progress */
    .separation-progress {
        padding: 12px 16px;
    }

    /* Playlist detail mobile */
    .playlist-player-bar {
        flex-direction: column;
        gap: 10px;
        padding: 10px 12px;
    }

    .playlist-player-left {
        width: 100%;
        max-width: none;
    }

    .playlist-player-right {
        width: 100%;
    }

    .playlist-player-controls {
        width: 100%;
        justify-content: center;
    }

    .playlist-volume-wrap {
        display: none;
    }

    .playlist-detail-header {
        flex-wrap: wrap;
        gap: 8px;
    }

    .playlist-detail-header h1 {
        font-size: 20px;
    }

    /* Modals */
    .modal {
        align-items: flex-start;
        padding-top: max(14px, env(safe-area-inset-top));
    }

    .modal-content {
        width: 95vw;
        max-width: 95vw;
        margin: 0 auto;
        max-height: calc(100vh - 84px);
        max-height: calc(100dvh - 84px);
    }
}

@media (max-height: 760px) {
    .modal {
        align-items: flex-start;
        padding-top: max(10px, env(safe-area-inset-top));
    }

    .modal-content {
        margin: 0 auto;
        max-height: calc(100vh - 20px);
        max-height: calc(100dvh - 20px);
    }
}

/* ========== PLAYHEAD ========== */
.playhead {
    position: absolute;
    top: 0;
    width: 2px;
    height: 100%;
    background: var(--text-primary);
    z-index: 10;
    pointer-events: none;
    left: 0;
}

.playhead::before {
    content: '';
    position: absolute;
    top: 0;
    left: -4px;
    width: 10px;
    height: 10px;
    background: var(--text-primary);
    clip-path: polygon(50% 100%, 0 0, 100% 0);
}

/* Track reset button */
.track-reset-btn {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 12px;
    cursor: pointer;
    padding: 4px 8px;
    margin-top: 4px;
    font-family: inherit;
}

.track-reset-btn:hover {
    text-decoration: underline;
}

/* Metronome track */
.metronome-track .track-waveform-container {
    background: var(--bg-card);
}

/* Speed control */
.speed-control {
    position: absolute;
    bottom: 8px;
    left: 235px;
    display: flex;
    gap: 0;
    z-index: 5;
}

.speed-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 2px 10px;
    font-size: 11px;
    cursor: pointer;
    font-family: inherit;
}

.speed-btn:first-child {
    border-radius: 4px 0 0 4px;
}

.speed-btn:last-child {
    border-radius: 0 4px 4px 0;
}

.speed-btn.active {
    background: var(--text-primary);
    color: var(--bg-primary);
    border-color: var(--text-primary);
}

/* Context menu for track row */
.context-menu {
    position: fixed;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 6px;
    min-width: 180px;
    z-index: 500;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.context-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-primary);
    transition: background 0.15s;
}

.context-menu-item:hover {
    background: var(--bg-hover);
}

.context-menu-item i {
    width: 16px;
    text-align: center;
    color: var(--text-muted);
}

.context-menu-item.danger {
    color: var(--danger);
}

.context-menu-item.danger i {
    color: var(--danger);
}

.context-menu-divider {
    height: 1px;
    background: var(--border);
    margin: 4px 6px;
}

.context-menu-section-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 6px 10px 4px;
}

.player-mobile-menu {
    min-width: 250px;
    z-index: 650;
}

.player-mobile-menu .context-menu-item {
    justify-content: flex-start;
}

.player-mobile-menu .context-menu-item.pro-only {
    opacity: 0.78;
}

.menu-pro-tag {
    margin-left: auto;
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 999px;
    border: 1px solid var(--accent);
    color: var(--accent);
    font-weight: 700;
    letter-spacing: 0.4px;
}

/* Chord Editor Popup */
.chord-editor-popup {
    position: fixed;
    z-index: 200;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.5);
    width: 92vw;
    max-width: 400px;
    padding: 16px;
}
.chord-editor-popup.hidden {
    display: none;
}
.chord-editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.chord-editor-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}
.chord-editor-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
}
.chord-editor-close:hover {
    color: var(--text-primary);
}
.chord-editor-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.chord-editor-preview {
    display: flex;
    justify-content: center;
    padding: 4px 0;
}
.chord-editor-preview svg {
    max-width: 100%;
}
.chord-editor-fields {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.chord-editor-label {
    font-size: 11px;
    color: var(--text-muted);
}
.chord-editor-frets {
    display: flex;
    gap: 4px;
}
.chord-fret-input {
    width: 30px;
    padding: 4px 2px;
    text-align: center;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-main);
    color: var(--text-primary);
    font-family: monospace;
    font-size: 14px;
    outline: none;
}
.chord-fret-input:focus {
    border-color: var(--accent);
}
.chord-editor-actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    margin-top: 8px;
}
.chord-editor-reset {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
}
.chord-editor-reset:hover {
    background: var(--bg-hover);
}
.chord-editor-save {
    background: var(--accent);
    border: none;
    color: #000;
    padding: 5px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}
.chord-editor-save:hover {
    filter: brightness(1.1);
}
.chord-editor-suggestions {
    margin-top: 4px;
}
.chord-suggestions-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-height: 260px;
    overflow-y: auto;
    padding: 4px 0;
}
.chord-suggestions-header {
    width: 100%;
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 6px 0 2px;
    padding-bottom: 2px;
    border-bottom: 1px solid var(--border);
}
.chord-suggestions-header:first-child {
    margin-top: 0;
}
.chord-suggestion-item {
    cursor: pointer;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 4px;
    background: var(--bg-main);
    transition: border-color 0.15s, background 0.15s;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 70px;
}
.chord-suggestion-item:hover {
    border-color: var(--accent);
    background: var(--bg-hover);
}
.chord-suggestion-item.active {
    border-color: var(--accent);
    background: rgba(30,215,96,0.12);
}
.chord-suggestion-item svg {
    max-width: 72px;
    max-height: 80px;
}
.chord-suggestion-label {
    font-size: 9px;
    color: var(--text-muted);
    margin-top: 2px;
    white-space: nowrap;
}
.chord-editor-popup {
    max-height: 85vh;
    overflow-y: auto;
}
.chord-editor-preview svg {
    transform: scale(1.15);
    transform-origin: center;
}
.chord-editor-delete {
    background: transparent;
    border: 1px solid #e53e3e;
    color: #e53e3e;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    margin-right: auto;
}
.chord-editor-delete:hover {
    background: rgba(229,62,62,0.15);
}
.cifra-chord-wrap {
    cursor: pointer;
    position: relative;
}
.cifra-chord-wrap:hover .cifra-chord {
    text-decoration: underline;
}
/* Insert chord marker */
.cifra-word {
    cursor: text;
    position: relative;
}
.cifra-lyrics-line .cifra-char:hover,
.cifra-mixed-line .cifra-char:hover {
    background: rgba(30,215,96,0.08);
    border-radius: 2px;
}
.cifra-insert-marker {
    position: absolute;
    top: -2px;
    left: 0;
    width: 2px;
    height: 100%;
    background: var(--accent);
    pointer-events: none;
    animation: blink-cursor 1s step-end infinite;
}
@keyframes blink-cursor {
    50% { opacity: 0; }
}
.chord-insert-popup {
    position: fixed;
    z-index: 210;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.5);
    padding: 10px 12px;
    width: 220px;
}
.chord-insert-popup.hidden {
    display: none;
}
.chord-insert-popup input {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-main);
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    font-family: monospace;
    box-sizing: border-box;
}
.chord-insert-popup input:focus {
    border-color: var(--accent);
}
.chord-insert-popup label {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 4px;
    display: block;
}
.chord-insert-actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    margin-top: 8px;
}
.chord-insert-actions button {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    border: none;
}
.chord-insert-cancel {
    background: transparent;
    border: 1px solid var(--border) !important;
    color: var(--text-secondary);
}
.chord-insert-confirm {
    background: var(--accent);
    color: #000;
    font-weight: 600;
}

body.cifra-fullscreen-active {
    overflow: hidden;
}

body.cifra-fullscreen-active #sidebar {
    display: none;
}

body.cifra-fullscreen-active .main-content {
    width: 100%;
}

#page-player.cifra-fullscreen-active {
    position: fixed;
    inset: 0;
    z-index: 5000;
    padding: 0;
    background: radial-gradient(circle at top, #153858 0%, #0d2439 45%, #081624 100%);
}

#page-player.cifra-fullscreen-active .player-header,
#page-player.cifra-fullscreen-active .player-controls,
#page-player.cifra-fullscreen-active .separation-progress,
#page-player.cifra-fullscreen-active #tracks-area,
#page-player.cifra-fullscreen-active #sections-panel,
#page-player.cifra-fullscreen-active #btn-collapse-left,
#page-player.cifra-fullscreen-active #resize-handle-left,
#page-player.cifra-fullscreen-active #mobile-chord-bar,
#page-player.cifra-fullscreen-active #mobile-instrument-chips,
#page-player.cifra-fullscreen-active #chords-panel {
    display: none !important;
}

#page-player.cifra-fullscreen-active .player-body {
    height: 100vh;
    min-height: 100vh;
}

#page-player.cifra-fullscreen-active .center-panel {
    display: flex !important;
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
}

#page-player.cifra-fullscreen-active .cifra-view {
    padding: 0;
    background: transparent;
}

#page-player.cifra-fullscreen-active .cifra-view-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 0;
    padding: 14px 22px;
    position: sticky;
    transition: opacity 0.35s ease, transform 0.35s ease;
    top: 0;
    z-index: 12;
    background: rgba(6, 19, 31, 0.92);
    border-bottom: 1px solid rgba(34, 68, 102, 0.9);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
}

#page-player.cifra-fullscreen-active .cifra-header-actions {
    margin-left: auto;
}

#page-player.cifra-fullscreen-active .cifra-view-header.cifra-header-hidden {
    opacity: 0;
    transform: translateY(-110%);
    pointer-events: none;
}

#page-player.cifra-fullscreen-active .cifra-content {
    width: min(100%, 1480px);
    margin: 0 auto;
    padding: 26px 36px 48px;
    font-size: clamp(28px, 3vw, 54px);
    line-height: 1.85;
    --cifra-left-inset: 8px;
}

#page-player.cifra-fullscreen-active .cifra-content.show-diagrams {
    line-height: 2;
}

#page-player.cifra-fullscreen-active .cifra-content.show-diagrams .cifra-chord-dia svg {
    width: 64px;
    height: auto;
}

#page-player.cifra-fullscreen-active .cifra-content.show-diagrams .cifra-lyrics-line.cifra-lyrics-line {
    margin-bottom: 52px;
}

@media (max-width: 900px) {
    #page-player.cifra-fullscreen-active .cifra-view-header {
        padding: 12px 14px;
    }

    #page-player.cifra-fullscreen-active .cifra-level-selector {
        order: 3;
        width: 100%;
        justify-content: flex-start;
    }

    #page-player.cifra-fullscreen-active .cifra-header-actions {
        margin-left: 0;
    }

    #page-player.cifra-fullscreen-active .cifra-content {
        width: 100%;
        padding: 18px 12px 36px;
        font-size: clamp(22px, 5.4vw, 34px);
        line-height: 1.75;
        --cifra-left-inset: 2px;
    }

    #page-player.cifra-fullscreen-active .cifra-content.show-diagrams .cifra-chord-dia svg {
        width: 56px;
    }

    #page-player.cifra-fullscreen-active .cifra-fullscreen-btn-label {
        display: none;
    }
}

/* Lyrics-only presentation mode (hides chord rows, keeps lyrics + section headers) */
#cifra-content.lyrics-only .cifra-chord-line {
    display: none !important;
}

/* Instrument Picker Modal */
.instrument-picker-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.15s ease;
}
.instrument-picker-content {
    background: var(--bg-secondary, #1e293b);
    border-radius: 16px;
    padding: 24px;
    min-width: 280px;
    max-width: 340px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    border: 1px solid var(--border, #334155);
}
.instrument-picker-content h3 {
    margin: 0 0 18px;
    text-align: center;
    font-size: 18px;
    color: var(--text-primary, #e2e8f0);
    font-weight: 600;
}
.instrument-picker-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.instrument-picker-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border: 2px solid var(--border, #334155);
    border-radius: 12px;
    background: var(--bg-primary, #0f172a);
    color: var(--text-primary, #e2e8f0);
    font-size: 15px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.instrument-picker-btn:hover {
    border-color: var(--accent, #4a9eff);
    background: rgba(74,158,255,0.08);
}
.instrument-picker-btn.active {
    border-color: var(--accent, #4a9eff);
    background: rgba(74,158,255,0.15);
}
.instrument-picker-btn i {
    font-size: 22px;
    width: 28px;
    text-align: center;
    color: var(--accent, #4a9eff);
}
.instrument-picker-btn span {
    font-weight: 500;
}

/* ============ INSPIRAÇÃO FEED ============ */
.feed-container {
    width: 100%;
}
.feed-loading {
    text-align: center;
    padding: 2rem;
    color: rgba(255,255,255,0.5);
    font-size: 0.95rem;
}
.feed-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.feed-card {
    background: rgba(255,255,255,0.06);
    border-radius: 12px;
    overflow: hidden;
    transition: background 0.2s;
}
.feed-card.my-song-card {
    position: relative;
    overflow: visible;
}
.feed-card.my-song-card.menu-open {
    z-index: 40;
}
.feed-card:hover {
    background: rgba(255,255,255,0.09);
}
.feed-card-header {
    padding: 12px 16px 0;
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}
.my-song-date {
    width: 100%;
    font-size: 0.68rem;
    color: rgba(255,255,255,0.35);
    letter-spacing: 0.3px;
}
.feed-card-likes {
    color: #aaa;
    font-size: 0.85rem;
    white-space: nowrap;
    flex-shrink: 0;
}
.feed-card-header .feed-card-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}
.feed-card-header + .feed-card-body {
    padding: 10px 16px 14px;
}
.feed-card-body {
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
}
.feed-card-play {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s, opacity 0.15s;
}
.feed-card-play:hover {
    transform: scale(1.08);
}
.feed-card-play.playing {
    background: var(--accent);
    animation: pulse-play 1.5s infinite;
}
@keyframes pulse-play {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}
.feed-card-info {
    flex: 1;
    min-width: 0;
}
.feed-card-footer {
    display: flex;
    justify-content: flex-end;
    padding: 0 16px 8px;
}
.feed-card-duration {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.5);
    white-space: nowrap;
}
.feed-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
    word-break: break-word;
}
.feed-card-meta {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.45);
    margin-top: 3px;
}
.feed-card-meta span {
    margin-right: 10px;
}
.feed-author-reveal {
    cursor: pointer;
    background: rgba(255,255,255,0.08);
    padding: 1px 8px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.15);
    transition: all 0.2s;
    user-select: none;
}
.feed-author-reveal:hover {
    background: rgba(255,255,255,0.14);
}
.feed-author-reveal.revealed {
    cursor: default;
    background: transparent;
    border-color: transparent;
    padding: 0;
}
.feed-card-genres {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 5px;
}
.feed-card-tags {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin-top: 5px;
}
.feed-genre-tag {
    font-size: 0.68rem;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(240,160,48,0.15);
    color: var(--accent);
    border: 1px solid rgba(240,160,48,0.25);
}
.feed-mood-tag {
    font-size: 0.68rem;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(100,180,255,0.12);
    color: #7cb8f0;
    border: 1px solid rgba(100,180,255,0.2);
}
.feed-voice-tag {
    font-size: 0.68rem;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(180,130,255,0.12);
    color: #b888f0;
    border: 1px solid rgba(180,130,255,0.2);
}
/* Feed Filters */
.feed-filters {
    margin-bottom: 12px;
}
.feed-subtitle {
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 0 6px 0;
    text-align: center;
}
.feed-filter-row {
    display: flex;
    gap: 6px;
    justify-content: center;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
}
.feed-filter-row::-webkit-scrollbar { display: none; }
.feed-filter-btn {
    flex-shrink: 0;
    padding: 5px 10px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.6);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.feed-filter-btn:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}
.feed-filter-btn.active {
    background: var(--accent);
    color: #1a1a2e;
    border-color: var(--accent);
    font-weight: 600;
}
.feed-filter-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
    padding: 10px 0;
}

#page-feed .feed-filter-options {
    gap: 10px;
    justify-content: center;
    margin-top: 10px;
    padding: 8px 0;
}

#page-feed .feed-filter-btn {
    padding: 8px 16px;
    border-radius: 20px;
    border-width: 1.2px;
    font-size: 0.9rem;
    font-weight: 600;
    min-height: 40px;
}
.feed-filter-option {
    padding: 9px 16px;
    min-height: 40px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.55);
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.feed-filter-option:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}
.feed-filter-option.active {
    background: rgba(240,160,48,0.18);
    color: var(--accent);
    border-color: rgba(240,160,48,0.35);
    font-weight: 600;
}
.feed-filter-outros-btn {
    border-style: dashed;
    color: rgba(255,255,255,0.4);
}
.feed-filter-outros-btn:hover {
    color: var(--accent);
    border-color: rgba(240,160,48,0.3);
}

/* Create from Inspiration button */
.feed-create-from-btn {
    color: rgba(255,255,255,0.45);
    font-size: 0.85rem;
}
.feed-create-from-btn:hover {
    color: var(--accent);
}

/* Create from Inspiration Modal */
.create-from-modal {
    background: var(--card-bg, #1e1e2e);
    border-radius: 16px;
    padding: 24px;
    width: 92%;
    max-width: 420px;
    position: relative;
    animation: modalSlideUp 0.25s ease;
}
@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
.create-from-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 1.1rem;
    cursor: pointer;
}
.create-from-modal-close:hover {
    color: #fff;
}
.create-from-modal-title {
    margin: 0 0 6px;
    font-size: 1.15rem;
    color: #fff;
}
.create-from-modal-title i {
    color: var(--accent);
}
.create-from-modal-ref {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.5);
    margin: 0 0 4px;
}
.create-from-modal-author {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.4);
    margin: 0 0 12px;
}
.create-from-modal-author i {
    margin-right: 4px;
}
.create-from-modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}
.create-from-modal-tags .feed-genre-tag,
.create-from-modal-tags .feed-mood-tag,
.create-from-modal-tags .feed-voice-tag {
    font-size: 0.72rem;
    padding: 3px 8px;
    border-radius: 10px;
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.7);
}
.create-from-modal-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 12px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
}
.create-from-tab {
    flex: 1;
    padding: 8px 10px;
    font-size: 0.82rem;
    border: none;
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.2s;
}
.create-from-tab.active {
    background: var(--accent);
    color: #000;
    font-weight: 600;
}
.create-from-input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.06);
    color: #fff;
    font-size: 0.9rem;
    outline: none;
    box-sizing: border-box;
}
.create-from-input:focus {
    border-color: var(--accent);
}
.create-from-textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.06);
    color: #fff;
    font-size: 0.9rem;
    resize: vertical;
    min-height: 100px;
    outline: none;
    box-sizing: border-box;
    font-family: inherit;
}
.create-from-textarea:focus {
    border-color: var(--accent);
}
.create-from-submit {
    display: block;
    width: 100%;
    margin-top: 14px;
    padding: 11px 16px;
    border: none;
    border-radius: 10px;
    background: var(--accent);
    color: #000;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s;
}
.create-from-submit:hover {
    opacity: 0.85;
}
.create-from-submit.hidden {
    display: none;
}
.create-from-panel.hidden {
    display: none;
}

.feed-card-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}
.my-song-more-wrap {
    position: relative;
    z-index: 2;
}
.my-song-more-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: background 0.15s;
}
.my-song-more-btn:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}
.my-song-dropdown {
    display: none;
    position: absolute;
    right: 0;
    bottom: 100%;
    top: auto;
    background: var(--bg-card, #1e2a3a);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 10px;
    min-width: 160px;
    z-index: 3000;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    overflow: hidden;
    margin-bottom: 6px;
}
.my-song-dropdown.open {
    display: block;
}
.my-song-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    background: none;
    border: none;
    color: #ccc;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.15s;
    text-align: left;
}
.my-song-dropdown-item:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}
.my-song-dropdown-item.danger {
    color: #ff6b7a;
}
.my-song-dropdown-item.danger:hover {
    background: rgba(255,70,90,0.12);
}
/* Download format menu */
.download-format-menu {
    background: var(--bg-card, #1e2a3a);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 10px;
    min-width: 170px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    overflow: hidden;
    z-index: 9999;
}
.download-format-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 11px 14px;
    background: none;
    border: none;
    color: #ccc;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.15s;
    text-align: left;
}
.download-format-item:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}
.download-format-item i {
    width: 16px;
    text-align: center;
    color: var(--accent, #EEAB47);
}
.download-format-desc {
    margin-left: auto;
    font-size: 0.7rem;
    color: rgba(255,255,255,0.35);
}
.feed-like-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.4);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    transition: color 0.2s, transform 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.feed-like-btn:hover {
    color: #ff4d6a;
}
.feed-like-btn.liked {
    color: #ff4d6a;
}
.feed-like-btn.liked i {
    animation: like-pop 0.3s ease;
}
@keyframes like-pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.35); }
    100% { transform: scale(1); }
}
.feed-like-count {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
}
.feed-load-more {
    display: block;
    width: 100%;
    padding: 12px;
    margin-top: 12px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s;
}
.feed-load-more:hover {
    background: rgba(255,255,255,0.1);
}
.feed-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: rgba(255,255,255,0.35);
}
.feed-empty p {
    margin-top: 8px;
    font-size: 0.9rem;
}

/* Feed audio progress bar */
.feed-card-progress {
    height: 3px;
    background: rgba(255,255,255,0.08);
    position: relative;
}
.feed-card-progress-bar {
    height: 100%;
    background: var(--accent);
    width: 0%;
    transition: width 0.3s linear;
}

/* Mini player row in Minhas Criações cards */
.feed-card-player {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 16px 10px;
}
.feed-card-player .feed-card-current-time,
.feed-card-player .feed-card-duration {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.5);
    white-space: nowrap;
    min-width: 32px;
}
.feed-card-player .feed-card-current-time {
    text-align: right;
}
.feed-card-player .feed-card-duration {
    text-align: left;
}
.feed-card-player .feed-card-progress {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: rgba(255,255,255,0.12);
    cursor: pointer;
    position: relative;
}
.feed-card-player .feed-card-progress-bar {
    border-radius: 3px;
}

/* ====== Shared Song Modal ====== */
.shared-song-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.85);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
    padding: 20px;
}
.shared-song-overlay.hidden { display: none; }
.shared-song-modal {
    background: linear-gradient(145deg, #1e2a3a, #15202e);
    border: 1px solid rgba(240,160,48,0.25);
    border-radius: 20px;
    padding: 32px 28px;
    max-width: 380px;
    width: 100%;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 40px rgba(240,160,48,0.08);
}
.shared-song-close {
    position: absolute;
    top: 12px; right: 16px;
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 1.6rem;
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
}
.shared-song-close:hover { color: #fff; }
.shared-song-icon {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    font-size: 2rem;
    color: #1a1a2e;
    box-shadow: 0 6px 24px rgba(240,160,48,0.3);
}
.shared-song-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 6px;
    word-break: break-word;
}
.shared-song-author {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
    margin: 0 0 12px;
}
.shared-song-tags {
    display: flex;
    gap: 6px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.shared-song-player {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}
.shared-song-play-btn {
    width: 52px; height: 52px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    color: #1a1a2e;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(240,160,48,0.3);
    transition: transform 0.15s;
}
.shared-song-play-btn:active { transform: scale(0.92); }
.shared-song-progress {
    flex: 1;
    height: 6px;
    background: rgba(255,255,255,0.12);
    border-radius: 3px;
    overflow: hidden;
    cursor: pointer;
}
.shared-song-progress-bar {
    height: 100%;
    width: 0%;
    background: var(--accent);
    border-radius: 3px;
    transition: width 0.2s linear;
}
.shared-song-time {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.45);
    white-space: nowrap;
    min-width: 70px;
    text-align: right;
}
.shared-song-cta {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.35);
    margin: 0;
}
.shared-song-cta strong { color: var(--accent); }

/* ====== My Created Songs Modal (Separation) ====== */
.my-created-modal-content {
    max-width: 480px;
}
.my-created-list-container {
    max-height: 400px;
    overflow-y: auto;
    padding: 4px 0;
}
.my-created-loading {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255,255,255,0.5);
    font-size: 0.95rem;
}
.my-created-empty {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255,255,255,0.4);
}
.my-created-empty p { margin: 8px 0 0; }
.my-created-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-radius: 10px;
    transition: background 0.15s;
    gap: 12px;
}
.my-created-item:hover {
    background: rgba(255,255,255,0.06);
}
.my-created-item-info {
    flex: 1;
    min-width: 0;
}
.my-created-item-info h4 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.my-created-item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.45);
    flex-wrap: wrap;
}
.my-created-import-btn {
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    color: #1a1a2e;
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.15s, opacity 0.15s;
}
.my-created-import-btn:active { transform: scale(0.95); }

/* Minhas Criações (wizard panel) */
.my-creations-container {
    padding: 16px;
    max-width: 600px;
    margin: 0 auto;
}
.my-songs-section {
    padding-top: 0;
}
.my-songs-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: rgba(255,255,255,0.8);
}
.my-songs-title i {
    color: var(--accent);
    margin-right: 6px;
}
.my-songs-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.feed-action-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.3);
    font-size: 1rem;
    cursor: pointer;
    padding: 6px;
    transition: color 0.2s;
}
.feed-action-btn:hover {
    color: var(--accent);
}
.my-song-toggle-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.3);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    transition: color 0.2s, transform 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.my-song-toggle-btn:hover {
    color: var(--accent);
}
.my-song-toggle-btn.public {
    color: var(--accent);
}
.my-song-toggle-btn.public i {
    animation: like-pop 0.3s ease;
}
.my-song-delete-btn {
    background: none;
    border: none;
    color: rgba(255,80,80,0.45);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 8px;
    transition: color 0.2s, transform 0.2s;
}
.my-song-delete-btn:hover {
    color: #f44;
    transform: scale(1.15);
}
.my-songs-help-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.35);
    font-size: 0.85rem;
    cursor: pointer;
    margin-left: 6px;
    vertical-align: middle;
    transition: color 0.2s;
}
.my-songs-help-btn:hover {
    color: var(--accent);
}
.my-songs-help-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.my-songs-help-modal-content {
    background: var(--bg-card);
    border-radius: 14px;
    padding: 24px 22px;
    max-width: 340px;
    width: 100%;
    position: relative;
    color: var(--text-primary);
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.my-songs-help-modal-content h4 {
    font-size: 1.05rem;
    margin-bottom: 12px;
    color: var(--accent);
}
.my-songs-help-modal-content p {
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 10px;
    color: rgba(255,255,255,0.8);
}
.my-songs-help-close {
    position: absolute;
    top: 10px;
    right: 14px;
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 1.4rem;
    cursor: pointer;
    transition: color 0.2s;
}
.my-songs-help-close:hover {
    color: #fff;
}

/* Notification bell */
.notification-bell-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.6);
    font-size: 1rem;
    cursor: pointer;
    position: relative;
    padding: 4px 6px;
    margin-left: 4px;
    transition: color 0.2s;
}
.notification-bell-btn:hover {
    color: var(--accent);
}
.notification-badge {
    position: absolute;
    top: -2px;
    right: -4px;
    background: #ff4d6a;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}
.notification-badge.hidden {
    display: none !important;
}

/* Notification dropdown */
.notification-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 320px;
    max-height: 400px;
    overflow-y: auto;
    background: var(--bg-secondary, #1a2332);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    z-index: 1000;
    padding: 8px 0;
}
.notification-dropdown-header {
    padding: 10px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.notification-dropdown-header button {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 0.75rem;
    cursor: pointer;
}
.notification-item {
    padding: 10px 16px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    transition: background 0.15s;
    cursor: default;
}
.notification-item:hover {
    background: rgba(255,255,255,0.04);
}
.notification-item.unread {
    background: rgba(240,160,48,0.06);
}
.notification-item-icon {
    color: #ff4d6a;
    font-size: 1rem;
    margin-top: 2px;
    flex-shrink: 0;
}
.notification-item-text {
    flex: 1;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.7);
    line-height: 1.4;
}
.notification-item-time {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.3);
    margin-top: 3px;
}
.notification-empty {
    padding: 2rem;
    text-align: center;
    color: rgba(255,255,255,0.35);
    font-size: 0.85rem;
}

/* ========== PERSONA (Custom Voice) ========== */
.wizard-option-minha-voz.selected {
    box-shadow: 0 0 0 2px var(--accent), 0 0 12px rgba(245, 166, 35, 0.3);
}
.wizard-option-minha-voz i {
    margin-right: 4px;
}

.persona-panel {
    margin-top: 12px;
    padding: 12px;
    background: rgba(124, 58, 237, 0.08);
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: 10px;
}

.persona-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
}

.persona-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
}
.persona-item:hover {
    background: rgba(168, 85, 247, 0.15);
    border-color: rgba(168, 85, 247, 0.3);
}
.persona-item.selected {
    background: rgba(168, 85, 247, 0.2);
    border-color: #a855f7;
    box-shadow: 0 0 0 1px #a855f7;
}

.persona-item-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}
.persona-item-info i {
    font-size: 1.2rem;
    color: #a855f7;
}
.persona-item-name {
    font-weight: 500;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.persona-item-source {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.4);
    background: rgba(255,255,255,0.06);
    padding: 2px 6px;
    border-radius: 4px;
}

.persona-item-delete {
    background: none;
    border: none;
    color: rgba(255,255,255,0.3);
    cursor: pointer;
    padding: 4px 6px;
    font-size: 0.85rem;
    transition: color 0.15s;
}
.persona-item-delete:hover {
    color: #ef4444;
}

.favoritas-panel {
    margin-top: 12px;
    padding: 12px;
    background: rgba(240,160,48,0.08);
    border: 1px solid rgba(240,160,48,0.25);
    border-radius: 10px;
}
.favoritas-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.persona-preview-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    border: none;
    font-size: 0.7rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.15s;
}
.persona-preview-btn:hover {
    transform: scale(1.1);
}
.persona-preview-btn.playing {
    background: var(--accent);
    animation: pulse-play 1.5s infinite;
}

.persona-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 6px;
}

.persona-upload-btn, .persona-record-btn {
    flex: 1;
    padding: 8px 12px;
    border: 1px dashed rgba(168, 85, 247, 0.4);
    background: rgba(168, 85, 247, 0.08);
    color: #c4b5fd;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.82rem;
    transition: all 0.15s;
}
.persona-upload-btn:hover, .persona-record-btn:hover {
    background: rgba(168, 85, 247, 0.18);
    border-color: #a855f7;
    color: #fff;
}
.persona-record-btn.recording {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    color: #fca5a5;
    animation: pulse-recording 1.2s infinite;
}
@keyframes pulse-recording {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.persona-hint {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.35);
    text-align: center;
    margin: 0;
}

.duration-selector {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.duration-label {
    display: block;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.55);
    margin-bottom: 8px;
    text-align: center;
}
.duration-label i {
    margin-right: 4px;
}

.duration-options {
    display: flex;
    gap: 6px;
    justify-content: center;
    flex-wrap: wrap;
}

.duration-option {
    background: rgba(255,255,255,0.06);
    border: 1.5px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    color: rgba(255,255,255,0.7);
    padding: 5px 14px;
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}
.duration-option:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.2);
    color: #fff;
}
.duration-option.selected {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    font-weight: 600;
}

.persona-empty, .persona-loading {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.4);
    text-align: center;
    padding: 12px 0;
    margin: 0;
}

.feed-save-voice-btn {
    color: #c4b5fd !important;
}
.feed-save-voice-btn:hover {
    color: #a855f7 !important;
}

/* ========== CREATE MUSIC PREMIUM THEME OVERRIDES ========== */
#page-create-music {
    position: relative;
    background:
        radial-gradient(680px 340px at 16% -8%, rgba(0, 212, 255, 0.10) 0%, rgba(0, 212, 255, 0) 68%),
        radial-gradient(760px 360px at 84% -10%, rgba(123, 97, 255, 0.17) 0%, rgba(123, 97, 255, 0) 70%);
}

#page-create-music::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.42;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0) 26%),
        repeating-linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.015) 0px,
            rgba(255, 255, 255, 0.015) 1px,
            transparent 1px,
            transparent 28px
        );
}

#page-create-music .create-music-container {
    position: relative;
    z-index: 1;
}

#page-create-music .create-profile-btn,
#page-feed .create-profile-btn,
#page-my-creations .create-profile-btn {
    background: linear-gradient(160deg, rgba(19, 47, 76, 0.92) 0%, rgba(23, 58, 94, 0.76) 100%);
    border: 1px solid rgba(0, 212, 255, 0.30);
    color: var(--text-primary);
    box-shadow: 0 10px 26px rgba(3, 12, 24, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

#page-create-music .create-profile-btn:hover,
#page-feed .create-profile-btn:hover,
#page-my-creations .create-profile-btn:hover {
    border-color: rgba(0, 212, 255, 0.62);
    box-shadow: 0 0 0 1px rgba(0, 212, 255, 0.24), 0 0 20px rgba(0, 212, 255, 0.16);
}

#page-create-music .create-profile-avatar,
#page-feed .create-profile-avatar,
#page-my-creations .create-profile-avatar {
    background: linear-gradient(135deg, #EEAB47 0%, #EEAB47 100%);
    color: #0A1F33;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.22), 0 8px 18px rgba(238, 171, 71, 0.30);
}

#page-create-music .create-credits-display,
#page-feed .create-credits-display,
#page-my-creations .create-credits-display {
    background: linear-gradient(130deg, rgba(238, 171, 71, 0.22) 0%, rgba(238, 171, 71, 0.15) 100%);
    border: 1px solid rgba(238, 171, 71, 0.45);
    color: #EEAB47;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

#page-create-music .create-credits-buy-btn,
#page-feed .create-credits-buy-btn,
#page-my-creations .create-credits-buy-btn {
    color: #EEAB47;
}

#page-create-music .create-credits-buy-btn:hover,
#page-feed .create-credits-buy-btn:hover,
#page-my-creations .create-credits-buy-btn:hover {
    color: #fff0be;
    text-shadow: 0 0 8px rgba(238, 171, 71, 0.45);
}

#page-create-music .notification-bell-btn,
#page-feed .notification-bell-btn,
#page-my-creations .notification-bell-btn {
    color: var(--text-secondary);
}

#page-create-music .notification-bell-btn:hover,
#page-feed .notification-bell-btn:hover,
#page-my-creations .notification-bell-btn:hover {
    color: var(--tech-cyan);
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.45);
}

#page-create-music .create-music-title,
#page-feed .create-music-title,
#page-my-creations .create-music-title {
    color: var(--text-primary);
    text-shadow: 0 10px 22px rgba(0, 0, 0, 0.35);
}

#page-my-creations .create-music-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

#page-my-creations .my-songs-help-btn {
    margin-left: 0;
}

#page-create-music .create-music-subtitle,
#page-create-music .wizard-question,
#page-create-music .create-progress-text {
    color: var(--text-secondary);
}

#page-create-music .create-panel {
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 16px;
    padding: 14px 16px 16px;
    background: linear-gradient(165deg, rgba(19, 47, 76, 0.88) 0%, rgba(15, 42, 68, 0.80) 62%, rgba(10, 31, 51, 0.86) 100%);
    box-shadow: 0 24px 50px rgba(2, 10, 18, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

#page-create-music .create-tab {
    border: 1px solid rgba(0, 212, 255, 0.32);
    background: linear-gradient(160deg, rgba(15, 42, 68, 0.68) 0%, rgba(19, 47, 76, 0.42) 100%);
    color: var(--text-secondary);
}

#page-create-music .create-tab:hover {
    border-color: rgba(0, 212, 255, 0.70);
    color: #FFFFFF;
    transform: translateY(-1px);
    box-shadow: 0 0 0 1px rgba(0, 212, 255, 0.22), 0 0 20px rgba(0, 212, 255, 0.18);
}

#page-create-music .create-tab.active {
    background: linear-gradient(135deg, rgba(238, 171, 71, 0.24) 0%, rgba(238, 171, 71, 0.14) 100%);
    border-color: #EEAB47;
    color: #EEAB47;
    box-shadow: 0 0 0 1px rgba(238, 171, 71, 0.30), 0 0 18px rgba(238, 171, 71, 0.20);
}

#page-create-music .create-tab.active i {
    color: #EEAB47;
    text-shadow: 0 0 12px rgba(238, 171, 71, 0.45);
}

#page-create-music .create-textarea-wrap,
#page-create-music .wizard-input,
#page-create-music .ai-lyrics-input,
#page-create-music .ai-lyrics-preview-textarea,
#page-create-music .saved-lyrics-select,
#page-create-music .saved-lyrics-edit-title-input,
#page-create-music .saved-lyrics-edit-textarea,
#page-create-music .create-option-pill,
#page-create-music .create-genre-dropdown {
    background: linear-gradient(180deg, rgba(19, 47, 76, 0.78) 0%, rgba(19, 47, 76, 0.60) 100%);
    border-color: rgba(201, 209, 217, 0.16);
    color: var(--text-primary);
}

#page-create-music .create-textarea-wrap:focus-within,
#page-create-music .wizard-input:focus,
#page-create-music .ai-lyrics-input:focus,
#page-create-music .ai-lyrics-preview-textarea:focus,
#page-create-music .saved-lyrics-select:focus,
#page-create-music .saved-lyrics-edit-title-input:focus,
#page-create-music .saved-lyrics-edit-textarea:focus,
#page-create-music .create-from-input:focus,
#page-create-music .create-from-textarea:focus {
    border-color: var(--tech-cyan);
    box-shadow: 0 0 0 1px rgba(0, 212, 255, 0.40), 0 0 20px rgba(0, 212, 255, 0.16);
}

#page-create-music .create-textarea-wrap textarea::placeholder,
#page-create-music .wizard-input::placeholder,
#page-create-music .ai-lyrics-input::placeholder,
#page-create-music .ai-lyrics-preview-textarea::placeholder,
#page-create-music .create-from-input::placeholder,
#page-create-music .create-from-textarea::placeholder {
    color: rgba(201, 209, 217, 0.54);
}

#page-create-music .create-char-counter {
    color: rgba(201, 209, 217, 0.58);
}

#page-create-music .wizard-option {
    border-radius: 14px;
    border: 1px solid rgba(201, 209, 217, 0.14);
    background: linear-gradient(170deg, rgba(19, 47, 76, 0.76) 0%, rgba(15, 42, 68, 0.65) 100%);
    color: var(--text-secondary);
}

#page-create-music .wizard-option:hover {
    border-color: rgba(0, 212, 255, 0.62);
    color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22), 0 0 16px rgba(0, 212, 255, 0.16);
}

#page-create-music .wizard-option.selected {
    border-color: rgba(123, 97, 255, 0.84);
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.22) 0%, rgba(123, 97, 255, 0.32) 100%);
    color: #FFFFFF;
    box-shadow: 0 0 0 1px rgba(123, 97, 255, 0.44), 0 12px 24px rgba(8, 20, 33, 0.35), 0 0 22px rgba(123, 97, 255, 0.24);
}

#page-create-music .wizard-option.selected i,
#page-create-music .ai-lyrics-suggest-btn:hover i,
#page-create-music .ai-lyrics-chip.selected i {
    color: var(--tech-cyan);
    text-shadow: 0 0 12px rgba(0, 212, 255, 0.48);
}

#page-create-music .wizard-nav {
    border-top-color: rgba(201, 209, 217, 0.15);
}

#page-create-music .wizard-dot {
    background: rgba(201, 209, 217, 0.28);
}

#page-create-music .wizard-dot.active {
    background: #EEAB47;
    box-shadow: 0 0 10px rgba(238, 171, 71, 0.60);
}

#page-create-music .wizard-next-btn {
    background: linear-gradient(135deg, #EEAB47 0%, #EEAB47 100%);
    color: #0A1F33;
    border: 1px solid rgba(255, 255, 255, 0.20);
    box-shadow: 0 14px 26px rgba(238, 171, 71, 0.26), 0 2px 8px rgba(0, 0, 0, 0.35);
}

#page-create-music .btn-create-song,
#page-create-music .btn-save-created,
.create-from-submit {
    background: linear-gradient(135deg, #EEAB47 0%, #EEAB47 100%);
    color: #0A1F33;
    border: 1px solid rgba(255, 255, 255, 0.20);
    box-shadow: 0 14px 26px rgba(238, 171, 71, 0.26), 0 2px 8px rgba(0, 0, 0, 0.35);
}

#page-create-music .wizard-next-btn:hover {
    transform: scale(1.03);
    box-shadow: 0 18px 30px rgba(238, 171, 71, 0.34), 0 0 24px rgba(238, 171, 71, 0.24);
    filter: none;
}

#page-create-music .btn-create-song:hover,
#page-create-music .btn-save-created:hover,
.create-from-submit:hover {
    transform: scale(1.03);
    box-shadow: 0 18px 30px rgba(238, 171, 71, 0.34), 0 0 24px rgba(238, 171, 71, 0.24);
    filter: none;
}

#page-create-music .wizard-next-btn:disabled,
#page-create-music .btn-create-song:disabled,
#page-create-music .btn-save-created:disabled,
.create-from-submit:disabled {
    transform: none;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.24);
}

#page-create-music .wizard-back-btn,
#page-create-music .saved-lyrics-open-btn,
#page-create-music .saved-lyrics-action-btn,
#page-create-music .btn-create-variation,
#page-create-music .duration-option,
#page-create-music .persona-upload-btn,
#page-create-music .persona-record-btn,
#page-create-music .saved-lyrics-row-btn,
#page-create-music .btn-save-lyrics {
    background: rgba(10, 31, 51, 0.28);
    border-color: rgba(0, 212, 255, 0.42);
    color: var(--text-secondary);
}

#page-create-music .wizard-back-btn:hover,
#page-create-music .saved-lyrics-open-btn:hover,
#page-create-music .saved-lyrics-action-btn:hover,
#page-create-music .btn-create-variation:hover,
#page-create-music .duration-option:hover,
#page-create-music .persona-upload-btn:hover,
#page-create-music .persona-record-btn:hover,
#page-create-music .saved-lyrics-row-btn:hover,
#page-create-music .btn-save-lyrics:hover {
    border-color: rgba(0, 212, 255, 0.78);
    color: #FFFFFF;
    box-shadow: 0 0 0 1px rgba(0, 212, 255, 0.25), 0 0 18px rgba(0, 212, 255, 0.20);
}

#page-create-music .duration-option.selected,
#page-create-music .create-from-tab.active {
    background: linear-gradient(135deg, #EEAB47 0%, #EEAB47 100%);
    border-color: #EEAB47;
    color: #0A1F33;
}

#page-create-music .duration-selector {
    padding: 14px 14px 16px;
}

#page-create-music .duration-options {
    min-height: 54px;
    align-items: center;
    align-content: center;
    padding: 8px 12px;
}

#page-create-music .ai-lyrics-suggest-btn {
    border-color: rgba(123, 97, 255, 0.54);
    background: rgba(15, 42, 68, 0.46);
}

#page-create-music .ai-lyrics-suggest-btn:hover,
#page-create-music .ai-lyrics-suggest-btn:active {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.16) 0%, rgba(123, 97, 255, 0.24) 100%);
    border-color: rgba(123, 97, 255, 0.90);
    color: #FFFFFF;
    box-shadow: 0 0 0 1px rgba(123, 97, 255, 0.30), 0 0 22px rgba(123, 97, 255, 0.24);
}

#page-create-music .ai-lyrics-chip.selected {
    border-color: rgba(123, 97, 255, 0.80);
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.16) 0%, rgba(123, 97, 255, 0.28) 100%);
    color: #FFFFFF;
    box-shadow: 0 0 0 1px rgba(123, 97, 255, 0.25);
}

#page-create-music .create-result-card,
#page-create-music .create-result-lyrics-box,
#page-create-music .saved-lyrics-card,
#page-create-music .persona-panel,
#page-create-music .favoritas-panel,
#page-create-music .duration-selector,
#page-create-music .notification-dropdown,
#page-create-music .wizard-genre-expanded {
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: linear-gradient(165deg, rgba(19, 47, 76, 0.88) 0%, rgba(15, 42, 68, 0.78) 100%);
    box-shadow: 0 16px 34px rgba(2, 9, 16, 0.36);
}

#page-create-music .create-result-art,
#page-create-music .create-genre-tag {
    background: linear-gradient(135deg, #EEAB47 0%, #EEAB47 100%);
    color: #0A1F33;
}

#page-create-music .create-progress-bar,
#page-create-music .create-spinner,
#page-create-music .saved-lyrics-card-icon,
#page-create-music .my-songs-title i {
    color: #EEAB47;
}

#page-create-music .create-progress-bar {
    background: linear-gradient(90deg, #EEAB47 0%, #EEAB47 100%);
}

#page-create-music .create-result-info p,
#page-create-music .saved-lyrics-card-preview,
#page-create-music .persona-hint,
#page-create-music .create-result-lyrics-box pre {
    color: var(--text-secondary);
}

@media (max-width: 600px) {
    #page-create-music .create-panel {
        padding: 12px 10px 12px;
        border-radius: 14px;
    }

    #page-create-music .create-tab {
        padding: 8px 12px;
    }

    #page-create-music .wizard-question {
        font-size: 17px;
    }
}

/* ============ TEVOXI WATERMARK ============ */
.tevoxi-watermark {
    display: none;
    pointer-events: none;
    user-select: none;
}

@media (max-width: 768px) {
    #page-create-music .tevoxi-watermark,
    #page-feed .tevoxi-watermark {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        margin: 14px auto 86px;
        opacity: 0.10;
    }
    #page-create-music .tevoxi-watermark img,
    #page-feed .tevoxi-watermark img {
        width: 168px;
        height: 168px;
        object-fit: contain;
    }
}
