:root {
    --bg-primary: #1a1a2e;
    --bg-secondary: #16213e;
    --bg-tertiary: #0f3460;
    --accent: #e94560;
    --accent-hover: #ff6b6b;
    --text-primary: #eee;
    --text-secondary: #aaa;
    --border: #333;
    --success: #4ade80;
    --desync: #f59e0b;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Single Ribbon Header */
.ribbon {
    background: var(--bg-secondary);
    padding: 6px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    border-bottom: 1px solid var(--border);
    min-height: 42px;
    flex-shrink: 0;
    overflow-x: auto;
}

.ribbon::-webkit-scrollbar {
    height: 4px;
}

.ribbon::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 2px;
}

.ribbon-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--accent);
    white-space: nowrap;
    margin-right: 8px;
}

.ribbon-divider {
    width: 1px;
    height: 24px;
    background: var(--border);
    flex-shrink: 0;
}

.ribbon-group {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.ribbon-group label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.ribbon button {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border);
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.15s;
    white-space: nowrap;
}

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

.ribbon button.active {
    background: var(--accent);
    border-color: var(--accent);
}

/* Desync button special styling */
.ribbon button.desync-btn.active {
    background: var(--desync);
    border-color: var(--desync);
    color: #000;
}

.ribbon button.desync-btn:hover {
    background: var(--desync);
    border-color: var(--desync);
}

.ribbon button.play-btn {
    background: var(--accent);
    border-color: var(--accent);
    padding: 5px 14px;
}

.ribbon button.play-btn:hover {
    background: var(--accent-hover);
}

.ribbon select, .ribbon input[type="number"] {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border);
    padding: 5px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
}

.ribbon input[type="number"] {
    width: 45px;
}

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

.ribbon #videoCount {
    width: auto;
}

.ribbon input[type="range"] {
    -webkit-appearance: none;
    background: var(--bg-tertiary);
    height: 4px;
    border-radius: 2px;
    cursor: pointer;
    width: 80px;
}

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

/* Progress bar in ribbon - fills available space */
.progress-group {
    flex: 1;
    min-width: 150px;
    max-width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.3s;
}

/* Disabled state for progress group in desync mode */
.progress-group.disabled {
    opacity: 0.3;
    pointer-events: none;
}

.progress-group.disabled .progress-bar {
    cursor: not-allowed;
}

.time-display {
    font-family: monospace;
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

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

.progress-bar:hover {
    height: 10px;
}

.progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 3px;
    transition: width 0.1s;
}

/* Video Container - CSS Grid for dynamic fill */
.video-container {
    flex: 1;
    display: grid;
    gap: 2px;
    padding: 2px;
    overflow: hidden;
    background: #000;
}

.video-wrapper {
    background: #111;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 0;
}

.video-wrapper.audio-active {
    box-shadow: inset 0 0 0 2px var(--success);
}

.video-wrapper.drag-over {
    box-shadow: inset 0 0 0 3px var(--accent);
    background: rgba(233, 69, 96, 0.1);
}

.video-wrapper.resizing {
    z-index: 10;
}

/* Hover Overlay */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, 
        rgba(0,0,0,0.8) 0%, 
        transparent 30%,
        transparent 70%,
        rgba(0,0,0,0.8) 100%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 8px;
    z-index: 5;
}

.video-wrapper:hover .video-overlay,
.video-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.overlay-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.video-label {
    font-size: 0.8rem;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.overlay-buttons {
    display: flex;
    gap: 4px;
}

.overlay-buttons button {
    background: rgba(0,0,0,0.6);
    border: none;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: background 0.2s;
}

.overlay-buttons button:hover {
    background: var(--accent);
}

/* Individual Progress Bar (Desync Mode) */
.individual-progress {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    flex-wrap: wrap;
}

.individual-time {
    font-family: monospace;
    font-size: 0.7rem;
    color: var(--desync);
    white-space: nowrap;
    min-width: 85px;
}

.individual-progress-bar {
    flex: 1;
    min-width: 80px;
    height: 8px;
    background: rgba(255,255,255,0.15);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.individual-progress-bar:hover {
    height: 12px;
    background: rgba(255,255,255,0.25);
}

.individual-progress-fill {
    height: 100%;
    background: var(--desync);
    border-radius: 4px;
    transition: width 0.1s;
}

.individual-seek-buttons {
    display: flex;
    gap: 4px;
}

.individual-seek-buttons button {
    background: rgba(245, 158, 11, 0.3);
    border: 1px solid var(--desync);
    color: var(--desync);
    padding: 2px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.65rem;
    font-weight: bold;
    transition: all 0.2s;
}

.individual-seek-buttons button:hover {
    background: var(--desync);
    color: #000;
}

.overlay-bottom {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.overlay-bottom label {
    font-size: 0.7rem;
    color: #ccc;
}

.overlay-bottom input[type="number"] {
    background: rgba(0,0,0,0.6);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    width: 70px;
}

.overlay-bottom input[type="range"] {
    -webkit-appearance: none;
    background: rgba(255,255,255,0.2);
    height: 4px;
    border-radius: 2px;
    cursor: pointer;
    width: 60px;
}

.overlay-bottom input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 10px;
    height: 10px;
    background: #fff;
    border-radius: 50%;
}

.offset-display {
    font-size: 0.7rem;
    color: #aaa;
    min-width: 50px;
}

/* Video element */
.video-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-content video {
    max-width: 100%;
    max-height: 100%;
}

.video-content.fill video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-content.native video {
    object-fit: contain;
}

.video-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--text-secondary);
    text-align: center;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.video-placeholder svg {
    width: 40px;
    height: 40px;
    opacity: 0.4;
}

.video-placeholder span {
    font-size: 0.8rem;
    opacity: 0.6;
}

/* Resize handle */
.resize-handle {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 20px;
    height: 20px;
    cursor: nwse-resize;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 10;
}

.video-wrapper:hover .resize-handle {
    opacity: 0.6;
}

.resize-handle::before {
    content: '';
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 10px;
    height: 10px;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
}

/* Hidden file input */
.file-input {
    display: none;
}

/* Shortcuts modal */
.shortcuts-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.shortcuts-modal.visible {
    display: flex;
}

.shortcuts-content {
    background: var(--bg-secondary);
    padding: 25px;
    border-radius: 10px;
    max-width: 450px;
    max-height: 80vh;
    overflow: auto;
}

.shortcuts-content h2 {
    margin-bottom: 15px;
    color: var(--accent);
    font-size: 1.1rem;
}

.shortcut-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
}

.shortcut-key {
    background: var(--bg-tertiary);
    padding: 2px 8px;
    border-radius: 3px;
    font-family: monospace;
    font-size: 0.8rem;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-tertiary);
    padding: 10px 20px;
    border-radius: 6px;
    border: 1px solid var(--accent);
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 1000;
    font-size: 0.85rem;
}

.toast.visible {
    opacity: 1;
}

.vol-display {
    font-size: 0.7rem;
    color: var(--text-secondary);
    min-width: 32px;
}

/* Info Modal */
.info-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.info-modal.visible {
    display: flex;
}

.info-content {
    background: var(--bg-secondary);
    padding: 30px;
    border-radius: 12px;
    max-width: 550px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    border: 1px solid var(--border);
}

.info-content h2 {
    color: var(--accent);
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.info-content .tagline {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.info-section {
    margin-bottom: 20px;
}

.info-section h3 {
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
}

.info-section ul {
    list-style: none;
    padding: 0;
}

.info-section li {
    padding: 6px 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.info-section li strong {
    color: var(--text-primary);
}

.security-section {
    background: rgba(74, 222, 128, 0.05);
    border: 1px solid rgba(74, 222, 128, 0.2);
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
}

.security-section h3 {
    color: var(--success);
    border-bottom-color: rgba(74, 222, 128, 0.3);
}

.security-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.security-badges .badge {
    background: rgba(74, 222, 128, 0.15);
    color: var(--success);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.2s;
}

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

.info-footer {
    text-align: center;
    padding-top: 15px;
    border-top: 1px solid var(--border);
    margin-top: 10px;
}

.info-footer p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.info-footer a {
    color: var(--accent);
    text-decoration: none;
}

.info-footer a:hover {
    text-decoration: underline;
}

.info-btn {
    background: var(--bg-tertiary) !important;
}

.info-btn:hover {
    background: var(--accent) !important;
}

/* Global drag indicator */
body.dragging-file .video-wrapper {
    box-shadow: inset 0 0 0 2px rgba(233, 69, 96, 0.3);
}

body.dragging-file .video-placeholder span::after {
    content: ' ← Drop here!';
    color: var(--accent);
}

        
/* ========== Support Button ========== */
.support-btn {
    background: linear-gradient(135deg, #ff5e5b, #ff9966);
    border: none;
    border-radius: 8px;
    padding: 0.6rem 1rem;
    color: white;
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(255, 94, 91, 0.3);
    z-index: 100;
}

.support-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 94, 91, 0.4);
}

.support-btn:active {
    transform: translateY(0);
}

.support-btn svg {
    animation: heartbeat 1.5s ease-in-out infinite;
}

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

/* Desync mode indicator on video wrappers */
body.desync-mode .video-wrapper {
    border: 1px solid rgba(245, 158, 11, 0.3);
}

body.desync-mode .video-wrapper.audio-active {
    box-shadow: inset 0 0 0 2px var(--success), 0 0 0 1px rgba(245, 158, 11, 0.3);
}

/* ========== Per-Video Fullscreen Overlay ========== */
.video-fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.video-fullscreen-overlay.active {
    opacity: 1;
    visibility: visible;
}

.video-fullscreen-overlay.cursor-hidden {
    cursor: none;
}

.fullscreen-video-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fullscreen-video-container video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Fullscreen Controls */
.fullscreen-controls {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fullscreen-controls.visible {
    opacity: 1;
}

.fullscreen-controls > * {
    pointer-events: auto;
}

.fullscreen-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 30px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.8) 0%, transparent 100%);
}

.fullscreen-title {
    font-size: 1.2rem;
    font-weight: 500;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.fullscreen-exit-btn {
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fullscreen-exit-btn svg {
    width: 24px;
    height: 24px;
    color: #fff;
}

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

.fullscreen-bottom {
    padding: 20px 30px 30px;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
}

.fullscreen-progress-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.fullscreen-time {
    font-family: monospace;
    font-size: 0.9rem;
    color: #fff;
    min-width: 50px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

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

.fullscreen-progress-bar:hover {
    height: 10px;
}

.fullscreen-progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 3px;
    transition: width 0.1s;
}

.fullscreen-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.fs-ctrl-btn {
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    position: relative;
}

.fs-ctrl-btn svg {
    width: 22px;
    height: 22px;
}

.fs-ctrl-btn span {
    font-size: 0.6rem;
    font-weight: bold;
    position: absolute;
    bottom: 6px;
}

.fs-ctrl-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.1);
}

.fs-play-btn {
    width: 70px;
    height: 70px;
    background: var(--accent);
}

.fs-play-btn svg {
    width: 32px;
    height: 32px;
}

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

/* Seek button icons adjustment */
.fs-ctrl-btn:not(.fs-play-btn) svg {
    margin-bottom: 4px;
}

/* ========== Stack Mode ========== */
:root { --stack: #a855f7; }

.ribbon button.stack-btn.active {
    background: var(--stack);
    border-color: var(--stack);
    color: #fff;
}

.ribbon button.stack-btn:hover {
    background: var(--stack);
    border-color: var(--stack);
}

/* In stack mode, wrappers are all positioned in grid cell 1/1 */
body.stack-mode .video-container {
    background: #000 !important;
}

body.stack-mode .video-wrapper {
    background: transparent !important;
    background-color: transparent !important;
}


/* First wrapper gets the hover overlay; others suppress their overlays */
body.stack-mode .video-wrapper:not(:last-child) .video-overlay {
    display: none;
}

/* ========== Export Modal ========== */
.export-modal {
    display: flex;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    align-items: center;
    justify-content: center;
    z-index: 1100;
    padding: 20px;
}

.export-content {
    background: var(--bg-secondary);
    padding: 28px 30px;
    border-radius: 12px;
    width: 100%;
    max-width: 440px;
    position: relative;
    border: 1px solid var(--border);
}

.export-content h2 {
    color: var(--accent);
    font-size: 1.2rem;
    margin-bottom: 4px;
}

.export-subtitle {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-bottom: 18px;
}

.export-fields {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 20px;
}

.export-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.export-field label {
    font-size: 0.72rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.export-field input[type="text"],
.export-field select {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border);
    padding: 6px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
}

.export-field input[type="text"]:focus,
.export-field select:focus {
    outline: none;
    border-color: var(--accent);
}

.export-row {
    display: flex;
    gap: 14px;
}

.export-row .export-field {
    flex: 1;
}

/* Opacity table */
.export-opacity-table {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: var(--bg-tertiary);
    border-radius: 5px;
    padding: 8px 10px;
}

.export-opacity-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
}

.export-opacity-name {
    color: var(--text-secondary);
    width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex-shrink: 0;
}

.export-opacity-bar-wrap {
    flex: 1;
    height: 6px;
    background: rgba(255,255,255,0.08);
    border-radius: 3px;
    overflow: hidden;
}

.export-opacity-bar {
    height: 100%;
    background: var(--stack, #a855f7);
    border-radius: 3px;
    transition: width 0.2s;
}

.export-opacity-pct {
    color: var(--text-primary);
    min-width: 34px;
    text-align: right;
    font-family: monospace;
    font-size: 0.72rem;
}

/* Progress */
.export-progress-area {
    margin-bottom: 16px;
}

.export-progress-label {
    font-size: 0.82rem;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.export-progress-track {
    width: 100%;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.export-progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 4px;
    transition: width 0.15s;
}

.export-progress-sub {
    font-size: 0.72rem;
    color: var(--text-secondary);
    margin-top: 5px;
    font-family: monospace;
}

/* Actions */
.export-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.export-cancel-btn {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    padding: 7px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.15s;
}

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

.export-start-btn {
    background: var(--stack, #a855f7);
    color: #fff;
    border: none;
    padding: 7px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.15s;
}

.export-start-btn:hover {
    filter: brightness(1.15);
}

.export-start-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Export ribbon button — matches stack color */
.export-ribbon-btn {
    background: var(--stack, #a855f7) !important;
    border-color: var(--stack, #a855f7) !important;
    color: #fff !important;
    font-weight: 600;
}
.export-ribbon-btn:hover {
    filter: brightness(1.15);
}

.toggle-btn {
    min-width: auto;
    text-align: left;
}

.play-btn.icon-only {
    min-width: 36px;
    padding: 4px 10px;
    font-size: 14px;
}
.speed-select {
    width: 64px;
    padding: 2px 4px;
}
.support-heart {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ff6b9d;
    text-decoration: none;
    padding: 4px 6px;
    border-radius: 4px;
    transition: transform 0.15s, color 0.15s;
}
.support-heart:hover {
    color: #ff4778;
    transform: scale(1.15);
}

.beatbar-overlay {
    pointer-events: none;
    font-family: inherit;
}
.beatbar-canvas {
    width: 100%;
    height: 100%;
    display: block;
}
.beatbar-status {
    position: absolute;
    top: 6px; left: 8px;
    font-size: 11px;
    color: #fff;
    background: rgba(0,0,0,0.55);
    padding: 2px 8px;
    border-radius: 3px;
    opacity: 0;
    transition: opacity 0.15s;
}
.beatbar-status:not(:empty) { opacity: 1; }
.beatbar-status--err { color: #f9a; background: rgba(60,0,0,0.7); }
.beatbar-status--ok  { color: #9ef0df; }
.beatbar-status--busy { color: #ffd; }
.beats-btn.active { background: var(--accent, #7aa8ff); color: #000; }