/* ----- 全局重置 & 字体 ----- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none; /* 防止选中文本，更像游戏 */
}

body {
    overflow: hidden;
    font-family: 'Segoe UI', 'Poppins', 'Microsoft YaHei', sans-serif;
    background-color: #0a0c0f;
}

/* ----- 遮罩层 (进入界面) ----- */
#blocker {
    position: fixed;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #1a2a1f 0%, #0b140f 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
    color: #f5e7c8;
    text-shadow: 0 0 10px #ffb347, 0 0 20px #7c5e3a;
    backdrop-filter: blur(4px);
}

#blocker::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('images/background-illustration.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.15;
    pointer-events: none;
    z-index: 0;
}

#blocker > * {
    position: relative;
    z-index: 1;
}

#blocker h1 {
    font-size: 4rem;
    letter-spacing: 6px;
    margin-bottom: 1rem;
    font-weight: 600;
    border-bottom: 2px solid #ffaa33;
    padding-bottom: 0.3rem;
    text-transform: uppercase;
    animation: glowPulse 2s infinite;
}

#blocker p {
    font-size: 1.3rem;
    opacity: 0.9;
    margin-bottom: 2.5rem;
    font-style: italic;
}

#blocker button {
    padding: 16px 48px;
    font-size: 1.8rem;
    background: #f68adb;
    color: #1e2b1a;
    border: 3px solid #f5e7c8;
    cursor: pointer;
    font-weight: bold;
    letter-spacing: 2px;
    text-transform: uppercase;
    box-shadow: 0 0 30px #ffaa33, 0 4px 0 #8b5a2b;
    transition: 0.1s ease;
    border-radius: 60px;
}

#blocker button:hover {
    background: #ffb347;
    transform: translateY(-2px);
    box-shadow: 0 0 40px #ffc107, 0 6px 0 #8b5a2b;
}

#blocker button:active {
    transform: translateY(4px);
    box-shadow: 0 0 20px #ffaa33, 0 2px 0 #8b5a2b;
}

@keyframes glowPulse {
    0% { text-shadow: 0 0 10px #ffb347, 0 0 20px #7c5e3a; }
    50% { text-shadow: 0 0 20px #ffaa33, 0 0 40px #ff8800; }
    100% { text-shadow: 0 0 10px #ffb347, 0 0 20px #7c5e3a; }
}

/* ----- 顶层UI层 (指针穿透区域控制) ----- */
#ui-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

#ui-layer > * {
    pointer-events: auto;
}

/* ----- 准星 ----- */
#crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    transform: translate(-50%, -50%);
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    box-shadow: 0 0 10px #ff9800, inset 0 0 6px #ff9800;
    pointer-events: none;
    z-index: 20;
}

#crosshair::before,
#crosshair::after {
    content: '';
    position: absolute;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 6px #ff9800;
}

#crosshair::before {
    width: 12px;
    height: 2px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

#crosshair::after {
    width: 2px;
    height: 12px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* ----- HUD 左上信息面板 ----- */
#hud {
    position: absolute;
    top: 24px;
    left: 24px;
    background: rgba(10, 20, 10, 0.7);
    backdrop-filter: blur(8px);
    border: 1px solid #ffaa33;
    border-radius: 12px;
    padding: 12px 28px;
    color: #f5e7c8;
    box-shadow: 0 4px 20px rgba(0,0,0,0.6), 0 0 15px #7c5e3a;
    letter-spacing: 1px;
    min-width: 180px;
}

#hud .label {
    font-size: 0.9rem;
    text-transform: uppercase;
    opacity: 0.7;
    margin-bottom: 4px;
}

#mode-name {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    text-shadow: 0 0 8px #ff9800;
    color: #fff3d1;
}

/* ----- 底部工具栏 (滑动条样式) ----- */
#toolbar {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 24px;
    align-items: center;
    background: rgba(20, 20, 15, 0.7);
    backdrop-filter: blur(16px);
    padding: 12px 28px;
    border-radius: 60px;
    border: 1px solid #ffaa33;
    box-shadow: 0 10px 30px rgba(0,0,0,0.7), 0 0 30px #3a2e1e;
}

.mode-label {
    font-size: 1.2rem;
    color: #ffd966;
    letter-spacing: 1px;
    font-weight: 600;
    text-shadow: 0 2px 4px black;
}

#mode-slider {
    width: 280px;
    cursor: pointer;
    accent-color: #ffaa33;
    background: #3a3a4a;
    height: 6px;
    border-radius: 10px;
    -webkit-appearance: none;
    appearance: none;
}

#mode-slider:focus {
    outline: none;
}

#mode-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: #ffaa33;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 8px #ffcc66;
    border: 1px solid white;
}

.mode-value {
    background: #2c2c34;
    padding: 6px 20px;
    border-radius: 40px;
    color: #fff;
    font-size: 1rem;
    min-width: 120px;
    text-align: center;
    font-weight: 600;
    box-shadow: inset 0 0 2px rgba(0,0,0,0.3), 0 1px 2px rgba(255,255,255,0.1);
    letter-spacing: 1px;
}

/* ----- 对话框 (RPG风格) ----- */
#dialogue-box {
    position: absolute;
    bottom: 140px;
    left: 50%;
    transform: translateX(-50%);
    width: 550px;
    max-width: 80vw;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(12px);
    border: 2px solid #c79a4b;
    border-radius: 24px;
    padding: 24px 32px;
    color: #f5e7c8;
    box-shadow: 0 20px 40px rgba(0,0,0,0.8), 0 0 50px #7c5e3a;
    display: none;
    pointer-events: auto;
    font-size: 1.3rem;
}

#dialogue-box b {
    color: #ffc174;
    font-size: 1.6rem;
    margin-right: 10px;
    text-shadow: 0 0 10px #ff9800;
}

#dialogue-box span {
    line-height: 1.6;
}

#dialogue-box .hint {
    font-size: 1rem;
    margin-top: 16px;
    color: #ffaa33;
    text-align: right;
    opacity: 0.8;
    border-top: 1px dashed #5e4a2b;
    padding-top: 12px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    #blocker h1 {
        font-size: 2.5rem;
    }
    #blocker button {
        font-size: 1.4rem;
        padding: 12px 32px;
    }
    #toolbar {
        gap: 12px;
        padding: 8px 20px;
    }
    .mode-label {
        font-size: 0.9rem;
    }
    #mode-slider {
        width: 160px;
    }
    .mode-value {
        font-size: 0.8rem;
        min-width: 90px;
        padding: 4px 12px;
    }
    #dialogue-box {
        bottom: 120px;
        padding: 16px 24px;
        font-size: 1rem;
    }
    #dialogue-box b {
        font-size: 1.3rem;
    }
}