/* style.css - 轮回乐园游戏样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background: #0a0a0f;
    color: #c0c0c0;
    font-family: 'Microsoft YaHei', 'SimHei', monospace;
    min-height: 100vh;
}

.game-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

/* 标题 */
.game-title {
    text-align: center;
    padding: 30px 0;
    border-bottom: 2px solid #333;
    margin-bottom: 20px;
}
.game-title h1 {
    font-size: 2.5em;
    background: linear-gradient(90deg, #ff4444, #ff8800, #ffcc00, #ff4444);
    background-size: 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 3s linear infinite;
}
@keyframes shine { 0%{background-position:0%} 100%{background-position:200%} }
.game-title p { color: #666; margin-top: 8px; font-size: 0.9em; }

/* 状态面板 */
.status-panel {
    background: linear-gradient(135deg, #111118, #1a1a25);
    border: 1px solid #333;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.status-panel h3 {
    grid-column: 1 / -1;
    color: #ffcc00;
    border-bottom: 1px solid #333;
    padding-bottom: 8px;
    margin-bottom: 5px;
}
.stat-item { padding: 4px 0; font-size: 0.95em; }
.stat-label { color: #888; }
.stat-value { color: #fff; font-weight: bold; }
.stat-value.hp { color: #44ff44; }
.stat-value.atk { color: #ff4444; }
.stat-value.def { color: #4488ff; }
.stat-value.spd { color: #ffaa00; }
.stat-value.gold { color: #ffdd44; }

/* HP条 */
.hp-bar-container {
    grid-column: 1 / -1;
    background: #222;
    border-radius: 10px;
    height: 24px;
    overflow: hidden;
    position: relative;
}
.hp-bar {
    height: 100%;
    background: linear-gradient(90deg, #ff4444, #44ff44);
    border-radius: 10px;
    transition: width 0.5s;
}
.hp-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 0.85em;
    font-weight: bold;
    text-shadow: 1px 1px 2px #000;
}

/* EXP条 */
.exp-bar-container {
    grid-column: 1 / -1;
    background: #222;
    border-radius: 8px;
    height: 16px;
    overflow: hidden;
    position: relative;
}
.exp-bar {
    height: 100%;
    background: linear-gradient(90deg, #4444ff, #aa44ff);
    border-radius: 8px;
    transition: width 0.5s;
}
.exp-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 0.75em;
    text-shadow: 1px 1px 2px #000;
}

/* 主内容区 */
.main-content {
    background: linear-gradient(135deg, #111118, #1a1a25);
    border: 1px solid #333;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 20px;
}
.main-content h2 {
    color: #ff8800;
    margin-bottom: 15px;
    font-size: 1.4em;
}
.main-content p {
    line-height: 1.8;
    margin-bottom: 10px;
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 12px 24px;
    margin: 5px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
    font-family: inherit;
    transition: all 0.3s;
    text-decoration: none;
    color: #fff;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(0,0,0,0.4); }
.btn-primary { background: linear-gradient(135deg, #ff4444, #cc2222); }
.btn-success { background: linear-gradient(135deg, #44aa44, #228822); }
.btn-info { background: linear-gradient(135deg, #4488ff, #2255cc); }
.btn-warning { background: linear-gradient(135deg, #ffaa00, #cc8800); }
.btn-danger { background: linear-gradient(135deg, #aa2222, #661111); }
.btn-shop { background: linear-gradient(135deg, #aa44ff, #6622cc); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.btn-sm { padding: 8px 16px; font-size: 0.85em; }

/* 导航 */
.nav-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

/* 战斗日志 */
.battle-log {
    background: #0a0a10;
    border: 1px solid #222;
    border-radius: 8px;
    padding: 15px;
    max-height: 400px;
    overflow-y: auto;
    margin: 15px 0;
    font-size: 0.9em;
    line-height: 1.6;
}
.log-player { color: #44ff44; }
.log-enemy { color: #ff4444; }
.log-system { color: #ffcc00; }
.log-damage { color: #ff6666; font-weight: bold; }
.log-heal { color: #66ff66; }
.log-critical { color: #ff00ff; font-weight: bold; font-size: 1.1em; }

/* 任务列表 */
.mission-list { list-style: none; }
.mission-item {
    background: #151520;
    border: 1px solid #2a2a3a;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: border-color 0.3s;
}
.mission-item:hover { border-color: #ff8800; }
.mission-item.completed { opacity: 0.5; border-color: #44ff44; }
.mission-info h4 { color: #fff; margin-bottom: 5px; }
.mission-info p { color: #888; font-size: 0.85em; }
.mission-reward { color: #ffcc00; font-size: 0.85em; text-align: right; }

/* 商店 */
.shop-item {
    background: #151520;
    border: 1px solid #2a2a3a;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.shop-item:hover { border-color: #aa44ff; }
.item-info h4 { color: #fff; }
.item-info p { color: #888; font-size: 0.85em; }
.item-price { color: #ffdd44; font-weight: bold; }

/* 世界选择 */
.world-card {
    background: #151520;
    border: 1px solid #2a2a3a;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s;
}
.world-card:hover { border-color: #ff8800; transform: translateX(5px); }
.world-card.locked { opacity: 0.4; }
.world-card.cleared { border-color: #44ff44; }
.world-card h3 { color: #ff8800; margin-bottom: 8px; }
.world-card p { color: #888; font-size: 0.9em; }
.world-req { color: #ff4444; font-size: 0.8em; margin-top: 5px; }

/* 结果面板 */
.result-panel {
    text-align: center;
    padding: 30px;
}
.result-victory h2 { color: #44ff44; font-size: 2em; }
.result-defeat h2 { color: #ff4444; font-size: 2em; }
.reward-list { margin: 20px 0; font-size: 1.1em; }
.reward-list li { list-style: none; padding: 5px; color: #ffcc00; }

/* 首页 */
.start-screen { text-align: center; padding: 50px 20px; }
.start-screen .subtitle { color: #888; font-size: 1.1em; margin: 20px 0 40px; line-height: 1.8; }
.start-screen .quote {
    color: #ff8800;
    font-style: italic;
    border-left: 3px solid #ff8800;
    padding-left: 15px;
    margin: 30px auto;
    max-width: 500px;
    text-align: left;
}

/* 背包 */
.inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}
.inv-item {
    background: #151520;
    border: 1px solid #2a2a3a;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
}
.inv-item h4 { color: #fff; font-size: 0.9em; }
.inv-item .count { color: #ffcc00; }

/* 动画 */
.fade-in { animation: fadeIn 0.5s ease-in; }
@keyframes fadeIn { from{opacity:0;transform:translateY(10px)} to{opacity:1;transform:translateY(0)} }

/* 响应式 */
@media (max-width: 600px) {
    .status-panel { grid-template-columns: 1fr; }
    .mission-item { flex-direction: column; text-align: center; gap: 10px; }
    .game-title h1 { font-size: 1.8em; }
}