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

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: url('../images/bk01.jpg') center center / cover no-repeat fixed;
    color: #ffffff;
    min-height: 100vh;
    padding: 0;
    overflow-x: hidden;
}

/* Header Styles */
.main-header {
    background: linear-gradient(145deg, rgba(15, 15, 15, 0.95) 0%, rgba(5, 5, 5, 0.98) 100%);
    border-bottom: 1px solid rgba(60, 60, 60, 0.3);
    backdrop-filter: blur(20px);
    padding: 20px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.logo-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.1;
}



.logo {
    height: 88px;
    width: 88px;
    object-fit: contain;
    filter: brightness(1.2);
}

.app-logo {
    height: 88px;
    width: 88px;
    flex-shrink: 0;
    object-fit: contain;
    filter: brightness(1.2) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.45));
    transition: transform 0.3s ease, filter 0.3s ease;
}

.logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    border-radius: 8px;
    outline: none;
}

.logo-link:focus-visible {
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.55);
}

.app-logo:hover {
    filter: brightness(1.35) drop-shadow(0 3px 6px rgba(220, 53, 69, 0.35));
    transform: scale(1.05);
}

.app-title {
    font-size: 25px;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff 0%, #cccccc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
    margin: 0;
}

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

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

.mobile-controls {
    display: none;
}

.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: linear-gradient(145deg, rgba(15, 15, 15, 0.98) 0%, rgba(5, 5, 5, 0.99) 100%);
    border: 1px solid rgba(60, 60, 60, 0.3);
    border-radius: 8px;
    padding: 20px;
    min-width: 200px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(20px);
    z-index: 1000;
}

.mobile-menu.active {
    display: block;
}

.pro-login-btn {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pro-login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4);
}

.pro-login-btn.mobile {
    width: 100%;
    margin-bottom: 15px;
}

.theme-toggle-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
}

.theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.theme-toggle-btn.mobile {
    width: 100%;
    justify-content: center;
    padding: 12px;
}

.theme-icon {
    width: 18px;
    height: 18px;
    transition: all 0.3s ease;
}

.theme-toggle-btn .sun-icon {
    display: none;
}

.theme-toggle-btn .moon-icon {
    display: block;
}

body.light-theme .theme-toggle-btn .sun-icon {
    display: block;
}

body.light-theme .theme-toggle-btn .moon-icon {
    display: none;
}

.theme-text {
    font-size: 14px;
    font-weight: 500;
}

.hamburger-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: all 0.3s ease;
}

.hamburger-line {
    width: 24px;
    height: 2px;
    background: #fff;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.hamburger-btn.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.tagline {
     font-size: 0.9rem;
     color: red;
     font-style: italic;
     display: block;
     margin-top: 5px;
 }
 

   
   /* Section Header Styles */
    .section-header {
        color: #fff;
        font-size: 1.5rem;
        font-weight: 600;
        margin: 0 0 20px 0;
        padding: 10px 0;
        text-align: center;
    }
    
    /* New Library Container */
    .new-library-row {
    background: linear-gradient(145deg, rgba(40, 40, 40, 0.6) 0%, rgba(20, 20, 20, 0.8) 100%);
    border-radius: 4px;
    padding: 20px 20px 0 20px;
    margin: 20px 0;
    border: 1px solid rgba(80, 80, 80, 0.3);
    backdrop-filter: blur(15px);
    width: 100%;
    text-align: left;
}

.new-row {
    background: linear-gradient(145deg, rgba(40, 40, 40, 0.6) 0%, rgba(20, 20, 20, 0.8) 100%);
    border-radius: 4px;
    padding: 15px;
    margin: 15px 0 0 0;
    border: 1px solid rgba(80, 80, 80, 0.3);
    backdrop-filter: blur(15px);
    width: 100%;
}

.row-content {
    color: white;
    min-height: 50px;
}

/* Pattern Tools Styles */


.record-btn.recording {
    background: linear-gradient(145deg, #fd7e14, #e8590c);
    animation: pulse 1.5s infinite;
}

.recording-status {
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #dc3545;
    font-weight: 500;
}

.recording-indicator {
    font-size: 20px;
    animation: blink 1s infinite;
}

.recording-time {
    font-family: 'Courier New', monospace;
    font-size: 16px;
}

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

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Pattern Library Styles */
.pattern-library {
    margin-top: 30px;
    width: 100%;
}

.library-title {
    color: #fff;
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0 0 20px 0;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.library-item {
    background: rgba(30, 30, 30, 0.8);
    border: 1px solid rgba(80, 80, 80, 0.4);
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.library-item:hover {
    border-color: rgba(0, 123, 255, 0.6);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
    transform: translateY(-2px);
}

.pattern-preview {
    margin-bottom: 15px;
}

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

.pattern-info h4 {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
}

.pattern-bpm {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    font-weight: 400;
}

.pattern-visual {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.track-preview {
    display: flex;
    gap: 4px;
}

.track-preview .step {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    background: rgba(80, 80, 80, 0.5);
    border: 1px solid rgba(100, 100, 100, 0.3);
}

.track-preview .step.active {
    background: linear-gradient(145deg, #007bff, #0056b3);
    border-color: #007bff;
    box-shadow: 0 0 4px rgba(0, 123, 255, 0.4);
}

.pattern-actions {
    display: flex;
    gap: 10px;
}

.load-pattern-btn,
.preview-pattern-btn {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.load-pattern-btn {
    background: linear-gradient(145deg, #28a745, #1e7e34);
    color: white;
}

.load-pattern-btn:hover {
    background: linear-gradient(145deg, #1e7e34, #155724);
    transform: translateY(-1px);
}

.preview-pattern-btn {
    background: linear-gradient(145deg, #6c757d, #5a6268);
    color: white;
}

.preview-pattern-btn:hover {
    background: linear-gradient(145deg, #5a6268, #495057);
    transform: translateY(-1px);
}

.preview-pattern-btn.playing {
    background: linear-gradient(145deg, #dc3545, #c82333);
    animation: pulse 1.5s infinite;
}

/* Professional Footer Styles */
.app-footer {
    width: 100%;
    margin-top: 60px;
    background: linear-gradient(145deg, rgba(20, 20, 20, 0.95) 0%, rgba(10, 10, 10, 0.98) 100%);
    border-top: 1px solid rgba(70, 70, 70, 0.3);
    backdrop-filter: blur(20px);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.3);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-main {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding: 50px 0 30px;
    border-bottom: 1px solid rgba(70, 70, 70, 0.2);
}

.footer-section {
    display: flex;
    flex-direction: column;
}

/* Brand Section */
.footer-brand {
    max-width: 350px;
}

.footer-logo {
    color: #ffffff;
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 0 15px 0;
    background: linear-gradient(135deg, #ffffff 0%, #cccccc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
}

.footer-description {
    color: #cccccc;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0 0 25px 0;
    opacity: 0.9;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(145deg, rgba(60, 60, 60, 0.4) 0%, rgba(30, 30, 30, 0.6) 100%);
    border: 1px solid rgba(100, 100, 100, 0.3);
    border-radius: 8px;
    color: #cccccc;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.social-link:hover {
    background: linear-gradient(145deg, rgba(0, 212, 170, 0.2) 0%, rgba(0, 150, 120, 0.3) 100%);
    border-color: rgba(0, 212, 170, 0.5);
    color: #00d4aa;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 212, 170, 0.2);
}

/* Footer Sections */
.footer-title {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 20px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-link {
    color: #cccccc;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    opacity: 0.8;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 2px 0;
}

.footer-link:hover {
    color: #00d4aa;
    opacity: 1;
    transform: translateX(5px);
}

.footer-link svg {
    flex-shrink: 0;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.footer-link:hover svg {
    opacity: 1;
}

/* Footer Bottom */
.footer-bottom {
    padding: 25px 0;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.copyright {
    color: #999999;
    font-size: 0.85rem;
    margin: 0;
    opacity: 0.8;
}

.footer-bottom-links {
    display: flex;
    gap: 25px;
}

.footer-bottom-link {
    color: #999999;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.footer-bottom-link:hover {
    color: #00d4aa;
    opacity: 1;
}

/* Footer Responsive Design */
@media (max-width: 1024px) {
    .footer-main {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
        padding: 40px 0 25px;
    }
    
    .footer-brand {
        grid-column: 1 / -1;
        max-width: 100%;
        text-align: center;
        margin-bottom: 20px;
    }
    
    .footer-container {
        padding: 0 15px;
    }
}

@media (max-width: 768px) {
    .app-footer {
        margin-top: 40px;
    }
    
    .footer-main {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 30px 0 20px;
        text-align: center;
    }
    
    .footer-brand {
        margin-bottom: 15px;
    }
    
    .footer-logo {
        font-size: 1.5rem;
    }
    
    .footer-description {
        font-size: 0.9rem;
        margin-bottom: 20px;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .footer-title {
        font-size: 1rem;
        margin-bottom: 15px;
    }
    
    .footer-links li {
        margin-bottom: 8px;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .footer-bottom-links {
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .footer-container {
        padding: 0 10px;
    }
    
    .footer-main {
        padding: 25px 0 15px;
        gap: 20px;
    }
    
    .footer-logo {
        font-size: 1.3rem;
    }
    
    .footer-description {
        font-size: 0.85rem;
    }
    
    .social-links {
        gap: 10px;
    }
    
    .social-link {
        width: 35px;
        height: 35px;
    }
    
    .social-link svg {
        width: 16px;
        height: 16px;
    }
    
    .footer-title {
        font-size: 0.95rem;
    }
    
    .footer-link {
        font-size: 0.85rem;
    }
    
    .footer-bottom {
        padding: 20px 0;
    }
    
    .footer-bottom-links {
        flex-direction: column;
        gap: 10px;
    }
    
    .copyright,
    .footer-bottom-link {
        font-size: 0.8rem;
    }
}



/* Keyboard Help Styles */
.keyboard-help {
    margin-top: 30px;
    width: 100%;
}

.help-title {
    color: #fff;
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0 0 20px 0;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.shortcuts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.shortcut-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(30, 30, 30, 0.6);
    border: 1px solid rgba(80, 80, 80, 0.3);
    border-radius: 6px;
    padding: 12px 16px;
    transition: all 0.3s ease;
}

.shortcut-item:hover {
    border-color: rgba(0, 123, 255, 0.4);
    background: rgba(30, 30, 30, 0.8);
}

.shortcut-key {
    background: linear-gradient(145deg, #495057, #343a40);
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    font-weight: 600;
    min-width: 50px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.shortcut-desc {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 400;
}

.help-toggle {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.help-toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 10px;
}

.help-toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4);
}

.help-toggle-btn.mobile {
    width: 100%;
    margin-bottom: 15px;
    margin-right: 0;
}

.keyboard-help-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    max-width: 90vw;
    max-height: 80vh;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1001;
    overflow-y: auto;
}

.keyboard-help-popup.show {
    opacity: 1;
    visibility: visible;
}

.keyboard-help-popup .help-title {
    text-align: center;
    margin-bottom: 25px;
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Enhanced Responsive Design */
@media (max-width: 768px) {
    .keyboard-help-popup {
        width: calc(100% - 40px);
        max-height: calc(100vh - 100px);
        overflow-y: auto;
    }
    
    .help-toggle-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .shortcuts-grid {
        gap: 10px;
    }
    
    .shortcut-item {
        padding: 10px 14px;
    }
    
    .pattern-tools {
        padding: 24px 20px;
        margin: 0 -10px;
        border-radius: 12px;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .library-grid,
    .shortcuts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .tools-title,
    .library-title,
    .help-title {
        font-size: 1.5rem;
        margin-bottom: 24px;
    }
    
    .export-section,
    .import-section,
    .recording-section,
    .library-item {
        padding: 24px 20px;
    }
    
    .export-section h4,
    .import-section h4,
    .recording-section h4 {
        font-size: 1.1rem;
        margin-bottom: 18px;
    }
    
    .pattern-input {
        padding: 12px 14px;
        font-size: 14px;
    }
    
    .tool-btn {
        padding: 14px 18px;
        font-size: 14px;
    }
    
    .pattern-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .pattern-tools {
        padding: 20px 16px;
        margin: 0 -5px;
    }
    
    .tools-title {
        font-size: 1.3rem;
        margin-bottom: 20px;
    }
    
    .export-section,
    .import-section,
    .recording-section {
        padding: 20px 16px;
    }
    
    .tool-btn {
        padding: 12px 16px;
        font-size: 13px;
        gap: 8px;
    }
    
    .btn-icon {
        width: 18px;
        height: 18px;
    }
}

.container {
    max-width: 1200px;
    margin: 15px auto 0;
    background: transparent;
    border-radius: 4px;
    padding: 20px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(60, 60, 60, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}



/* Tab Styles */
.tab-container {
    margin-bottom: 20px;
}

.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    justify-content: flex-start;
    padding: 4px;
    background: linear-gradient(145deg, rgba(40, 40, 40, 0.6) 0%, rgba(20, 20, 20, 0.8) 100%);
    border-radius: 4px;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(80, 80, 80, 0.3);
    width: fit-content;
}

.tab-btn {
    padding: 8px 16px;
    border: 1px solid rgba(100, 100, 100, 0.3);
    background: linear-gradient(135deg, rgba(60, 60, 60, 0.4) 0%, rgba(30, 30, 30, 0.6) 100%);
    color: white;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.tab-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.tab-btn:hover::before {
    left: 100%;
}

.tab-btn:hover {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.2) 0%, rgba(176, 42, 55, 0.2) 100%);
    border-color: rgba(220, 53, 69, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.3);
    color: #ffffff;
}

.tab-btn.active {
    background: linear-gradient(135deg, #dc3545 0%, #b02a37 100%);
    border-color: #dc3545;
    color: #ffffff;
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.5);
    transform: translateY(-1px);
}

.tab-content {
    animation: fadeIn 0.3s ease;
    display: block;
}

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

.controls {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
    padding: 15px 20px;
    background: linear-gradient(145deg, rgba(25, 25, 25, 0.8) 0%, rgba(15, 15, 15, 0.9) 100%);
    border-radius: 4px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(60, 60, 60, 0.3);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.transport-controls {
    display: flex;
    gap: 8px;
    justify-content: flex-start;
    margin: 0;
    padding: 0;
    background: none;
    border-radius: 0;
    backdrop-filter: none;
    border: none;
}

.transport-btn {
    padding: 8px 16px;
    border: 1px solid rgba(100, 100, 100, 0.3);
    background: linear-gradient(135deg, rgba(60, 60, 60, 0.4) 0%, rgba(30, 30, 30, 0.6) 100%);
    color: #cccccc;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
}



.transport-btn.active {
    background: linear-gradient(135deg, #dc3545 0%, #b02a37 100%);
    border-color: #dc3545;
    color: #ffffff;
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.5);
}

.transport-controls button {
    padding: 8px 16px;
    border: 1px solid rgba(100, 100, 100, 0.3);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(15px);
    position: relative;
    overflow: hidden;
}

.transport-controls button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.transport-controls button:hover::before {
    left: 100%;
}

.play-btn {
    background: linear-gradient(135deg, #00d4aa 0%, #00a085 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(0, 212, 170, 0.3);
}

.play-btn:hover {
    background: linear-gradient(135deg, #00a085 0%, #00d4aa 100%);
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(0, 212, 170, 0.5);
    border-color: #00d4aa;
}

.play-btn.playing {
    background: linear-gradient(135deg, #ff4757 0%, #ff3742 100%);
    box-shadow: 0 6px 20px rgba(255, 71, 87, 0.3);
}

.stop-btn {
    background: linear-gradient(135deg, #ff4757 0%, #ff3742 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(255, 71, 87, 0.3);
}

.stop-btn:hover {
    background: linear-gradient(135deg, #ff3742 0%, #ff4757 100%);
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(255, 71, 87, 0.5);
    border-color: #ff4757;
}

.clear-btn {
    background: linear-gradient(135deg, #ffa726 0%, #ff9800 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(255, 167, 38, 0.3);
}

.clear-btn:hover {
    background: linear-gradient(135deg, #ff9800 0%, #ffa726 100%);
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(255, 167, 38, 0.5);
    border-color: #ffa726;
}

.export-btn {
    background: linear-gradient(135deg, #00b8d9 0%, #0091ad 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(0, 184, 217, 0.3);
}

.export-btn:hover {
    background: linear-gradient(135deg, #0091ad 0%, #00b8d9 100%);
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(0, 184, 217, 0.5);
    border-color: #00b8d9;
}

.export-btn:disabled {
    background: linear-gradient(135deg, #555 0%, #444 100%);
    cursor: wait;
    transform: none;
    box-shadow: none;
}

/* Kit Controls */
.kit-controls {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.kit-btn {
    padding: 8px 16px;
    border: 1px solid rgba(100, 100, 100, 0.3);
    background: linear-gradient(135deg, rgba(60, 60, 60, 0.4) 0%, rgba(30, 30, 30, 0.6) 100%);
    color: #cccccc;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.kit-btn:hover {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border-color: #007bff;
    color: #ffffff;
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.4);
    transform: translateY(-2px);
}

.kit-btn.active {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    border-color: #28a745;
    color: #ffffff;
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.5);
}

.tempo-controls, .signature-controls, .preset-controls, .sync-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 20px;
    background: rgba(40, 40, 40, 0.6);
    border-radius: 4px;
    border: 1px solid rgba(80, 80, 80, 0.4);
    backdrop-filter: blur(10px);
}

.tempo-controls label, .signature-controls label, .preset-controls label, .sync-controls label {
    font-weight: 600;
    color: white;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    min-width: fit-content;
}

#presetSelect {
    padding: 8px 12px;
    background: rgba(60, 60, 60, 0.8);
    border: 1px solid rgba(100, 100, 100, 0.4);
    border-radius: 4px;
    color: white;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    min-width: 200px;
}

#presetSelect:hover {
    background: rgba(80, 80, 80, 0.9);
    border-color: rgba(120, 120, 120, 0.6);
}

#presetSelect:focus {
    outline: none;
    border-color: #00d4aa;
    box-shadow: 0 0 0 2px rgba(0, 212, 170, 0.2);
}

#presetSelect option {
    background: rgba(40, 40, 40, 0.95);
    color: white;
    padding: 8px;
}





/* Mixer Page Styles */
.mixer {
    padding: 40px;
    text-align: center;
    background: rgba(20, 20, 20, 0.8);
    border-radius: 8px;
    margin: 20px;
    backdrop-filter: blur(10px);
}

.mixer-title {
    color: #00d4aa;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.section-subtitle {
    color: #00d4aa;
    font-size: 18px;
    margin: 20px 0 15px 0;
    text-align: center;
    font-weight: 600;
    text-shadow: 0 0 8px rgba(0, 212, 170, 0.5);
    border-bottom: 1px solid rgba(60, 60, 60, 0.3);
    padding-bottom: 10px;
}

/* Track Mixers Section */
.track-mixers-section {
    margin-bottom: 30px;
}

.track-mixers {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    padding: 20px 0;
}

.track-mixer {
    background: linear-gradient(145deg, rgba(40, 40, 40, 0.6) 0%, rgba(20, 20, 20, 0.8) 100%);
    border: 1px solid rgba(80, 80, 80, 0.3);
    border-radius: 4px;
    padding: 15px;
    width: 120px;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(15px);
    transition: all 0.3s ease;
}

.track-mixer:hover {
    border-color: rgba(0, 212, 170, 0.5);
    box-shadow: 0 12px 35px rgba(0, 212, 170, 0.2);
    transform: translateY(-2px);
}

.track-mixer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 8px;
}





.track-name {
    color: white;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 8px;
    text-shadow: 0 0 5px rgba(0, 212, 170, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.track-controls {
    display: flex;
    gap: 5px;
    justify-content: center;
}

.solo-btn, .mute-btn {
    width: 25px;
    height: 25px;
    border: 1px solid rgba(100, 100, 100, 0.3);
    background: linear-gradient(135deg, rgba(60, 60, 60, 0.4) 0%, rgba(30, 30, 30, 0.6) 100%);
    color: #cccccc;
    font-size: 10px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.solo-btn:hover {
    background: linear-gradient(135deg, #ffa726 0%, #ff9800 100%);
    color: #ffffff;
    border-color: #ffa726;
    box-shadow: 0 4px 15px rgba(255, 167, 38, 0.3);
}

.solo-btn.active {
    background: linear-gradient(135deg, #ffa726 0%, #ff9800 100%);
    color: #ffffff;
    border-color: #ffa726;
    box-shadow: 0 6px 20px rgba(255, 167, 38, 0.5);
}

.mute-btn:hover {
    background: linear-gradient(135deg, #ff4757 0%, #ff3742 100%);
    color: #ffffff;
    border-color: #ff4757;
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.3);
}

.mute-btn.active {
    background: linear-gradient(135deg, #ff4757 0%, #ff3742 100%);
    color: #ffffff;
    border-color: #ff4757;
    box-shadow: 0 6px 20px rgba(255, 71, 87, 0.5);
}

.track-mixer-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Pan Control */
.pan-control {
    text-align: center;
}

.pan-control label {
    color: #cccccc;
    font-size: 10px;
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pan-knob-container {
    display: flex;
    justify-content: center;
    margin-bottom: 5px;
}

.pan-knob {
    width: 30px;
    height: 30px;
    border: 2px solid rgba(100, 100, 100, 0.3);
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(60, 60, 60, 0.4) 0%, rgba(30, 30, 30, 0.6) 100%);
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.pan-knob:hover {
    border-color: rgba(0, 212, 170, 0.5);
    box-shadow: 0 0 15px rgba(0, 212, 170, 0.3);
}

.pan-knob-indicator {
    width: 2px;
    height: 12px;
    background: #00d4aa;
    position: absolute;
    top: 2px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 1px;
    box-shadow: 0 0 4px rgba(0, 212, 170, 0.5);
}

.pan-value {
    color: #00d4aa;
    font-size: 10px;
    font-weight: 600;
    text-shadow: 0 0 4px rgba(0, 212, 170, 0.3);
}

/* Track Fader */
.track-fader {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.track-fader .fader-container {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 150px;
}

.track-fader .fader-scale {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    font-size: 8px;
    color: #666666;
}

.track-fader .fader-track {
    width: 6px;
    height: 150px;
    background: linear-gradient(to bottom, rgba(40, 40, 40, 0.8) 0%, rgba(20, 20, 20, 0.9) 100%);
    border: 1px solid rgba(80, 80, 80, 0.3);
    border-radius: 3px;
    position: relative;
    cursor: pointer;
    backdrop-filter: blur(5px);
}

.track-fader .fader-handle {
    width: 20px;
    height: 12px;
    background: linear-gradient(135deg, rgba(60, 60, 60, 0.8) 0%, rgba(30, 30, 30, 0.9) 100%);
    border: 1px solid rgba(100, 100, 100, 0.3);
    border-radius: 2px;
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.track-fader .fader-handle:hover {
    background: linear-gradient(135deg, #00d4aa 0%, #00a085 100%);
    border-color: #00d4aa;
    box-shadow: 0 0 15px rgba(0, 212, 170, 0.5);
}

.track-fader .fader-value {
    margin-top: 8px;
    text-align: center;
}

.track-fader .fader-value span {
    color: #00d4aa;
    font-size: 10px;
    font-weight: 600;
    text-shadow: 0 0 4px rgba(0, 212, 170, 0.3);
}


/* Console Fader Styles */
.console-fader {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
    border-radius: 12px;
    border: 2px solid #333;
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.3),
        0 8px 32px rgba(0, 0, 0, 0.4);
    width: 120px;
    height: 400px;
}

.fader-label {
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 15px;
    text-align: center;
    background: #333;
    padding: 4px 8px;
    border-radius: 3px;
    border: 1px solid #555;
}

.fader-container {
    position: relative;
    display: flex;
    align-items: center;
    height: 280px;
    margin: 10px 0;
}

.fader-scale {
    position: absolute;
    left: -30px;
    height: 280px;
    top: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-end;
    pointer-events: none;
}

.scale-mark {
    color: #aaa;
    font-size: 10px;
    font-weight: 500;
    line-height: 1;
    margin: 2px 0;
}

.fader-track {
    position: relative;
    width: 8px;
    height: 280px;
    background: linear-gradient(to bottom, 
        #1a1a1a 0%, 
        #2a2a2a 20%, 
        #333 50%, 
        #2a2a2a 80%, 
        #1a1a1a 100%);
    border: 1px solid #444;
    border-radius: 4px;
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.fader-handle {
    position: absolute;
    width: 30px;
    height: 15px;
    background: linear-gradient(145deg, #888, #555);
    border: 2px solid #222;
    border-radius: 3px;
    cursor: pointer;
    box-shadow: 
        0 3px 6px rgba(0, 0, 0, 0.4),
        inset 0 1px 2px rgba(255, 255, 255, 0.2);
    left: -11px;
    top: 70%;
    transition: background 0.1s ease;
}

.fader-handle:hover {
    background: linear-gradient(145deg, #999, #666);
}

.fader-handle:active {
    background: linear-gradient(145deg, #aaa, #777);
}

.fader-cap {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 15px;
    background: linear-gradient(145deg, #555, #333);
    border: 1px solid #222;
    border-radius: 3px;
    pointer-events: none;
    box-shadow: 
        0 2px 6px rgba(0, 0, 0, 0.4),
        inset 0 1px 2px rgba(255, 255, 255, 0.1);
}

.fader-value {
    margin-top: 15px;
    text-align: center;
}

.fader-value span {
    color: red;
    font-size: 14px;
    font-weight: 600;
    background: transparent;
    padding: 6px 10px;
    border-radius: 4px;
    border: none;
    box-shadow: none;
}

#bpm, #uiSync {
    width: 120px;
    height: 6px;
    border-radius: 4px;
    background: linear-gradient(90deg, #808080 0%, #404040 100%);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    border: 1px solid #000000;
}

#bpm::-webkit-slider-thumb, #uiSync::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #000000 0%, #404040 100%);
    cursor: pointer;
    border: 2px solid #808080;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

#bpm::-moz-range-thumb, #uiSync::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #000000 0%, #404040 100%);
    cursor: pointer;
    border: 2px solid #808080;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

#bpmValue, #uiSyncValue {
    font-weight: 600;
    color: white;
    min-width: 45px;
    font-size: 13px;
    background: rgba(0, 212, 170, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid rgba(0, 212, 170, 0.2);
}



.sequencer {
    display: flex;
    margin-bottom: 25px;
    padding: 20px;
    background: linear-gradient(145deg, rgba(30, 30, 30, 0.8) 0%, rgba(15, 15, 15, 0.9) 100%);
    border-radius: 4px;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(70, 70, 70, 0.3);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    gap: 20px;
}

.track-labels {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 50px;
}

.track-label {
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(145deg, rgba(220, 53, 69, 0.2) 0%, rgba(176, 42, 55, 0.2) 100%);
    border-radius: 4px;
    font-weight: 700;
    font-size: 13px;
    min-width: 80px;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(220, 53, 69, 0.3);
    padding: 0 8px;
    gap: 8px;
    backdrop-filter: blur(10px);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.track-label .track-name {
    flex: 1;
    text-align: left;
}

.sample-select {
    margin-left: 10px;
}

.track-label .sample-select:hover {
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.1);
}

.track-label .sample-select:focus {
    outline: none;
    border-color: white;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
}

.step-grid {
    flex: 1;
}

.step-numbers {
    display: grid;
    grid-template-columns: repeat(16, 1fr);
    gap: 6px;
    margin-bottom: 15px;
}

.step-number {
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, rgba(80, 80, 80, 0.3) 0%, rgba(40, 40, 40, 0.5) 100%);
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #cccccc;
    border: 1px solid rgba(120, 120, 120, 0.4);
    backdrop-filter: blur(10px);
}

.step-number.current {
    background: linear-gradient(135deg, #dc3545 0%, #b02a37 100%);
    color: white;
    transform: scale(1.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4);
    border-color: #dc3545;
}

.tracks {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tracks {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.track {
    display: flex;
    gap: 6px;
}

.step {
    width: 100%;
    height: 45px;
    background: linear-gradient(145deg, rgba(80, 80, 80, 0.3) 0%, rgba(40, 40, 40, 0.5) 100%);
    border: 2px solid rgba(120, 120, 120, 0.4);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    backdrop-filter: blur(10px);
    overflow: hidden;
}

/* Beat markers — every 4th step (i.e. the downbeats: 1, 5, 9, 13) gets a
   subtly brighter background so you can visually locate "beat 1, 2, 3, 4"
   at a glance without counting cells. */
.step[data-step="0"],
.step[data-step="4"],
.step[data-step="8"],
.step[data-step="12"] {
    background: linear-gradient(145deg, rgba(0, 212, 170, 0.18) 0%, rgba(0, 145, 173, 0.18) 100%);
    border-color: rgba(0, 212, 170, 0.5);
}

.step-number:nth-child(4n+1) {
    color: #00d4aa;
    font-weight: 700;
}

/* Numbered downbeats stand out from the in-between 16th-note cells. */
.step-number.beat-marker {
    color: #00d4aa;
    font-weight: 800;
}
.step-number:not(.beat-marker) {
    color: rgba(255, 255, 255, 0.55);
    font-weight: 500;
}

.step::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.step:hover::before {
    transform: translateX(100%);
}

.step:hover {
    background: linear-gradient(145deg, rgba(220, 53, 69, 0.15) 0%, rgba(176, 42, 55, 0.15) 100%);
    transform: scale(1.05);
    border-color: rgba(220, 53, 69, 0.6);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.3);
}

.step.active {
    background: linear-gradient(135deg, #dc3545 0%, #b02a37 100%);
    border-color: #dc3545;
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: scale(1.02);
}

.step.playing {
    animation: modernPulse 0.6s ease-in-out;
}

@keyframes modernPulse {
    0% { transform: scale(1.02); box-shadow: 0 8px 25px rgba(220, 53, 69, 0.5); }
    50% { transform: scale(1.1); box-shadow: 0 12px 35px rgba(220, 53, 69, 0.8), 0 0 40px rgba(220, 53, 69, 0.6); }
    100% { transform: scale(1.02); box-shadow: 0 8px 25px rgba(220, 53, 69, 0.5); }
}

.step.current-playing {
    border-color: #dc3545;
    box-shadow: 0 0 30px rgba(220, 53, 69, 0.8), 0 0 60px rgba(220, 53, 69, 0.4);
}

/* Per-step velocity variants */
.step.active.ghost {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.45) 0%, rgba(176, 42, 55, 0.45) 100%);
    border-color: rgba(220, 53, 69, 0.55);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    opacity: 0.75;
}

.step.active.accent {
    background: linear-gradient(135deg, #ff5566 0%, #c4263a 100%);
    border-color: #ff7788;
    box-shadow: 0 10px 30px rgba(220, 53, 69, 0.7),
                0 0 18px rgba(255, 102, 119, 0.6),
                inset 0 1px 0 rgba(255, 255, 255, 0.35);
    transform: scale(1.06);
}

/* Master FX section in mixer modal — hardware knob style */
.master-fx-section {
    margin: 24px 0 8px;
    padding: 26px 26px 22px;
    background:
        radial-gradient(circle at 50% 0%, rgba(220, 53, 69, 0.10), transparent 65%),
        linear-gradient(145deg, rgba(45, 45, 45, 0.7) 0%, rgba(18, 18, 18, 0.9) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    box-shadow:
        0 6px 20px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        inset 0 -1px 0 rgba(0, 0, 0, 0.5);
    position: relative;
}

.master-fx-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(220, 53, 69, 0.55), transparent);
    border-radius: 10px 10px 0 0;
}

.master-fx-section .section-subtitle {
    margin: 0 0 22px 0;
    font-size: 12px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 700;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.master-fx-controls {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 60px;
    flex-wrap: wrap;
}

.fx-knob-control {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.fx-knob {
    --knob-size: 72px;
    --knob-angle: -135deg; /* -135deg (min) to +135deg (max) */
    width: var(--knob-size);
    height: var(--knob-size);
    position: relative;
    cursor: grab;
    user-select: none;
    touch-action: none;
    outline: none;
}

.fx-knob:active { cursor: grabbing; }

.fx-knob:focus-visible .fx-knob-ring {
    box-shadow:
        0 0 0 2px rgba(220, 53, 69, 0.6),
        inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

/* Outer ring with arc indicator */
.fx-knob-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background:
        conic-gradient(from -135deg,
            rgba(220, 53, 69, 0.85) 0deg,
            rgba(220, 53, 69, 0.85) calc((var(--knob-angle) + 135deg) * 1),
            rgba(255, 255, 255, 0.06) calc((var(--knob-angle) + 135deg) * 1),
            rgba(255, 255, 255, 0.06) 270deg,
            transparent 270deg
        );
    box-shadow:
        inset 0 0 0 1px rgba(0, 0, 0, 0.5),
        0 4px 12px rgba(0, 0, 0, 0.5);
    transition: filter 0.2s ease;
}

.fx-knob:hover .fx-knob-ring {
    filter: brightness(1.15);
}

/* Inner brushed-metal body */
.fx-knob-body {
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.18) 0%, transparent 45%),
        linear-gradient(145deg, #3a3a3a 0%, #1a1a1a 70%, #0d0d0d 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        inset 0 2px 4px rgba(255, 255, 255, 0.08),
        inset 0 -3px 6px rgba(0, 0, 0, 0.6),
        0 2px 4px rgba(0, 0, 0, 0.4);
    transform: rotate(var(--knob-angle));
    transition: transform 0.05s linear;
}

/* Pointer line */
.fx-knob-indicator {
    position: absolute;
    top: 6px;
    left: 50%;
    width: 3px;
    height: 30%;
    background: linear-gradient(to bottom, #ff6677, #c4263a);
    border-radius: 2px;
    transform: translateX(-50%);
    box-shadow:
        0 0 6px rgba(220, 53, 69, 0.7),
        0 0 2px rgba(255, 255, 255, 0.3);
}

.fx-knob-label {
    font-size: 10px;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.65);
    font-weight: 700;
    margin-top: 4px;
}

.fx-knob-value {
    font-size: 11px;
    color: #ff6677;
    font-variant-numeric: tabular-nums;
    background: rgba(220, 53, 69, 0.10);
    padding: 3px 10px;
    border-radius: 4px;
    min-width: 64px;
    text-align: center;
    border: 1px solid rgba(220, 53, 69, 0.25);
    text-shadow: 0 0 6px rgba(220, 53, 69, 0.4);
}

/* Light theme adjustments */
body.light-theme .master-fx-section {
    background:
        radial-gradient(circle at 50% 0%, rgba(220, 53, 69, 0.08), transparent 65%),
        linear-gradient(145deg, rgba(245, 245, 245, 0.95) 0%, rgba(220, 220, 220, 0.95) 100%);
    border-color: rgba(0, 0, 0, 0.08);
}

body.light-theme .master-fx-section .section-subtitle {
    color: rgba(0, 0, 0, 0.85);
    text-shadow: none;
}

body.light-theme .fx-knob-body {
    background:
        radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.7) 0%, transparent 45%),
        linear-gradient(145deg, #d8d8d8 0%, #b8b8b8 70%, #a0a0a0 100%);
    border-color: rgba(0, 0, 0, 0.08);
}

body.light-theme .fx-knob-label {
    color: rgba(0, 0, 0, 0.65);
}

@media (max-width: 600px) {
    .master-fx-controls {
        gap: 30px;
    }
    .fx-knob {
        --knob-size: 60px;
    }
}



/* Container 2 and Columns Styling */
.container-2 {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    padding: 20px;
    background: linear-gradient(145deg, rgba(40, 40, 40, 0.6) 0%, rgba(20, 20, 20, 0.8) 100%);
    border-radius: 4px;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(80, 80, 80, 0.3);
}

.column-1, .column-2, .column-3 {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.kit-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 10px 20px;
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.9) 0%, rgba(176, 42, 55, 0.9) 100%);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    z-index: 2;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    opacity: 0;
    pointer-events: none;
}

.column-1:hover .kit-button,
.column-2:hover .kit-button,
.column-3:hover .kit-button {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

.kit-button:hover {
    background: linear-gradient(135deg, rgba(176, 42, 55, 0.9) 0%, rgba(220, 53, 69, 0.9) 100%);
    transform: translate(-50%, -50%) scale(1.15);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.column-1 {
    flex: 1;
    width: 300px;
    height: 300px;
    min-height: 300px;
    background: linear-gradient(145deg, rgba(60, 60, 60, 0.2) 0%, rgba(30, 30, 30, 0.3) 100%), url('../images/58982.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-blend-mode: overlay;
    border-radius: 4px;
    border: 1px solid rgba(100, 100, 100, 0.3);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.column-2 {
    flex: 1;
    width: 300px;
    height: 300px;
    min-height: 300px;
    background: linear-gradient(145deg, rgba(60, 60, 60, 0.2) 0%, rgba(30, 30, 30, 0.3) 100%), url('../images/814581.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-blend-mode: overlay;
    border-radius: 4px;
    border: 1px solid rgba(100, 100, 100, 0.3);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.column-3 {
    flex: 1;
    width: 300px;
    height: 300px;
    min-height: 300px;
    background: linear-gradient(145deg, rgba(60, 60, 60, 0.2) 0%, rgba(30, 30, 30, 0.3) 100%), url('../images/889.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-blend-mode: overlay;
    border-radius: 4px;
    border: 1px solid rgba(100, 100, 100, 0.3);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.column-1:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(220, 53, 69, 0.2), 0 8px 25px rgba(0, 0, 0, 0.5);
    border-color: rgba(220, 53, 69, 0.4);
    background: linear-gradient(145deg, rgba(60, 60, 60, 0.1) 0%, rgba(30, 30, 30, 0.2) 100%), url('../images/58982.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-blend-mode: overlay;
}

.column-2:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(220, 53, 69, 0.2), 0 8px 25px rgba(0, 0, 0, 0.5);
    border-color: rgba(220, 53, 69, 0.4);
    background: linear-gradient(145deg, rgba(60, 60, 60, 0.1) 0%, rgba(30, 30, 30, 0.2) 100%), url('../images/814581.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-blend-mode: overlay;
}

.column-3:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(220, 53, 69, 0.2), 0 8px 25px rgba(0, 0, 0, 0.5);
    border-color: rgba(220, 53, 69, 0.4);
    background: linear-gradient(145deg, rgba(60, 60, 60, 0.1) 0%, rgba(30, 30, 30, 0.2) 100%), url('../images/889.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-blend-mode: overlay;
}

/* Active kit styling */
.column-1.active-kit,
.column-2.active-kit,
.column-3.active-kit {
    border: 3px solid #00ff00;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.5);
    transform: scale(1.02);
}

.column-1::before, .column-2::before, .column-3::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(220, 53, 69, 0.1), transparent);
    transition: left 0.6s ease;
}

.column-1:hover::before, .column-2:hover::before, .column-3:hover::before {
    left: 100%;
}



/* Mixer Toggle Button */
.mixer-toggle-btn {
    background: linear-gradient(135deg, #2d5a27, #4a8c3a);
    color: #ffffff;
    border: 1px solid #4a8c3a;
    padding: 8px 16px;
    border-radius: 4px;
    font-family: 'Orbitron', monospace;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.mixer-toggle-btn:hover {
    background: linear-gradient(135deg, #4a8c3a, #5fa84f);
    transform: translateY(-1px);
}

/* Mixer Inline Panel Styles */
.mixer-panel {
    display: block;
    width: 100%;
    margin: 18px 0 8px;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.32s ease, opacity 0.25s ease, margin 0.32s ease;
}

.mixer-panel[hidden] {
    display: none;
}

.mixer-panel.show {
    max-height: 2400px; /* large enough to fit any content; collapses cleanly */
    opacity: 1;
}

/* No overlay anymore — inline */
.mixer-modal-overlay {
    display: none !important;
}

.mixer-modal-content {
    position: relative;
    width: 100%;
    max-width: 100%;
    background: linear-gradient(135deg, rgba(30, 30, 30, 0.96) 0%, rgba(18, 18, 18, 0.98) 100%);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    overflow: hidden;
    transform: translateY(-8px);
    transition: transform 0.3s ease;
}

.mixer-panel.show .mixer-modal-content {
    transform: translateY(0);
}

.mixer-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 22px;
    background: linear-gradient(135deg, rgba(40, 40, 40, 0.85) 0%, rgba(28, 28, 28, 0.9) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    user-select: none;
}

.mixer-modal-header .mixer-title {
    margin: 0;
    color: white;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 1px;
}

.close-mixer-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-mixer-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: rotate(90deg);
}

.mixer-panel .mixer {
    max-height: none;
    overflow: visible;
    padding: 18px 22px 22px;
}

/* Light theme overrides for the inline panel */
body.light-theme .mixer-modal-content {
    background: linear-gradient(135deg, rgba(248, 248, 248, 0.96) 0%, rgba(230, 230, 230, 0.98) 100%);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

body.light-theme .mixer-modal-header {
    background: linear-gradient(135deg, rgba(235, 235, 235, 0.95) 0%, rgba(220, 220, 220, 0.95) 100%);
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

body.light-theme .mixer-modal-header .mixer-title {
    color: #222;
}

body.light-theme .close-mixer-btn {
    color: rgba(0, 0, 0, 0.6);
}

body.light-theme .close-mixer-btn:hover {
    background: rgba(0, 0, 0, 0.08);
    color: #000;
}

/* Light Theme Styles */
body.light-theme {
    background: url('../images/bk02.jpg') center center / cover no-repeat fixed;
    color: #333;
}

body.light-theme .main-header {
    background: linear-gradient(145deg, rgba(15, 15, 15, 0.98) 0%, rgba(5, 5, 5, 0.99) 100%);
    border-bottom: 1px solid rgba(60, 60, 60, 0.3);
}

body.light-theme .container {
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-theme .theme-toggle-btn {
    background: linear-gradient(135deg, rgba(60, 60, 60, 0.9), rgba(40, 40, 40, 0.95));
    border: 1px solid rgba(100, 100, 100, 0.7);
    color: #fff;
    backdrop-filter: blur(10px);
}

body.light-theme .theme-toggle-btn:hover {
    background: linear-gradient(135deg, rgba(70, 70, 70, 0.95), rgba(50, 50, 50, 1));
    border-color: rgba(120, 120, 120, 0.9);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

body.light-theme .mobile-menu {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.98) 0%, rgba(240, 240, 240, 0.99) 100%);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #333;
}

body.light-theme .hamburger-line {
    background: #fff;
}

body.light-theme .step.active {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border-color: #22c55e;
    box-shadow: 0 8px 25px rgba(34, 197, 94, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Responsive Design - Mobile-First Approach */

/* Tablet Styles (768px - 1024px) */
@media (max-width: 1024px) and (min-width: 769px) {
    .header-content {
        padding: 0 20px;
    }
    
    .container {
        margin: 15px 20px 0;
        padding: 20px;
        border-radius: 16px;
    }
    
    .app-title {
        font-size: 24px;
    }
    
    .controls {
        flex-wrap: wrap;
        gap: 20px;
        justify-content: center;
        padding: 20px;
        border-radius: 12px;
    }
    
    .transport-controls {
        gap: 12px;
    }
    
    .sequencer-content {
        grid-template-columns: 90px 1fr;
        gap: 16px;
    }
    
    .track-label {
        width: 90px;
        height: 48px;
        font-size: 0.85rem;
        border-radius: 8px;
    }
    
    .step {
        height: 48px;
        flex: 1;
        min-width: 0;
        max-width: 48px;
        border-radius: 8px;
        touch-action: manipulation;
    }
    
    .step-number {
        flex: 1;
        min-width: 0;
        max-width: 48px;
        height: 32px;
    }
    
    .sequencer {
        padding: 18px;
        margin: 18px;
    }
}

/* Mobile Styles (768px and below) - Cohesive App-like Design */
@media (max-width: 768px) {
    /* Mobile Body Adjustments */
    body {
        background: url('../images/bk01.jpg') center center / cover no-repeat fixed;
        padding: 0;
        margin: 0;
        overflow-x: hidden;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    
    /* Mobile Header Controls */
    .desktop-controls {
        display: none;
    }
    
    .mobile-controls {
        display: flex;
    }
    
    .header-controls {
        position: relative;
    }
    
    /* Mobile App-like Animations */
    * {
        -webkit-tap-highlight-color: transparent;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }
    
    /* Smooth scrolling for mobile */
    html {
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Mobile entrance animations */
    .container {
        animation: slideInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    }
    
    .container:nth-child(2) {
        animation-delay: 0.1s;
    }
    
    .container:nth-child(3) {
        animation-delay: 0.2s;
    }
    
    @keyframes slideInUp {
        from {
            opacity: 0;
            transform: translateY(30px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    /* Mobile loading states */
    .loading {
        position: relative;
        overflow: hidden;
    }
    
    .loading::after {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
        animation: shimmer 1.5s infinite;
    }
    
    @keyframes shimmer {
        0% { left: -100%; }
        100% { left: 100%; }
    }
    
    /* Mobile Header - App-like Design */
    .main-header {
        background: linear-gradient(145deg, rgba(15, 15, 15, 0.95) 0%, rgba(5, 5, 5, 0.98) 100%);
        backdrop-filter: blur(20px);
        border-bottom: 1px solid rgba(60, 60, 60, 0.3);
        padding: 16px 0;
        position: sticky;
        top: 0;
        z-index: 1000;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    }
    
    .header-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 0 20px;
        gap: 12px;
    }
    
    .logo-section {
        flex: 1;
    }

    .app-logo,
    .logo {
        height: 64px;
        width: 64px;
    }
    
    .app-title {
        font-size: 22px;
        font-weight: 700;
        background: linear-gradient(135deg, #ffffff 0%, #cccccc 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        letter-spacing: 2px;
        margin: 0;
    }
    
    .tagline {
        font-size: 0.75rem;
        color: red;
        margin-top: 2px;
        font-weight: 500;
        font-style: italic;
    }
    

    
    /* Mobile Container - Card-based Design */
    .container {
        margin: 16px;
        padding: 20px;
        background: linear-gradient(145deg, rgba(20, 20, 20, 0.8) 0%, rgba(10, 10, 10, 0.9) 100%);
        border-radius: 4px;
        border: 1px solid rgba(60, 60, 60, 0.3);
        backdrop-filter: blur(20px);
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1);
        overflow: hidden;
    }
    
    /* Mobile Controls - Modern Card Design */
    .controls {
        background: rgba(40, 40, 40, 0.6);
        border-radius: 4px;
        padding: 20px;
        margin: 16px;
        border: 1px solid rgba(80, 80, 80, 0.4);
        backdrop-filter: blur(10px);
        display: flex;
        flex-direction: column;
        gap: 20px;
    }
    
    .transport-controls {
        display: flex;
        justify-content: center;
        gap: 12px;
        flex-wrap: wrap;
    }
    
    .transport-controls button {
        min-height: 48px;
        min-width: 80px;
        font-size: 0.9rem;
        font-weight: 600;
        padding: 12px 20px;
        border-radius: 12px;
        border: none;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .transport-controls button:hover, .transport-controls button:active {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    }
    
    .play-btn {
        background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%) !important;
        box-shadow: 0 4px 16px rgba(76, 175, 80, 0.3) !important;
    }
    
    .stop-btn {
        background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%) !important;
        box-shadow: 0 4px 16px rgba(244, 67, 54, 0.3) !important;
    }
    
    .clear-btn {
        background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%) !important;
        box-shadow: 0 4px 16px rgba(255, 152, 0, 0.3) !important;
    }
    
    .mixer-toggle-btn {
        background: linear-gradient(135deg, #9c27b0 0%, #7b1fa2 100%) !important;
        box-shadow: 0 4px 16px rgba(156, 39, 176, 0.3) !important;
    }
    
    /* Mobile Tempo and Preset Controls */
    .tempo-controls, .preset-controls {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
        flex-wrap: wrap;
        background: rgba(255, 255, 255, 0.05);
        padding: 16px;
        border-radius: 12px;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .tempo-controls label, .preset-controls label {
        font-weight: 600;
        color: #fff;
        font-size: 0.9rem;
    }
    
    .tempo-controls input[type="range"] {
        min-width: 140px;
        height: 6px;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 3px;
        outline: none;
        -webkit-appearance: none;
        appearance: none;
    }
    
    .tempo-controls input[type="range"]::-webkit-slider-thumb {
        -webkit-appearance: none;
        width: 20px;
        height: 20px;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        border-radius: 50%;
        cursor: pointer;
        box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
    }
    
    .preset-controls select {
        min-height: 44px;
        padding: 12px 16px;
        font-size: 0.9rem;
        border-radius: 8px;
        border: 1px solid rgba(255, 255, 255, 0.2);
        background: rgba(255, 255, 255, 0.1);
        color: #fff;
        backdrop-filter: blur(10px);
    }
    
    #bpmValue {
        font-weight: 700;
        color: #667eea;
        font-size: 1rem;
        min-width: 40px;
        text-align: center;
    }

/* All mobile styles have been moved to their respective media queries above */

/* Desktop and larger screen styles start here */
    .container-2 {
        display: flex;
        gap: 12px;
        justify-content: center;
        flex-wrap: wrap;
        padding: 16px;
        margin: 0 16px;
        background: rgba(255, 255, 255, 0.03);
        border-radius: 16px;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .kit-button {
        min-height: 48px;
        min-width: 90px;
        font-size: 0.9rem;
        font-weight: 600;
        padding: 12px 20px;
        border-radius: 12px;
        border: 2px solid rgba(255, 255, 255, 0.2);
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
        color: #fff;
        backdrop-filter: blur(10px);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .kit-button:hover, .kit-button.active {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        border-color: #667eea;
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    }
    
    /* Mobile Section Headers */
    .section-header {
        font-size: 1.4rem;
        font-weight: 600;
        margin: 0 0 16px 0;
        padding: 10px 0;
        text-align: center;
        color: #fff;
    }
    
    /* Mobile Library Sections */
    .new-library-row {
        background: linear-gradient(145deg, rgba(40, 40, 40, 0.6) 0%, rgba(20, 20, 20, 0.8) 100%);
        border-radius: 4px;
        padding: 20px 20px 0 20px;
        margin: 16px;
        border: 1px solid rgba(80, 80, 80, 0.3);
        backdrop-filter: blur(15px);
    }
    
    .new-row {
        background: linear-gradient(145deg, rgba(40, 40, 40, 0.6) 0%, rgba(20, 20, 20, 0.8) 100%);
        border-radius: 4px;
        padding: 15px;
        margin: 15px 0 0 0;
        border: 1px solid rgba(80, 80, 80, 0.3);
        backdrop-filter: blur(15px);
    }
    
    /* Mobile Mixer Improvements */
    .track-mixers {
        flex-direction: column;
        align-items: center;
        gap: 16px;
        padding: 16px;
        background: rgba(255, 255, 255, 0.02);
        border-radius: 16px;
        margin: 16px;
        border: 1px solid rgba(255, 255, 255, 0.05);
    }
    
    .track-mixer {
        width: 100%;
        max-width: 380px;
        min-height: 120px;
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
        border: 1px solid rgba(255, 255, 255, 0.15);
        border-radius: 16px;
    }
    
    /* Mobile Mixer Inline Panel Responsive Styles */
    .mixer-modal-content {
        width: 100%;
        max-width: none;
        margin: 0;
        border-radius: 12px;
    }
    
    .mixer-modal-header {
        padding: 16px 20px;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .mixer-modal-header .mixer-title {
        font-size: 20px;
    }
    
    .mixer-panel .mixer {
        padding: 16px 18px;
    }
    
    .close-mixer-btn {
        width: 36px;
        height: 36px;
        font-size: 24px;
    }
    
    /* Mobile Typography System for Consistency */
    html {
        font-size: 16px; /* Base font size optimized for mobile */
    }
    
    body {
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
        line-height: 1.5;
        letter-spacing: -0.01em;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    
    .app-title {
        font-size: 22px;
        font-weight: 700;
        background: linear-gradient(135deg, #ffffff 0%, #cccccc 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        letter-spacing: 2px;
        margin: 0;
    }
    
    .tagline {
        font-size: 0.75rem;
        color: red;
        margin-top: 2px;
        font-weight: 500;
        font-style: italic;
    }
    
    .track-label {
        font-size: 0.9rem !important;
        font-weight: 600 !important;
        line-height: 1.2 !important;
        letter-spacing: 0.01em !important;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4) !important;
    }
    
    .track-name {
        font-size: 0.85rem !important;
        font-weight: 500 !important;
        line-height: 1.2 !important;
        opacity: 0.9 !important;
    }
    
    button {
        font-size: 0.9rem !important;
        font-weight: 600 !important;
        line-height: 1.2 !important;
        letter-spacing: 0.01em !important;
    }
    
    /* Enhanced Text Readability */
    .section-header {
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4) !important;
        font-size: 1.4rem !important;
        font-weight: 700 !important;
        line-height: 1.3 !important;
    }
    
    /* Mobile Reading Optimization */
    p, span, label {
        font-size: 0.9rem;
        line-height: 1.4;
        color: rgba(255, 255, 255, 0.9);
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    }
    
    /* Touch Target Optimization */
    .step, .kit-button, button {
        min-height: 44px;
        min-width: 44px;
        touch-action: manipulation;
    }
    
    /* Improved Focus States for Accessibility */
    button:focus, .step:focus {
        outline: 2px solid rgba(255, 255, 255, 0.6);
        outline-offset: 2px;
        box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1);
    }
    
    .track-mixer-header {
        font-size: 0.85rem;
        font-weight: 700;
        color: #fff;
        min-width: 60px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    .track-mixer-body {
        flex: 1;
        display: flex;
        align-items: center;
        gap: 16px;
    }
    
    .track-fader .fader-container {
        height: 80px;
        width: 32px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 16px;
        border: 1px solid rgba(255, 255, 255, 0.2);
    }
    
    .track-fader .fader-track {
        height: 76px;
        width: 4px;
        background: linear-gradient(to top, #667eea 0%, #764ba2 100%);
        border-radius: 2px;
        margin: 2px auto;
    }
    
    .track-fader .fader-thumb {
        width: 24px;
        height: 24px;
        background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
        border-radius: 50%;
        border: 2px solid #667eea;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }
    
    /* Mobile Sequencer - No Scroll Compact Layout */
    .sequencer {
        display: flex;
        flex-direction: column;
        margin: 5px;
        padding: 8px;
        background: linear-gradient(145deg, rgba(30, 30, 30, 0.8) 0%, rgba(15, 15, 15, 0.9) 100%);
        border-radius: 4px;
        backdrop-filter: blur(15px);
        border: 1px solid rgba(70, 70, 70, 0.3);
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
        gap: 8px;
        overflow: hidden;
        max-width: 100vw;
        box-sizing: border-box;
    }
    
    .sequencer-content {
        display: flex;
        flex-direction: column;
        gap: 8px;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }
    
    .track-labels {
        display: flex;
        flex-direction: row;
        gap: 2px;
        padding: 0;
        padding-top: 32px;
        overflow: hidden;
        justify-content: space-between;
    }
    
    .track-label {
        flex: 1;
        min-width: 0;
        height: 65px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2px;
        border-radius: 6px;
        background: linear-gradient(145deg, rgba(220, 53, 69, 0.2) 0%, rgba(176, 42, 55, 0.2) 100%);
        border: 1px solid rgba(220, 53, 69, 0.3);
        backdrop-filter: blur(10px);
    }
    
    .track-name {
        font-size: 0.9rem;
        font-weight: 700;
        text-transform: uppercase;
        white-space: nowrap;
        max-width: 100%;
        line-height: 1.3;
        color: white;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    }
    
    .sample-select {
        width: 28px;
        height: 16px;
        font-size: 0.5rem;
        border-radius: 3px;
    }
    
    .step-grid {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }
    
    .step-numbers, .track {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }
    
    .step-number, .step {
        width: 100%;
        min-width: 0;
        flex: 1;
    }
}

/* Small Mobile Styles (480px and below) - Ultra Compact App Design */
@media (max-width: 480px) {
    /* Ultra compact header */
    .header-content {
        padding: 0 14px;
        gap: 6px;
    }
    
    /* Ultra Compact Sequencer */
    .sequencer {
        padding: 12px;
        margin: 12px 8px;
    }
    
    .sequencer-content {
        display: flex;
        flex-direction: column;
        gap: 8px;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }
    
    .track-labels {
        display: flex;
        flex-direction: row;
        gap: 1px;
        padding: 0;
        padding-top: 32px;
        overflow: hidden;
        justify-content: space-between;
    }
    
    .track-label {
        flex: 1;
        min-width: 0;
        height: 60px;
        border-radius: 6px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2px;
        background: linear-gradient(145deg, rgba(220, 53, 69, 0.2) 0%, rgba(176, 42, 55, 0.2) 100%);
        border: 1px solid rgba(220, 53, 69, 0.3);
        backdrop-filter: blur(10px);
    }
    
    .track-name {
        font-size: 0.8rem;
        max-width: 100%;
        white-space: nowrap;
        line-height: 1.3;
        font-weight: 700;
        text-transform: uppercase;
        color: white;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    }
    
    .sample-select {
        width: 24px;
        height: 14px;
        font-size: 0.45rem;
    }
    
    .step-number {
        height: 28px;
        width: 100%;
        font-size: 0.6rem;
        border-radius: 6px;
        min-width: 0;
    }
    
    .step {
        height: 40px;
        width: 100%;
        border-radius: 10px;
        border-width: 1.5px;
        min-width: 0;
    }
    
    .step-grid {
        gap: 3px;
    }
    
    .step-numbers, .track {
        gap: 3px;
    }
}

/* Extra Small Mobile (360px and below) - Maximum Compactness */
@media (max-width: 360px) {
    .sequencer {
        padding: 8px;
        margin: 8px 4px;
    }
    
    .sequencer-content {
        grid-template-columns: 60px 1fr;
        gap: 6px;
    }
    
    .track-label {
        width: 60px;
        height: 36px;
        border-radius: 8px;
    }
    
    .track-name {
        font-size: 0.55rem;
    }
    
    .sample-select {
        width: 30px;
        height: 18px;
        font-size: 0.55rem;
    }
    
    .step-number {
        height: 24px;
        width: 100%;
        font-size: 0.55rem;
        border-radius: 4px;
        min-width: 0;
    }
    
    .step {
        height: 36px;
        width: 100%;
        border-radius: 8px;
        border-width: 1px;
        min-width: 0;
    }
    
    .step-grid {
        gap: 2px;
    }
    
    .step-numbers, .track {
        gap: 2px;
    }
    
    .track-labels {
        padding-top: 24px;
    }
}

/* Continue Small Mobile Styles */
@media (max-width: 480px) {
    .app-title {
        font-size: 20px;
        font-weight: 700;
        background: linear-gradient(135deg, #ffffff 0%, #cccccc 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        letter-spacing: 2px;
        margin: 0;
    }
    
    .tagline {
        font-size: 0.7rem;
        color: red;
        margin-top: 2px;
        font-weight: 500;
        font-style: italic;
    }
    

    
    /* Ultra compact containers */
    .container {
        margin: 10px;
        border-radius: 18px;
    }
    
    .controls {
        padding: 14px;
        margin: 10px;
        gap: 14px;
        border-radius: 14px;
    }
    
    .transport-controls button {
        min-height: 42px;
        min-width: 65px;
        font-size: 0.8rem;
        padding: 9px 14px;
        border-radius: 10px;
    }
    
    .tempo-controls, .preset-controls {
        padding: 10px;
        gap: 8px;
        border-radius: 10px;
    }
    
    .tempo-controls input[type="range"] {
        min-width: 110px;
    }
    
    .preset-controls select {
        min-height: 40px;
        padding: 10px 12px;
        font-size: 0.85rem;
        border-radius: 6px;
    }
    
    #bpmValue {
        font-size: 0.9rem;
    }
    
    /* Ultra compact sequencer */
    .sequencer {
        padding: 10px;
        margin: 10px;
        border-radius: 14px;
    }
    
    .sequencer-content {
        grid-template-columns: 65px 1fr;
        gap: 6px;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }
    
    .track-labels {
        padding-top: 32px;
        gap: 2px;
    }
    
    .track-label {
        width: 65px;
        height: 40px;
        gap: 2px;
        border-radius: 10px;
    }
    
    .track-name {
        font-size: 0.6rem;
    }
    
    .sample-select {
        width: 32px;
        height: 20px;
        font-size: 0.6rem;
        border-radius: 4px;
    }
    
    .step-numbers {
        gap: 2px;
        margin-bottom: 4px;
    }
    
    .step-number {
        height: 26px;
        width: 100%;
        font-size: 0.6rem;
        border-radius: 6px;
        min-width: 0;
    }
    
    .track {
        gap: 2px;
    }
    
    .step {
        height: 40px;
        width: 100%;
        border-radius: 8px;
        min-width: 0;
    }
    
    /* Ultra compact kit buttons */
    .container-2 {
        padding: 10px;
        margin: 0 10px;
        gap: 6px;
        border-radius: 14px;
    }
    
    .kit-button {
        min-height: 42px;
        min-width: 75px;
        font-size: 0.8rem;
        padding: 9px 14px;
        border-radius: 10px;
    }
    
    /* Ultra compact mixer */
    .track-mixers {
        padding: 10px;
        margin: 10px;
        gap: 10px;
        border-radius: 14px;
    }
    
    .track-mixer {
        max-width: 100%;
        padding: 14px;
        gap: 10px;
        border-radius: 14px;
    }
    
    .track-mixer-header {
        font-size: 0.75rem;
        min-width: 45px;
    }
    
    .track-mixer-body {
        gap: 10px;
    }
    
    .track-fader .fader-container {
        height: 65px;
        width: 26px;
        border-radius: 13px;
    }
    
    .track-fader .fader-track {
        height: 61px;
    }
    
    .track-fader .fader-thumb {
        width: 18px;
        height: 18px;
    }
    
    /* Ultra compact sections */
    .section-header {
        font-size: 1.15rem;
        padding: 10px 14px;
    }
    
    .new-library-row {
        padding: 14px;
        margin: 10px;
        border-radius: 14px;
    }
    
    .new-row {
        padding: 10px;
        border-radius: 10px;
    }
}

/* Landscape Mobile Optimization - Horizontal App Layout */
@media (max-height: 500px) and (orientation: landscape) {
    /* Compact landscape header */
    .main-header {
        padding: 8px 0;
    }
    
    .header-content {
        padding: 0 12px;
        gap: 6px;
    }
    
    .app-title {
        font-size: 18px;
        font-weight: 700;
        background: linear-gradient(135deg, #ffffff 0%, #cccccc 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        letter-spacing: 2px;
        margin: 0;
    }
    
    .tagline {
        font-size: 0.65rem;
        color: red;
        margin-top: 2px;
        font-weight: 500;
        font-style: italic;
    }
    

    
    /* Landscape containers */
    .container {
        margin: 6px;
        border-radius: 16px;
    }
    
    .controls {
        padding: 8px;
        margin: 6px;
        gap: 8px;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        border-radius: 12px;
    }
    
    .transport-controls {
        flex: 1;
        min-width: 180px;
        gap: 6px;
    }
    
    .transport-controls button {
        min-height: 32px;
        min-width: 55px;
        padding: 6px 10px;
        font-size: 0.75rem;
        border-radius: 8px;
    }
    
    .tempo-controls, .preset-controls {
        flex: 1;
        min-width: 130px;
        padding: 6px;
        gap: 6px;
        border-radius: 8px;
    }
    
    .tempo-controls input[type="range"] {
        min-width: 80px;
    }
    
    .preset-controls select {
        min-height: 32px;
        padding: 6px 8px;
        font-size: 0.75rem;
    }
    
    #bpmValue {
        font-size: 0.85rem;
    }
    
    /* Landscape sequencer */
    .sequencer {
        padding: 6px;
        margin: 6px;
        border-radius: 12px;
    }
    
    .sequencer-content {
        gap: 6px;
    }
    
    .track-labels {
        padding-top: 24px;
        gap: 1px;
    }
    
    .track-label {
        height: 32px;
        gap: 1px;
        border-radius: 8px;
    }
    
    .track-name {
        font-size: 0.55rem;
    }
    
    .sample-select {
        width: 28px;
        height: 16px;
        font-size: 0.55rem;
    }
    
    .step-numbers {
        gap: 1px;
        margin-bottom: 2px;
    }
    
    .step-number {
        height: 20px;
        min-width: 32px;
        font-size: 0.55rem;
        border-radius: 4px;
    }
    
    .track {
        gap: 1px;
    }
    
    .step {
        height: 32px;
        min-width: 32px;
        border-radius: 6px;
    }
    
    /* Landscape kit buttons */
    .container-2 {
        padding: 6px;
        margin: 0 6px;
        gap: 4px;
        border-radius: 12px;
    }
    
    .kit-button {
        min-height: 32px;
        min-width: 60px;
        font-size: 0.75rem;
        padding: 6px 10px;
        border-radius: 8px;
    }
    
    /* Landscape mixer */
    .track-mixers {
        padding: 6px;
        margin: 6px;
        gap: 6px;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        border-radius: 12px;
    }
    
    .track-mixer {
        max-width: 240px;
        min-height: 70px;
        padding: 8px;
        gap: 6px;
        border-radius: 12px;
    }
    
    .track-mixer-header {
        font-size: 0.7rem;
        min-width: 40px;
    }
    
    .track-mixer-body {
        gap: 6px;
    }
    
    .track-fader .fader-container {
        height: 50px;
        width: 20px;
        border-radius: 10px;
    }
    
    .track-fader .fader-track {
        height: 46px;
    }
    
    .track-fader .fader-thumb {
        width: 14px;
        height: 14px;
    }
    
    /* Landscape sections */
    .section-header {
        font-size: 1rem;
        padding: 6px 10px;
    }
    
    .new-library-row {
        padding: 8px;
        margin: 6px;
        border-radius: 12px;
    }
    
    .new-row {
        padding: 6px;
        border-radius: 8px;
    }
}



/* Dark Theme Styles */
.dark-theme {
    background: #0a0a0a;
}

.dark-theme .main-header {
    background: linear-gradient(135deg, #1a1a1a 0%, #0f0f0f 100%);
}

.dark-theme .container {
    background: #111;
}

.dark-theme .tab-btn {
    background: #222;
    color: #ccc;
    border-color: #444;
}

.dark-theme .tab-btn.active {
    background: #333;
    color: #fff;
}

.dark-theme .controls {
    background: linear-gradient(145deg, #1a1a1a 0%, #0f0f0f 100%);
}

.dark-theme .step {
    background: #222;
    border-color: #333;
}

.dark-theme .step.active {
    background: linear-gradient(135deg, #dc3545 0%, #b02a37 100%);
    border-color: #dc3545;
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.dark-theme .track-label {
    background: #1a1a1a;
    color: #ccc;
}

.dark-theme .mixer {
    background: linear-gradient(145deg, #1a1a1a 0%, #0f0f0f 100%);
}

.dark-theme .track-mixer {
    background: #222;
    border-color: #333;
}

/* Mobile-specific smaller buttons */
@media (max-width: 768px) {
    .transport-controls button {
        min-height: 36px !important;
        min-width: 60px !important;
        font-size: 0.75rem !important;
        padding: 8px 12px !important;
        border-radius: 8px !important;
    }
    
    .transport-controls {
        gap: 8px !important;
    }
    
    .track-label {
        padding-top: 12px !important;
        padding-bottom: 12px !important;
    }
    
    /* Make all other buttons smaller for mobile */
    .kit-button {
        padding: 6px 12px !important;
        font-size: 0.7rem !important;
        border-radius: 3px !important;
    }
    
    .solo-btn, .mute-btn {
        width: 28px !important;
        height: 20px !important;
        font-size: 0.6rem !important;
        padding: 2px !important;
        border-radius: 3px !important;
    }
    
    .close-mixer-btn {
        width: 24px !important;
        height: 24px !important;
        font-size: 0.8rem !important;
        padding: 2px !important;
    }
    
    .tab-btn {
        padding: 6px 10px !important;
        font-size: 0.7rem !important;
        border-radius: 4px !important;
    }
}

/* ===== Pro Login Modal ===== */
.pro-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.pro-modal[hidden] { display: none; }

.pro-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    animation: proFadeIn 0.18s ease both;
}

.pro-modal-content {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: linear-gradient(135deg, rgba(30, 30, 30, 0.98) 0%, rgba(18, 18, 18, 1) 100%);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
    overflow: hidden;
    animation: proPopIn 0.22s ease both;
}

@keyframes proFadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes proPopIn  { from { opacity: 0; transform: translateY(8px) scale(0.98) } to { opacity: 1; transform: none } }

.pro-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 22px;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.18), rgba(185, 28, 28, 0.12));
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.pro-modal-title { color: #fff; font-size: 18px; letter-spacing: 1px; }

.pro-modal-body { padding: 18px 22px 22px; }
.pro-modal-tagline { color: rgba(255,255,255,0.75); font-size: 13px; margin-bottom: 16px; }

.pro-field { display: block; margin-bottom: 12px; }
.pro-field span {
    display: block;
    color: rgba(255,255,255,0.7);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 4px;
}
.pro-field input {
    width: 100%;
    padding: 10px 12px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease;
}
.pro-field input:focus {
    border-color: rgba(220, 38, 38, 0.6);
}

.pro-error {
    margin: 6px 0 0;
    padding: 8px 10px;
    background: rgba(220, 38, 38, 0.15);
    border: 1px solid rgba(220, 38, 38, 0.4);
    color: #fca5a5;
    border-radius: 6px;
    font-size: 13px;
}

.pro-info {
    margin: 6px 0 0;
    padding: 8px 10px;
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.35);
    color: #86efac;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.4;
}

.pro-modal-forgot {
    margin: 12px 0 0;
    text-align: center;
    font-size: 12px;
}

.pro-forgot-link {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.25);
    padding-bottom: 1px;
    transition: color 0.15s, border-color 0.15s;
}

.pro-forgot-link:hover,
.pro-forgot-link:focus-visible {
    color: #fff;
    border-bottom-color: rgba(220, 38, 38, 0.6);
    outline: none;
}
.pro-error[hidden] { display: none; }

.pro-modal-actions { margin-top: 14px; }
.pro-modal-actions .pro-login-btn { width: 100%; padding: 12px; }

.pro-modal-hint {
    margin-top: 14px;
    color: rgba(255,255,255,0.5);
    font-size: 12px;
}
.pro-modal-hint code {
    background: rgba(255,255,255,0.08);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
}

/* Active Pro state — button visual */
.pro-login-btn.pro-active {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
}
.pro-login-btn.pro-active:hover {
    box-shadow: 0 4px 15px rgba(22, 163, 74, 0.45);
}

/* Pro-only feature gating */
.pro-only[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
    position: relative;
}
.pro-only[disabled]::after {
    content: "PRO";
    position: absolute;
    top: -6px;
    right: -6px;
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 3px;
    letter-spacing: 0.5px;
}

/* Drop zone overlay shown over a track when dragging an audio file */
.track-label.drop-target {
    outline: 2px dashed rgba(220, 38, 38, 0.7);
    outline-offset: 2px;
    border-radius: 6px;
}

/* Light theme tweaks */
body.light-theme .pro-modal-content {
    background: linear-gradient(135deg, #fff 0%, #f3f3f3 100%);
    border-color: rgba(0,0,0,0.08);
}
body.light-theme .pro-modal-title { color: #222; }
body.light-theme .pro-modal-tagline,
body.light-theme .pro-field span { color: rgba(0,0,0,0.7); }
body.light-theme .pro-field input {
    background: #fff;
    border-color: rgba(0,0,0,0.15);
    color: #222;
}
body.light-theme .pro-modal-hint { color: rgba(0,0,0,0.5); }
body.light-theme .pro-modal-hint code { background: rgba(0,0,0,0.06); }

/* ===== Header export action group ===== */
.header-export-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-right: 12px;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    margin-right: 4px;
}
.header-export-actions .export-btn {
    /* Match .help-toggle-btn / .pro-login-btn sizing */
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    color: #fff;
    line-height: 1;
    transition: all 0.3s ease;
}
.header-export-actions .export-btn:hover:not([disabled]) {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 184, 217, 0.4);
}

/* Mobile-menu export group */
.mobile-export-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 6px;
}
.mobile-export-actions .export-btn {
    flex: 1 1 30%;
    padding: 8px 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    border: none;
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
}

/* Hide the desktop header group on small screens; mobile menu takes over */
@media (max-width: 768px) {
    .header-export-actions { display: none; }
}

body.light-theme .header-export-actions {
    border-right-color: rgba(0, 0, 0, 0.1);
}

/* ===== Toast notifications =====
 * Stacked top-right, below the header so they never cover the
 * EXPORT / MIDI / STEMS buttons. Uses translateX/opacity for a
 * smooth slide-in. Accessible (aria-live) and dismissable.
 */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: min(360px, calc(100vw - 32px));
}

.toast {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 240px;
    max-width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(28, 28, 28, 0.98) 0%, rgba(18, 18, 18, 0.98) 100%);
    color: #f5f5f5;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 13px;
    line-height: 1.4;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45),
                0 2px 6px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 3px solid #4b5563;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast.leaving {
    opacity: 0;
    transform: translateX(20px);
}

.toast-success { border-left-color: #16a34a; }
.toast-error   { border-left-color: #dc2626; }
.toast-info    { border-left-color: #0ea5e9; }

.toast-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    margin-top: 1px;
}
.toast-success .toast-icon { background: rgba(22, 163, 74, 0.18); color: #4ade80; }
.toast-error   .toast-icon { background: rgba(220, 38, 38, 0.18); color: #fca5a5; }
.toast-info    .toast-icon { background: rgba(14, 165, 233, 0.18); color: #7dd3fc; }

.toast-text {
    flex: 1;
    word-break: break-word;
}

.toast-close {
    flex-shrink: 0;
    background: transparent;
    border: 0;
    color: rgba(255, 255, 255, 0.55);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 0 2px;
    margin: -2px -4px -2px 4px;
    border-radius: 4px;
    transition: color 0.15s ease, background 0.15s ease;
}
.toast-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

@media (prefers-reduced-motion: reduce) {
    .toast { transition: opacity 0.15s ease; transform: none; }
    .toast.leaving { transform: none; }
}

@media (max-width: 600px) {
    .toast-container {
        top: auto;
        bottom: 16px;
        right: 16px;
        left: 16px;
        max-width: none;
        align-items: stretch;
    }
    .toast { min-width: 0; }
}

/* Light theme */
body.light-theme .toast {
    background: linear-gradient(135deg, #ffffff 0%, #f7f7f7 100%);
    color: #1f2937;
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18),
                0 2px 6px rgba(0, 0, 0, 0.08);
}
body.light-theme .toast-close { color: rgba(0, 0, 0, 0.45); }
body.light-theme .toast-close:hover { color: #111; background: rgba(0, 0, 0, 0.06); }

/* ===== VU Meters =====
 * Per-track vertical meters live inside each .track-label;
 * a horizontal master meter sits in the header.
 * The canvas is sized at runtime to devicePixelRatio for crisp pixels.
 */
.track-label {
    position: relative;
}
.vu-meter {
    width: 6px;
    height: 48px;
    margin-left: 8px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
    image-rendering: pixelated;
    flex-shrink: 0;
    align-self: center;
    vertical-align: middle;
}

.master-vu-wrapper {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    margin-right: 10px;
}
.master-vu {
    width: 120px;
    height: 14px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.05);
}
.master-vu-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.55);
}

@media (max-width: 900px) {
    .master-vu { width: 80px; }
}
@media (max-width: 768px) {
    .master-vu-wrapper { display: none; }
}

body.light-theme .master-vu-wrapper {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.08);
}
body.light-theme .master-vu-label { color: rgba(0, 0, 0, 0.5); }
body.light-theme .vu-meter { background: rgba(0, 0, 0, 0.08); }

/* Dark theme: keep the master VU identical to the default look so toggling
   the theme doesn't change the meter's appearance. */
body.dark-theme .master-vu-wrapper,
.dark-theme .master-vu-wrapper {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
}
body.dark-theme .master-vu,
.dark-theme .master-vu {
    background: rgba(255, 255, 255, 0.05);
}
body.dark-theme .master-vu-label,
.dark-theme .master-vu-label {
    color: rgba(255, 255, 255, 0.55);
}
body.dark-theme .vu-meter,
.dark-theme .vu-meter {
    background: rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}