/* ============================================
   剧情系统 & 教学引导
   盲盒易拉罐 - 一只打工猫的逆袭故事
   ============================================ */

/* 剧情遮罩 */
.story-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.story-modal {
    position: relative;
    text-align: center;
    max-width: 600px;
    padding: 40px;
}

.story-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: background 0.5s ease;
}

.backdrop-city { background: radial-gradient(ellipse at center, #1a1a2e, #0f0e17); }
.backdrop-angry { background: radial-gradient(ellipse at center, #2c1810, #0f0e17); }
.backdrop-sad { background: radial-gradient(ellipse at center, #1a1a3e, #0f0e17); }
.backdrop-thinking { background: radial-gradient(ellipse at center, #1a2a1e, #0f0e17); }
.backdrop-happy { background: radial-gradient(ellipse at center, #2a2a1e, #0f0e17); }
.backdrop-love { background: radial-gradient(ellipse at center, #2a1a2e, #0f0e17); }
.backdrop-determined { background: radial-gradient(ellipse at center, #1a2a2e, #0f0e17); }

.story-character {
    font-size: 80px;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
    position: relative;
    z-index: 1;
}

.story-dialog-box {
    position: relative;
    z-index: 1;
}

.story-speaker {
    font-size: 20px;
    color: var(--accent-gold);
    margin-bottom: 15px;
    font-weight: 700;
}

.story-text {
    font-size: 22px;
    line-height: 1.8;
    color: var(--text-primary);
    margin-bottom: 30px;
    min-height: 80px;
}

.story-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn-story-next, .btn-story-skip {
    padding: 12px 32px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-story-next {
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-orange));
    color: var(--bg-primary);
}

.btn-story-skip {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

/* 教学引导 */
.tutorial-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.tutorial-box {
    background: var(--bg-card);
    border: 2px solid var(--accent-gold);
    border-radius: var(--radius-lg);
    padding: 30px;
    max-width: 500px;
    text-align: center;
    animation: fadeIn 0.3s ease;
    box-shadow: 0 0 30px rgba(255, 217, 61, 0.2);
}

.tutorial-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 15px;
}

.tutorial-icon {
    font-size: 24px;
}

.tutorial-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent-gold);
}

.tutorial-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
}

.tutorial-speaker {
    font-size: 40px;
    margin-bottom: 10px;
}

.tutorial-text {
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.tutorial-progress {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.btn-tutorial-next {
    padding: 10px 24px;
    font-size: 15px;
    font-weight: 600;
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-orange));
    color: var(--bg-primary);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
}

/* 教学完成弹窗 */
.tutorial-complete-modal {
    text-align: center;
}

/* 教学完成弹窗 - 确保在最顶层 */
#tutorialCompleteModal.modal-overlay {
    z-index: 2500;
}

.tutorial-complete-header {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent-gold);
    margin-bottom: 20px;
}

.tutorial-complete-body {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 25px;
    line-height: 1.8;
    text-align: left;
}

.tutorial-complete-body ul {
    list-style: none;
    padding: 10px 0;
}

.tutorial-complete-body li {
    padding: 4px 0;
}

.reward-text {
    font-size: 18px;
    color: var(--accent-gold);
    font-weight: 700;
    text-align: center;
    margin-top: 10px;
}

.btn-start-adventure {
    padding: 14px 36px;
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-orange));
    color: var(--bg-primary);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-start-adventure:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 217, 61, 0.4);
}

/* 剧情淡入淡出 */
.story-fade-in {
    animation: fadeIn 0.5s ease forwards;
}

.story-fade-out {
    animation: fadeOut 0.5s ease forwards;
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}
