/* css/style.css */
@font-face {
    font-family: 'GameFont';
    src: url('../assets/fonts/myfont.ttf') format('truetype');
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'GameFont', 'Microsoft YaHei', 'PingFang SC', sans-serif;
    background: #1a0a00;
    user-select: none;
    -webkit-user-select: none;
}

#bg-layer {
    position: fixed;
    inset: 0;
    background: url('../assets/images/background_b.png') center/cover no-repeat;
    z-index: 0;
    filter: brightness(0.6);
}

/* 如果背景图没加载到就用渐变兜底 */
#bg-layer {
    background-color: #2a1500;
    background-image:
        url('../assets/images/background_b.png'),
        linear-gradient(135deg, #1a0a00 0%, #3d1f00 50%, #1a0a00 100%);
    background-size: cover;
    background-position: center;
}

.screen {
    position: fixed;
    inset: 0;
    z-index: 1;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.screen.active {
    display: flex;
}

.hidden {
    display: none !important;
}

.screen-title {
    color: #ffd700;
    font-size: 42px;
    margin-bottom: 30px;
    text-shadow: 0 2px 10px rgba(255, 215, 0, 0.5);
}

.glow-text {
    animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {

    0%,
    100% {
        opacity: 0.7;
        text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
    }

    50% {
        opacity: 1;
        text-shadow: 0 0 30px rgba(255, 215, 0, 0.8);
    }
}

/* 通用按钮 */
.btn-menu {
    display: block;
    width: 240px;
    padding: 12px 0;
    margin: 8px auto;
    border: 2px solid rgba(200, 200, 200, 0.3);
    border-radius: 10px;
    background: rgba(60, 40, 30, 0.9);
    color: #f0f0f0;
    font-family: inherit;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-menu:hover,
.btn-menu:active {
    background: rgba(80, 60, 50, 0.95);
    border-color: #ffd700;
    transform: scale(1.03);
}

.btn-back {
    display: block;
    width: 200px;
    padding: 10px 0;
    margin: 20px auto 0;
    border: 2px solid rgba(200, 200, 200, 0.3);
    border-radius: 10px;
    background: rgba(60, 40, 30, 0.9);
    color: #f0f0f0;
    font-family: inherit;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-back:hover {
    background: rgba(80, 60, 50, 0.95);
    border-color: #ffd700;
}

.btn-small {
    padding: 6px 16px;
    border: 2px solid rgba(200, 200, 200, 0.3);
    border-radius: 8px;
    background: rgba(60, 40, 30, 0.9);
    color: #f0f0f0;
    font-family: inherit;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-small:hover {
    border-color: #ffd700;
}

.panel {
    background: rgba(30, 33, 40, 0.92);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 30px 40px;
    text-align: center;
    color: #f0f0f0;
}

.overlay {
    position: absolute;
    inset: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.75);
}

/* 滑动条 */
.slider-wrap {
    margin: 20px 0;
    color: #fff;
    font-size: 18px;
}

.slider-wrap input[type="range"] {
    width: 300px;
    display: block;
    margin: 10px auto;
    accent-color: #ffd700;
}

/* 屏幕震动（打击感） */
.shake-screen {
    animation: shakeAnim 0.15s cubic-bezier(.36,.07,.19,.97) both;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    perspective: 1000px;
}

@keyframes shakeAnim {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}