* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #d4e8ff;
    --btn-gradient-start: #ff7e5f;
    --btn-gradient-end: #feb47b;
    --btn-active-start: #ff6b4d;
    --btn-active-end: #fea868;
    --btn-hover-start: #ff6342;
    --btn-hover-end: #fe9e58;
    --btn-shadow: rgba(255, 126, 95, 0.45);
}

html, body {
    height: 100%;
    width: 100%;
    overflow: hidden;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: #ffffff;
    display: flex;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}

.container {
    position: relative;
    width: 100%;
    max-width: 640px;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    overflow: hidden;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.bg-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
    animation: imgFadeIn 0.8s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
    background: #f0f7fa;
}

.btn-wrapper {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    padding: 25px 5%;
    background: var(--bg-primary);
}

.btn-fixed {
    pointer-events: auto;
    width: 100%;
    height: 68px;
    background: linear-gradient(135deg, var(--btn-gradient-start) 0%, var(--btn-gradient-end) 100%);
    color: #ffffff;
    font-size: 20px;
    font-weight: 700;
    border: none;
    border-radius: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px var(--btn-shadow);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    user-select: none;
    cursor: pointer;
    animation: btnPopIn 1s ease-out 0.3s forwards;
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    backface-visibility: hidden;
    position: relative;
    overflow: hidden;
    outline: none;
}

.btn-fixed:focus-visible {
    outline: 3px solid rgba(255, 126, 95, 0.6);
    outline-offset: 2px;
}

.btn-fixed:hover {
    background: linear-gradient(135deg, var(--btn-hover-start) 0%, var(--btn-hover-end) 100%);
    box-shadow: 0 10px 30px var(--btn-shadow);
}

.btn-fixed:active {
    transform: scale(0.95);
    box-shadow: 0 4px 15px rgba(255, 126, 95, 0.35);
    background: linear-gradient(135deg, var(--btn-active-start) 0%, var(--btn-active-end) 100%);
}

.btn-fixed::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    border-radius: 34px;
    animation: btnShine 2.5s linear infinite;
    z-index: 1;
}

.btn-fixed span {
    position: relative;
    z-index: 2;
}

/* 全屏遮罩 —— 在所有元素最上层 */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: transparent;
    z-index: 9999;
    cursor: pointer;
}

@keyframes imgFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes btnPopIn {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    80% {
        opacity: 1;
        transform: translateY(-2px) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes btnShine {
    100% {
        left: 100%;
    }
}
