/* 重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px;
    min-height: calc(100vh - 140px);
}

/* 导航栏样式 */
.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-menu {
    display: flex;
    gap: 20px;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-link:hover {
    background-color: rgba(255,255,255,0.1);
}

/* 卡片样式 */
.auth-container, .token-container, .records-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 200px);
}

.auth-card, .token-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    padding: 40px;
    width: 100%;
    max-width: 500px;
}

.auth-header, .token-header, .records-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h1, .token-header h1, .records-header h1 {
    color: #333;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* 表单样式 */
.auth-form, .reset-form {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e1e1;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

/* 按钮样式 */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn-block {
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-copy {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #333;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-copy:hover {
    background: #e9ecef;
}

/* 警告框样式 */
.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.alert-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-warning {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

/* Token显示样式 */
.token-display {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 12px;
    margin: 15px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    word-break: break-all;
}

.token-display code {
    font-family: 'Courier New', monospace;
    color: #333;
}

.new-token-section, .current-token-section {
    margin: 20px 0;
}

/* 警告框 */
.warning-box {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.warning-box h4 {
    color: #856404;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.warning-box ul {
    margin-left: 20px;
    color: #856404;
}

/* 仪表板样式 */
.dashboard {
    padding: 20px;
}

.welcome-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    display: flex;
    gap: 20px;
    align-items: center;
}

.stat-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-content h3 {
    color: #333;
    margin-bottom: 5px;
}

.stat-number {
    font-size: 28px;
    font-weight: bold;
    color: #667eea;
    margin: 5px 0;
}

.stat-note {
    color: #666;
    font-size: 14px;
}

/* 快速操作 */
.quick-actions {
    margin: 30px 0;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.action-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    text-decoration: none;
    color: #333;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    text-align: center;
}

.action-card:hover {
    transform: translateY(-5px);
    color: #333;
}

.action-card i {
    font-size: 36px;
    color: #667eea;
    margin-bottom: 15px;
}

.action-card h3 {
    margin-bottom: 10px;
}

/* API指南 */
.api-guide {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-top: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.code-block {
    background: #282c34;
    border-radius: 8px;
    padding: 20px;
    margin-top: 15px;
    overflow-x: auto;
}

.code-block code {
    color: #abb2bf;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
}

/* 表格样式 */
.records-table-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin: 20px 0;
}

.records-table {
    width: 100%;
    border-collapse: collapse;
            display: block;
        overflow-x: auto;
}

.records-table th {
    background: #f8f9fa;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #dee2e6;
}

.records-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #dee2e6;
}

.records-table tr:hover {
    background-color: #f8f9fa;
}

/* 状态徽章 */
.method-badge, .status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.method-get { background: #d4edda; color: #155724; }
.method-post { background: #d1ecf1; color: #0c5460; }
.method-put { background: #fff3cd; color: #856404; }
.method-delete { background: #f8d7da; color: #721c24; }

.status-2 { background: #d4edda; color: #155724; }
.status-4 { background: #fff3cd; color: #856404; }
.status-5 { background: #f8d7da; color: #721c24; }

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
}

.page-link {
    padding: 8px 16px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    color: #333;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
}

.page-link:hover {
    background: #f8f9fa;
}

.page-info {
    color: #666;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-state i {
    color: #dee2e6;
    margin-bottom: 20px;
}

/* 页脚样式 */
.footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 15px;
    }

    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }

    .container {
        padding: 10px;
    }

    .auth-card, .token-card {
        padding: 20px;
        margin: 10px;
    }

    .stats-grid, .action-grid {
        grid-template-columns: 1fr;
    }


}