/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.game-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 游戏标题 */
.game-header {
    text-align: center;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.game-header h1 {
    font-size: 2.5em;
    color: #8B4513;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.subtitle {
    font-size: 1.1em;
    color: #666;
    font-style: italic;
}

/* 主游戏区域 */
.game-main {
    display: flex;
    gap: 20px;
    flex: 1;
}

/* 状态面板 */
.status-panel {
    width: 300px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    height: fit-content;
    position: sticky;
    top: 20px;
}

.status-panel h3 {
    color: #8B4513;
    margin-bottom: 15px;
    font-size: 1.2em;
    border-bottom: 2px solid #ddd;
    padding-bottom: 5px;
}

/* 属性条 */
.attribute, .disciple {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    gap: 10px;
}

.attr-name, .disciple-name {
    width: 50px;
    font-size: 0.9em;
    font-weight: bold;
}

.attr-bar, .relationship-bar {
    flex: 1;
    height: 20px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.attr-fill, .relationship-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease, background-color 0.3s ease;
}

.attr-fill {
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
}

.relationship-fill {
    background: linear-gradient(90deg, #FF6B6B, #4ECDC4);
}

.attr-value, .relationship-value {
    width: 30px;
    text-align: center;
    font-weight: bold;
    font-size: 0.9em;
}

/* 进度条 */
.progress {
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 25px;
    background: #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    margin-top: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #FFD700, #FFA500);
    border-radius: 12px;
    transition: width 0.5s ease;
    width: 1.23%;
}

/* 故事面板 */
.story-panel {
    flex: 1;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
}

.story-content {
    flex: 1;
    margin-bottom: 30px;
}

#event-title {
    color: #8B4513;
    font-size: 1.8em;
    margin-bottom: 20px;
    text-align: center;
}

.event-text {
    font-size: 1.1em;
    line-height: 1.8;
    color: #444;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #8B4513;
}

/* 选择按钮 */
.choices-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.choice-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 10px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.choice-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

.choice-btn:active {
    transform: translateY(0);
}

.choice-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 游戏结束界面 */
.game-over-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.game-over-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 500px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

#ending-title {
    color: #8B4513;
    font-size: 2em;
    margin-bottom: 20px;
}

.ending-text {
    font-size: 1.1em;
    line-height: 1.6;
    color: #444;
    margin-bottom: 30px;
}

.restart-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.restart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .game-main {
        flex-direction: column;
    }
    
    .status-panel {
        width: 100%;
        position: static;
    }
    
    .game-header h1 {
        font-size: 2em;
    }
    
    .story-panel {
        padding: 20px;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.story-content, .choices-container {
    animation: fadeIn 0.5s ease;
}

/* 关系状态颜色 */
.relationship-fill.excellent {
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
}

.relationship-fill.good {
    background: linear-gradient(90deg, #2196F3, #03DAC6);
}

.relationship-fill.neutral {
    background: linear-gradient(90deg, #FF9800, #FFC107);
}

.relationship-fill.poor {
    background: linear-gradient(90deg, #FF5722, #F44336);
}

.relationship-fill.hostile {
    background: linear-gradient(90deg, #9C27B0, #E91E63);
}

