/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
}

/* 导航栏 */
.navbar {
    background-color: #2c3e50;
    color: white;
    padding: 0 20px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-brand {
    font-size: 20px;
    font-weight: bold;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-link {
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.nav-link:hover {
    background-color: rgba(255,255,255,0.1);
}

.nav-link.active {
    background-color: #3498db;
}

.btn-logout {
    background-color: #e74c3c;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.btn-logout:hover {
    background-color: #c0392b;
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}

/* 卡片 */
.card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.card-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.card-header h2 {
    font-size: 18px;
    color: #2c3e50;
    margin: 0;
}

.card-body {
    padding: 20px;
}

/* 表单 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-control:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* 验证码组 */
.captcha-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.captcha-group .form-control {
    flex: 1;
}

.captcha-img {
    height: 40px;
    width: 100px;
    cursor: pointer;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: opacity 0.3s;
}

.captcha-img:hover {
    opacity: 0.8;
}

/* 输入组 */
.input-group {
    display: flex;
    gap: 10px;
}

.input-group .form-control {
    flex: 1;
}

/* 按钮 */
.btn {
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-primary:active {
    transform: translateY(1px);
}

.btn-sm {
    padding: 5px 12px;
    font-size: 13px;
}

.btn-lg {
    padding: 15px 30px;
    font-size: 16px;
}

.btn-block {
    width: 100%;
}

/* 文本颜色 */
.text-muted {
    color: #7f8c8d;
    margin-bottom: 15px;
}

/* 错误消息 */
.error-message {
    color: #e74c3c;
    margin-top: 10px;
    text-align: center;
}

/* 高亮文本 */
.highlight {
    color: #27ae60;
    font-weight: bold;
}

/* 徽章 */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
}

.badge-info {
    background-color: #3498db;
    color: white;
}

.badge-warning {
    background-color: #f39c12;
    color: white;
}

/* 表格 */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.data-table thead {
    background-color: #f8f9fa;
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.data-table th {
    font-weight: 600;
    color: #2c3e50;
    white-space: nowrap;
}

.data-table tbody tr:hover {
    background-color: #f8f9fa;
}

.url-cell {
    max-width: 400px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.table-responsive {
    overflow-x: auto;
}

/* 分页 */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.pagination-info {
    color: #7f8c8d;
    margin-right: 15px;
}

.pagination-buttons {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.pagination-buttons .btn.active {
    background-color: #2c3e50;
}

/* 间距工具类 */
.mb-4 {
    margin-bottom: 20px !important;
}

/* 登录页面 */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    padding: 40px;
}

.login-title {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 24px;
}

.login-form .form-group {
    margin-bottom: 20px;
}

/* 用户信息网格 */
.user-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.info-item {
    display: flex;
    flex-direction: column;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.info-item label {
    font-size: 12px;
    color: #7f8c8d;
    margin-bottom: 5px;
}

.info-item span {
    font-size: 16px;
    color: #2c3e50;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        height: auto;
        padding: 15px;
        gap: 15px;
    }

    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }

    .container {
        padding: 0 15px;
    }

    .input-group {
        flex-direction: column;
    }

    .data-table {
        font-size: 13px;
    }

    .url-cell {
        max-width: 200px;
    }

    .pagination {
        flex-direction: column;
        align-items: stretch;
    }

    .pagination-buttons {
        justify-content: center;
    }
}
