/* WooArtView Frontend Styles - FINAL FIXES: Remove Fullscreen, Fix Mobile Gallery Button */

/* FIXED: View in Room Button - DARKER BACKGROUND */
.wav-view-in-room-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 16px;
    background: linear-gradient(135deg, 
        rgba(139, 69, 255, 0.9) 0%, 
        rgba(59, 130, 246, 0.9) 50%, 
        rgba(147, 51, 234, 0.9) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: #ffffff;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    box-shadow: 
        0 4px 16px rgba(139, 69, 255, 0.3),
        0 2px 8px rgba(59, 130, 246, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
    width: 100%;
    text-align: center;
    margin-bottom: 15px;
}

.wav-view-in-room-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.2), 
        transparent);
    transition: left 0.6s ease;
}

.wav-view-in-room-btn:hover::before {
    left: 100%;
}

.wav-view-in-room-btn:hover {
    background: linear-gradient(135deg, 
        rgba(139, 69, 255, 1) 0%, 
        rgba(59, 130, 246, 1) 50%, 
        rgba(147, 51, 234, 1) 100%);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 
        0 6px 20px rgba(139, 69, 255, 0.4),
        0 4px 12px rgba(59, 130, 246, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    border-color: rgba(255, 255, 255, 0.3);
}

.wav-icon {
    width: 16px;
    height: 16px;
    stroke-width: 2.5;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Modal Styles */
.wav-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(15, 13, 37, 1) 0%, 
        rgba(24, 23, 64, 1) 25%, 
        rgba(27, 24, 81, 1) 50%, 
        rgba(33, 28, 101, 1) 75%, 
        rgba(39, 35, 114, 1) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 999999;
    animation: fadeIn 0.4s ease-out;
}

.wav-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.wav-modal-content {
    background: linear-gradient(135deg, 
        rgba(15, 13, 37, 1) 0%, 
        rgba(24, 23, 64, 1) 25%, 
        rgba(27, 24, 81, 1) 50%, 
        rgba(33, 28, 101, 1) 75%, 
        rgba(39, 35, 114, 1) 100%);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    box-shadow: 
        0 25px 50px rgba(139, 69, 255, 0.4),
        0 15px 35px rgba(59, 130, 246, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    animation: slideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

/* FIXED: Modal Header - Only Close Button */
.wav-modal-header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    background: linear-gradient(135deg, 
        rgba(15, 13, 37, 1) 0%, 
        rgba(24, 23, 64, 1) 100%);
    flex-shrink: 0;
    position: relative;
}

.wav-modal-header h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    text-align: center;
    flex: 1;
    padding: 0 60px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* FIXED: Modern Circular Close Button - Only Button */
.wav-close-btn {
    background: linear-gradient(135deg, 
        rgba(239, 68, 68, 0.9) 0%, 
        rgba(220, 38, 38, 0.9) 100%);
    backdrop-filter: blur(15px);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #ffffff;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 4px 12px rgba(239, 68, 68, 0.4),
        0 2px 6px rgba(0, 0, 0, 0.2);
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    padding: 0;
}

.wav-close-btn:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 
        0 6px 20px rgba(239, 68, 68, 0.6),
        0 0 0 4px rgba(239, 68, 68, 0.2);
    background: linear-gradient(135deg, 
        rgba(239, 68, 68, 1) 0%, 
        rgba(220, 38, 38, 1) 100%);
}

.wav-close-btn svg {
    width: 14px;
    height: 14px;
    stroke-width: 2.5;
}

/* Modal Body */
.wav-modal-body {
    display: flex;
    flex: 1;
    overflow: hidden;
    flex-direction: column;
}

/* Mode Toggle Buttons - Top Positioned */
.wav-ar-toggle {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, 
        rgba(139, 69, 255, 0.9) 0%, 
        rgba(59, 130, 246, 0.9) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: none;
    border-radius: 12px;
    padding: 8px 16px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 
        0 4px 12px rgba(139, 69, 255, 0.4),
        0 2px 6px rgba(0, 0, 0, 0.2);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    z-index: 100;
    min-width: 100px;
    text-align: center;
}

.wav-ar-toggle:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 
        0 6px 18px rgba(139, 69, 255, 0.5),
        0 0 0 4px rgba(139, 69, 255, 0.2);
}

.wav-upload-toggle {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, 
        rgba(34, 197, 94, 0.9) 0%, 
        rgba(22, 163, 74, 0.9) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: none;
    border-radius: 12px;
    padding: 8px 16px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 
        0 4px 12px rgba(34, 197, 94, 0.4),
        0 2px 6px rgba(0, 0, 0, 0.2);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    z-index: 100;
    min-width: 100px;
    text-align: center;
}

.wav-upload-toggle:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 
        0 6px 18px rgba(34, 197, 94, 0.5),
        0 0 0 4px rgba(34, 197, 94, 0.2);
}

/* Room Selector - Desktop Only */
.wav-room-selector {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 30;
    display: none;
}

.wav-room-category-dropdown {
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.95) 0%, 
        rgba(255, 255, 255, 0.9) 100%);
    backdrop-filter: blur(15px);
    color: #333333;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 
        0 4px 12px rgba(139, 69, 255, 0.3),
        0 2px 6px rgba(0, 0, 0, 0.1);
    text-shadow: none;
    min-width: 200px;
    padding: 8px 16px;
}

.wav-room-category-dropdown:focus {
    outline: none;
    box-shadow: 
        0 6px 20px rgba(139, 69, 255, 0.4),
        0 0 0 4px rgba(139, 69, 255, 0.2);
}

.wav-room-category-dropdown option {
    background: rgba(255, 255, 255, 0.95);
    color: #333333;
    font-weight: 600;
}

/* AR Mode */
.wav-ar-mode {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: #000;
    display: none;
    overflow: hidden;
    z-index: 1000000 !important;
}

.wav-ar-container {
    position: relative;
    width: 100%;
    height: 100%;
    background: #000;
}

.wav-ar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    padding: 20px;
    z-index: 100;
}

/* Modern AR Exit Button */
.wav-ar-exit-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, 
        rgba(239, 68, 68, 0.9) 0%, 
        rgba(220, 38, 38, 0.9) 100%);
    backdrop-filter: blur(15px);
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 12px rgba(239, 68, 68, 0.4),
        0 2px 6px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    pointer-events: all;
    color: #ffffff;
    font-size: 20px;
    font-weight: bold;
}

.wav-ar-exit-btn:hover {
    transform: scale(1.1);
    box-shadow: 
        0 6px 20px rgba(239, 68, 68, 0.6),
        0 0 0 4px rgba(239, 68, 68, 0.2);
}

.wav-ar-instructions {
    background: linear-gradient(135deg, 
        rgba(15, 13, 37, 0.95) 0%, 
        rgba(139, 69, 255, 0.95) 100%);
    backdrop-filter: blur(20px);
    color: white;
    padding: 20px;
    border-radius: 16px;
    text-align: center;
    pointer-events: all;
    max-width: 280px;
    width: 90%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 8px 32px rgba(139, 69, 255, 0.4),
        0 4px 16px rgba(0, 0, 0, 0.2);
}

.wav-ar-instructions h3 {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.wav-ar-instructions p {
    margin: 0;
    font-size: 14px;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    font-weight: 500;
    line-height: 1.4;
}

/* Camera Capture Mode */
.wav-camera-capture {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: #000;
    display: none;
    overflow: hidden;
    z-index: 1000000 !important;
}

.wav-camera-container {
    position: relative;
    width: 100%;
    height: 100%;
    background: #000;
}

#wav-camera-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wav-camera-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    pointer-events: none;
    padding: 20px 20px 80px;
    z-index: 100;
}

.wav-camera-controls {
    display: flex;
    justify-content: center;
    gap: 16px;
    pointer-events: all;
}

.wav-camera-preview {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    pointer-events: all;
}

.wav-captured-preview {
    max-width: 240px;
    max-height: 160px;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 8px 24px rgba(139, 69, 255, 0.6);
}

.wav-camera-btn {
    background: linear-gradient(135deg, 
        rgba(139, 69, 255, 0.9) 0%, 
        rgba(59, 130, 246, 0.9) 100%);
    backdrop-filter: blur(15px);
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-weight: 600;
    font-size: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 12px rgba(139, 69, 255, 0.4),
        0 2px 6px rgba(0, 0, 0, 0.2);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    touch-action: manipulation;
    min-width: 48px;
    min-height: 48px;
}

.wav-camera-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 
        0 6px 20px rgba(139, 69, 255, 0.5),
        0 0 0 4px rgba(139, 69, 255, 0.2);
}

.wav-camera-btn svg {
    width: 16px;
    height: 16px;
    stroke-width: 2;
    flex-shrink: 0;
}

.wav-camera-btn.capture {
    background: linear-gradient(135deg, 
        rgba(239, 68, 68, 0.9) 0%, 
        rgba(220, 38, 38, 0.9) 100%);
    box-shadow: 
        0 4px 12px rgba(239, 68, 68, 0.4),
        0 2px 6px rgba(0, 0, 0, 0.2);
    min-width: 60px;
    min-height: 60px;
}

.wav-camera-btn.capture:hover {
    box-shadow: 
        0 6px 20px rgba(239, 68, 68, 0.5),
        0 0 0 4px rgba(239, 68, 68, 0.2);
}

.wav-camera-btn.capture svg {
    width: 20px;
    height: 20px;
}

/* Visualization Area */
.wav-visualization-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Default View */
.wav-default-view {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, 
        rgba(15, 13, 37, 0.6) 0%, 
        rgba(24, 23, 64, 0.6) 100%);
    backdrop-filter: blur(20px);
    background-image: url('https://images.pexels.com/photos/1571460/pexels-photo-1571460.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1');
    background-size: cover;
    background-position: center;
    display: block;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
}

/* Upload Interface */
.wav-upload-interface {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, 
        rgba(15, 13, 37, 0.6) 0%, 
        rgba(24, 23, 64, 0.6) 100%);
    backdrop-filter: blur(20px);
    display: none;
    padding: 8px;
    flex-direction: column;
}

/* Mobile Layout Fixes */
@media (max-width: 768px) {
    .wav-upload-interface {
        display: flex;
        flex-direction: column;
    }
    
    .wav-upload-area {
        height: 50vh;
        flex-shrink: 0;
    }
    
    .wav-controls-panel {
        height: 50vh;
        flex-shrink: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        display: none;
    }
    
    .wav-upload-interface {
        display: none !important;
    }
    
    .wav-modal-body.upload-mode .wav-upload-interface {
        display: flex !important;
    }
    
    .wav-modal-body.upload-mode .wav-default-view {
        display: none !important;
    }
    
    .wav-upload-buttons .wav-camera-btn {
        display: block !important;
    }
    
    .wav-thumbnails {
        margin-bottom: 80px !important;
    }
}

/* FIXED: Enhanced Upload Area */
.wav-upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 20px;
    border: 2px dashed rgba(139, 69, 255, 0.8);
    border-radius: 20px;
    background: linear-gradient(135deg, 
        rgba(139, 69, 255, 0.3) 0%, 
        rgba(59, 130, 246, 0.3) 100%);
    backdrop-filter: blur(10px);
    transition: all 0.4s ease;
    cursor: pointer;
    margin: 8px;
    position: relative;
    min-height: 200px;
}

.wav-upload-area:hover {
    border-color: rgba(139, 69, 255, 1);
    background: linear-gradient(135deg, 
        rgba(139, 69, 255, 0.4) 0%, 
        rgba(59, 130, 246, 0.4) 100%);
    transform: scale(1.01);
}

.wav-upload-area.dragover {
    border-color: #8b45ff !important;
    border-style: solid !important;
    background: linear-gradient(135deg, 
        rgba(139, 69, 255, 0.6) 0%, 
        rgba(59, 130, 246, 0.6) 100%) !important;
    transform: scale(1.02) !important;
    box-shadow: 
        0 8px 32px rgba(139, 69, 255, 0.5),
        0 0 0 4px rgba(139, 69, 255, 0.3) !important;
    animation: dragPulse 1s ease-in-out infinite alternate;
}

@keyframes dragPulse {
    0% { 
        box-shadow: 
            0 8px 32px rgba(139, 69, 255, 0.5),
            0 0 0 4px rgba(139, 69, 255, 0.3);
    }
    100% { 
        box-shadow: 
            0 12px 40px rgba(139, 69, 255, 0.7),
            0 0 0 6px rgba(139, 69, 255, 0.4);
    }
}

.wav-upload-content {
    text-align: center;
    padding: 16px 12px;
    color: #ffffff;
    pointer-events: none;
}

.wav-upload-icon {
    width: 32px;
    height: 32px;
    margin: 0 auto 12px;
    stroke: #ffffff;
    stroke-width: 1.5;
    filter: drop-shadow(0 4px 8px rgba(139, 69, 255, 0.3));
    pointer-events: none;
}

.wav-upload-content h3 {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

.wav-upload-content p {
    margin: 0 0 16px;
    color: #ffffff;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    font-size: 12px;
    font-weight: 500;
    pointer-events: none;
}

/* Upload Buttons */
.wav-upload-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
    max-width: 280px;
    margin-bottom: 12px;
    pointer-events: all;
}

.wav-upload-btn {
    background: linear-gradient(135deg, 
        rgba(139, 69, 255, 0.9) 0%, 
        rgba(59, 130, 246, 0.9) 100%);
    backdrop-filter: blur(15px);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 12px rgba(139, 69, 255, 0.4),
        0 2px 6px rgba(0, 0, 0, 0.2);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    font-size: 12px;
    touch-action: manipulation;
    text-align: center;
    min-width: auto;
    pointer-events: all;
    position: relative;
    overflow: hidden;
}

.wav-upload-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 
        0 6px 20px rgba(139, 69, 255, 0.5),
        0 0 0 4px rgba(139, 69, 255, 0.2);
}

.wav-upload-buttons .wav-camera-btn {
    background: linear-gradient(135deg, 
        rgba(34, 197, 94, 0.9) 0%, 
        rgba(22, 163, 74, 0.9) 100%);
    box-shadow: 
        0 4px 12px rgba(34, 197, 94, 0.4),
        0 2px 6px rgba(0, 0, 0, 0.2);
    display: none;
}

.wav-upload-buttons .wav-camera-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 
        0 6px 20px rgba(34, 197, 94, 0.5),
        0 0 0 4px rgba(34, 197, 94, 0.2);
}

/* FIXED: Hidden file input */
#wav-file-input {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
    padding: 0;
    margin: 0;
    pointer-events: none;
}

/* Artwork Container */
.wav-artwork-container {
    position: absolute;
    cursor: grab;
    transition: filter 0.2s ease, transform 0.1s ease;
    transform-style: preserve-3d;
    perspective: 1000px;
    filter: drop-shadow(0 4px 12px rgba(139, 69, 255, 0.3));
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    z-index: 10;
    touch-action: manipulation;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.wav-artwork-container:hover {
    filter: drop-shadow(0 6px 18px rgba(139, 69, 255, 0.4));
}

.wav-artwork-container:active,
.wav-artwork-container.dragging {
    cursor: grabbing;
    z-index: 100;
    filter: drop-shadow(0 8px 24px rgba(139, 69, 255, 0.5));
}

.wav-artwork-frame {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    transform-style: preserve-3d;
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    pointer-events: none;
}

.wav-artwork-frame.classic {
    border: 12px solid #8B4513;
    box-shadow: 
        inset 0 0 12px rgba(0,0,0,0.3),
        0 0 12px rgba(0,0,0,0.2),
        0 4px 16px rgba(139, 69, 255, 0.2);
}

.wav-artwork-frame.modern {
    border: 6px solid #8B4513;
    box-shadow: 
        0 2px 12px rgba(0,0,0,0.15),
        0 4px 16px rgba(139, 69, 255, 0.2);
}

.wav-artwork-frame.ornate {
    border: 12px solid #8B4513;
    border-image: repeating-linear-gradient(45deg, #8B4513, transparent 6px) 12;
    box-shadow: 
        inset 0 0 16px rgba(0,0,0,0.4),
        0 0 14px rgba(0,0,0,0.3),
        0 4px 16px rgba(139, 69, 255, 0.2);
}

.wav-artwork-frame.minimal {
    border: 3px solid #8B4513;
    box-shadow: 
        0 1px 8px rgba(0,0,0,0.1),
        0 4px 16px rgba(139, 69, 255, 0.2);
}

.wav-artwork-frame.none {
    border: none;
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.3),
        0 2px 8px rgba(139, 69, 255, 0.2);
}

#wav-artwork-image {
    display: block;
    width: 100px;
    height: auto;
    max-width: none;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Controls Panel */
.wav-controls-panel {
    width: 100%;
    padding: 6px;
    background: linear-gradient(135deg, 
        rgba(15, 13, 37, 1) 0%, 
        rgba(24, 23, 64, 1) 100%);
    backdrop-filter: blur(30px);
    border-top: 1px solid rgba(255, 255, 255, 0.4);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 30vh;
    transition: all 0.3s ease;
}

.wav-control-group {
    padding: 8px;
    background: linear-gradient(135deg, 
        rgba(15, 13, 37, 1) 0%, 
        rgba(24, 23, 64, 1) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 8px;
    box-shadow: 
        0 2px 8px rgba(139, 69, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.wav-control-group h4 {
    margin: 0 0 6px;
    font-size: 11px;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-left: 4px;
}

.wav-frame-colors-horizontal {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 8px;
}

.wav-color-option {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 1);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.wav-color-option:hover,
.wav-color-option.active {
    border-color: #8b45ff;
    transform: scale(1.15);
    box-shadow: 
        0 4px 12px rgba(139, 69, 255, 0.4),
        0 0 0 2px rgba(139, 69, 255, 0.2);
}

.wav-frame-style-label {
    display: block;
    margin: 8px 0 4px;
    font-size: 11px;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-left: 4px;
}

.wav-style-dropdown {
    width: 100%;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.95) 0%, 
        rgba(255, 255, 255, 0.9) 100%);
    backdrop-filter: blur(15px);
    color: #333333;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-shadow: none;
    margin-top: 4px;
    padding: 8px 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.wav-style-dropdown:focus {
    outline: none;
    box-shadow: 
        0 4px 12px rgba(139, 69, 255, 0.3),
        0 0 0 3px rgba(139, 69, 255, 0.2);
}

.wav-style-dropdown option {
    background: rgba(255, 255, 255, 0.95);
    color: #333333;
    font-weight: 600;
}

.wav-control-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.wav-control-grid .wav-full-width {
    grid-column: 1 / -1;
}

.wav-slider-container {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 0px;
}

.wav-slider-container label {
    font-size: 9px;
    font-weight: 600;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 2px;
    padding-left: 4px;
}

.wav-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(135deg, 
        rgba(139, 69, 255, 0.8) 0%, 
        rgba(59, 130, 246, 0.8) 100%);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.wav-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b45ff 0%, #3b82f6 100%);
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 1);
    box-shadow: 
        0 2px 8px rgba(139, 69, 255, 0.4),
        0 1px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.wav-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 
        0 4px 12px rgba(139, 69, 255, 0.5),
        0 0 0 3px rgba(139, 69, 255, 0.2);
}

.wav-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b45ff 0%, #3b82f6 100%);
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 1);
    box-shadow: 
        0 2px 8px rgba(139, 69, 255, 0.4),
        0 1px 4px rgba(0, 0, 0, 0.2);
}

.wav-slider-value {
    font-size: 8px;
    font-weight: 600;
    color: #8b45ff;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.wav-action-buttons {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    border-top: none;
    padding-top: 0px;
}

.wav-btn {
    flex: 1;
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    backdrop-filter: blur(15px);
    text-align: center;
    box-shadow: 
        0 2px 8px rgba(139, 69, 255, 0.2),
        0 1px 4px rgba(0, 0, 0, 0.1);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.wav-btn-primary {
    background: linear-gradient(135deg, 
        rgba(139, 69, 255, 0.9) 0%, 
        rgba(59, 130, 246, 0.9) 100%);
    color: white;
}

.wav-btn-primary:hover {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 
        0 4px 12px rgba(139, 69, 255, 0.4),
        0 0 0 3px rgba(139, 69, 255, 0.2);
}

.wav-btn-secondary {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.6) 0%, 
        rgba(255, 255, 255, 0.5) 100%);
    color: #ffffff;
}

.wav-btn-secondary:hover {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 
        0 4px 12px rgba(255, 255, 255, 0.3),
        0 0 0 3px rgba(255, 255, 255, 0.2);
}

/* Navigation */
.wav-navigation {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 12px;
    pointer-events: none;
    z-index: 20;
}

.wav-nav-btn {
    background: linear-gradient(135deg, 
        rgba(15, 13, 37, 0.9) 0%, 
        rgba(24, 23, 64, 0.9) 100%);
    backdrop-filter: blur(15px);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: all;
    box-shadow: 
        0 4px 12px rgba(139, 69, 255, 0.4),
        0 2px 6px rgba(0, 0, 0, 0.2);
    touch-action: manipulation;
}

.wav-nav-btn:hover {
    transform: scale(1.1);
    box-shadow: 
        0 6px 20px rgba(139, 69, 255, 0.5),
        0 0 0 4px rgba(139, 69, 255, 0.2);
}

.wav-nav-btn svg {
    width: 20px;
    height: 20px;
    stroke: #ffffff;
    stroke-width: 2;
    fill: none;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Thumbnails */
.wav-thumbnails {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    justify-content: center;
    flex-wrap: wrap;
    padding: 0 12px;
    margin-bottom: 80px;
    transition: all 0.3s ease;
}

.wav-thumbnail {
    width: 60px;
    height: 40px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.6);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(139, 69, 255, 0.2);
}

.wav-thumbnail:hover,
.wav-thumbnail.active {
    border-color: #8b45ff;
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(139, 69, 255, 0.4);
}

.wav-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* FIXED: Mobile Control Toggle Buttons - Better Positioning */
@media (max-width: 768px) {
    .wav-controls-toggle {
        position: absolute;
        bottom: 12px;
        left: 12px;
        background: linear-gradient(135deg, 
            rgba(139, 69, 255, 0.9) 0%, 
            rgba(59, 130, 246, 0.9) 100%);
        backdrop-filter: blur(15px);
        border: none;
        border-radius: 12px;
        padding: 8px 16px;
        color: #ffffff;
        font-size: 12px;
        font-weight: 700;
        cursor: pointer;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 
            0 4px 12px rgba(139, 69, 255, 0.4),
            0 2px 6px rgba(0, 0, 0, 0.2);
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
        z-index: 100;
        min-width: 100px;
        text-align: center;
    }
    
    .wav-controls-toggle:hover {
        transform: translateY(-2px) scale(1.05);
        box-shadow: 
            0 6px 18px rgba(139, 69, 255, 0.5),
            0 0 0 4px rgba(139, 69, 255, 0.2);
    }
    
    .wav-thumbnails-toggle {
        position: absolute;
        bottom: 12px;
        right: 12px;
        background: linear-gradient(135deg, 
            rgba(34, 197, 94, 0.9) 0%, 
            rgba(22, 163, 74, 0.9) 100%);
        backdrop-filter: blur(15px);
        border: none;
        border-radius: 12px;
        padding: 8px 16px;
        color: #ffffff;
        font-size: 12px;
        font-weight: 700;
        cursor: pointer;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 
            0 4px 12px rgba(34, 197, 94, 0.4),
            0 2px 6px rgba(0, 0, 0, 0.2);
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
        z-index: 100;
        min-width: 100px;
        text-align: center;
    }
    
    .wav-thumbnails-toggle:hover {
        transform: translateY(-2px) scale(1.05);
        box-shadow: 
            0 6px 18px rgba(34, 197, 94, 0.5),
            0 0 0 4px rgba(34, 197, 94, 0.2);
    }
}

/* Animations */
@keyframes fadeIn {
    from { 
        opacity: 0; 
        backdrop-filter: blur(0px);
    }
    to { 
        opacity: 1; 
        backdrop-filter: blur(20px);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        backdrop-filter: blur(30px);
    }
}

/* Custom Scrollbar */
.wav-controls-panel::-webkit-scrollbar {
    width: 3px;
}

.wav-controls-panel::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.wav-controls-panel::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, 
        rgba(139, 69, 255, 0.8) 0%, 
        rgba(59, 130, 246, 0.8) 100%);
    border-radius: 2px;
    backdrop-filter: blur(10px);
}

.wav-controls-panel::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, 
        rgba(139, 69, 255, 1) 0%, 
        rgba(59, 130, 246, 1) 100%);
}

/* Desktop Specific Styles */
@media (min-width: 769px) {
    .wav-modal-content {
        border-radius: 32px;
        width: 90%;
        max-width: 1600px;
        height: 90vh;
        margin: 20px;
    }
    
    .wav-modal-body {
        flex-direction: row;
    }
    
    .wav-controls-panel {
        width: 420px;
        border-top: none;
        border-left: 1px solid rgba(255, 255, 255, 0.15);
        max-height: none;
        padding: 24px;
        gap: 20px;
        display: flex !important;
    }
    
    .wav-visualization-area {
        padding: 24px;
        padding-top: 60px;
    }
    
    .wav-default-view {
        border-radius: 24px;
        border: 1px solid rgba(255, 255, 255, 0.15);
        box-shadow: 
            0 8px 32px rgba(139, 69, 255, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
        height: calc(100% - 40px);
    }
    
    .wav-upload-interface {
        border-radius: 24px;
        border: 1px solid rgba(255, 255, 255, 0.15);
        box-shadow: 
            0 8px 32px rgba(139, 69, 255, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
        flex-direction: row;
    }
    
    .wav-upload-area {
        height: auto;
        flex: 1;
    }
    
    #wav-artwork-image {
        width: 200px;
    }
    
    .wav-control-group {
        padding: 16px;
    }
    
    .wav-control-group h4 {
        font-size: 14px;
        margin-bottom: 12px;
    }
    
    .wav-slider-container label {
        font-size: 12px;
    }
    
    .wav-slider-value {
        font-size: 11px;
    }
    
    .wav-btn {
        font-size: 12px;
        padding: 12px 16px;
    }
    
    .wav-color-option {
        width: 32px;
        height: 32px;
    }
    
    .wav-style-dropdown {
        font-size: 14px;
        padding: 8px 12px;
    }
    
    .wav-room-selector {
        display: block !important;
    }
    
    .wav-nav-btn {
        width: 56px;
        height: 56px;
    }
    
    .wav-nav-btn svg {
        width: 24px;
        height: 24px;
    }
    
    .wav-ar-toggle {
        display: none !important;
    }
    
    .wav-upload-buttons .wav-camera-btn {
        display: none !important;
    }
    
    .wav-upload-buttons {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 0;
        grid-template-columns: none;
    }
    
    .wav-thumbnails {
        margin-bottom: 8px;
    }
    
    .wav-modal-header h2 {
        font-size: 20px;
        white-space: normal;
    }
    
    .wav-upload-toggle {
        position: absolute;
        top: 12px;
        right: 20px;
        left: auto;
    }
    
    .wav-thumbnail {
        width: 80px;
        height: 60px;
    }
    
    .wav-controls-toggle,
    .wav-thumbnails-toggle {
        display: none !important;
    }
}

/* Accessibility */
.wav-view-in-room-btn:focus,
.wav-btn:focus,
.wav-close-btn:focus {
    outline: 2px solid #8b45ff;
    outline-offset: 2px;
    box-shadow: 
        0 0 0 4px rgba(139, 69, 255, 0.3),
        0 8px 24px rgba(139, 69, 255, 0.4);
}

/* Loading States */
.wav-loading {
    position: relative;
    overflow: hidden;
}

.wav-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(139, 69, 255, 0.3), 
        transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* 3D Perspective Support */
.wav-default-view {
    perspective: 1200px;
    perspective-origin: center center;
}

.wav-artwork-container.perspective-mode {
    transform-style: preserve-3d;
}