/* =========================================
   Floating Toolbar for Lyrics Pages
   ========================================= */

/* Recording Timer - Above Toolbar */
.recording-timer {
    position: fixed;
    bottom: 120px;
    /* Above toolbar */
    left: 50%;
    transform: translateX(-50%);
    background: rgba(239, 68, 68, 0.95);
    /* Red background */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 8px 20px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 9999;
    /* Below Modal (10000) but above content */
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4);
    animation: slideUpTimer 0.3s ease-out;
}

.timer-icon {
    font-size: 14px;
    color: white;
    animation: pulse 1.5s infinite;
}

.timer-text {
    font-size: 16px;
    font-weight: 600;
    color: white;
    font-family: 'Courier New', monospace;
    /* Monospace for timer */
    letter-spacing: 1px;
}

@keyframes slideUpTimer {
    from {
        bottom: 20px;
        opacity: 0;
    }

    to {
        bottom: 120px;
        opacity: 1;
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Floating Toolbar Container */
/* Floating Toolbar Container */
.lyrics-floating-toolbar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.96);
    /* Dark Slate 900 */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 8px 20px 4px;
    /* Reduced vertical padding */
    border-radius: 20px;
    /* Slightly tighter radius */
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    /* Align sections vertically */
    gap: 12px;
    /* Reduced gap */
    z-index: 100;
    /* Lower z-index so it's below Menu (2000) */
    animation: slideUp 0.4s ease-out;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
}

.lyrics-floating-toolbar.hidden {
    transform: translateX(-50%) translateY(200%);
    opacity: 0;
    pointer-events: none;
}

@keyframes slideUp {
    from {
        bottom: -100px;
        opacity: 0;
    }

    to {
        bottom: 20px;
        opacity: 1;
    }
}

/* Toolbar Sections & Labels */
.toolbar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    /* Minimal gap between button and label */
}

.toolbar-label {
    font-size: 9px;
    /* Smaller font */
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    /* More subtle */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1;
    margin-top: 2px;
}

/* Toolbar Buttons */
.toolbar-btn {
    background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
    border: none;
    color: white;
    width: 38px;
    /* Slightly smaller buttons */
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 15px;
    position: relative;
}

.toolbar-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}

.toolbar-btn:active {
    transform: translateY(-1px) scale(0.98);
}

/* Button Separator */
.toolbar-separator {
    width: 1px;
    height: 24px;
    /* Reduced height to match shorter content */
    background: rgba(255, 255, 255, 0.1);
    margin: 0;
    /* Remove margin as gap handles spacing */
    align-self: center;
}

/* Font Size Controls */
.font-size-group {
    display: flex;
    gap: 6px;
    align-items: center;
}

.toolbar-btn.font-btn {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    font-weight: 600;
}

.toolbar-btn.font-btn:hover {
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

/* Center Record Button */
/* Center Record Button - Redesigned */
.toolbar-btn.record-btn-center {
    background: white !important;
    /* White Background */
    width: 48px;
    height: 48px;
    font-size: 24px;
    /* Larger Icon */
    border: 2px solid #EF4444;
    /* Red Border */
    color: #EF4444;
    /* Red Icon */
}

/* Recording Active State - Blinking Indicator */
.toolbar-btn.record-btn-center.recording-active i {
    animation: micFlicker 1s steps(1) infinite;
}

/* Ensure button background stays solid white during recording */
.toolbar-btn.record-btn-center.recording-active {
    background: white !important;
    animation: none !important;
    border: 2px solid #EF4444 !important;
}

@keyframes micFlicker {

    0%,
    50% {
        color: black;
        /* Kala */
    }

    51%,
    100% {
        color: #EF4444;
        /* Lal */
    }
}

/* Auto Scroll Controls */
.scroll-group {
    display: flex;
    gap: 6px;
    align-items: center;
}

.toolbar-btn.scroll-btn {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
}

.toolbar-btn.scroll-btn:hover {
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.toolbar-btn.scroll-btn.active {
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
    animation: pulse 1.5s ease-in-out infinite;
}

/* Speed Selector */
.speed-selector {
    position: relative;
}

.speed-dropdown {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    gap: 12px;
    min-width: 200px;
}

.speed-dropdown.active {
    display: flex;
}

.speed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.speed-value {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    min-width: 30px;
    text-align: center;
}

.speed-slider {
    width: 100%;
    height: 6px;
    border-radius: 5px;
    background: linear-gradient(to right, #93C5FD 0%, #2563EB 100%);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.speed-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.5);
    border: 3px solid #3B82F6;
    transition: all 0.2s ease;
}

.speed-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.6);
}

.speed-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.5);
    border: 3px solid #3B82F6;
    transition: all 0.2s ease;
}

.speed-slider::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.6);
}

.speed-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #9CA3AF;
    margin-top: -4px;
}

/* Tooltip */
.toolbar-btn::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.toolbar-btn:hover::before {
    opacity: 1;
}

/* =========================================
   Recording Modal - PROFESSIONAL LIGHT STUDIO THEME
   ========================================= */

.recording-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.recording-modal.active {
    display: flex;
}

.recording-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease;
}

.recording-modal-content {
    position: relative;
    /* Dark Theme Background (Dark Slate) */
    background: #0f172a;
    border-radius: 20px;
    padding: 0;
    max-width: 1000px;
    width: 95%;
    max-height: 85vh;
    height: 700px;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
    /* Stronger shadow for dark theme */
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    color: #f8fafc;
    /* Light text */
}

/* Horizontal layout for desktop */
@media (min-width: 768px) {
    .recording-modal-content {
        display: grid;
        grid-template-columns: 1.5fr 1fr;
        grid-template-rows: auto 1fr;
        grid-template-areas:
            "header header"
            "video gallery";
        gap: 0;
    }

    .modal-header {
        grid-area: header;
        padding: 18px 60px 18px 24px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        display: flex;
        justify-content: space-between;
        align-items: center;
        background: #0f172a;
        /* Dark background */
        z-index: 10;
        height: 70px;
    }

    .modal-title-group {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .modal-title-group h2 {
        margin: 0;
        font-size: 18px;
        color: #f8fafc;
        font-weight: 600;
        letter-spacing: 0.5px;
    }

    .modal-header p {
        color: #94a3b8;
        font-size: 13px;
        margin: 0;
    }

    .modal-icon-pulse {
        width: 32px;
        height: 32px;
        background: rgba(59, 130, 246, 0.2);
        /* Darker blue bg */
        color: #60a5fa;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        animation: pulseIcon 2.5s infinite;
    }

    .modal-close {
        position: absolute;
        top: 16px;
        right: 16px;
        z-index: 20;
        background: rgba(255, 255, 255, 0.1);
        color: #cbd5e1;
        width: 32px;
        height: 32px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: 0.2s;
        border: none;
        cursor: pointer;
    }

    .modal-close:hover {
        background: rgba(239, 68, 68, 0.2);
        color: #f87171;
    }

    /* Video Area */
    .video-container {
        grid-area: video;
        background: #000;
        position: relative;
        overflow: hidden;
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0;
        border-radius: 0 0 0 20px;
    }

    .video-preview {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transform: scaleX(-1);
        /* Flip horizontally to un-mirror */
    }

    .recording-indicator {
        position: absolute;
        top: 20px;
        left: 20px;
        background: rgba(0, 0, 0, 0.7);
        padding: 6px 12px;
        border-radius: 20px;
        color: white;
        font-size: 12px;
        display: flex;
        align-items: center;
        gap: 6px;
        z-index: 20;
    }

    .rec-dot {
        width: 8px;
        height: 8px;
        background: #EF4444;
        border-radius: 50%;
        animation: recPulse 1s infinite;
    }

    /* Gallery Area - DARK THEME */
    .recordings-gallery {
        grid-area: gallery;
        background: #1e293b;
        /* Darker slate */
        border-left: 1px solid rgba(255, 255, 255, 0.1);
        display: flex;
        flex-direction: column;
        height: 100%;
        overflow: hidden;
        border-radius: 0 0 20px 0;
    }

    .gallery-header {
        padding: 15px 20px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        background: #0f172a;
        height: 50px;
    }

    .gallery-header h3 {
        margin: 0;
        font-size: 14px;
        color: #cbd5e1;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .badge {
        background: #3B82F6;
        color: white;
        padding: 2px 8px;
        border-radius: 4px;
        font-size: 11px;
        font-weight: 700;
    }

    /* Retake / Back to Camera Button */
    .header-actions {
        display: flex;
        gap: 8px;
    }

    .retake-btn {
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        color: #e2e8f0;
        font-size: 11px;
        padding: 4px 10px;
        border-radius: 6px;
        cursor: pointer;
        font-weight: 600;
        transition: all 0.2s;
    }

    .retake-btn:hover {
        background: #3b82f6;
        color: white;
        border-color: #3b82f6;
    }

    .gallery-list {
        flex: 1;
        overflow-y: auto;
        padding: 15px;
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .gallery-list::-webkit-scrollbar {
        width: 6px;
    }

    .gallery-list::-webkit-scrollbar-track {
        background: #1e293b;
    }

    .gallery-list::-webkit-scrollbar-thumb {
        background: #475569;
        border-radius: 3px;
    }

    /* Empty State */
    .empty-gallery {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        height: 100%;
        color: #64748b;
        text-align: center;
    }

    .empty-icon {
        font-size: 32px;
        margin-bottom: 12px;
        opacity: 0.5;
        color: #475569;
    }

    .sub-text {
        font-size: 12px;
        margin-top: 5px;
        opacity: 0.8;
    }

    /* Privacy Note in Empty State */
    .privacy-note {
        margin-top: 24px;
        background: rgba(16, 185, 129, 0.1);
        color: #34d399;
        font-size: 11px;
        padding: 8px 12px;
        border-radius: 8px;
        display: flex;
        align-items: center;
        gap: 8px;
        border: 1px solid rgba(16, 185, 129, 0.2);
    }

    .privacy-note i {
        font-size: 10px;
    }

    /* Gallery Item */
    .gallery-item {
        background: rgba(255, 255, 255, 0.03);
        border-radius: 10px;
        padding: 12px;
        display: flex;
        align-items: center;
        gap: 12px;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
        border: 1px solid rgba(255, 255, 255, 0.05);
        transition: transform 0.2s ease, border-color 0.2s;
        cursor: pointer;
    }

    .gallery-item:hover {
        transform: translateY(-2px);
        border-color: #64748b;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
        background: rgba(255, 255, 255, 0.05);
    }

    .gallery-item.active {
        border-color: #3b82f6;
        background: rgba(59, 130, 246, 0.1);
    }

    .item-icon {
        width: 36px;
        height: 36px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #94a3b8;
    }

    .item-info {
        flex: 1;
    }

    .item-name {
        display: block;
        font-weight: 600;
        font-size: 13px;
        color: #e2e8f0;
    }

    .item-meta {
        font-size: 11px;
        color: #64748b;
    }

    .item-actions {
        display: flex;
        gap: 6px;
    }

    .gallery-action-btn {
        width: 28px;
        height: 28px;
        border-radius: 6px;
        border: none;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.2s;
        background: rgba(255, 255, 255, 0.1);
        color: #94a3b8;
    }

    .play-btn:hover {
        background: #3b82f6;
        color: white;
    }

    .dl-btn:hover {
        background: #10b981;
        color: white;
    }

    .del-btn:hover {
        background: #ef4444;
        color: white;
    }

    /* Camera Info Overlay */
    .camera-info-overlay {
        position: absolute;
        top: 20px;
        right: 20px;
        left: auto;
        display: flex;
        gap: 10px;
        z-index: 5;
        pointer-events: none;
    }

    .info-tag {
        background: rgba(0, 0, 0, 0.6);
        color: white;
        padding: 4px 10px;
        border-radius: 4px;
        font-size: 11px;
        font-weight: 600;
        backdrop-filter: blur(4px);
    }

    .camera-overlay {
        z-index: 10;
        position: absolute;
        bottom: 20px;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
        pointer-events: none;
    }

    .camera-record-btn {
        pointer-events: auto;
    }

    .overlay-timer {
        font-size: 20px;
        font-weight: 700;
        color: white;
        font-family: monospace;
        background: rgba(0, 0, 0, 0.5);
        padding: 2px 8px;
        border-radius: 4px;
    }
}

/* Base Camera Record Button Styles */
.camera-record-btn {
    width: 72px;
    height: 72px;
    border: none;
    background: transparent;
    cursor: pointer;
    position: relative;
    padding: 0;
    transition: transform 0.2s ease;
}

.camera-record-btn:hover {
    transform: scale(1.05);
}

.record-outer-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 4px solid white;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.record-inner-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 54px;
    height: 54px;
    background: #EF4444;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.camera-record-btn.recording .record-inner-circle {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: #DC2626;
    animation: recordPulse 1.5s ease-in-out infinite;
}

@keyframes recordPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.6);
    }

    50% {
        box-shadow: 0 0 0 10px rgba(220, 38, 38, 0.3);
    }
}

@keyframes pulseIcon {
    0% {
        box-shadow: 0 0 0 0 rgba(96, 165, 250, 0.4);
    }

    70% {
        box-shadow: 0 0 0 8px rgba(96, 165, 250, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(96, 165, 250, 0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Camera Access Denied State */
.camera-denied-msg {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #e2e8f0;
    padding: 30px;
    height: 100%;
    background: #0f172a;
    width: 100%;
}

.denied-icon {
    font-size: 48px;
    color: #ef4444;
    margin-bottom: 16px;
    opacity: 0.8;
}

.camera-denied-msg h3 {
    font-size: 18px;
    margin: 0 0 10px 0;
    color: #f8fafc;
}

.camera-denied-msg p {
    font-size: 14px;
    color: #94a3b8;
    margin: 0 0 24px 0;
    max-width: 300px;
    line-height: 1.5;
}

.denied-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.retry-btn {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.retry-btn-secondary {
    background: transparent;
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.4);
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.retry-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #cbd5e1;
    border-color: #cbd5e1;
}

.retry-btn:hover {
    background: #2563eb;
    transform: translateY(-2px);
}

@keyframes modalSlideIn {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Rec Dot Animation */
@keyframes recPulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}


/* Default hidden on desktop */
.mobile-minimize-handle {
    display: none;
}

/* Mobile Responsive Adjustments - COMPLETE REDESIGN */
@media (max-width: 768px) {

    /* Full-screen modal on mobile */
    .recording-modal-content {
        height: 100vh !important;
        max-height: 100vh !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        border-radius: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        background: #0f172a;
    }

    /* Hide header completely on mobile */
    .modal-header {
        display: none !important;
    }

    /* Hide desktop close button */
    .modal-close {
        display: none !important;
    }

    /* Mobile Close Button - Inside Video Preview (Top-Right) */
    .mobile-minimize-handle {
        display: flex !important;
        position: absolute !important;
        top: 16px !important;
        right: 16px !important;
        left: auto !important;
        transform: none !important;

        /* Sizing */
        width: 40px !important;
        height: 40px !important;
        border-radius: 50% !important;

        /* Glassmorphism */
        background: rgba(0, 0, 0, 0.6) !important;
        backdrop-filter: blur(8px) !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;

        /* Align Icon */
        align-items: center !important;
        justify-content: center !important;
        color: rgba(255, 255, 255, 0.95) !important;

        cursor: pointer !important;
        z-index: 10000 !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
        transition: all 0.2s ease !important;
    }

    .mobile-minimize-handle i {
        font-size: 18px !important;
        transform: rotate(0deg) !important;
    }

    .mobile-minimize-handle:active {
        background: rgba(0, 0, 0, 0.8) !important;
        transform: scale(0.9) !important;
    }

    /* Smooth Slide Animations */
    @keyframes slideUpModal {
        0% {
            transform: translateY(100%);
        }

        100% {
            transform: translateY(0);
        }
    }

    @keyframes slideDownModal {
        0% {
            transform: translateY(0);
        }

        100% {
            transform: translateY(100%);
        }
    }

    /* Apply animations to content */
    .recording-modal.active .recording-modal-content {
        animation: slideUpModal 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards !important;
    }

    .recording-modal.active.closing .recording-modal-content {
        animation: slideDownModal 0.5s cubic-bezier(0.32, 0, 0.67, 0) forwards !important;
    }

    /* Hide "REC" text on mobile, keep dot */
    .recording-indicator span:not(.rec-dot) {
        display: none !important;
    }

    .modal-header p {
        display: none !important;
    }

    .modal-title-group {
        flex: 1;
    }

    .modal-title-group h2 {
        font-size: 15px !important;
        margin: 0 !important;
    }


    .modal-icon-pulse {
        width: 28px !important;
        height: 28px !important;
    }

    .modal-close {
        width: 30px !important;
        height: 30px !important;
    }

    /* Video container - Square aspect on mobile (to show recordings list below) */
    .video-container {
        position: relative !important;
        flex: 0 0 auto !important;
        width: 100% !important;
        aspect-ratio: 1 / 1 !important;
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
        border-radius: 0 !important;
        background: #000 !important;
        overflow: hidden !important;
    }

    .video-preview {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    /* Camera overlay adjustments - ensure centered positioning INSIDE video */
    .camera-overlay {
        position: absolute !important;
        bottom: 30px !important;
        left: 0 !important;
        right: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 15px !important;
        z-index: 10 !important;
        pointer-events: none !important;
        /* Allow clicks to pass through empty areas */
    }

    /* Enable pointers for buttons */
    .camera-record-btn,
    .overlay-timer {
        pointer-events: auto !important;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
        /* Better visibility */
    }

    .overlay-timer {
        font-size: 20px !important;
        /* Slightly larger for mobile */
        font-weight: 700 !important;
        padding: 4px 12px !important;
        background: rgba(0, 0, 0, 0.3);
        /* Subtle background */
        border-radius: 4px;
        backdrop-filter: blur(2px);
    }

    /* CRITICAL: Ensure ONLY toggle/timer are hidden during playback, keep mirror/tags visible */
    .video-container.playback-mode .camera-overlay {
        display: none !important;
    }

    /* Camera record button - centered below timer */
    .camera-record-btn {
        width: 70px !important;
        /* Slightly larger for better touch */
        height: 70px !important;
    }

    .record-inner-circle {
        width: 52px !important;
        height: 52px !important;
    }

    .camera-record-btn.recording .record-inner-circle {
        width: 26px !important;
        height: 26px !important;
        border-radius: 4px !important;
    }

    /* Info Overlay - Split Layout: Labels (Left) | Mirror (Right) */
    .camera-info-overlay {
        top: 12px !important;
        left: 12px !important;
        right: 12px !important;
        width: auto !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-start !important;
        /* Align everything to start first */
        gap: 8px !important;
        pointer-events: none !important;
        /* Allow clicks through empty space */
        z-index: 60 !important;
    }

    /* Interactive children need pointer-events */
    .camera-info-overlay>* {
        pointer-events: auto !important;
    }

    /* HIDE HD Quality and Stereo tags on mobile */
    .info-tag {
        display: none !important;
    }

    /* Mirror toggle button - Match minimize button exactly */
    #mirrorToggle {
        display: flex !important;
        position: absolute !important;
        top: 4px !important;
        left: 4px !important;
        width: 40px !important;
        height: 40px !important;
        border-radius: 50% !important;

        /* Same styling as minimize button */
        background: rgba(0, 0, 0, 0.6) !important;
        backdrop-filter: blur(8px) !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;

        /* Align Icon - same as minimize */
        align-items: center !important;
        justify-content: center !important;
        color: rgba(255, 255, 255, 0.95) !important;
        font-size: 18px !important;

        cursor: pointer !important;
        z-index: 10000 !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
        transition: all 0.2s ease !important;
        margin: 0 !important;
        order: initial !important;
        transform: none !important;
    }

    #mirrorToggle.active {
        background: rgba(59, 130, 246, 0.8) !important;
        color: white !important;
        border-color: rgba(59, 130, 246, 1) !important;
    }

    /* Add label below mirror button */
    #mirrorToggle::after {
        content: 'Mirror';
        position: absolute;
        top: 100%;
        left: 50%;
        transform: translateX(-50%);
        margin-top: 4px;
        font-size: 10px;
        font-weight: 600;
        color: rgba(255, 255, 255, 0.8);
        white-space: nowrap;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
        pointer-events: none;
    }

    /* Add label below minimize/close button */
    .mobile-minimize-handle::after {
        content: 'Minimize';
        position: absolute;
        top: 100%;
        left: 50%;
        transform: translateX(-50%);
        margin-top: 4px;
        font-size: 10px;
        font-weight: 600;
        color: rgba(255, 255, 255, 0.8);
        white-space: nowrap;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
        pointer-events: none;
    }

    /* Gallery - takes remaining space */
    .recordings-gallery {
        flex: 1 1 auto !important;
        width: 100% !important;
        background: #1e293b !important;
        border-left: none !important;
        border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
        border-radius: 0 !important;
        overflow: hidden !important;
        display: flex !important;
        flex-direction: column !important;
        min-height: 0 !important;
    }

    .gallery-header {
        padding: 12px 16px !important;
        height: auto !important;
        min-height: 45px !important;
        justify-content: space-between !important;
        flex-shrink: 0 !important;
    }

    /* Header - horizontal alignment */
    .gallery-header {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        margin-bottom: 12px !important;
        padding-bottom: 0 !important;
    }

    .gallery-header h3 {
        font-size: 16px !important;
        margin: 0 !important;
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
    }

    .badge {
        font-size: 11px !important;
        padding: 2px 8px !important;
        background: rgba(255, 255, 255, 0.15) !important;
        color: #fff !important;
        border-radius: 12px !important;
        /* Pill shape */
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        display: inline-block !important;
        line-height: normal !important;
    }

    .header-actions {
        margin-top: 0 !important;
    }

    .retake-btn {
        font-size: 11px !important;
        padding: 6px 12px !important;
        background: #2563eb !important;
        /* Proper button blue */
        border-radius: 6px !important;
    }

    .retake-btn {
        font-size: 10px !important;
        padding: 4px 8px !important;
    }

    .gallery-list {
        flex: 1 1 auto !important;
        padding: 12px !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    /* Gallery items - mobile optimized */
    /* Gallery items - mobile optimized and organized */
    /* Gallery items - mobile optimized and organized */
    .gallery-item {
        padding: 12px !important;
        margin-bottom: 8px !important;
        display: flex !important;
        align-items: center !important;
        gap: 12px !important;
        /* Visual styling for separation */
        background: #0f172a !important;
        /* Distinct dark card background */
        border: 1px solid rgba(255, 255, 255, 0.15) !important;
        /* Brighter border */
        border-radius: 8px !important;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
    }

    .item-icon {
        width: 36px !important;
        height: 36px !important;
        font-size: 14px !important;
        flex-shrink: 0 !important;
        /* Button style for icon */
        background: rgba(255, 255, 255, 0.1) !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
    }

    .item-info {
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 2px !important;
        min-width: 0 !important;
        /* Text truncation fix */
    }

    .item-name {
        font-size: 13px !important;
    }

    .item-meta {
        font-size: 11px !important;
    }

    .item-actions {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        flex-shrink: 0 !important;
    }

    .gallery-action-btn {
        width: 32px !important;
        height: 32px !important;
        font-size: 12px !important;
        /* Button styling */
        background: rgba(255, 255, 255, 0.1) !important;
        border-radius: 50% !important;
        /* Circular buttons */
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        transition: background 0.2s !important;
    }

    .gallery-action-btn:active {
        background: rgba(255, 255, 255, 0.3) !important;
    }

    .del-btn {
        background: rgba(255, 59, 48, 0.2) !important;
        /* Subtle red for delete */
        border-color: rgba(255, 59, 48, 0.3) !important;
    }

    /* Empty state */
    /* Empty state - Enhanced for Mobile */
    .empty-gallery {
        padding: 40px 20px !important;
        text-align: center !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        height: 100% !important;
        opacity: 0.8;
    }

    .empty-icon {
        font-size: 48px !important;
        margin-bottom: 16px !important;
        color: #475569 !important;
        background: rgba(255, 255, 255, 0.05);
        width: 80px;
        height: 80px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        margin: 0 auto 20px auto !important;
    }

    .empty-gallery p {
        font-size: 16px !important;
        font-weight: 600 !important;
        color: #e2e8f0 !important;
        margin: 0 0 8px 0 !important;
    }

    .sub-text {
        font-size: 13px !important;
        color: #94a3b8 !important;
        display: block !important;
        margin-bottom: 24px !important;
    }

    .privacy-note {
        margin-top: auto !important;
        /* Push to bottom if needed, or just regular margin */
        background: rgba(16, 185, 129, 0.1) !important;
        border: 1px solid rgba(16, 185, 129, 0.2) !important;
        padding: 12px 16px !important;
        border-radius: 12px !important;
        width: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 10px !important;
    }

    .privacy-note span {
        font-size: 12px !important;
        color: #34d399 !important;
        text-align: left !important;
    }

    .privacy-note i {
        font-size: 14px !important;
        color: #34d399 !important;
    }

    .sub-text {
        font-size: 11px !important;
    }

    /* Info overlay - Top of video */
    .camera-info-overlay {
        position: absolute !important;
        top: 12px !important;
        right: 12px !important;
        left: 12px !important;
        /* Spans full width for flexibility */
        gap: 8px !important;
        z-index: 20 !important;
        /* Higher than controls */
        justify-content: flex-end !important;
        /* Aligns items to right, or space-between if needed */
        pointer-events: none !important;
        /* Allow clicks through empty space */
        display: flex !important;
        flex-wrap: wrap !important;
    }

    .info-tag,
    .mirror-toggle-btn {
        pointer-events: auto !important;
        /* Enable interaction for buttons */
        backdrop-filter: blur(4px);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    }

    .info-tag {
        font-size: 10px !important;
        padding: 3px 8px !important;
    }

    /* Fix Scroll Speed Popup Overflow */
    .speed-dropdown {
        left: auto !important;
        right: 0 !important;
        transform: none !important;
        bottom: 55px !important;
        /* Slightly higher than button */
    }

    /* Privacy Note - Mobile */
    .privacy-note {
        font-size: 10px !important;
        padding: 6px 10px !important;
        margin-top: 16px !important;
        max-width: 90% !important;
    }

    .privacy-note i {
        font-size: 9px !important;
    }

    /* Camera Denied Message - Mobile */
    .camera-denied-msg {
        padding: 20px !important;
    }

    .denied-icon {
        font-size: 40px !important;
        margin-bottom: 12px !important;
    }

    .camera-denied-msg h3 {
        font-size: 16px !important;
        margin: 0 0 8px 0 !important;
    }

    .camera-denied-msg p {
        font-size: 13px !important;
        margin: 0 0 20px 0 !important;
        max-width: 100% !important;
    }

    /* Denied Actions - Mobile (Stack vertically) */
    .denied-actions {
        flex-direction: column !important;
        gap: 10px !important;
        width: 100% !important;
    }

    .retry-btn,
    .retry-btn-secondary {
        width: 100% !important;
        padding: 12px 20px !important;
        font-size: 15px !important;
        min-height: 44px !important;
        /* Touch target */
    }

    /* Mirror Toggle - Mobile */
    .mirror-toggle-btn {
        min-width: 44px !important;
        min-height: 44px !important;
        font-size: 16px !important;
        pointer-events: auto !important;
    }
}