* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'YouYuan', 'SimSun', sans-serif;
}

body {
    background: url('https://cdn.pixabay.com/photo/2016/05/24/16/48/mountains-1412683_1280.png') no-repeat center center fixed;
    background-size: cover;
    color: #333;
    overflow: hidden;
    height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* 游戏标题 */
.game-title {
    text-align: center;
    margin-bottom: 20px;
    color: #8B4513;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    font-size: 2.5em;
}

/* 开始界面 */
#start-screen {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    margin: auto;
    animation: fadeIn 1s ease-in-out;
}

.input-group {
    margin: 15px 0;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #8B4513;
}

.input-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.9);
}

.start-btn {
    background: linear-gradient(135deg, #8B4513, #D2691E);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 5px;
    font-size: 18px;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s ease;
}

.start-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* 主游戏界面 */
#game-screen {
    display: none;
    flex: 1;
    flex-direction: column;
    animation: fadeIn 1s ease-in-out;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    margin-bottom: 20px;
}

.sect-info {
    display: flex;
    align-items: center;
}

.sect-name {
    font-size: 1.5em;
    font-weight: bold;
    color: #8B4513;
    margin-right: 20px;
}

.master-info {
    display: flex;
    flex-direction: column;
}

.master-name {
    font-weight: bold;
}

.cultivation-level {
    color: #D2691E;
}

.resources {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.resource {
    display: flex;
    align-items: center;
    background: rgba(210, 105, 30, 0.2);
    padding: 5px 10px;
    border-radius: 20px;
    flex: 1 1 auto;
    min-width: 150px;
    max-width: 200px;
    overflow: hidden;
}

.resource-icon {
    margin-right: 5px;
    flex-shrink: 0;
}

/* 主要游戏区域 */
.game-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 20px;
}

/* 左侧面板 - 宗主和丹药生成 */
.left-panel {
    flex: 1;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.master-panel {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.master-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 10px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: #8B4513;
    border: 3px solid #8B4513;
}

.master-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.action-btn {
    background: linear-gradient(135deg, #8B4513, #D2691E);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 5px;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.pill-generation {
    display: flex;
    justify-content: center;
    margin: 10px 0;
}

.pill-container {
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(210, 105, 30, 0.2), rgba(210, 105, 30, 0.1));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.pill {
    width: 30px;
    height: 30px;
    background: radial-gradient(circle, #f5d742, #d4a017);
    border-radius: 50%;
    position: absolute;
    opacity: 0;
}

.generate-btn {
    background: linear-gradient(135deg, #8B4513, #D2691E);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

/* 右侧面板 - 弟子管理 */
.right-panel {
    flex: 2;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.disciples-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.disciples-title {
    font-size: 1.3em;
    color: #8B4513;
}

.recruit-btn {
    background: linear-gradient(135deg, #8B4513, #D2691E);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.recruit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.disciples-container {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    overflow-y: auto;
}

.disciple-card {
    position: relative;
    padding-right: 50px; /* 为按钮留出空间 */
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.disciple-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.disciple-card.selected {
    border: 2px solid #8B4513;
}

.disciple-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin: 0 auto 10px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #8B4513;
    border: 2px solid #D2691E;
}

.disciple-name {
    text-align: center;
    font-weight: bold;
    margin-bottom: 5px;
}

.disciple-level {
    text-align: center;
    color: #D2691E;
    margin-bottom: 10px;
}

.disciple-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.9em;
}

.disciple-actions {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.disciple-btn {
    background: linear-gradient(135deg, #8B4513, #D2691E);
    color: white;
    border: none;
    padding: 5px 8px;
    border-radius: 3px;
    font-size: 0.8em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.disciple-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.disciple-btn.dismiss {
    background: linear-gradient(135deg, #800000, #FF0000);
}

.disciple-element {
    margin-top: 5px;
    text-align: center;
}

.element-gold, .element-wood, .element-water, .element-fire, .element-earth {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    color: white;
    font-size: 0.9em;
}

.element-gold {
    background: linear-gradient(135deg, #FFD700, #B8860B);
}

.element-wood {
    background: linear-gradient(135deg, #32CD32, #006400);
}

.element-water {
    background: linear-gradient(135deg, #1E90FF, #00008B);
}

.element-fire {
    background: linear-gradient(135deg, #FF4500, #8B0000);
}

.element-earth {
    background: linear-gradient(135deg, #CD853F, #8B4513);
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pillFloat {
    0% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(180deg); }
    100% { transform: translateY(0) rotate(360deg); }
}

@keyframes pillTransfer {
    0% { transform: translateX(0); opacity: 1; }
    100% { transform: translateX(100%); opacity: 0; }
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 100;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.3s ease-in-out;
}

.modal-title {
    font-size: 1.5em;
    color: #8B4513;
    margin-bottom: 20px;
    text-align: center;
}

.modal-body {
    margin-bottom: 20px;
}

.modal-footer {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.modal-btn {
    padding: 8px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-btn.primary {
    background: linear-gradient(135deg, #8B4513, #D2691E);
    color: white;
    border: none;
}

.modal-btn.secondary {
    background: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
}

.modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

/* 进度条样式 */
.progress-bar {
    width: 100%;
    height: 10px;
    background: #f0f0f0;
    border-radius: 5px;
    margin-top: 5px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(to right, #D2691E, #8B4513);
    width: 0%;
    transition: width 0.3s ease;
}

/* 游戏目标样式 */
.game-goal {
    margin-top: 20px;
    padding: 15px;
    background: rgba(139, 69, 19, 0.1);
    border-radius: 5px;
    text-align: left;
}

.game-goal h3 {
    color: #8B4513;
    margin-bottom: 10px;
}

/* 宗门等级样式 */
.sect-level {
    color: #D2691E;
    font-weight: bold;
}

/* 战斗界面样式 */
.battle-screen {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 200;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
}

.battle-title {
    font-size: 2em;
    margin-bottom: 30px;
    text-shadow: 0 0 10px rgba(255, 165, 0, 0.7);
}

.battle-arena {
    display: flex;
    justify-content: space-between;
    width: 80%;
    max-width: 1000px;
}

.battle-side {
    width: 45%;
    text-align: center;
}

.battle-character {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin: 0 auto 20px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 50px;
    border: 3px solid #D2691E;
}

.battle-stats {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
}

.battle-hp {
    margin-bottom: 10px;
}

.battle-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.battle-btn {
    background: linear-gradient(135deg, #8B4513, #D2691E);
    color: white;
    border: none;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.battle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 10px rgba(255, 165, 0, 0.5);
}

.battle-log {
    width: 80%;
    max-width: 1000px;
    height: 150px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    margin-top: 30px;
    overflow-y: auto;
}

.battle-log-entry {
    margin-bottom: 5px;
    animation: fadeIn 0.3s ease-in-out;
}

.battle-result {
    font-size: 1.5em;
    margin-top: 20px;
    text-shadow: 0 0 10px rgba(255, 165, 0, 0.7);
}

/* 弟子资质颜色 */
.quality-普通 {
    color: #808080; /* 灰色 */
}

.quality-良好 {
    color: #008000; /* 绿色 */
}

.quality-优秀 {
    color: #0000FF; /* 蓝色 */
}

.quality-卓越 {
    color: #800080; /* 紫色 */
}

.quality-天才 {
    color: #FFA500; /* 橙色 */
}

/* 丹药传输动画 */
.pill-transfer {
    position: absolute;
    width: 15px;
    height: 15px;
    background: radial-gradient(circle, #f5d742, #d4a017);
    border-radius: 50%;
    z-index: 100;
    pointer-events: none;
}

@keyframes transferPill {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(0.5);
        opacity: 0;
    }
}

/* 添加天材地宝相关样式 */
.treasures-btn {
    cursor: pointer;
    transition: all 0.3s ease;
}

.treasures-btn:hover {
    background: rgba(210, 105, 30, 0.4);
}

#treasures-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
}

.treasure-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(210, 105, 30, 0.1);
    padding: 10px;
    border-radius: 5px;
    flex-wrap: wrap;
}

.treasure-name {
    font-weight: bold;
    color: #D2691E;
    flex: 1;
}

.treasure-count {
    color: #8B4513;
    margin: 0 10px;
}

.treasure-effect {
    font-size: 0.9em;
    color: #555;
    flex: 2;
    margin: 0 10px;
}

.use-treasure-btn {
    background: linear-gradient(135deg, #8B4513, #D2691E);
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
}

.no-treasures {
    text-align: center;
    color: #888;
    padding: 20px;
} 