* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', sans-serif;
    user-select: none;
}
body {
    background: linear-gradient(to bottom, #ffedef, #ffd1e0);
    overflow: hidden;
    height: 100vh;
}
/* 开始界面 */
#startScreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, #ff6b9d, #c44569);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    color: white;
    text-align: center;
}
#startScreen h1 {
    font-size: 36px;
    margin-bottom: 30px;
    text-shadow: 0 0 10px rgba(255,255,255,0.5);
}
#startBtn {
    padding: 15px 40px;
    font-size: 22px;
    background: #ffd500;
    color: #d92d2d;
    border: none;
    border-radius: 50px;
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    cursor: pointer;
    transition: 0.2s;
}
#startBtn:active {
    transform: scale(0.95);
}
.rule {
    margin-top: 20px;
    font-size: 14px;
    line-height: 1.6;
    max-width: 80%;
}

/* 奖励表单 */
.reward-form {
    margin: 20px 0;
    padding: 20px;
    background: rgba(255,255,255,0.9);
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.reward-title {
    font-size: 18px;
    font-weight: bold;
    color: #d92d2d;
    margin-bottom: 15px;
    text-align: center;
}

.reward-item {
    margin: 10px 0;
    display: flex;
    align-items: center;
}

.reward-item label {
    width: 120px;
    font-size: 16px;
    color: #666;
}

.reward-item input {
    flex: 1;
    padding: 8px 12px;
    border: 2px solid #ff6b9d;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
}

.reward-item input:focus {
    border-color: #d92d2d;
}

/* 奖励显示 */
.reward-display {
    margin: 20px 0;
    padding: 15px;
    background: linear-gradient(to right, #ffd700, #ffaa00);
    border-radius: 10px;
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* 游戏中奖励显示 */
.reward-display-game {
    position: fixed;
    top: 35%;
    left: 20px;
    padding: 5px 10px;
    background: transparent;
    color: #d92d2d;
    font-size: 20px;
    font-weight: bold;
    text-align: left;
    z-index: 2;
    pointer-events: none;
    max-width: calc(100% - 40px);
    overflow: hidden;
    word-wrap: break-word;
}

/* 分数 */
.score-box {
    position: fixed;
    top: 20px;
    left: 20px;
    font-size: 26px;
    font-weight: bold;
    color: #d92d2d;
    z-index: 999;
    background: rgba(255,255,255,0.9);
    padding: 8px 15px;
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* 倒计时 */
.time-box {
    position: fixed;
    top: 20%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 80px;
    font-weight: bold;
    color: rgba(217, 45, 45, 0.1);
    z-index: 1;
    pointer-events: none;
    text-align: center;
}

/* 红包样式 */
.red-packet {
    position: absolute;
    width: 55px;
    height: 70px;
    background: linear-gradient(to bottom, #e74c3c, #c0392b);
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.15s;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.red-packet::before {
    content: "🧧";
}
.red-packet:active {
    transform: scale(0.9);
}

/* 加分效果 */
.score-popup {
    position: absolute;
    font-size: 24px;
    font-weight: bold;
    color: #ff0000;
    pointer-events: none;
    animation: floatUp 1s ease-out forwards;
    z-index: 100;
}

@keyframes floatUp {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-50px);
    }
}

/* 答题弹窗 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}
.modal-box {
    background: #fff;
    width: 320px;
    padding: 35px 25px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.modal-title {
    font-size: 22px;
    margin-bottom: 20px;
    color: #d92d2d;
    font-weight: bold;
}
.question {
    font-size: 28px;
    margin: 15px 0;
    font-weight: bold;
}
.answer-input {
    width: 100%;
    padding: 12px;
    font-size: 20px;
    text-align: center;
    margin-bottom: 20px;
    border: 2px solid #ff6b9d;
    border-radius: 10px;
    outline: none;
}
.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 10px;
    font-size: 17px;
    font-weight: bold;
    cursor: pointer;
    margin: 0 8px;
    white-space: nowrap;
}
.btn-giveup {
    background: #aaa;
    color: #fff;
}
.btn-answer {
    background: #d92d2d;
    color: #fff;
}
.tip {
    margin-top: 15px;
    font-size: 15px;
    min-height: 20px;
    padding: 5px;
    border-radius: 5px;
    z-index: 1000;
    background: #fff;
}

/* 结束界面样式 */
.end-score {
    font-size: 24px;
    font-weight: bold;
    margin: 20px 0;
    color: #d92d2d;
}

.end-message {
    font-size: 16px;
    margin-bottom: 25px;
    color: #666;
}

.confirm-message {
    font-size: 16px;
    line-height: 1.5;
    margin: 20px 0;
    color: #666;
    text-align: left;
}

.question-confirm-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.btn-restart {
    background: #d92d2d;
    color: #fff;
}

.btn-confirm {
    background: #d92d2d;
    color: #fff;
}

@media (max-width: 400px) {
    .btn {
        font-size: 14px;
        padding: 10px 15px;
    }
    
    .question-confirm-buttons {
        gap: 5px;
    }
}