/* admin/css/style.css - 明亮后台样式 */
:root {
    --primary: #ff6b35;
    --secondary: #4a90e2;
    --accent: #7b4b9a;
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --gray-100: #f1f3f5;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-600: #6c757d;
    --gray-800: #343a40;
    --shadow: 0 4px 12px rgba(0,0,0,0.05);
    --shadow-hover: 0 8px 24px rgba(0,0,0,0.1);
    --border-radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: var(--light-bg);
    color: var(--gray-800);
    line-height: 1.6;
}

.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* 顶部导航 */
.admin-nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
    background: var(--white);
    padding: 15px 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
}

.admin-left-nav {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.admin-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--gray-100);
    color: var(--gray-600);
    text-decoration: none;
    border-radius: 30px;
    font-weight: 500;
    transition: all 0.3s;
    border: 1px solid transparent;
}

.admin-nav-link:hover {
    background: var(--primary);
    color: white;
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.logout-btn {
    background: var(--gray-100);
    color: var(--gray-600);
    padding: 8px 16px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    border: 1px solid var(--gray-200);
}

.logout-btn:hover {
    background: var(--gray-200);
}

/* 页面标题 */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--gray-200);
}

.admin-title {
    font-size: 1.8rem;
    color: var(--primary);
    margin: 0;
}

/* 卡片 */
.card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 25px;
    margin-bottom: 30px;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow);
}

.card h2 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    color: var(--gray-800);
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
}

/* 表单 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--gray-600);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    color: var(--gray-800);
    font-size: 1rem;
    transition: border 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255,107,53,0.1);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    background: var(--gray-100);
    color: var(--gray-600);
    border: 1px solid var(--gray-200);
}

.btn-primary {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.btn-primary:hover {
    background: #e05a2b;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background: var(--secondary);
    color: white;
    border-color: var(--secondary);
}

.btn-secondary:hover {
    background: #3a7bcb;
    transform: translateY(-2px);
}

.btn-danger {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-sm {
    padding: 6px 16px;
    font-size: 0.9rem;
}

/* 表格 */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.data-table th {
    background: var(--gray-100);
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: var(--gray-800);
    border-bottom: 2px solid var(--gray-200);
}

.data-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--gray-200);
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tbody tr:hover {
    background: var(--gray-100);
}

/* 操作按钮组 */
.actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.btn-edit {
    background: rgba(74,144,226,0.1);
    color: var(--secondary);
    border-color: rgba(74,144,226,0.3);
}

.btn-edit:hover {
    background: rgba(74,144,226,0.2);
}

.btn-delete {
    background: rgba(220,53,69,0.1);
    color: #dc3545;
    border-color: rgba(220,53,69,0.3);
}

.btn-delete:hover {
    background: rgba(220,53,69,0.2);
}

/* 状态标签 */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-online {
    background: #d4edda;
    color: #155724;
}

.status-offline {
    background: #f8d7da;
    color: #721c24;
}

.status-maintenance {
    background: #fff3cd;
    color: #856404;
}

/* 热门徽章 */
.hot-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #ff6b35, #ff8c00);
    color: white;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-left: 8px;
}

/* 金币显示 */
.gold-display {
    background: rgba(255,215,0,0.15);
    padding: 8px 16px;
    border-radius: 30px;
    border: 1px solid #ffd700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: #b8860b;
}

.gold-required {
    background: rgba(255,215,0,0.1);
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    border: 1px solid #ffd700;
    text-align: center;
}

.gold-amount {
    font-size: 1.5rem;
    font-weight: bold;
    color: #ff8c00;
    margin: 0 5px;
}

/* 提示信息 */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--white);
    color: var(--gray-600);
    text-decoration: none;
    border: 1px solid var(--gray-200);
    transition: all 0.3s;
}

.page-link:hover,
.page-link.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* 响应式 */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 20px;
    }
    .admin-nav-container {
        flex-direction: column;
        align-items: stretch;
    }
    .admin-left-nav {
        justify-content: center;
    }
    .admin-user {
        justify-content: center;
    }
}