/**
 * 游戏主样式文件
 */

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

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    overflow: hidden;
    height: 100vh;
}

#app {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 顶部栏 */
.game-header {
    height: 60px;
    background: linear-gradient(90deg, #0f3460 0%, #16213e 100%);
    border-bottom: 2px solid #e94560;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.game-title {
    font-size: 24px;
    font-weight: bold;
    color: #e94560;
    text-shadow: 0 0 10px rgba(233, 69, 96, 0.5);
}

.player-info {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 16px;
}

.realm-badge {
    background: linear-gradient(135deg, #f39c12 0%, #e74c3c 100%);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
}

.header-right {
    display: flex;
    gap: 10px;
}

/* 主体容器 */
.game-container {
    flex: 1;
    display: flex;
    overflow: hidden;
}

/* 左侧导航 */
.game-sidebar {
    width: 100px;
    background: rgba(15, 52, 96, 0.8);
    border-right: 1px solid #0f3460;
    display: flex;
    flex-direction: column;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    padding: 10px 0;
}

.nav-btn {
    padding: 15px 10px;
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

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

.nav-btn.active {
    background: rgba(233, 69, 96, 0.3);
    border-left-color: #e94560;
}

.nav-btn .icon {
    font-size: 24px;
}

.nav-btn span:last-child {
    font-size: 12px;
}

/* 主内容区 */
.game-main {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.2);
}

.page {
    display: none;
}

.page.active {
    display: block;
}

/* 右侧信息栏 */
.game-info {
    width: 200px;
    background: rgba(15, 52, 96, 0.8);
    border-left: 1px solid #0f3460;
    padding: 20px;
    overflow-y: auto;
}

.info-panel {
    margin-bottom: 20px;
}

.info-panel h3 {
    font-size: 16px;
    margin-bottom: 10px;
    color: #e94560;
    border-bottom: 1px solid #e94560;
    padding-bottom: 5px;
}

.info-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

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

.btn-primary {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: #fff;
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: #fff;
}

.btn-success {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: #fff;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 16px;
}

.btn-settings {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.btn-logout {
    background: rgba(233, 69, 96, 0.8);
    color: #fff;
}

/* 修炼页面 */
.cultivate-panel {
    background: rgba(15, 52, 96, 0.6);
    border-radius: 10px;
    padding: 30px;
    max-width: 800px;
    margin: 0 auto;
}

.cultivate-panel h2 {
    font-size: 28px;
    margin-bottom: 30px;
    text-align: center;
    color: #e94560;
}

.cultivation-status {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
}

.status-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.status-item:last-child {
    border-bottom: none;
}

.cultivation-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.log-panel {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    padding: 15px;
    max-height: 300px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
}

.log-entry {
    margin-bottom: 5px;
    padding: 5px;
    border-left: 3px solid #e94560;
    padding-left: 10px;
}

/* 战斗页面 */
.combat-panel {
    background: rgba(15, 52, 96, 0.6);
    border-radius: 10px;
    padding: 30px;
}

.combat-panel h2 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #e94560;
}

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

.monster-card {
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid #e94560;
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s;
}

.monster-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(233, 69, 96, 0.4);
}

.monster-name {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #f39c12;
}

.monster-info {
    font-size: 14px;
    margin-bottom: 5px;
}

.combat-log {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    padding: 15px;
    max-height: 400px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.8;
}

/* 背包页面 */
.backpack-panel {
    background: rgba(15, 52, 96, 0.6);
    border-radius: 10px;
    padding: 30px;
}

.backpack-panel h2 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #e94560;
}

.backpack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
}

.item-slot {
    width: 80px;
    height: 80px;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid #555;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.item-slot:hover {
    border-color: #e94560;
    transform: scale(1.05);
}

.item-icon {
    font-size: 32px;
    margin-bottom: 5px;
}

.item-count {
    position: absolute;
    bottom: 2px;
    right: 5px;
    font-size: 12px;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 0 3px #000;
}

/* 好友页面 */
.friends-panel {
    background: rgba(15, 52, 96, 0.6);
    border-radius: 10px;
    padding: 30px;
}

.friends-panel h2 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #e94560;
}

.friends-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.friends-actions input {
    flex: 1;
    padding: 10px;
    border: 2px solid #0f3460;
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    font-size: 14px;
}

.friends-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.friend-item {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #0f3460;
    border-radius: 5px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.friend-info {
    flex: 1;
}

.friend-name {
    font-size: 16px;
    font-weight: bold;
    color: #3498db;
    margin-bottom: 5px;
}

.friend-detail {
    font-size: 14px;
    color: #aaa;
}

/* 公告栏 */
.announcement-bar {
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #e94560 0%, #c0392b 100%);
    padding: 15px 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 20px;
    max-width: 80%;
}

.announcement-content {
    flex: 1;
    font-size: 16px;
    line-height: 1.5;
}

.btn-close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 0 5px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .game-header {
        padding: 0 10px;
    }

    .game-title {
        font-size: 18px;
    }

    .player-info {
        font-size: 14px;
    }

    .game-sidebar {
        width: 70px;
    }

    .nav-btn .icon {
        font-size: 20px;
    }

    .nav-btn span:last-child {
        font-size: 10px;
    }

    .game-info {
        display: none;
    }

    .cultivate-panel,
    .combat-panel,
    .backpack-panel,
    .friends-panel {
        padding: 15px;
    }

    .announcement-bar {
        width: 90%;
        padding: 10px 15px;
    }

    .announcement-content {
        font-size: 14px;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #e94560;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #c0392b;
}

/* 货币颜色 */
.currency-yuanbao {
    color: #f39c12;
}

.currency-silver {
    color: #bdc3c7;
}

.currency-gold {
    color: #f1c40f;
}

.currency-spirit {
    color: #2ecc71;
}

/* 品质颜色 */
.quality-common { border-color: #9b9b9b !important; }
.quality-rare { border-color: #5eff7f !important; }
.quality-epic { border-color: #4da6ff !important; }
.quality-legendary { border-color: #a335ee !important; }
.quality-mythic { border-color: #ff8000 !important; }
