/* 斗罗大陆文字游戏样式 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
    background-color: #1a1a2e;
    color: #eee;
    min-height: 100vh;
}

#app {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 认证界面 */
.auth-container {
    max-width: 400px;
    margin: 100px auto;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 40px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.auth-container h1 {
    font-size: 48px;
    color: #e94560;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.subtitle {
    font-size: 18px;
    color: #aaa;
    margin-bottom: 30px;
}

.auth-form {
    text-align: left;
}

.auth-form h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #fff;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #ddd;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 16px;
}

.form-group input::placeholder {
    color: #999;
}

.form-group input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.3);
}

.auth-switch {
    text-align: center;
    margin-top: 20px;
    color: #aaa;
}

.auth-switch a {
    color: #e94560;
    text-decoration: none;
}

.auth-switch a:hover {
    text-decoration: underline;
}

/* 按钮样式 */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.btn.primary {
    background: linear-gradient(135deg, #e94560, #c23152);
    color: #fff;
    width: 100%;
}

.btn.primary:hover {
    background: linear-gradient(135deg, #c23152, #a02040);
    transform: translateY(-2px);
}

.btn.small {
    padding: 8px 16px;
    font-size: 14px;
}

.btn.action {
    background: linear-gradient(135deg, #0f3460, #16213e);
    color: #fff;
    margin: 5px;
}

.btn.action:hover {
    background: linear-gradient(135deg, #16213e, #0f3460);
}

/* 角色创建界面 */
.create-container {
    max-width: 500px;
    margin: 100px auto;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 40px;
    border-radius: 10px;
}

.create-container h2 {
    color: #e94560;
    margin-bottom: 20px;
}

.create-container p {
    color: #aaa;
    margin-bottom: 30px;
}

/* 游戏主界面 */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, #16213e, #0f3460);
    border-radius: 10px;
    margin-bottom: 20px;
}

.game-title {
    font-size: 24px;
    font-weight: bold;
    color: #e94560;
}

.game-nav {
    display: flex;
    gap: 10px;
}

.nav-btn {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 5px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-btn:hover, .nav-btn.active {
    background: #e94560;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

#user-name {
    color: #ddd;
}

/* 状态栏 */
.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-item .label {
    color: #aaa;
    min-width: 40px;
}

.status-item .value {
    color: #fff;
    font-weight: bold;
}

.progress-bar {
    width: 100px;
    height: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    transition: width 0.3s ease;
}

.progress-fill.hp {
    background: linear-gradient(90deg, #e94560, #ff6b6b);
}

.progress-fill.mp {
    background: linear-gradient(90deg, #4ecdc4, #45b7d1);
}

.progress-fill.exp {
    background: linear-gradient(90deg, #f9ca24, #f0932b);
}

/* 游戏内容区 */
.game-content {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 20px;
    min-height: 500px;
}

.panel {
    display: none;
}

.panel.active {
    display: block;
}

.panel h3 {
    color: #e94560;
    margin-bottom: 20px;
    font-size: 24px;
}

/* 主界面 */
.location-info {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.location-info h3 {
    color: #f9ca24;
    margin-bottom: 10px;
}

.location-info p {
    color: #ddd;
    line-height: 1.6;
}

.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

/* 游戏日志容器 */
.game-log-container {
    background: rgba(0, 0, 0, 0.4);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid rgba(233, 69, 96, 0.3);
}

.game-log-container h4 {
    color: #f9ca24;
    margin-bottom: 15px;
    font-size: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

.game-log {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 8px;
    max-height: 250px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
}

.game-log p {
    color: #ddd;
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.5;
    padding: 5px 10px;
    border-left: 3px solid transparent;
}

.game-log p.log-welcome {
    color: #f9ca24;
    border-left-color: #f9ca24;
    font-weight: bold;
}

.game-log p.log-gold {
    color: #f9ca24;
    border-left-color: #f9ca24;
}

.game-log p.log-exp {
    color: #4ecdc4;
    border-left-color: #4ecdc4;
}

.game-log p.log-battle {
    color: #e94560;
    border-left-color: #e94560;
}

.game-log p.log-heal {
    color: #2ecc71;
    border-left-color: #2ecc71;
}

.game-log p.log-info {
    color: #aaa;
    border-left-color: #666;
}

/* 商店面板 */
.shop-container {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 10px;
}

.shop-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.shop-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
}

.shop-item:hover {
    background: rgba(233, 69, 96, 0.2);
    transform: translateY(-3px);
}

.shop-item .item-name {
    color: #fff;
    font-weight: bold;
    margin-bottom: 5px;
}

.shop-item .item-desc {
    color: #aaa;
    font-size: 12px;
    margin-bottom: 10px;
}

.shop-item .item-price {
    color: #f9ca24;
    font-weight: bold;
}

.shop-item .buy-btn {
    margin-top: 10px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #e94560, #c23152);
    border: none;
    border-radius: 5px;
    color: #fff;
    cursor: pointer;
}

/* 挂机面板 */
.idle-container {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 10px;
}

.idle-container p {
    color: #ddd;
    margin-bottom: 20px;
}

.idle-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.idle-status {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 8px;
}

.idle-status p {
    margin-bottom: 10px;
}

/* NPC对话面板 */
.npc-container {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 10px;
}

.npc-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.npc-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.npc-item:hover {
    background: rgba(233, 69, 96, 0.2);
}

.npc-item .npc-name {
    color: #fff;
    font-weight: bold;
    margin-bottom: 5px;
}

.npc-item .npc-desc {
    color: #aaa;
    font-size: 12px;
}

.npc-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.dialog-box {
    background: linear-gradient(135deg, #16213e, #0f3460);
    padding: 30px;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    border: 2px solid #e94560;
}

.dialog-box p {
    color: #fff;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.dialog-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.dialog-actions .btn {
    flex: 1;
    min-width: 100px;
}

/* 角色面板 */
.character-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.info-section {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 10px;
}

.info-section h4 {
    color: #f9ca24;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.info-section p {
    margin-bottom: 10px;
    color: #ddd;
}

.info-section strong {
    color: #fff;
}

.attribute-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.attribute-row span:first-child {
    min-width: 50px;
}

.attribute-row span:nth-child(2) {
    min-width: 30px;
    text-align: center;
    font-weight: bold;
    color: #f9ca24;
}

.attribute-row .btn {
    padding: 4px 10px;
    font-size: 14px;
    min-width: 30px;
}

.available-points {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 2px solid #e94560;
    color: #f9ca24;
    font-weight: bold;
}

.character-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* 背包面板 */
.inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.inventory-item {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.inventory-item:hover {
    background: rgba(233, 69, 96, 0.3);
    transform: translateY(-3px);
}

.inventory-item .item-name {
    color: #fff;
    font-weight: bold;
    margin-bottom: 5px;
}

.inventory-item .item-quantity {
    color: #aaa;
    font-size: 14px;
}

.inventory-item .use-btn {
    margin-top: 10px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #4ecdc4, #45b7d1);
    border: none;
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    font-size: 12px;
}

.inventory-item .use-btn:hover {
    background: linear-gradient(135deg, #45b7d1, #4ecdc4);
}

/* 任务面板 */
.quest-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-btn {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 5px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn:hover, .tab-btn.active {
    background: #e94560;
}

.quest-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.quest-item {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quest-item:hover {
    background: rgba(233, 69, 96, 0.2);
}

.quest-item .quest-name {
    color: #f9ca24;
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 10px;
}

.quest-item .quest-desc {
    color: #ddd;
    margin-bottom: 10px;
    line-height: 1.5;
}

.quest-item .quest-rewards {
    color: #4ecdc4;
    font-size: 14px;
}

/* 地图面板 */
.map-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
}

.current-location, .available-locations {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 10px;
}

.current-location h4, .available-locations h4 {
    color: #f9ca24;
    margin-bottom: 15px;
}

.current-location p {
    color: #fff;
    font-size: 20px;
    font-weight: bold;
}

.location-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.location-item:hover {
    background: rgba(233, 69, 96, 0.3);
}

.location-item .location-name {
    color: #fff;
    font-weight: bold;
    margin-bottom: 5px;
}

.location-item .location-req {
    color: #aaa;
    font-size: 14px;
}

/* 战斗面板 */
.battle-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.enemy-info {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.enemy-info h4 {
    color: #e94560;
    font-size: 24px;
    margin-bottom: 15px;
}

.battle-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.battle-log {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 10px;
    max-height: 300px;
    overflow-y: auto;
}

.battle-log p {
    color: #aaa;
    margin-bottom: 5px;
    font-size: 14px;
}

.battle-log p.damage {
    color: #e94560;
}

.battle-log p.heal {
    color: #4ecdc4;
}

.battle-log p.reward {
    color: #f9ca24;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .game-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .game-nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .status-bar {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .map-container {
        grid-template-columns: 1fr;
    }
    
    .character-info {
        grid-template-columns: 1fr;
    }
}
