* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden;
    background: #000;
    color: #fff;
}

/* Model Selection Screen */
#model-selection-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #0f3460 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    transition: opacity 0.5s ease;
}

#model-selection-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.selection-container {
    text-align: center;
    max-width: 1200px;
    padding: 40px;
}

.selection-container h1 {
    font-size: 48px;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #2196F3, #00BCD4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 18px;
    color: #aaa;
    margin-bottom: 60px;
}

.model-cards {
    display: flex;
    gap: 40px;
    justify-content: center;
    flex-wrap: wrap;
}

.model-card {
    background: rgba(20, 20, 30, 0.8);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 40px;
    width: 320px;
    transition: all 0.4s ease;
    cursor: pointer;
}

.model-card:hover {
    transform: translateY(-10px);
    border-color: #2196F3;
    box-shadow: 0 20px 60px rgba(33, 150, 243, 0.4);
}

.model-preview {
    width: 200px;
    height: 200px;
    margin: 0 auto 30px;
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.2), rgba(0, 188, 212, 0.2));
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 3px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s ease;
}

.model-card:hover .model-preview {
    transform: scale(1.1);
    border-color: #2196F3;
    box-shadow: 0 0 40px rgba(33, 150, 243, 0.6);
}

.preview-icon {
    font-size: 80px;
}

.model-card h3 {
    font-size: 28px;
    margin-bottom: 15px;
    color: #fff;
}

.model-card p {
    color: #aaa;
    font-size: 16px;
    margin-bottom: 30px;
    line-height: 1.6;
}

.select-btn {
    background: linear-gradient(135deg, #2196F3, #00BCD4);
    border: none;
    border-radius: 10px;
    padding: 15px 40px;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.select-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(33, 150, 243, 0.6);
}

#webgl-canvas {
    display: block;
    width: 100vw;
    height: 100vh;
}

/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.5s ease;
}

#loading-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loader {
    text-align: center;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: #2196F3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.progress-bar {
    width: 300px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin-top: 20px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2196F3, #00BCD4);
    width: 0%;
    transition: width 0.3s ease;
}

/* UI Overlay */
#ui-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
}

#ui-overlay.hidden {
    display: none;
}

.panel {
    position: absolute;
    background: rgba(20, 20, 30, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 20px;
    pointer-events: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#color-selector {
    top: 20px;
    right: 20px;
    min-width: 200px;
}

#color-selector h3,
#action-menu h3 {
    margin-bottom: 15px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #aaa;
}

.color-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.color-btn {
    width: 50px;
    height: 50px;
    border: 3px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.color-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.color-btn.active {
    border-color: #fff;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

#action-menu {
    bottom: 20px;
    right: 20px;
    min-width: 220px;
}

.action-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #2196F3;
    transform: translateX(-4px);
}

.action-btn .icon {
    font-size: 20px;
}

.action-btn.active {
    background: rgba(33, 150, 243, 0.3);
    border-color: #2196F3;
}

/* Annotation Tags */
#annotations-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.annotation-tag {
    position: absolute;
    pointer-events: auto;
    transform: translate(-50%, -50%);
}

.annotation-dot {
    width: 20px;
    height: 20px;
    background: #2196F3;
    border: 2px solid #fff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(33, 150, 243, 0.6);
    animation: pulse 2s infinite;
    transition: all 0.3s ease;
}

.annotation-dot:hover {
    transform: scale(1.3);
    background: #fff;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 20px rgba(33, 150, 243, 0.6); }
    50% { box-shadow: 0 0 40px rgba(33, 150, 243, 1); }
}

.annotation-label {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(20, 20, 30, 0.95);
    padding: 8px 16px;
    border-radius: 6px;
    white-space: nowrap;
    font-size: 13px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.annotation-tag:hover .annotation-label {
    opacity: 1;
}

.annotation-detail {
    position: absolute;
    bottom: 20px;
    left: 20px;
    max-width: 350px;
    background: rgba(20, 20, 30, 0.95);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    pointer-events: auto;
}

.annotation-detail h3 {
    margin-bottom: 10px;
    color: #2196F3;
}

.annotation-detail p {
    line-height: 1.6;
    color: #ccc;
    font-size: 14px;
}

.annotation-detail .close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.annotation-detail .close-btn:hover {
    opacity: 1;
}

/* Control Hints */
.hints {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(20, 20, 30, 0.8);
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 13px;
    color: #aaa;
    border: 1px solid rgba(255, 255, 255, 0.1);
    pointer-events: auto;
}

/* Skip Intro Button */
.skip-btn {
    position: absolute;
    bottom: 40px;
    right: 40px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: auto;
}

.skip-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(4px);
}

.skip-btn.hidden {
    display: none;
}

/* Button Combination Overlay */
#button-combo-overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(20, 20, 30, 0.98);
    backdrop-filter: blur(20px);
    padding: 40px;
    border-radius: 16px;
    border: 2px solid #2196F3;
    box-shadow: 0 0 60px rgba(33, 150, 243, 0.5);
    z-index: 200;
    pointer-events: auto;
    transition: opacity 0.3s ease;
}

#button-combo-overlay.hidden {
    display: none;
}

.combo-display h3 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 24px;
    color: #2196F3;
}

#combo-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
}

.combo-button {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #2196F3, #00BCD4);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    font-weight: bold;
    box-shadow: 0 8px 24px rgba(33, 150, 243, 0.4);
    animation: buttonPress 0.6s ease infinite;
}

@keyframes buttonPress {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); box-shadow: 0 12px 32px rgba(33, 150, 243, 0.6); }
}

.combo-separator {
    font-size: 32px;
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .panel {
        padding: 15px;
    }
    
    #color-selector,
    #action-menu {
        position: relative;
        top: auto;
        bottom: auto;
        right: auto;
        margin: 10px;
    }
    
    .hints {
        font-size: 11px;
        padding: 8px 12px;
    }
}
