/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #333;
    min-height: 100vh;
    line-height: 1.6;
}

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

/* 头部样式 */
.header {
    background: linear-gradient(90deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 15px 25px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

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

.logo i {
    font-size: 32px;
    color: #4dabf7;
}

.logo h1 {
    font-size: 24px;
    font-weight: 700;
}

.version {
    background: rgba(255, 255, 255, 0.2);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

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

.balance, .api-status {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 15px;
    border-radius: 8px;
}

.balance i, .api-status i {
    color: #4dabf7;
}

.status-connected {
    color: #51cf66;
    font-weight: 600;
}

/* 主内容区布局 */
.main-content {
    display: flex;
    gap: 25px;
    margin-bottom: 25px;
}

/* 侧边栏样式 */
.sidebar {
    width: 250px;
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
}

.nav-menu {
    list-style: none;
    margin-bottom: 30px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    margin-bottom: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-item:hover {
    background-color: #f1f3f5;
}

.nav-item.active {
    background: linear-gradient(90deg, #339af0 0%, #228be6 100%);
    color: white;
}

.nav-item i {
    width: 20px;
    text-align: center;
}

.api-info {
    margin-top: auto;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
}

.api-info h4 {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #495057;
}

.api-credential {
    margin-bottom: 15px;
}

.api-credential label {
    display: block;
    font-size: 12px;
    color: #868e96;
    margin-bottom: 5px;
}

.app-key {
    display: block;
    background: #e9ecef;
    padding: 8px;
    border-radius: 4px;
    font-size: 12px;
    font-family: monospace;
    word-break: break-all;
    color: #495057;
}

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

/* 内容区域样式 */
.content-area {
    flex: 1;
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.tab-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #343a40;
}

.tab-actions {
    display: flex;
    gap: 15px;
}

.filter-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* 按钮样式 */
.btn-primary, .btn-secondary, .btn-small, .btn-pagination {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(90deg, #339af0 0%, #228be6 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(90deg, #228be6 0%, #1c7ed6 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 136, 230, 0.3);
}

.btn-secondary {
    background: #e9ecef;
    color: #495057;
}

.btn-secondary:hover {
    background: #dee2e6;
}

.btn-small {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-pagination {
    padding: 8px 16px;
    background: #f8f9fa;
    color: #495057;
}

/* 表单样式 */
.form-container {
    max-width: 800px;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #495057;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #339af0;
    box-shadow: 0 0 0 3px rgba(51, 154, 240, 0.1);
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

/* 表格样式 */
.table-container {
    overflow-x: auto;
    margin-bottom: 20px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background: #f8f9fa;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

.data-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e9ecef;
}

.data-table tr:hover {
    background-color: #f8f9fa;
}

/* 余额卡片样式 */
.balance-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.balance-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.card-icon {
    width: 60px;
    height: 60px;
    background: #339af0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-icon i {
    font-size: 24px;
    color: white;
}

.card-content h3 {
    font-size: 14px;
    color: #868e96;
    margin-bottom: 5px;
}

.balance-amount {
    font-size: 28px;
    font-weight: 700;
    color: #495057;
}

/* 分页样式 */
.pagination {
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.page-info {
    color: #495057;
}

.page-size {
    margin-left: auto;
    color: #495057;
}

/* 配置页面样式 */
.config-container {
    max-width: 800px;
}

.endpoint-list {
    margin-top: 20px;
}

.endpoint-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 10px;
}

.endpoint-method {
    background: #339af0;
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 12px;
    min-width: 60px;
    text-align: center;
}

.endpoint-path {
    font-family: monospace;
    color: #495057;
}

.endpoint-desc {
    color: #868e96;
    margin-left: auto;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #868e96;
}

.modal-body {
    padding: 20px;
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #868e96;
}

.empty-state i {
    margin-bottom: 15px;
    color: #ced4da;
}

/* 通知样式 */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    background: #51cf66;
    color: white;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateX(150%);
    transition: transform 0.3s ease;
    z-index: 1001;
}

.notification.show {
    transform: translateX(0);
}

.notification.error {
    background: #ff6b6b;
}

/* 页脚样式 */
.footer {
    text-align: center;
    padding: 20px;
    color: #868e96;
    font-size: 14px;
    border-top: 1px solid #e9ecef;
    margin-top: 20px;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .main-content {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .tab-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .tab-actions {
        width: 100%;
    }
    
    .filter-group {
        flex-direction: column;
        width: 100%;
    }
    
    .balance-cards {
        grid-template-columns: 1fr;
    }
}