/* 基础样式重置与全局设置 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    margin: 0;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #000000;
    color: #ffffff;
    height: 100vh;
    touch-action: none;
}

/* 初始加载动画样式 */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000000;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
}

.loading-logo {
    max-width: 200px;
    max-height: 200px;
    opacity: 0;
    transform: scale(0.8);
    animation: fadeInScale 0.5s ease-in-out forwards;
}

.loading-progress-container {
    width: 300px;
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0, 204, 255, 0.3) inset;
    opacity: 0;
    animation: fadeIn 0.5s ease-in-out 0.3s forwards;
}

#loading-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #00ccff, #0088cc);
    border-radius: 5px;
    width: 0%;
    box-shadow: 0 0 15px rgba(0, 204, 255, 0.5);
    animation: progressAnimation 2s ease-in-out forwards;
}

/* 加载动画关键帧 */
@keyframes fadeInScale {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes progressAnimation {
    0% {
        width: 0%;
    }
    90% {
        width: 90%;
        transition: width 3.15s ease-out;
    }
    100% {
        width: 100%;
        transition: width 0.35s ease-in;
    }
}

/* 加载完成后隐藏动画 */
@keyframes hideLoading {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

/* 版权信息样式 */
#copyright-info {
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    padding: 10px 15px;
    margin-top: 15px;
    border-top: 1px solid rgba(0, 204, 255, 0.2);
}

#copyright-info a {
    color: #00ccff;
    text-decoration: none;
    transition: all 0.3s ease;
    text-shadow: 0 0 5px rgba(0, 204, 255, 0.5);
}

#copyright-info a:hover {
    color: #0088cc;
    text-decoration: underline;
    text-shadow: 0 0 10px rgba(0, 204, 255, 0.7);
}

/* 加载文本样式 */
.loading-text {
    text-align: center;
    opacity: 0;
    animation: fadeIn 0.5s ease-in-out 0.6s forwards;
}

.loading-text p {
    margin: 8px 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.loading-text p:first-child {
    color: #00ccff;
    font-size: 16px;
    text-shadow: 0 0 10px rgba(0, 204, 255, 0.5);
}

.loading-text p:last-child {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-style: italic;
}

/* 科技感背景 - 移到模拟容器上 */

/* 模拟区域样式 */
#container {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

#simulationCanvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* 网格背景效果 */
#simulation-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: calc(100% - 60px); /* 从底部全屏，控制面板会覆盖在上面 */
}

#simulation-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: 20px 20px;
    pointer-events: none;
    z-index: 1;
}

/* 引用文字区域 */
#quotes-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: rgba(0, 0, 0, 0.7);
    overflow: hidden;
    z-index: 50;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid #333333;
}

#quote {
    position: absolute;
    width: 100%;
    text-align: center;
    color: #00ccff;
    font-size: 16px;
    line-height: 60px;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    padding: 0 20px;
    box-sizing: border-box;
    text-shadow: 0 0 5px rgba(0, 204, 255, 0.7);
    font-family: 'Courier New', monospace;
}

/* 信息面板样式 */
.info-panel {
    position: absolute;
    top: 70px;
    right: 20px;
    z-index: 100;
}

#info-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.info-toggle-btn {
    background: rgba(0, 0, 0, 0.8);
    color: #00ccff;
    border: 1px solid rgba(0, 204, 255, 0.3);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(0, 204, 255, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.info-toggle-btn:hover {
    background: rgba(0, 204, 255, 0.2);
    transform: scale(1.1);
}

.info-content {
    background: linear-gradient(135deg, rgba(10, 25, 47, 0.9), rgba(15, 30, 60, 0.85));
    color: #e0f7ff;
    padding: 15px;
    border-radius: 5px;
    max-width: 300px;
    border: 1px solid rgba(0, 204, 255, 0.5);
    box-shadow: 0 0 15px rgba(0, 204, 255, 0.3), inset 0 0px 10px rgba(0, 204, 255, 0.05);
    backdrop-filter: blur(8px);
    transform: perspective(500px) rotateX(2deg);
    display: none;
}

.info-content h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #00ccff;
    border-bottom: 1px solid #333333;
    padding-bottom: 5px;
}

.info-content p {
    margin: 8px 0;
    line-height: 1.4;
}

#body-info {
    display: none !important;
}

#info h3, #body-info h3 {
    margin-top: 0;
    color: #00ccff;
    border-bottom: 1px solid #333333;
    padding-bottom: 8px;
    margin-bottom: 10px;
    font-weight: normal;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#info p, #body-info p {
    margin: 8px 0;
    line-height: 1.4;
}

#toggle-info {
    background: none;
    border: none;
    color: #00ccff;
    cursor: pointer;
    font-size: 16px;
    padding: 0 10px;
    width: auto;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

/* 设置按钮专属样式 - 确保独立性 */
.settings-toggle-btn {
    position: absolute !important;
    left: 10px !important;
    top: 10px !important;
    z-index: 51 !important;
    background: rgba(0, 0, 0, 0.8) !important;
    border: 1px solid rgba(0, 204, 255, 0.3) !important;
    border-radius: 50% !important;
    color: #00ccff !important;
    font-size: 18px !important;
    width: 36px !important;
    height: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 0 15px rgba(0, 204, 255, 0.2) !important;
    backdrop-filter: blur(10px) !important;
    cursor: pointer !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* 碰撞和温度消息 */
#collision-message, #temperature-message {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    padding: 15px 30px;
    border-radius: 5px;
    font-size: 18px;
    display: none;
    z-index: 200;
    text-align: center;
    max-width: 90%;
    font-family: 'Courier New', monospace;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid #00ccff;
    box-shadow: 0 0 15px rgba(0, 204, 255, 0.3);
    backdrop-filter: blur(5px);
}

#collision-message {
    top: 110px;
    color: #00ccff;
}

#temperature-message {
    top: 180px;
    color: #00ccff;
}

/* 控制面板样式 */
#controls-container {
    position: absolute;
    bottom: 0 !important;
    left: 0 !important;
    top: auto !important;
    width: 100%;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.95), rgba(10, 18, 35, 0.95));
    border-top: 1px solid rgba(0, 204, 255, 0.5);
    z-index: 150;
    padding: 15px;
    max-height: 50vh;
    overflow-y: auto;
    height: 250px;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 204, 255, 0.1);
    transition: transform 0.3s ease-out;
    transform-origin: bottom center;
}

#controls-container.collapsed {
    transform: translateY(calc(100% - 45px));
}

#controls-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #333333;
    cursor: pointer;
}

.controls-toggle-btn {
    background: rgba(0, 0, 0, 0.8);
    color: #00ccff;
    border: 1px solid rgba(0, 204, 255, 0.3);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(0, 204, 255, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 200;
}

.controls-toggle-btn:hover {
    background: rgba(0, 204, 255, 0.2);
    transform: scale(1.1);
}

#controls-header h3 {
    margin: 0;
    color: #66ccff;
    font-size: 20px;
    font-weight: normal;
    text-shadow: 0 0 5px rgba(102, 204, 255, 0.5);
}

#controls-content {
    display: none;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

/* 天体和速度控制样式 */
.celestial-body, #speed-container {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(22, 31, 53, 0.85));
    border-radius: 5px;
    padding: 15px;
    border: 1px solid rgba(0, 204, 255, 0.3);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3), inset 0 0 10px rgba(0, 204, 255, 0.05);
}

#speed-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
}

/* 按钮容器样式 */
#buttons-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 15px 0;
    border-bottom: 1px solid #333333;
    width: 100%;
}

.main-buttons, .io-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.main-buttons {
    flex: 1;
    min-width: 250px;
}

/* 按钮样式 */
button, #toggle-controls, #civilization-history-btn {
    padding: 12px 15px;
    background: linear-gradient(145deg, #0f172a, #1e293b);
    border: 1px solid rgba(0, 204, 255, 0.5);
    border-radius: 5px;
    color: #00ccff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Courier New', monospace;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), 0 0 5px rgba(0, 204, 255, 0.5);
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

button::before, #toggle-controls::before, #civilization-history-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 204, 255, 0.2), transparent);
    transition: all 0.5s ease;
}

button:hover, #toggle-controls:hover, #civilization-history-btn:hover {
    background: linear-gradient(145deg, #1e293b, #334155);
    box-shadow: 0 0 15px rgba(0, 204, 255, 0.7);
    transform: translateY(-2px);
}

button:hover::before, #toggle-controls:hover::before, #civilization-history-btn:hover::before {
    left: 100%;
}

button:active, #toggle-controls:active, #civilization-history-btn:active {
    transform: translateY(1px);
}

#body-info button {
    width: 100%;
    margin-top: 10px;
    padding: 8px;
}

/* 文明历史按钮 */
#show-history-btn {
    display: inline-flex;
    position: relative;
    margin: 0;
    flex: 0 0 auto;
    width: auto;
    min-width: auto;
    max-width: none;
}
#civilization-history-btn {
    display: inline-flex;
    position: relative;
    margin: 0;
    flex: 0 0 auto;
    width: 12%;
    min-width: auto;
    max-width: none;
}
/* 输入框样式 */
input[type="text"], input[type="number"] {
    flex: 1;
    padding: 8px;
    background: rgba(30, 30, 30, 0.8);
    border: 1px solid #333333;
    border-radius: 3px;
    color: #cccccc;
    font-size: 14px;
}

input:focus {
    outline: none;
    border-color: #00ccff;
    box-shadow: 0 0 5px rgba(0, 204, 255, 0.5);
}

label {
    display: inline-block;
    width: 70px;
    font-size: 14px;
    color: #999999;
}

/* 滑块控件样式 */
.speed-control-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
}

.speed-scale {
    position: relative;
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
    height: 20px;
}

.speed-scale-min, .speed-scale-mid, .speed-scale-max {
    font-size: 14px;
    color: #00ccff;
    position: relative;
    text-shadow: 0 0 5px rgba(0, 204, 255, 0.7);
}

.speed-scale-min::after, .speed-scale-mid::after, .speed-scale-max::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 5px;
    background: #00ccff;
}

#speed-value {
    min-width: 50px;
    text-align: center;
    color: #00ccff;
    font-family: 'Courier New', monospace;
}

/* 滑块样式 */
#speed-control, input[type="range"] {
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #1a1a1a;
    outline: none;
    border: 1px solid #00ccff;
    margin: 0;
}

#speed-control::-webkit-slider-thumb, input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.9), rgba(0,204,255,0.6));
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 204, 255, 0.8),
                0 2px 4px rgba(0, 0, 0, 0.5),
                inset 0 1px 2px rgba(255,255,255,0.3);
    border: 1px solid rgba(0, 204, 255, 0.8);
    transition: all 0.2s ease;
}

#speed-control::-webkit-slider-thumb:hover, input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 15px rgba(0, 204, 255, 1);
}

/* 隐藏文件输入框 */
#fileInput {
    display: none;
}

/* 文明历史模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
    background-color: rgba(0, 0, 0, 0.95);
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #00ccff;
    width: 80%;
    max-width: 800px;
    max-height: 80vh;
    border-radius: 5px;
    position: relative;
    color: #fff;
    box-shadow: 0 0 30px rgba(0, 204, 255, 0.3);
    backdrop-filter: blur(10px);
}

.modal-content h2 {
    color: #00ccff;
    margin-top: 0;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    right: 20px;
    top: 10px;
    cursor: pointer;
}

.close:hover, .close:focus {
    color: #fff;
}

.modal-body {
    max-height: 60vh;
    overflow-y: auto;
    margin-top: 20px;
}

#civilization-history-table {
    width: 100%;
    border-collapse: collapse;
    color: #ccc;
}

#civilization-history-table th, #civilization-history-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #333;
}

#civilization-history-table th {
    background-color: rgba(0, 50, 100, 0.5);
    color: #00ccff;
    position: sticky;
    top: 0;
}

#civilization-history-table tr:hover {
    background-color: rgba(0, 204, 255, 0.1);
}

/* 滚动条样式 */
#controls-container::-webkit-scrollbar, .modal-body::-webkit-scrollbar {
    width: 8px;
}

#controls-container::-webkit-scrollbar-track, .modal-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

#controls-container::-webkit-scrollbar-thumb, .modal-body::-webkit-scrollbar-thumb {
    background: rgba(0, 204, 255, 0.5);
    border-radius: 4px;
}

/* 移动端适配 */
@media (max-width: 768px) {
    body {
        font-size: 14px;
        touch-action: manipulation;
    }

    #controls-content {
        grid-template-columns: 1fr;
    }

    #quote {
        font-size: 12px;
        line-height: 40px;
        height: 40px;
        padding: 0 10px;
    }

    #quotes-container {
        height: 40px;
    }

    .info-panel {
        top: 50px;
        right: 10px;
    }

    .info-toggle-btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
        background: rgba(0, 0, 0, 0.7);
        border: 1px solid rgba(255, 255, 255, 0.3);
        border-radius: 50%;
        color: white;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
    }

        .controls-toggle-btn {
            bottom: 10px;
            left: 50%;
            transform: translateX(-50%);
            width: 60px;
            height: 30px;
            font-size: 12px;
        }

        #controls-container {
            bottom: 0;
            left: 0;
            top: auto;
            max-width: 100%;
            width: 100%;
            max-height: 45vh;
            padding: 12px;
            border-radius: 12px 12px 0 0;
        }

        .info-content {
            top: 42px;
            right: 0;
            max-width: 260px;
            width: 260px;
            padding: 12px;
            font-size: 13px;
            border-radius: 8px;
            background: rgba(0, 0, 0, 0.85);
            border: 1px solid rgba(255, 255, 255, 0.2);
        }

    .info-content h4 {
        font-size: 14px;
        margin: 0 0 8px 0;
    }

    .info-content p {
        margin: 6px 0;
        font-size: 12px;
        line-height: 1.4;
    }

    #collision-message, #temperature-message {
        font-size: 13px;
        padding: 8px 12px;
        top: 90px;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        max-width: 90%;
        width: auto;
        text-align: center;
    }

    .celestial-body div {
        flex-direction: column;
        align-items: flex-start;
    }

    label {
        width: 100%;
        margin-bottom: 5px;
    }

    #buttons-container {
        flex-direction: column;
        gap: 10px;
    }

    .main-buttons, .io-buttons {
        width: 100%;
        flex-wrap: wrap;
    }

    .main-buttons {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 4px;
    }

    button, #civilization-history-btn {
        min-width: auto;
        padding: 6px 4px;
        font-size: 11px;
        white-space: nowrap;
        min-height: 36px;
    }

    #simulation-container {
        height: calc(100% - 40px);
    }

    #controls-container {
        height: auto;
        max-height: 45vh;
        padding: 10px;
        border-radius: 12px 12px 0 0;
    }

    #controls-header {
        margin-bottom: 12px;
        padding-bottom: 8px;
    }

    #controls-header h3 {
        font-size: 16px;
    }

    .controls-toggle-btn {
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 30px;
    font-size: 12px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

    #speed-container {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 12px;
    }

    .speed-control-wrapper {
        width: 100%;
    }

    .speed-scale {
        padding: 0 5px;
        font-size: 11px;
    }

    #speed-control {
        height: 6px;
        margin: 8px 0;
    }

    #speed-control::-webkit-slider-thumb {
        width: 18px;
        height: 18px;
    }

    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 15px;
        border-radius: 12px;
    }

    #civilization-history-table th, #civilization-history-table td {
        padding: 8px 5px;
        font-size: 11px;
    }

    .modal-body {
        max-height: 60vh;
    }

    .first-person-controls {
        top: 65px;
        left: 15px;
        right: 15px;
        bottom: auto;
        transform: none;
        padding: 12px;
        font-size: 12px;
    }
    }

    /* 小屏幕优化 */
    @media (max-width: 375px) {
        #quote {
            font-size: 11px;
        }
        
        button, #civilization-history-btn {
            font-size: 11px;
            padding: 6px 4px;
        }
        
        #collision-message, #temperature-message {
            font-size: 12px;
            padding: 6px 10px;
            top: 85px;
            left: 50%;
            right: auto;
            transform: translateX(-50%);
            max-width: 85%;
            width: auto;
            text-align: center;
        }
    }

    /* 触摸优化 */
    button, #toggle-controls {
        min-height: 36px;
        touch-action: manipulation;
    }


/* 平板设备优化 */
@media (min-width: 769px) and (max-width: 1024px) {
    #info, #body-info {
        max-width: 320px;
    }
    
    #controls-container {
        max-height: 40vh;
    }
}

/* 防止文字选择 */
* {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* 高DPI屏幕优化 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    #quote {
        font-weight: 300;
    }
}

/* 移动端加载动画 */
@media (max-width: 768px) {
    @keyframes pulse {
        0% { opacity: 0.6; }
        50% { opacity: 1; }
        100% { opacity: 0.6; }
    }
    
    .loading-animation {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        color: #00ccff;
        font-size: 16px;
        animation: pulse 1.5s ease-in-out infinite;
        z-index: 1000;
    }
}

/* 收起按钮样式优化 */
#toggle-controls {
    width: 80px;
    padding: 8px 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* 第一视角模式下隐藏操作说明 */
.first-person-mode .info-panel {
    display: none !important;
}

/* 第一视角模式样式 */
.first-person-controls {
    position: absolute;
    top: 50%;
    right: 30px;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: #00ccff;
    padding: 15px 25px;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
    z-index: 200;
    border: 1px solid rgba(0, 204, 255, 0.5);
    box-shadow: 0 0 15px rgba(0, 204, 255, 0.3);
    backdrop-filter: blur(5px);
    font-family: 'Courier New', monospace;
}

.first-person-controls .control-hint {
    margin: 5px 0;
    opacity: 0.8;
}

.first-person-controls .control-key {
    color: #ffffff;
    font-weight: bold;
    background: rgba(0, 204, 255, 0.2);
    padding: 2px 6px;
    border-radius: 3px;
    margin: 0 3px;
}

/* 第一视角按钮激活状态 */
#first-person-btn.active {
    background: linear-gradient(135deg, rgba(0, 204, 255, 0.8), rgba(0, 150, 200, 0.8));
    color: #000000;
    font-weight: bold;
    box-shadow: 0 0 15px rgba(0, 204, 255, 0.6);
    transform: scale(1.05);
}

/* 第一视角模式下隐藏控制面板内容，但保留收起按钮 */
.first-person-mode #controls-container {
    display: none;
}

.first-person-mode #quotes-container {
    display: none;
}

/* 第一视角模式下隐藏操作指南 */
.first-person-mode #info {
    display: none !important;
}

/* 第一视角模式下控制面板在底部 */
.first-person-mode #controls-container {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    top: auto !important;
    width: 100% !important;
    z-index: 150 !important;
}

/* 第一视角控制面板移到最右端 */
.first-person-controls {
    position: absolute;
    top: 80px;
    right: 20px;
    bottom: auto;
    transform: none;
    background: rgba(0, 0, 0, 0.7);
    color: #00ccff;
    padding: 15px 25px;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
    z-index: 200;
    border: 1px solid rgba(0, 204, 255, 0.5);
    box-shadow: 0 0 15px rgba(0, 204, 255, 0.3);
    backdrop-filter: blur(5px);
    font-family: 'Courier New', monospace;
}

/* 第一视角模式下控制面板按钮始终显示 */
.first-person-mode .controls-toggle-btn {
    display: flex !important;
    z-index: 1000;
}

/* 恒星名称标注样式 */
.star-label {
    position: absolute;
    color: #ffffff;
    font-size: 14px;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.8), 0 0 10px rgba(0, 0, 0, 0.6);
    pointer-events: none;
    user-select: none;
    transform: translate(-50%, -50%);
    white-space: nowrap;
    z-index: 1000;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    opacity: 0.9;
}