/* VR界面交互技术 - 星空钢琴3D版 样式文件 */

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

body {
    font-family: 'Arial', sans-serif;
    background: #000;
    overflow: hidden;
    height: 100vh;
    color: white;
}

#container {
    position: relative;
    width: 100vw;
    height: 100vh;
}

#canvas {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    display: block;
}

#ui-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
}

#title {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 2.5em;
    text-align: center;
    text-shadow: 0 0 20px rgba(74, 158, 255, 0.8);
    font-weight: 300;
    letter-spacing: 3px;
    pointer-events: none;
}

#controls-panel {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(10, 10, 30, 0.9);
    border-radius: 15px;
    padding: 20px;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(74, 158, 255, 0.3);
    color: white;
    min-width: 280px;
    max-height: 80vh;
    overflow-y: auto;
    pointer-events: auto;
}

#controls-panel h3 {
    color: #4a9eff;
    margin-bottom: 15px;
    font-size: 1.2em;
    text-align: center;
}

.control-group {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(74, 158, 255, 0.2);
}

.control-group:last-child {
    border-bottom: none;
}

.control-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9em;
    color: #ccc;
    font-weight: bold;
}

.control-group button {
    background: linear-gradient(135deg, #4a9eff 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    margin: 2px;
    font-size: 0.8em;
    transition: all 0.3s ease;
    min-width: 80px;
}

.control-group button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 158, 255, 0.4);
}

.control-group button.active {
    background: linear-gradient(135deg, #764ba2 0%, #4a9eff 100%);
    box-shadow: 0 0 15px rgba(74, 158, 255, 0.6);
}

.control-group input[type="range"] {
    width: 100%;
    margin: 5px 0;
    height: 6px;
    border-radius: 3px;
    background: rgba(74, 158, 255, 0.2);
    outline: none;
    -webkit-appearance: none;
}

.control-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #4a9eff;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(74, 158, 255, 0.5);
}

.control-group input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #4a9eff;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 10px rgba(74, 158, 255, 0.5);
}

.control-group input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.2);
    accent-color: #4a9eff;
}

.control-group div {
    margin: 5px 0;
    font-size: 0.85em;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#info-panel {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(10, 10, 30, 0.9);
    border-radius: 15px;
    padding: 20px;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(74, 158, 255, 0.3);
    color: white;
    max-width: 350px;
    max-height: 60vh;
    overflow-y: auto;
    pointer-events: auto;
}

#info-panel h3 {
    color: #4a9eff;
    margin-bottom: 15px;
    text-align: center;
}

#info-panel .info-item {
    margin: 8px 0;
    font-size: 0.85em;
    line-height: 1.4;
}

#performance-stats {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.8);
    color: #4a9eff;
    padding: 12px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.8em;
    pointer-events: none;
    border: 1px solid rgba(74, 158, 255, 0.3);
}

#performance-stats div {
    margin: 3px 0;
}

#loading-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #000011 0%, #001122 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    color: white;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(74, 158, 255, 0.3);
    border-top: 3px solid #4a9eff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

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

.loading-text {
    font-size: 1.2em;
    margin-bottom: 10px;
    text-align: center;
    color: #4a9eff;
}

.loading-progress {
    width: 400px;
    height: 6px;
    background: rgba(74, 158, 255, 0.2);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 30px;
}

.loading-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4a9eff, #764ba2);
    width: 0%;
    transition: width 0.3s ease;
}

.tech-requirements {
    margin-top: 20px;
    font-size: 0.9em;
    color: #aaa;
    text-align: center;
    max-width: 500px;
}

.tech-requirements .requirement {
    margin: 4px 3px;
    padding: 4px 10px;
    background: rgba(74, 158, 255, 0.1);
    border-radius: 6px;
    display: inline-block;
    border: 1px solid rgba(74, 158, 255, 0.3);
    font-size: 0.8em;
    transition: all 0.3s ease;
}

.requirement.completed {
    background: rgba(0, 255, 100, 0.2);
    color: #0f8;
    border-color: rgba(0, 255, 100, 0.5);
    box-shadow: 0 0 10px rgba(0, 255, 100, 0.3);
}

/* 响应式设计 */
@media (max-width: 1200px) {
    #controls-panel {
        min-width: 250px;
        font-size: 0.9em;
    }
    
    #info-panel {
        max-width: 300px;
        font-size: 0.9em;
    }
    
    #title {
        font-size: 2em;
    }
}

@media (max-width: 768px) {
    #controls-panel {
        position: fixed;
        top: auto;
        bottom: 20px;
        right: 20px;
        left: 20px;
        max-height: 40vh;
        min-width: auto;
    }
    
    #info-panel {
        position: fixed;
        bottom: 20px;
        left: 20px;
        right: 20px;
        max-width: none;
        max-height: 30vh;
        display: none; /* 默认隐藏，节省空间 */
    }
    
    #title {
        font-size: 1.5em;
        top: 20px;
    }
    
    #performance-stats {
        font-size: 0.7em;
        padding: 8px;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(74, 158, 255, 0.1);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: rgba(74, 158, 255, 0.5);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(74, 158, 255, 0.7);
}

/* 动画效果 */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-up {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* 特殊效果 */
.glow {
    box-shadow: 0 0 20px rgba(74, 158, 255, 0.5);
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(74, 158, 255, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(74, 158, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(74, 158, 255, 0); }
}