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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #0a0a1a;
    color: #60a5fa;
    min-height: 100vh;
    padding: 10px;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.game-container {
    max-width: 420px;
    margin: 0 auto;
    background: #0d0d24;
    border: 1px solid #1e40af;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 0 20px rgba(30, 64, 175, 0.3);
}

/* 顶部栏 */
.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    margin-bottom: 12px;
    position: relative;
}

.close-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #1e40af;
    background: transparent;
    color: #60a5fa;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:active {
    background: #1e3a8a;
}

.player-name {
    font-size: 18px;
    font-weight: bold;
    color: #93c5fd;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.top-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.realm-tag {
    background: #1e3a8a;
    color: #93c5fd;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    border: 1px solid #3b82f6;
}

.icon-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #1e40af;
    background: transparent;
    color: #60a5fa;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:active {
    background: #1e3a8a;
}

/* 数据四格 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.stat-card {
    background: #0f172a;
    border: 1px solid #1e40af;
    border-radius: 6px;
    padding: 8px 4px;
    text-align: center;
}

.stat-label {
    font-size: 12px;
    color: #60a5fa;
    margin-bottom: 4px;
    opacity: 0.8;
}

.stat-value {
    font-size: 15px;
    font-weight: bold;
    color: #3b82f6;
}

.stat-value.hp {
    color: #ef4444;
}

/* 进度条 */
.progress-section {
    margin-bottom: 16px;
}

.progress-bar-container {
    width: 100%;
    height: 24px;
    background: #0f172a;
    border: 1px solid #1e40af;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #1e40af, #3b82f6, #60a5fa, #3b82f6, #1e40af);
    background-size: 200% 100%;
    animation: flow 2s linear infinite;
    width: 0%;
    transition: width 0.3s ease;
}

@keyframes flow {
    0% { background-position: 0% 0; }
    100% { background-position: 200% 0; }
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    color: #93c5fd;
    text-shadow: 0 0 3px #000;
    z-index: 1;
}

/* 区块标题 */
.section-title {
    font-size: 16px;
    color: #93c5fd;
    margin-bottom: 10px;
    font-weight: bold;
    letter-spacing: 4px;
}

/* 行动按钮 */
.action-buttons {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    margin-bottom: 10px;
}

.action-btn {
    background: transparent;
    border: 1px solid #1e40af;
    color: #60a5fa;
    border-radius: 6px;
    padding: 8px 2px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}

.action-btn:active {
    background: #1e3a8a;
}

.action-btn.active {
    background: #1e40af;
    color: #bfdbfe;
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.5);
}

.action-btn .btn-text {
    font-size: 13px;
    font-weight: 500;
}

.action-btn .btn-desc {
    font-size: 10px;
    opacity: 0.7;
    line-height: 1.3;
    text-align: center;
    color: #60a5fa;
}

.action-btn:disabled {
    opacity: 0.5;
}

/* 当前状态 */
.current-status {
    font-size: 12px;
    color: #60a5fa;
    text-align: center;
    margin-bottom: 16px;
    opacity: 0.8;
}

.status-idle { color: #6b7280; }
.status-cultivating { color: #3b82f6; }
.status-fast { color: #f59e0b; }
.status-healing { color: #10b981; }
.status-mining { color: #8b5cf6; }

/* 游历区 */
.travel-section {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.menu-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 80px;
    flex-shrink: 0;
}

.menu-item {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid #1e40af;
    color: #60a5fa;
    border-radius: 4px;
    padding: 4px 2px;
    text-align: center;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.menu-item:active {
    background: #1e3a8a;
}

.menu-item.active {
    background: #1e40af;
    color: #bfdbfe;
}

.menu-item.locked {
    opacity: 0.4;
    color: #4b5563;
    border-color: #374151;
}

.map-content {
    flex: 1;
    display: flex;
    gap: 8px;
}

.map-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.map-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #0f172a;
    border: 1px solid #1e40af;
    border-radius: 4px;
    padding: 4px 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.map-item:active {
    background: #1e3a8a;
}

.map-item.active {
    background: #1e40af;
    border-color: #3b82f6;
}

.map-item.locked {
    opacity: 0.4;
}

.map-name {
    font-size: 13px;
    color: #93c5fd;
    margin-bottom: 2px;
}

.map-info {
    font-size: 11px;
    color: #60a5fa;
    opacity: 0.7;
}

.mine-btn {
    width: 70px;
    background: #1e3a8a;
    border: 1px solid #3b82f6;
    color: #bfdbfe;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    writing-mode: vertical-lr;
    text-orientation: upright;
    letter-spacing: 4px;
    animation: pulse 2s infinite;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mine-btn:active {
    background: #1e40af;
}

.mine-btn.mining {
    background: #1e40af;
    animation: none;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 5px rgba(59, 130, 246, 0.5); }
    50% { box-shadow: 0 0 15px rgba(59, 130, 246, 0.8); }
}

.mine-status {
    position: absolute;
    font-size: 12px;
    color: #f59e0b;
}

/* 中间标语 */
.center-slogan {
    text-align: center;
    font-size: 24px;
    color: #fbbf24;
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
    margin: 20px 0;
    font-weight: bold;
    letter-spacing: 4px;
}

/* 日志区 */
.log-container {
    background: #0a0a1a;
    border: 1px solid #1e40af;
    border-radius: 4px;
    height: 200px;
    overflow-y: auto;
    padding: 8px;
    font-size: 12px;
    line-height: 1.6;
}

.log-container::-webkit-scrollbar {
    width: 4px;
}

.log-container::-webkit-scrollbar-track {
    background: #0f172a;
}

.log-container::-webkit-scrollbar-thumb {
    background: #1e40af;
    border-radius: 2px;
}

.log-item {
    margin-bottom: 2px;
}

.log-time {
    color: #4b5563;
    margin-right: 4px;
}

.log-normal { color: #60a5fa; }
.log-success { color: #34d399; }
.log-warning { color: #fbbf24; }
.log-danger { color: #ef4444; }
.log-info { color: #8b5cf6; }
.log-special { color: #f472b6; }

/* 弹窗 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 20px;
}

.modal-overlay.show {
    display: flex;
}

.modal {
    background: #0d0d24;
    border: 2px solid #1e40af;
    border-radius: 8px;
    width: 100%;
    max-width: 360px;
    box-shadow: 0 0 30px rgba(30, 64, 175, 0.5);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #1e40af;
    font-size: 16px;
    font-weight: bold;
    color: #93c5fd;
}

.modal-close {
    background: transparent;
    border: none;
    color: #60a5fa;
    font-size: 20px;
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-body {
    padding: 16px;
    max-height: 60vh;
    overflow-y: auto;
}

.panel-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #1e3a8a;
    font-size: 14px;
}

.panel-label {
    color: #60a5fa;
}

.panel-value {
    color: #93c5fd;
    font-weight: 500;
}

/* 设置 */
.setting-item {
    margin-bottom: 12px;
}

.setting-item label {
    display: block;
    margin-bottom: 6px;
    color: #60a5fa;
    font-size: 14px;
}

.setting-item input {
    width: 100%;
    background: #0f172a;
    border: 1px solid #1e40af;
    color: #93c5fd;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
}

.setting-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 16px;
}

.setting-btn {
    background: transparent;
    border: 1px solid #1e40af;
    color: #60a5fa;
    padding: 10px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
}

.setting-btn:active {
    background: #1e3a8a;
}

.setting-btn.danger {
    border-color: #991b1b;
    color: #f87171;
}

.setting-btn.danger:active {
    background: #7f1d1d;
}

/* Toast */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: #1e3a8a;
    border: 1px solid #3b82f6;
    color: #bfdbfe;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 14px;
    z-index: 200;
    transition: transform 0.3s ease;
    max-width: 90%;
    text-align: center;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

.toast.success { border-color: #059669; background: #064e3b; }
.toast.error { border-color: #dc2626; background: #7f1d1d; }
.toast.warning { border-color: #d97706; background: #78350f; }
.toast.info { border-color: #3b82f6; background: #1e3a8a; }

/* 移动端适配 */
@media (max-width: 380px) {
    .action-btn .btn-desc {
        font-size: 8px;
    }
    .action-btn .btn-text {
        font-size: 12px;
    }
    .menu-item {
        font-size: 12px;
        padding: 8px 2px;
    }
}
