/* Lithophane Preview Plugin Styles */

.lithophane-container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.lithophane-header {
    text-align: center;
    margin-bottom: 40px;
}

.lithophane-header h2 {
    color: #333;
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 700;
}

.lithophane-subtitle {
    color: #666;
    font-size: 1.1em;
    margin-bottom: 20px;
}

.lithophane-upload-section {
    background: #f8f9fa;
    border: 3px dashed #ddd;
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    margin-bottom: 40px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.lithophane-upload-section:hover {
    border-color: #007bff;
    background: #f0f8ff;
}

.lithophane-upload-section.dragover {
    border-color: #28a745;
    background: #f0fff4;
}

.upload-icon {
    font-size: 4em;
    color: #ccc;
    margin-bottom: 20px;
}

.upload-text {
    font-size: 1.2em;
    color: #666;
    margin-bottom: 15px;
}

.lithophane-btn {
    background: linear-gradient(45deg, #007bff, #0056b3);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,123,255,0.3);
}

.lithophane-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,123,255,0.4);
}

.lithophane-preview-section {
    margin-top: 30px;
}

.lithophane-preview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.lithophane-preview-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    text-align: center;
}

.lithophane-preview-card h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.lithophane-image-container {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.lithophane-original-preview {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

canvas {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

/* 3D Box Styles */
.lithophane-3d-scene {
    width: 100%;
    height: 400px;
    perspective: 1000px;
    perspective-origin: center center;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    background: radial-gradient(ellipse at center, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.3) 100%);
    border-radius: 15px;
    overflow: hidden;
}

.lithophane-3d-box {
    position: relative;
    width: 200px;
    height: 200px;
    transform-style: preserve-3d;
    transform: rotateX(-10deg) rotateY(25deg) rotateZ(0deg);
    transition: transform 0.5s ease;
    margin-bottom: 20px;
}

.lithophane-3d-box:hover {
    transform: rotateX(-10deg) rotateY(35deg) rotateZ(0deg);
}

.box-face {
    position: absolute;
    width: 200px;
    height: 200px;
    border: 2px solid #654321;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.3);
}

/* Wood texture background */
.box-face::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(90deg, transparent 50%, rgba(101,67,33,0.1) 50%),
        linear-gradient(
            45deg,
            #8B4513 0%,
            #A0522D 25%, 
            #654321 50%, 
            #8B4513 75%,
            #654321 100%
        );
    background-size: 4px 4px, 100% 100%;
    opacity: 0.9;
}

.box-front {
    transform: translateZ(100px);
}

.box-back {
    transform: translateZ(-100px) rotateY(180deg);
}

.box-right {
    transform: rotateY(90deg) translateZ(100px);
}

.box-left {
    transform: rotateY(-90deg) translateZ(100px);
}

.box-top {
    transform: rotateX(90deg) translateZ(100px);
    background: linear-gradient(45deg, #A0522D, #8B4513);
}

.box-bottom {
    transform: rotateX(-90deg) translateZ(100px);
    background: linear-gradient(45deg, #654321, #5D4037);
}

/* Lithophane panels */
.lithophane-panel {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 160px;
    height: 160px;
    border-radius: 5px;
    overflow: hidden;
    background: rgba(255, 140, 0, 0.1);
    box-shadow: 
        inset 0 0 20px rgba(255, 140, 0, 0.3),
        0 0 30px rgba(255, 140, 0, 0.4);
}

.panel-canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 3px;
    filter: sepia(20%) saturate(150%) hue-rotate(10deg);
}

.panel-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        circle at center,
        rgba(255, 140, 0, 0.6) 0%,
        rgba(255, 140, 0, 0.3) 30%,
        rgba(255, 140, 0, 0.1) 60%,
        transparent 100%
    );
    border-radius: 3px;
    pointer-events: none;
    animation: glow-pulse 3s ease-in-out infinite;
}

@keyframes glow-pulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

/* Box base */
.box-base {
    position: absolute;
    bottom: -50px;
    width: 280px;
    height: 40px;
    background: linear-gradient(45deg, #654321, #5D4037);
    border-radius: 10px;
    transform: rotateX(90deg) translateZ(-20px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.box-base::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(90deg, transparent 50%, rgba(101,67,33,0.2) 50%),
        linear-gradient(45deg, #8B4513, #654321);
    background-size: 3px 3px, 100% 100%;
    border-radius: 10px;
}

/* Ambient lighting */
.ambient-light {
    position: absolute;
    bottom: -100px;
    width: 400px;
    height: 200px;
    background: radial-gradient(
        ellipse at center,
        rgba(255, 140, 0, 0.2) 0%,
        rgba(255, 140, 0, 0.1) 40%,
        transparent 70%
    );
    border-radius: 50%;
    pointer-events: none;
}



/* Features section */
.lithophane-features {
    margin-top: 40px;
    text-align: center;
}

.lithophane-features h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.lithophane-feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.lithophane-feature-item {
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.lithophane-feature-item h4 {
    color: #007bff;
    margin-bottom: 10px;
}

/* Responsive design */
@media (max-width: 768px) {
    .lithophane-preview-grid {
        grid-template-columns: 1fr;
    }
    
    .lithophane-container {
        padding: 20px;
    }
    
    .lithophane-header h2 {
        font-size: 2em;
    }
    
    .lithophane-3d-scene {
        height: 300px;
    }
    
    .lithophane-3d-box {
        width: 150px;
        height: 150px;
    }
    
    .box-face {
        width: 150px;
        height: 150px;
    }
    
    .lithophane-panel {
        top: 15px;
        left: 15px;
        width: 120px;
        height: 120px;
    }
}

/* Enhanced lighting effects */
.lithophane-3d-scene::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 70% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 30% 70%, rgba(0, 0, 0, 0.1) 0%, transparent 50%);
    pointer-events: none;
    border-radius: 15px;
}

/* Depth and shadow enhancements */
.lithophane-3d-box::after {
    content: '';
    position: absolute;
    bottom: -120px;
    left: 20px;
    width: 250px;
    height: 80px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    filter: blur(20px);
    transform: rotateX(90deg);
    z-index: -1;
}