body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: #020810;
}

/* VR 按钮不被遮挡 */
.a-enter-vr {
    z-index: 9999 !important;
}
.a-enter-vr-button {
    z-index: 9999 !important;
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
}

.input-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
    z-index: -1;
}

#hand-status {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(5, 15, 25, 0.75);
    color: #88ccff;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(100, 180, 255, 0.2);
    z-index: 1000;
    display: none;
}

#ui-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 998;
}

/* ====== 物种信息面板 ====== */
.species-panel {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%) translateX(30px);
    width: 420px;
    max-width: 85vw;
    background: rgba(4, 12, 22, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(100, 180, 255, 0.25);
    border-radius: 16px;
    box-shadow: 0 12px 48px rgba(0, 4, 12, 0.7);
    pointer-events: auto;
    opacity: 0;
    display: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.species-panel.active {
    display: block;
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

.species-panel-inner {
    display: flex;
    position: relative;
    padding: 16px;
}

.close-btn-species {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: rgba(255, 100, 100, 0.2);
    border: 1px solid rgba(255, 100, 100, 0.3);
    border-radius: 50%;
    color: #ff8888;
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.species-visual {
    width: 100px;
    min-width: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-right: 12px;
    border-right: 1px solid rgba(100, 180, 255, 0.1);
}

.species-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(100, 180, 255, 0.15), rgba(100, 180, 255, 0.05));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    margin-bottom: 10px;
}

.scan-label {
    display: block;
    color: rgba(136, 204, 255, 0.5);
    font-size: 9px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.scan-number {
    display: block;
    color: #88ccff;
    font-size: 18px;
    font-weight: 700;
}

.species-info {
    flex: 1;
    padding-left: 14px;
}

.species-info h2 {
    margin: 0 0 3px 0;
    color: #cce8ff;
    font-size: 17px;
}

.species-type {
    margin: 0 0 8px 0;
    color: rgba(136, 204, 255, 0.45);
    font-size: 11px;
}

.species-desc {
    color: rgba(170, 210, 230, 0.8);
    font-size: 12px;
    line-height: 1.6;
    margin: 0;
}

/* ====== 玻璃面板 ====== */
.glass-panel {
    position: absolute;
    background: rgba(5, 15, 30, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(100, 180, 255, 0.2);
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0, 5, 15, 0.5);
    pointer-events: auto;
}

.glass-content {
    padding: 18px;
    position: relative;
}

.side-panel {
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    width: 300px;
    max-width: 80vw;
    display: none;
}

.side-panel.active {
    display: block;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-50%) translateX(20px); }
    to { opacity: 1; transform: translateY(-50%) translateX(0); }
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 26px;
    height: 26px;
    background: rgba(255, 100, 100, 0.15);
    border: 1px solid rgba(255, 100, 100, 0.3);
    border-radius: 50%;
    color: #ff8888;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.knowledge-icon {
    font-size: 28px;
    margin-bottom: 10px;
    text-align: center;
}

.knowledge-text {
    color: #99ddbb;
    font-size: 14px;
    line-height: 1.6;
    text-align: center;
    margin: 0;
}

.knowledge-progress {
    width: 100%;
    height: 2px;
    background: rgba(100, 180, 255, 0.1);
    border-radius: 2px;
    margin-top: 12px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #6699cc, #99ddbb);
    animation: shrink 5s linear forwards;
}

@keyframes shrink {
    from { width: 100%; }
    to { width: 0%; }
}

/* ====== 捡拾提示 ====== */
#pickup-hint {
    bottom: 12%;
    left: 50%;
    transform: translateX(-50%);
    display: none;
    min-width: 180px;
}

#pickup-hint.active {
    display: block;
    animation: fadeUp 0.25s ease-out;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateX(-50%) translateY(15px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.hint-text {
    color: #88ccff;
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 3px 0;
    text-align: center;
}

.hint-sub {
    color: rgba(136, 204, 255, 0.5);
    font-size: 11px;
    margin: 0 0 10px 0;
    text-align: center;
}

/* ====== 霓虹按钮 ====== */
.neon-btn {
    display: block;
    width: 100%;
    padding: 10px 20px;
    background: rgba(100, 180, 255, 0.1);
    border: 1px solid rgba(100, 180, 255, 0.35);
    border-radius: 8px;
    color: #88ccff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    pointer-events: auto;
    transition: all 0.25s ease;
    text-align: center;
    letter-spacing: 1px;
}

.neon-btn:hover {
    background: rgba(100, 180, 255, 0.2);
    border-color: rgba(100, 180, 255, 0.6);
    box-shadow: 0 0 15px rgba(100, 180, 255, 0.15);
}

.gaze-progress {
    width: 100%;
    height: 2px;
    background: rgba(100, 180, 255, 0.1);
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
    display: none;
}

.gaze-progress.active {
    display: block;
}

.gaze-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #6699cc, #99ddbb);
    width: 0%;
    transition: width 0.1s linear;
}

/* ====== 状态栏 ====== */
#vr-ui {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(5, 15, 25, 0.75);
    color: #88ccff;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 14px;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(100, 180, 255, 0.2);
}

/* ====== 胜利面板 ====== */
.center-panel {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 360px;
    max-width: 85vw;
    display: none;
}

.center-panel.active {
    display: block;
    animation: scaleIn 0.4s ease-out;
}

@keyframes scaleIn {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.92); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

#victory-panel h1 {
    margin: 0 0 12px;
    color: #6aabf5;
    text-align: center;
    font-size: 22px;
}

#victory-panel p {
    color: #aaddff;
    text-align: center;
    margin: 0 0 18px;
    font-size: 14px;
}

/* ====== 音效按钮 ====== */
.glass-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    padding: 10px 16px;
    background: rgba(5, 15, 30, 0.6);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(100, 180, 255, 0.25);
    border-radius: 10px;
    color: #88ccff;
    font-size: 13px;
    cursor: pointer;
    pointer-events: auto;
    z-index: 100;
}

/* ====== 手机控制按钮 ====== */
#mobile-controls {
    position: absolute;
    bottom: 20px;
    left: 20px;
    display: none;
    z-index: 1000;
    pointer-events: auto;
}

#mobile-controls button {
    width: 48px;
    height: 48px;
    background: rgba(5, 15, 30, 0.65);
    backdrop-filter: blur(4px);
    color: #88ccff;
    border: 1px solid rgba(100, 180, 255, 0.25);
    border-radius: 10px;
    font-size: 18px;
    cursor: pointer;
    margin: 2px;
    transition: all 0.2s ease;
}

#mobile-controls button:active {
    background: rgba(100, 180, 255, 0.25);
    transform: scale(0.95);
}

a-scene {
    background: #020810;
}

/* ====== 响应式 ====== */
@media (max-width: 768px) {
    #mobile-controls {
        display: grid;
        grid-template-columns: 48px 48px 48px;
        grid-template-rows: 48px 48px;
        gap: 4px;
    }
    #btn-forward { grid-column: 2; grid-row: 1; }
    #btn-left { grid-column: 1; grid-row: 2; }
    #btn-backward { grid-column: 2; grid-row: 2; }
    #btn-right { grid-column: 3; grid-row: 2; }

    .species-panel {
        width: 90vw;
        right: 5vw;
        left: 5vw;
    }
    .side-panel { width: 260px; }
    .center-panel { width: 85vw; }
    #vr-ui { font-size: 12px; padding: 8px 12px; }
}
