/* Chord Share - Cloud Edition Styles */

/* ==================== CSS RESET & VARIABLES ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* ==================== ANIMATIONS ==================== */
@keyframes slideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

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

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ==================== LANDING PAGE STYLES ==================== */
.landing-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a2e 50%, #16213e 100%);
    color: #fff;
    overflow-x: hidden;
}

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

/* Landing Header */
.landing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 60px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.landing-logo .logo-icon {
    font-size: 32px;
}

.landing-logo h1 {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.landing-nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.landing-nav a {
    color: #999;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.landing-nav a:hover {
    color: #fff;
}

/* Landing Page Buttons - Override global button styles */
.landing-page button.btn-login {
    background: transparent !important;
    border: 1px solid #3b82f6 !important;
    color: #3b82f6 !important;
    padding: 10px 24px !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-block !important;
}

.landing-page button.btn-login:hover {
    background: rgba(59, 130, 246, 0.1) !important;
    transform: none !important;
    box-shadow: none !important;
}

.landing-page button.btn-signup {
    background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
    border: none !important;
    color: #fff !important;
    padding: 10px 24px !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-block !important;
}

.landing-page button.btn-signup:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3) !important;
}

.landing-page button.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
    border: none !important;
    color: #fff !important;
    padding: 16px 32px !important;
    border-radius: 12px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-block !important;
}

.landing-page button.btn-primary:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 15px 30px rgba(59, 130, 246, 0.4) !important;
}

.landing-page button.btn-secondary {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
    padding: 16px 32px !important;
    border-radius: 12px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-block !important;
}

.landing-page button.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    transform: none !important;
}

.landing-page button.btn-large {
    padding: 18px 40px !important;
    font-size: 18px !important;
}

/* Hero Section */
.landing-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 120px 60px 60px;
    gap: 60px;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-content h2 {
    font-size: 56px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    color: #fff;
}

.hero-content .highlight {
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content > p {
    font-size: 18px;
    color: #999;
    line-height: 1.6;
    margin-bottom: 40px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* Hero Preview */
.hero-preview {
    flex: 1;
    display: flex;
    justify-content: center;
    animation: float 6s ease-in-out infinite;
}

.preview-window {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    width: 100%;
    max-width: 450px;
}

.preview-window .preview-header {
    background: #e8e8e8;
    padding: 12px 16px;
    display: flex;
    gap: 8px;
    border-bottom: none;
}

.preview-window .preview-header .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.preview-window .preview-header .dot.red { background: #ff5f57; }
.preview-window .preview-header .dot.yellow { background: #ffbd2e; }
.preview-window .preview-header .dot.green { background: #28c840; }

.preview-window .preview-content {
    padding: 30px;
    color: #333;
    background: #fff;
}

.preview-title-demo {
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 8px;
    color: #333;
}

.preview-meta-demo {
    font-size: 12px;
    color: #888;
    text-align: center;
    margin-bottom: 24px;
}

.preview-chord-demo {
    display: flex;
    gap: 40px;
    margin-bottom: 8px;
    font-family: 'Monaco', monospace;
}

.chord-demo {
    color: #3b82f6;
    font-weight: bold;
    font-size: 14px;
}

.preview-lyric-demo {
    font-size: 16px;
    color: #333;
}

/* Features Section */
.landing-features {
    padding: 100px 60px;
    background: rgba(0, 0, 0, 0.3);
}

.landing-features h3 {
    font-size: 40px;
    text-align: center;
    margin-bottom: 60px;
    color: #fff;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 40px 30px;
    text-align: center;
    transition: all 0.3s;
    animation: fadeInUp 0.6s ease-out backwards;
}

.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.2s; }
.feature-card:nth-child(3) { animation-delay: 0.3s; }
.feature-card:nth-child(4) { animation-delay: 0.4s; }
.feature-card:nth-child(5) { animation-delay: 0.5s; }
.feature-card:nth-child(6) { animation-delay: 0.6s; }

.feature-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.feature-card h4 {
    font-size: 20px;
    margin-bottom: 12px;
    color: #fff;
}

.feature-card p {
    font-size: 14px;
    color: #999;
    line-height: 1.6;
}

/* How It Works Section */
.landing-how-it-works {
    padding: 100px 60px;
}

.landing-how-it-works h3 {
    font-size: 40px;
    text-align: center;
    margin-bottom: 60px;
    color: #fff;
}

.steps {
    display: flex;
    justify-content: center;
    gap: 60px;
    max-width: 1000px;
    margin: 0 auto;
}

.step {
    text-align: center;
    flex: 1;
}

.step-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    margin: 0 auto 20px;
    color: #fff;
}

.step h4 {
    font-size: 20px;
    margin-bottom: 12px;
    color: #fff;
}

.step p {
    font-size: 14px;
    color: #999;
}

/* CTA Section */
.landing-cta {
    padding: 100px 60px;
    text-align: center;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(37, 99, 235, 0.1));
}

.landing-cta h3 {
    font-size: 40px;
    margin-bottom: 16px;
    color: #fff;
}

.landing-cta p {
    font-size: 18px;
    color: #999;
    margin-bottom: 40px;
}

/* Landing Footer */
.landing-footer {
    padding: 30px 60px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #666;
    font-size: 14px;
}

/* Main App Container */
.main-app {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.main-app.hidden {
    display: none !important;
}

/* Landing Page Responsive */
@media (max-width: 1024px) {
    .landing-hero {
        flex-direction: column;
        text-align: center;
        padding: 120px 30px 60px;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-content h2 {
        font-size: 40px;
    }

    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .steps {
        flex-direction: column;
        gap: 40px;
    }
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent !important;
    border: none !important;
    padding: 10px !important;
    cursor: pointer;
    z-index: 101;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 3px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

@media (max-width: 768px) {
    .landing-header {
        padding: 15px 20px;
    }

    .mobile-menu-btn {
        display: flex !important;
    }

    .landing-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: rgba(15, 15, 15, 0.98);
        flex-direction: column;
        padding: 80px 30px 30px;
        gap: 20px;
        transition: right 0.3s ease;
        z-index: 100;
    }

    .landing-nav.show {
        right: 0;
    }

    .landing-nav a {
        display: block !important;
        font-size: 18px;
        padding: 10px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .landing-nav button {
        width: 100%;
        margin-top: 10px;
    }

    .landing-hero {
        padding: 100px 20px 40px;
    }

    .hero-content h2 {
        font-size: 32px;
    }

    .hero-preview {
        display: none;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .landing-features,
    .landing-how-it-works,
    .landing-cta {
        padding: 60px 20px;
    }

    .steps {
        gap: 30px;
    }
}

/* ==================== CSS CUSTOM PROPERTIES ==================== */
:root {
    --bg-primary: #0f0f0f;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #242424;
    --border-color: #333;
    --text-primary: #e0e0e0;
    --text-secondary: #999;
    --accent-color: #3b82f6;
    --accent-hover: #2563eb;
    --chord-color: #60a5fa;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --preview-bg: #ffffff;
    --preview-text: #1f1f1f;
    --chord-font-size: 14px;
    --lyric-font-size: 16px;
    --chord-only-font-size: 18px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
}

/* ==================== THEME VARIATIONS ==================== */
body.theme-dark {
    --bg-primary: #1e1e1e;
    --bg-secondary: #2d2d30;
    --bg-tertiary: #252526;
    --border-color: #3e3e42;
    --text-primary: #d4d4d4;
    --accent-color: #0e639c;
    --chord-color: #0066cc;
}

body.theme-light {
    --bg-primary: #f5f5f5;
    --bg-secondary: #e0e0e0;
    --bg-tertiary: #e8e8e8;
    --border-color: #ccc;
    --text-primary: #333;
    --accent-color: #2196f3;
    --chord-color: #1976d2;
}

body.theme-blue {
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #0d1117;
    --border-color: #30363d;
    --text-primary: #c9d1d9;
    --accent-color: #1f6feb;
    --chord-color: #58a6ff;
}

body.theme-warm {
    --bg-primary: #2b2420;
    --bg-secondary: #3d352f;
    --bg-tertiary: #2b2420;
    --border-color: #5c4f45;
    --text-primary: #e8dfd3;
    --accent-color: #c17c3c;
    --chord-color: #e89a4a;
}

/* ==================== BASE STYLES ==================== */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    height: 100vh;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.3s ease-in;
}

/* ==================== FULLSCREEN MODES ==================== */
body.fullscreen-editor .sidebar,
body.fullscreen-editor .preview-pane,
body.fullscreen-editor .header { display: none !important; }
body.fullscreen-editor .editor-pane { width: 100% !important; }

body.fullscreen-preview .sidebar,
body.fullscreen-preview .editor-pane,
body.fullscreen-preview .header { display: none !important; }
body.fullscreen-preview .preview-pane { width: 100% !important; }

/* ==================== HEADER STYLES ==================== */
.header {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    padding: 12px 20px;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    box-shadow: var(--shadow-md);
    position: relative;
    z-index: 10;
}

.header h1 {
    font-size: 20px;
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--accent-color), var(--chord-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* ==================== BUTTON STYLES ==================== */
button {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

button:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

button:active {
    transform: translateY(0);
}

button:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

button.secondary {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

button.secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--accent-color);
}

button.danger {
    background: linear-gradient(135deg, var(--danger-color), #dc2626);
}

button.success {
    background: linear-gradient(135deg, var(--success-color), #059669);
}

button.small {
    padding: 5px 10px;
    font-size: 12px;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ==================== USER MENU STYLES ==================== */
.user-menu {
    position: relative;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-color), var(--chord-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.user-avatar:hover {
    transform: scale(1.1);
    border-color: var(--accent-color);
}

.user-dropdown {
    position: absolute;
    top: 50px;
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    min-width: 220px;
    box-shadow: var(--shadow-xl);
    display: none;
    z-index: 1000;
}

.user-dropdown.show {
    display: block;
    animation: slideIn 0.3s;
}

.user-info {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.user-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 4px;
}

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

.connection-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 10px;
}

.connection-status.online {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success-color);
}

.connection-status.offline {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger-color);
}

.connection-status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

/* ==================== MAIN CONTAINER ==================== */
.main-container {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* ==================== SIDEBAR STYLES ==================== */
.sidebar {
    width: 280px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: width 0.3s;
}

.sidebar.collapsed {
    width: 50px;
}

.sidebar.collapsed .sidebar-content,
.sidebar.collapsed .sidebar-header h3 {
    display: none;
}

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

.sidebar-header h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.toggle-sidebar {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 5px;
    font-size: 16px;
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    min-height: 0;
}

.sidebar-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}

.sidebar-actions button {
    flex: 1;
    font-size: 12px;
    padding: 8px;
}

/* ==================== SEARCH BOX ==================== */
.search-box {
    position: relative;
    margin-bottom: 15px;
}

.search-box input {
    width: 100%;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 12px 8px 32px;
    border-radius: 6px;
    font-size: 13px;
}

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

.search-box::before {
    content: '🔍';
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
}

/* ==================== MOBILE SEARCH BAR ==================== */
.mobile-search-bar {
    display: none;
    padding: 8px 12px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.mobile-search-bar input {
    width: 100%;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 14px;
}

.mobile-search-bar input:focus {
    outline: none;
    border-color: var(--accent-color);
}

/* ==================== CHORD TOOLS ==================== */
.chord-tools {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ==================== SONG LIST ==================== */
.song-list {
    list-style: none;
}

.song-item {
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    margin-bottom: 4px;
    transition: all 0.2s;
    border: 1px solid transparent;
}

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

.song-item:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: -2px;
}

.song-item.active {
    background: var(--bg-tertiary);
    border-color: var(--accent-color);
}

.song-item-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-item-meta {
    font-size: 11px;
    color: var(--text-secondary);
    display: flex;
    gap: 8px;
}

.song-item-actions {
    display: none;
    gap: 4px;
    margin-top: 6px;
}

.song-item:hover .song-item-actions {
    display: flex;
}

.song-item-actions button {
    padding: 3px 8px;
    font-size: 10px;
}

.cloud-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    color: var(--accent-color);
    background: rgba(59, 130, 246, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

/* ==================== EDITOR PANE ==================== */
.editor-pane {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.editor-toolbar {
    padding: 10px 15px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.editor-toolbar button {
    padding: 6px 10px;
    font-size: 12px;
}

.toolbar-divider {
    width: 1px;
    height: 24px;
    background: var(--border-color);
    margin: 0 4px;
}

.editor-toolbar select {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
}

/* Toolbar Dropdown Menus */
.toolbar-dropdown {
    position: relative;
    display: inline-block;
}

.toolbar-dropdown .dropdown-toggle {
    cursor: pointer;
}

.toolbar-dropdown .dropdown-menu {
    display: none !important;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 100;
    min-width: 160px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: var(--shadow-lg);
    padding: 4px 0;
    margin-top: 4px;
}

.toolbar-dropdown .dropdown-menu.show {
    display: block !important;
    animation: slideIn 0.15s ease-out;
}

.toolbar-dropdown .dropdown-menu button {
    display: block !important;
    width: 100%;
    text-align: left;
    padding: 8px 12px;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    color: var(--text-primary);
    font-size: 12px;
    font-weight: normal;
    cursor: pointer;
    transition: background 0.15s;
    box-shadow: none !important;
    transform: none !important;
}

.toolbar-dropdown .dropdown-menu button:hover {
    background: var(--bg-tertiary) !important;
    transform: none !important;
    box-shadow: none !important;
}

.editor-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.song-title-input {
    width: 100%;
    background: var(--bg-tertiary);
    border: none;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 12px 15px;
    font-size: 18px;
    font-weight: 600;
}

.song-title-input:focus {
    outline: none;
    border-bottom-color: var(--accent-color);
}

.editor-container {
    flex: 1;
    position: relative;
}

#chordEditor {
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    border: none;
    color: var(--text-primary);
    padding: 15px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    line-height: 1.6;
    resize: none;
}

#chordEditor:focus {
    outline: none;
}

/* ==================== PREVIEW PANE ==================== */
.preview-pane {
    width: 45%;
    min-width: 300px;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.preview-header {
    padding: 10px 15px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.preview-header h3 {
    font-size: 14px;
    font-weight: 600;
}

.preview-controls {
    display: flex;
    gap: 6px;
}

.preview-controls button {
    padding: 5px 10px;
    font-size: 11px;
}

.preview-wrapper {
    flex: 1;
    overflow: auto;
    padding: 20px;
    background: var(--preview-bg);
    position: relative;
}

#preview {
    font-family: 'Georgia', serif;
    color: var(--preview-text);
    max-width: 800px;
    margin: 0 auto;
}

.preview-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 5px;
    text-align: center;
}

.preview-artist {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
    text-align: center;
}

.preview-meta {
    font-size: 12px;
    color: #888;
    margin-bottom: 20px;
    text-align: center;
}

.chord-line {
    margin-bottom: 4px;
    min-height: 1.2em;
}

.chord-line .chord {
    color: var(--chord-color);
    font-weight: bold;
    font-family: 'Monaco', monospace;
    font-size: var(--chord-font-size);
}

.lyric-line {
    margin-bottom: 12px;
    font-size: var(--lyric-font-size);
    line-height: 1.4;
}

/* ChordPro chord-above-lyric formatting */
.chord-lyric-pair {
    margin-bottom: 8px;
    font-family: 'Monaco', 'Courier New', monospace;
}

.chord-row {
    color: var(--chord-color);
    font-weight: bold;
    font-size: var(--chord-font-size);
    white-space: pre;
    line-height: 1.2;
    min-height: 1.2em;
}

.lyric-row {
    font-size: var(--lyric-font-size);
    white-space: pre;
    line-height: 1.4;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.section-header {
    display: inline-block;
    font-weight: bold;
    font-size: 14px;
    color: #333;
    margin: 24px 0 12px 0;
    padding: 8px 16px;
    background: #e0e0e0;
    border-radius: 6px;
}

.section-header:first-of-type {
    margin-top: 10px;
}

.chord-only-line {
    color: var(--chord-color);
    font-weight: bold;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: var(--chord-only-font-size);
    margin-bottom: 8px;
    letter-spacing: 3px;
    line-height: 1.8;
}

.chords-only-row {
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: var(--chord-only-font-size);
    font-weight: bold;
    color: var(--chord-color);
    margin-bottom: 10px;
    padding: 0;
    letter-spacing: 3px;
    line-height: 1.8;
}

/* ==================== CHORDPRO PREVIEW ELEMENTS ==================== */
.preview-subtitle {
    font-size: 14px;
    color: #777;
    margin-bottom: 5px;
    text-align: center;
    font-style: italic;
}

.preview-composer {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
    text-align: center;
}

.empty-line {
    height: 12px;
}

/* ChordPro Environment Blocks */
.chordpro-chorus {
    margin: 16px 0;
    padding: 12px 16px;
    border-left: 4px solid var(--chord-color);
    background: rgba(59, 130, 246, 0.05);
    border-radius: 0 8px 8px 0;
}

.chordpro-verse {
    margin: 16px 0;
    padding: 12px 16px;
    border-left: 4px solid #10b981;
    background: rgba(16, 185, 129, 0.05);
    border-radius: 0 8px 8px 0;
}

.chordpro-bridge {
    margin: 16px 0;
    padding: 12px 16px;
    border-left: 4px solid #f59e0b;
    background: rgba(245, 158, 11, 0.05);
    border-radius: 0 8px 8px 0;
}

.environment-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
    margin-bottom: 8px;
}

/* ChordPro Tab Block */
.chordpro-tab {
    margin: 16px 0;
    padding: 12px 16px;
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.chordpro-tab pre {
    margin: 0;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.4;
    color: #333;
    white-space: pre;
    overflow-x: auto;
}

/* ChordPro Comments */
.chordpro-comment {
    font-size: 13px;
    color: #666;
    background: #f5f5f5;
    padding: 8px 12px;
    margin: 12px 0;
    border-radius: 6px;
    font-style: normal;
}

.chordpro-comment-italic {
    font-size: 13px;
    color: #666;
    padding: 8px 0;
    margin: 12px 0;
    font-style: italic;
}

.chordpro-comment-box {
    font-size: 13px;
    color: #333;
    background: #fff3cd;
    border: 2px solid #ffc107;
    padding: 10px 14px;
    margin: 12px 0;
    border-radius: 6px;
    font-weight: 500;
}

/* Inline chord styling improvements */
.lyric-line .chord {
    color: var(--chord-color);
    font-weight: bold;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: var(--chord-font-size);
    position: relative;
    top: -0.1em;
}

/* Chord Diagrams */
.chord-chart {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
}

.chord-chart-title {
    font-size: 14px;
    font-weight: 600;
    color: #666;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.chord-diagrams {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.chord-diagram {
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 5px;
}

.chord-diagram text {
    fill: #333;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.chord-diagram line {
    stroke: #555;
}

.chord-diagram circle {
    stroke: #333;
}

/* ==================== METRONOME WIDGET ==================== */
.metronome-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    min-width: 280px;
    box-shadow: var(--shadow-xl);
    z-index: 1000;
    display: none;
    animation: slideIn 0.3s;
}

.metronome-widget.show {
    display: block;
}

.metronome-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.metronome-header h3 {
    font-size: 16px;
    color: var(--text-primary);
    margin: 0;
}

.metronome-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

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

.metronome-display {
    text-align: center;
    margin-bottom: 15px;
}

.metronome-bpm {
    font-size: 48px;
    font-weight: bold;
    color: var(--accent-color);
}

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

.metronome-beat-indicator {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
}

.beat-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    transition: all 0.1s;
}

.beat-dot.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    box-shadow: 0 0 10px var(--accent-color);
}

.beat-dot.first.active {
    background: var(--success-color);
    border-color: var(--success-color);
    box-shadow: 0 0 10px var(--success-color);
}

.metronome-slider {
    margin-bottom: 15px;
}

.metronome-slider input[type="range"] {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--bg-tertiary);
    border-radius: 3px;
    outline: none;
}

.metronome-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: var(--accent-color);
    border-radius: 50%;
    cursor: pointer;
}

.metronome-controls {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 15px;
}

.metronome-controls #metronomePlayBtn {
    min-width: 80px;
}

.metronome-presets {
    display: flex;
    justify-content: center;
    gap: 6px;
}

.metronome-presets button {
    min-width: 40px;
}

/* ==================== DRAWING MODE STYLES ==================== */
.drawing-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.drawing-back-btn {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.drawing-back-btn:hover {
    background: var(--accent-color);
    color: white;
}

.drawing-tools {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pen-btn, .tool-btn {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 2px solid transparent;
    background: var(--bg-tertiary);
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.pen-btn:hover, .tool-btn:hover {
    border-color: var(--accent-color);
}

.pen-btn.active, .tool-btn.active {
    border-color: var(--accent-color);
    background: var(--accent-color);
}

.pen-settings {
    padding: 12px 15px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

.color-palette {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.color-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}

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

.color-btn.active {
    border-color: white;
    box-shadow: 0 0 0 2px var(--accent-color);
}

.pen-setting-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.pen-setting-row span:first-child {
    width: 70px;
}

.pen-setting-row input[type="range"] {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--bg-primary);
    border-radius: 3px;
    outline: none;
}

.pen-setting-row input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: var(--accent-color);
    border-radius: 50%;
    cursor: pointer;
}

.pen-setting-row span:last-child {
    width: 30px;
    text-align: right;
}

#drawingCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: crosshair;
    touch-action: none;
}

body.drawing-mode .preview-wrapper {
    overflow: hidden;
}

body.drawing-mode #preview {
    pointer-events: none;
}

/* ==================== MODAL STYLES ==================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.2s;
}

.modal-overlay.show {
    display: flex;
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideIn 0.3s;
}

.modal-content h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.modal-content label {
    display: block;
    font-size: 13px;
    margin-bottom: 5px;
    color: var(--text-secondary);
}

.modal-content input,
.modal-content select,
.modal-content textarea {
    width: 100%;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 15px;
}

.modal-content input:focus,
.modal-content select:focus,
.modal-content textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.modal-error {
    padding: 10px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--danger-color);
    border-radius: 6px;
    color: var(--danger-color);
    font-size: 13px;
    margin-bottom: 15px;
    display: none;
}

.modal-error.show {
    display: block;
}

/* ==================== TOAST NOTIFICATIONS ==================== */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 20px;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 250px;
}

.toast.success {
    border-left: 4px solid var(--success-color);
}

.toast.error {
    border-left: 4px solid var(--danger-color);
}

.toast.warning {
    border-left: 4px solid var(--warning-color);
}

.toast.info {
    border-left: 4px solid var(--accent-color);
}

/* ==================== LOADING SPINNER ==================== */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ==================== WORKSPACE SELECTOR ==================== */
.workspace-selector {
    display: flex;
    gap: 8px;
    align-items: center;
    flex: 1;
}

.workspace-selector select {
    flex: 1;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
}

.workspace-selector select:focus {
    outline: none;
    border-color: var(--accent-color);
}

/* ==================== SIDEBAR TABS ==================== */
.sidebar-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
}

.tab-btn {
    flex: 1;
    padding: 10px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s;
}

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

.tab-btn.active {
    color: var(--accent-color);
    border-bottom: 2px solid var(--accent-color);
}

/* ==================== SETLIST ITEMS ==================== */
.setlist-item {
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    margin-bottom: 4px;
    transition: all 0.2s;
    border: 1px solid transparent;
}

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

.setlist-item.active {
    background: var(--bg-tertiary);
    border-color: var(--accent-color);
}

.setlist-item-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.setlist-song-count {
    font-size: 11px;
    color: var(--text-secondary);
}

.setlist-item-actions {
    display: none;
    gap: 4px;
    margin-top: 6px;
}

.setlist-item:hover .setlist-item-actions {
    display: flex;
}

/* ==================== WORKSPACE LIST ==================== */
.workspace-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: var(--bg-tertiary);
    border-radius: 6px;
    margin-bottom: 8px;
}

.workspace-list-item-name {
    font-size: 14px;
    font-weight: 500;
}

.workspace-color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
}

/* ==================== SORTABLE LIST ==================== */
.sortable-list {
    list-style: none;
    padding: 0;
    margin: 0;
    min-height: 50px;
    background: var(--bg-primary);
    border-radius: 6px;
    padding: 8px;
}

.sortable-list li {
    padding: 10px 12px;
    background: var(--bg-tertiary);
    margin-bottom: 4px;
    border-radius: 4px;
    cursor: grab;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.sortable-list li:active {
    cursor: grabbing;
}

.sortable-list li.dragging {
    opacity: 0.5;
}

.sortable-list .drag-handle {
    color: var(--text-secondary);
    margin-right: 10px;
}

.sortable-list .remove-btn {
    background: none;
    border: none;
    color: var(--danger-color);
    cursor: pointer;
    padding: 2px 6px;
    font-size: 14px;
}

/* ==================== AVAILABLE SONGS LIST ==================== */
.available-songs-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 200px;
    overflow-y: auto;
    background: var(--bg-primary);
    border-radius: 6px;
}

.available-songs-list li {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s;
}

.available-songs-list li:hover {
    background: var(--bg-tertiary);
}

.available-songs-list li.added {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ==================== SETLIST SECTIONS ==================== */
.setlist-section {
    margin-bottom: 20px;
}

.setlist-section h4 {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-weight: 600;
}

/* ==================== EMPTY STATE ==================== */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

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

.empty-state p {
    font-size: 13px;
    margin-bottom: 20px;
}

/* ==================== TEAM COLLABORATION ==================== */
.team-section {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.team-member {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px;
    background: var(--bg-tertiary);
    border-radius: 6px;
    margin-bottom: 6px;
}

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

.team-member-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: 600;
}

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

.team-member-role {
    font-size: 11px;
    color: var(--text-secondary);
}

/* ==================== RESPONSIVE STYLES ==================== */
@media (max-width: 900px) {
    .main-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        max-height: 40vh;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        overflow-y: auto;
    }

    .editor-pane,
    .preview-pane {
        width: 100%;
        min-width: 0;
    }

    .editor-pane {
        min-height: 40vh;
    }

    .preview-pane {
        min-height: 40vh;
        border-left: none;
        border-top: 1px solid var(--border-color);
    }
}

@media (max-width: 600px) {
    .mobile-search-bar {
        display: block;
    }

    .header {
        padding: 8px 10px;
        gap: 8px;
        flex-wrap: wrap;
    }

    .header h1 {
        font-size: 14px;
        flex: 1;
    }

    .header-controls {
        gap: 4px;
    }

    .header-controls select,
    .header-controls button {
        padding: 5px 8px;
        font-size: 11px;
    }

    /* Sidebar mobile - compact collapsible */
    .sidebar {
        max-height: none;
        height: auto;
        overflow: visible;
        border-bottom: 1px solid var(--border-color);
    }

    .sidebar.collapsed {
        width: 100%;
    }

    .sidebar.collapsed .sidebar-content {
        display: none;
    }

    .sidebar-header {
        padding: 8px;
        gap: 6px;
    }

    .sidebar-header .workspace-selector {
        flex: 1;
        order: 0;
    }

    .sidebar-header .workspace-selector select {
        font-size: 12px;
        padding: 6px 8px;
    }

    .sidebar-header .workspace-selector button {
        padding: 6px;
        font-size: 10px;
    }

    .sidebar-header .toggle-sidebar {
        order: 1;
    }

    .sidebar-tabs {
        flex-shrink: 0;
        background: var(--bg-secondary);
    }

    .sidebar-tabs .tab-btn {
        padding: 10px 8px;
        font-size: 11px;
    }

    .sidebar-content {
        max-height: 200px;
        overflow-y: auto;
        padding: 8px;
    }

    .sidebar-actions {
        flex-direction: row;
        gap: 6px;
        margin-bottom: 8px;
    }

    .sidebar-actions button {
        flex: 1;
        padding: 8px;
        font-size: 11px;
    }

    .search-box {
        display: none; /* Use mobile search bar instead */
    }

    .song-list {
        max-height: 120px;
        overflow-y: auto;
    }

    .song-item {
        padding: 8px;
    }

    .song-item-title {
        font-size: 12px;
    }

    .song-item-meta {
        font-size: 9px;
    }

    .song-item-actions {
        display: none; /* Hide on mobile to save space */
    }

    /* Editor toolbar mobile */
    .editor-toolbar {
        flex-wrap: wrap;
        padding: 6px;
        gap: 4px;
    }

    .chord-tools {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
        width: 100%;
    }

    .chord-tools button,
    .chord-tools .toolbar-dropdown button {
        padding: 6px 8px;
        font-size: 10px;
    }

    .toolbar-divider {
        display: none;
    }

    .editor-toolbar > button {
        padding: 6px 10px;
        font-size: 11px;
    }

    /* Main container stacking */
    .main-container {
        flex-direction: column;
        height: auto;
        min-height: calc(100vh - 120px);
    }

    .editor-pane {
        min-height: 35vh;
        flex: 1;
    }

    .preview-pane {
        min-height: 35vh;
        flex: 1;
    }

    .song-title-input {
        font-size: 16px;
        padding: 8px 10px;
    }

    #chordEditor {
        font-size: 14px;
        min-height: 150px;
    }

    /* Preview mobile */
    .preview-header {
        padding: 6px 8px;
        flex-wrap: wrap;
        gap: 4px;
    }

    .preview-header h3 {
        font-size: 12px;
        width: 100%;
    }

    .preview-controls {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
    }

    .preview-controls button {
        padding: 5px 8px;
        font-size: 10px;
        flex: 1;
        min-width: 45px;
    }

    .save-status {
        order: -1;
        width: 100%;
        justify-content: center;
        margin-bottom: 4px;
    }

    .preview-wrapper {
        padding: 10px;
    }

    .preview-title {
        font-size: 18px;
    }

    .preview-artist {
        font-size: 14px;
    }
}

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

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

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

/* ==================== SCREEN READER ONLY ==================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ==================== FOCUS TRAP FOR MODALS ==================== */
.modal-content:focus {
    outline: none;
}

[role="dialog"] {
    outline: none;
}

/* ==================== SAVE STATUS INDICATOR ==================== */
.save-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(-2px);
}

.save-status.visible {
    opacity: 1;
    transform: translateY(0);
}

.save-status.saving {
    color: var(--warning-color);
    background: rgba(245, 158, 11, 0.1);
}

.save-status.saved {
    color: var(--success-color);
    background: rgba(16, 185, 129, 0.1);
}

.save-status.error {
    color: var(--danger-color);
    background: rgba(239, 68, 68, 0.1);
}

.save-status-icon {
    width: 12px;
    height: 12px;
}

.save-status.saving .save-status-icon {
    animation: spin 1s linear infinite;
}

/* Checkmark animation */
@keyframes checkmark {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.save-status.saved .save-status-icon {
    animation: checkmark 0.3s ease-out;
}

/* ==================== ONBOARDING TUTORIAL ==================== */
.onboarding-container {
    padding: 30px;
    text-align: center;
}

.onboarding-progress {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 25px;
}

.step-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border-color);
    transition: all 0.3s ease;
}

.step-dot.active {
    background: var(--accent-color);
    transform: scale(1.2);
}

.step-dot.completed {
    background: var(--success-color);
}

.onboarding-step {
    display: none;
    animation: fadeIn 0.3s ease;
}

.onboarding-step.active {
    display: block;
}

.onboarding-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.onboarding-step h3 {
    margin: 0 0 15px;
    font-size: 20px;
    color: var(--text-primary);
}

.onboarding-step p {
    margin: 0 0 10px;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.onboarding-step p strong {
    color: var(--text-primary);
}

.onboarding-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 25px;
    gap: 10px;
}

.onboarding-nav button {
    min-width: 100px;
}

.onboarding-skip {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    margin-top: 15px;
    padding: 5px 10px;
}

.onboarding-skip:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==================== COLLABORATION STYLES ==================== */
.collaborator-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    background: var(--bg-secondary);
    border-radius: 4px;
    margin-bottom: 6px;
}

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

.collaborator-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    font-weight: 600;
}

.collaborator-details {
    text-align: left;
}

.collaborator-email {
    font-size: 13px;
    color: var(--text-primary);
}

.collaborator-role {
    font-size: 11px;
    color: var(--text-secondary);
}

.collaborator-actions {
    display: flex;
    gap: 5px;
}

.collaborator-actions button {
    padding: 4px 8px;
    font-size: 11px;
}
