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

body {
    font-family: 'Courier New', monospace;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    color: #ffffff;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Header */
.header {
    text-align: center;
    padding: 2rem 1rem;
    background: rgba(0, 255, 255, 0.05);
    border-bottom: 1px solid rgba(0, 255, 255, 0.2);
}

.title {
    font-size: 3rem;
    font-weight: bold;
    background: linear-gradient(45deg, #00ffff, #ff00ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
    margin-bottom: 0.5rem;
    letter-spacing: 0.1em;
}

.subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1rem;
}

/* Upload Section */
.upload-section {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.upload-area {
    border: 2px dashed rgba(0, 255, 255, 0.3);
    border-radius: 15px;
    padding: 3rem 2rem;
    text-align: center;
    background: rgba(0, 255, 255, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.upload-area:hover,
.upload-area.drag-over {
    border-color: #00ffff;
    background: rgba(0, 255, 255, 0.1);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
}

.upload-content {
    pointer-events: none;
}

.upload-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 10px rgba(0, 255, 255, 0.5));
}

.upload-area h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #00ffff;
}

.upload-area p {
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 1.5rem;
}

.upload-btn {
    background: linear-gradient(45deg, #00ffff, #0080ff);
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 25px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: all;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.upload-btn:hover {
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
    transform: translateY(-2px);
}

/* Examples */
.examples {
    margin-top: 3rem;
    text-align: center;
}

.examples h4 {
    color: #00ffff;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.example-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

.example-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 1rem;
    border-radius: 10px;
    border: 2px solid rgba(0, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.5);
}

.example-item:hover {
    border-color: #00ffff;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.4);
    transform: scale(1.05);
}

.example-placeholder {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.1), rgba(255, 0, 255, 0.1));
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 0 10px rgba(0, 255, 255, 0.3));
}

.example-item span {
    color: #00ffff;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Processing */
.processing {
    text-align: center;
    padding: 4rem 2rem;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(0, 255, 255, 0.2);
    border-top: 4px solid #00ffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 2rem;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

.processing p {
    font-size: 1.2rem;
    color: #00ffff;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Viewer Section */
.viewer-section {
    position: relative;
    height: calc(100vh - 200px);
    min-height: 600px;
}

.viewer-container {
    position: relative;
    height: 70%;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 15px;
    margin: 1rem;
    overflow: hidden;
    border: 1px solid rgba(0, 255, 255, 0.3);
}

#scene-container {
    width: 100%;
    height: 100%;
}

#scene-container canvas {
    border-radius: 15px;
}

/* Floating Controls */
.floating-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 10;
}

.control-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid rgba(0, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.7);
    color: #00ffff;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.control-btn:hover,
.control-btn.active {
    border-color: #00ffff;
    background: rgba(0, 255, 255, 0.1);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}

/* Style Panel */
.style-panel {
    position: absolute;
    left: 20px;
    top: 20px;
    width: 250px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 10px;
    padding: 1rem;
    backdrop-filter: blur(10px);
    z-index: 10;
}

.style-panel h4 {
    color: #00ffff;
    margin-bottom: 1rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.control-group {
    margin-bottom: 1rem;
}

.control-group label {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.control-group input[type="color"] {
    width: 100%;
    height: 35px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    background: transparent;
}

.control-group input[type="range"] {
    width: 70%;
    margin-right: 10px;
    accent-color: #00ffff;
}

.control-group select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.8);
    color: #00ffff;
}

.control-group span {
    color: #00ffff;
    font-size: 0.9rem;
    min-width: 40px;
    display: inline-block;
}

/* Comparison Panel */
.comparison-panel {
    display: flex;
    gap: 2rem;
    padding: 1rem 2rem;
    justify-content: center;
    align-items: center;
}

.comparison-item {
    text-align: center;
    flex: 1;
    max-width: 300px;
}

.comparison-item h4 {
    color: #00ffff;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.comparison-item img {
    width: 100%;
    max-width: 200px;
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid rgba(0, 255, 255, 0.3);
}

.comparison-item p {
    color: rgba(255, 255, 255, 0.7);
    margin-top: 1rem;
    font-style: italic;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
}

.action-btn {
    background: linear-gradient(45deg, #ff00ff, #8000ff);
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 25px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.action-btn:hover {
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.5);
    transform: translateY(-2px);
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem 1rem;
    border-top: 1px solid rgba(0, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.5);
    margin-top: 2rem;
}

.footer-link {
    color: #00ffff;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-link:hover {
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .title {
        font-size: 2rem;
    }
    
    .style-panel {
        position: static;
        width: 100%;
        margin: 1rem;
        order: 2;
    }
    
    .floating-controls {
        position: static;
        justify-content: center;
        margin: 1rem;
        order: 1;
    }
    
    .viewer-container {
        flex-direction: column;
    }
    
    .comparison-panel {
        flex-direction: column;
        gap: 1rem;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .action-btn {
        width: 200px;
    }
}

/* Glow Effects */
@keyframes glow {
    0%, 100% { text-shadow: 0 0 10px rgba(0, 255, 255, 0.5); }
    50% { text-shadow: 0 0 20px rgba(0, 255, 255, 0.8), 0 0 30px rgba(0, 255, 255, 0.4); }
}

.title {
    animation: glow 3s ease-in-out infinite;
}

/* Holographic scan lines effect */
.viewer-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 2px,
        rgba(0, 255, 255, 0.03) 2px,
        rgba(0, 255, 255, 0.03) 4px
    );
    pointer-events: none;
    z-index: 1;
}