/* 组件样式 - 专门用于互动功能 */

/* 故事分支选择组件 */
.story-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

.story-scene {
    background: var(--warm-white);
    border-radius: 25px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.story-scene::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--macaron-pink), var(--macaron-purple));
    border-radius: 25px 25px 0 0;
}

.scene-image {
    width: 100%;
    height: 300px;
    background: linear-gradient(135deg, #87CEEB, #98FB98);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.scene-description {
    background: var(--macaron-yellow);
    padding: 1.5rem;
    border-radius: 20px;
    margin-bottom: 1.5rem;
    border-left: 5px solid var(--macaron-peach);
    box-shadow: 0 4px 15px rgba(255, 250, 205, 0.4);
}

.scene-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--soft-gray);
    margin-bottom: 1rem;
}

.narrator-voice {
    font-style: italic;
    color: #666;
    font-size: 0.9rem;
}

/* 选择按钮组 */
.choices-container {
    margin-top: 2rem;
}

.choices-title {
    text-align: center;
    font-size: 1.3rem;
    color: var(--soft-gray);
    margin-bottom: 1.5rem;
    font-weight: bold;
}

.choices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.choice-card {
    background: var(--warm-white);
    border: 3px solid transparent;
    border-radius: 20px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.choice-card:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
    border-color: var(--macaron-pink);
}

.choice-card.selected {
    border-color: var(--macaron-mint);
    background: linear-gradient(135deg, var(--macaron-mint), var(--macaron-blue));
    color: white;
    transform: scale(1.02);
}

.choice-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
    animation: gentle-bounce 2s ease-in-out infinite;
}

@keyframes gentle-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.choice-text {
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.choice-description {
    font-size: 0.9rem;
    opacity: 0.8;
    line-height: 1.4;
}

/* 故事进度追踪 */
.story-progress {
    background: var(--macaron-purple);
    padding: 1.5rem;
    border-radius: 20px;
    margin-bottom: 2rem;
    color: white;
}

.progress-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 1rem;
    text-align: center;
}

.progress-path {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.progress-step {
    background: rgba(255, 255, 255, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 15px;
    font-size: 0.8rem;
    position: relative;
}

.progress-step.current {
    background: var(--macaron-yellow);
    color: var(--soft-gray);
    font-weight: bold;
}

.progress-arrow {
    font-size: 1.2rem;
    opacity: 0.7;
}

/* 盟友状态显示 */
.allies-status {
    background: linear-gradient(135deg, var(--macaron-mint), var(--macaron-blue));
    padding: 1rem;
    border-radius: 20px;
    margin-bottom: 1.5rem;
    color: white;
    text-align: center;
}

.allies-title {
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.allies-list {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.ally-icon {
    background: rgba(255, 255, 255, 0.3);
    padding: 0.5rem;
    border-radius: 50%;
    font-size: 1.5rem;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.ally-icon.active {
    background: var(--macaron-yellow);
    transform: scale(1.1);
    animation: ally-glow 2s ease-in-out infinite;
}

@keyframes ally-glow {
    0%, 100% { box-shadow: 0 0 10px rgba(255, 250, 205, 0.5); }
    50% { box-shadow: 0 0 20px rgba(255, 250, 205, 0.8); }
}

/* 音频控制 */
.audio-controls {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--macaron-pink);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(255, 182, 193, 0.4);
    transition: all 0.3s ease;
    z-index: 1000;
}

.audio-controls:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(255, 182, 193, 0.6);
}

.audio-icon {
    color: white;
    font-size: 1.5rem;
}

/* 返回按钮 */
.back-button {
    background: var(--macaron-purple);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(230, 230, 250, 0.4);
    margin-bottom: 2rem;
    text-decoration: none;
    display: inline-block;
}

.back-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(230, 230, 250, 0.6);
    background: var(--macaron-pink);
}

/* 结局展示 */
.story-ending {
    background: linear-gradient(135deg, var(--macaron-yellow), var(--macaron-peach));
    padding: 2rem;
    border-radius: 25px;
    text-align: center;
    margin-top: 2rem;
    box-shadow: 0 8px 25px rgba(255, 218, 185, 0.4);
}

.ending-title {
    font-size: 2rem;
    color: var(--soft-gray);
    margin-bottom: 1rem;
    font-weight: bold;
}

.ending-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--soft-gray);
    margin-bottom: 1.5rem;
}

.restart-button {
    background: var(--macaron-mint);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(152, 251, 152, 0.4);
}

.restart-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(152, 251, 152, 0.6);
    background: var(--macaron-blue);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .story-container {
        padding: 1rem;
    }
    
    .choices-grid {
        grid-template-columns: 1fr;
    }
    
    .scene-image {
        height: 200px;
        font-size: 3rem;
    }
    
    .progress-path {
        flex-direction: column;
        gap: 0.3rem;
    }
    
    .progress-arrow {
        transform: rotate(90deg);
    }
    
    .audio-controls {
        bottom: 1rem;
        right: 1rem;
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 480px) {
    .choice-card {
        padding: 1rem;
    }
    
    .choice-icon {
        font-size: 2rem;
    }
    
    .scene-text {
        font-size: 1rem;
    }
    
    .ending-title {
        font-size: 1.5rem;
    }
}
