/* 主题颜色 */
:root {
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --accent-color: #4895ef;
    --success-color: #4cc9f0;
    --warning-color: #f72585;
    --danger-color: #e63946;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --gray-color: #6c757d;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #f5f7fb;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
.main-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1rem 0;
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 700;
}

.main-nav a {
    color: white;
    text-decoration: none;
    margin-left: 1.5rem;
    font-weight: 500;
    transition: var(--transition);
}

.main-nav a:hover {
    opacity: 0.8;
}

/* 主要内容区域 */
.main-content {
    min-height: calc(100vh - 120px);
    padding: 2rem 0;
}

/* 卡片样式 */
.card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
    margin-bottom: 2rem;
    transition: var(--transition);
}

.card:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.card-header {
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.card-title {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin: 0;
}

/* 表单样式 */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: var(--transition);
}

.btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-success {
    background: #2ecc71;
}

.btn-success:hover {
    background: #27ae60;
}

.btn-danger {
    background: var(--danger-color);
}

.btn-danger:hover {
    background: #c82333;
}

.btn-warning {
    background: var(--warning-color);
}

.btn-warning:hover {
    background: #d60e63;
}

.btn-primary {
    background: var(--primary-color);
}

.btn-primary:hover {
    background: var(--secondary-color);
}

/* 提示消息 */
.alert {
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
}

.alert-success {
    background: rgba(46, 204, 113, 0.2);
    border: 1px solid #2ecc71;
    color: #155724;
}

.alert-danger {
    background: rgba(231, 76, 60, 0.2);
    border: 1px solid var(--danger-color);
    color: #721c24;
}

.alert-warning {
    background: rgba(241, 196, 15, 0.2);
    border: 1px solid #f39c12;
    color: #856404;
}

/* 布局网格 */
.grid {
    display: grid;
    grid-gap: 1.5rem;
}

.grid-cols-1 {
    grid-template-columns: 1fr;
}

.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* 账号卡片 */
.account-card {
    border: 1px solid #eee;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    background: white;
    transition: var(--transition);
}

.account-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.account-category {
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.account-data {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: var(--border-radius);
    font-family: monospace;
    word-break: break-all;
    margin: 1rem 0;
}

.points-badge {
    display: inline-block;
    background: var(--accent-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .main-nav a {
        margin: 0 0.5rem;
    }
    
    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: 1fr;
    }
    
    .card {
        padding: 1.5rem;
    }
}

/* 表格样式 */
.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.table th {
    background: var(--primary-color);
    color: white;
    font-weight: 500;
}

.table tr:last-child td {
    border-bottom: none;
}

.table tr:hover {
    background: #f8f9fa;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.badge-success {
    background: rgba(46, 204, 113, 0.2);
    color: #27ae60;
}

.badge-danger {
    background: rgba(231, 76, 60, 0.2);
    color: var(--danger-color);
}

.badge-warning {
    background: rgba(241, 196, 15, 0.2);
    color: #f39c12;
}

/* 页脚 */
.main-footer {
    background: var(--dark-color);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
}

/* 公告栏 */
.announcement {
    background: linear-gradient(135deg, #4cc9f0, #4361ee);
    color: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    box-shadow: var(--box-shadow);
}

.announcement h3 {
    margin-top: 0;
}

/* 统计卡片 */
.stat-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--box-shadow);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0.5rem 0;
}

.stat-label {
    color: var(--gray-color);
    font-size: 0.875rem;
}

/* 小按钮样式 */
.btn-small {
    padding: 4px 8px;
    font-size: 0.8rem;
    border-radius: 4px;
}

.btn-small.btn-success {
    background: #2ecc71;
}

.btn-small.btn-success:hover {
    background: #27ae60;
}

.btn-small.btn-danger {
    background: var(--danger-color);
}

.btn-small.btn-danger:hover {
    background: #c82333;
}

.btn-small.btn-warning {
    background: var(--warning-color);
}

.btn-small.btn-warning:hover {
    background: #d60e63;
}

.btn-small.btn-primary {
    background: var(--primary-color);
}

.btn-small.btn-primary:hover {
    background: var(--secondary-color);
}

/* 用户管理页面样式 */
.users-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.users-table th,
.users-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}

.users-table th {
    background: var(--primary-color);
    color: white;
    font-weight: 500;
    position: sticky;
    top: 0;
    z-index: 10;
}

.users-table tr:last-child td {
    border-bottom: none;
}

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

.users-table td {
    background: white;
}

/* 响应式表格 */
.responsive-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* 用户基本信息 */
.user-basic-info {
    font-size: 0.9rem;
    line-height: 1.5;
}

.user-basic-info strong {
    color: var(--primary-color);
}

/* 积分信息 */
.user-points-info {
    text-align: center;
}

.points-badge {
    display: inline-block;
    background: linear-gradient(45deg, var(--accent-color), var(--primary-color));
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 5px;
}

.claim-count {
    font-size: 0.85rem;
    color: var(--gray-color);
}

/* 登录信息 */
.user-login-info {
    font-size: 0.85rem;
    line-height: 1.4;
}

.user-login-info strong {
    color: var(--dark-color);
    display: block;
    margin-top: 5px;
}

.ip-address {
    display: inline-block;
    background: #f1f3f4;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.8rem;
    margin: 2px 0;
}

/* 状态和操作 */
.user-status-actions {
    text-align: center;
}

.user-status-actions .badge {
    margin-bottom: 10px;
    display: inline-block;
}

.action-buttons {
    text-align: left;
}

.form-group-small {
    margin-bottom: 8px;
}

.input-small {
    display: block;
    width: 100%;
    padding: 4px 8px;
    margin-bottom: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.8rem;
}

.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 5px;
}

.inline-form {
    display: inline-block;
    margin: 0 2px;
}

.admin-tag {
    font-size: 0.8rem;
    color: var(--gray-color);
    font-style: italic;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .users-table,
    .users-table thead,
    .users-table tbody,
    .users-table th,
    .users-table td,
    .users-table tr {
        display: block;
    }

    .users-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    .users-table tr {
        border: 1px solid #ccc;
        margin-bottom: 10px;
        border-radius: var(--border-radius);
        padding: 10px;
        background: white;
        box-shadow: var(--box-shadow);
    }

    .users-table td {
        border: none;
        position: relative;
        padding-left: 50% !important;
        text-align: right;
    }

    .users-table td:before {
        content: attr(data-label) ": ";
        position: absolute;
        left: 6px;
        width: 45%;
        text-align: left;
        font-weight: bold;
        color: var(--primary-color);
    }

    .users-table td:first-child {
        border-top: none;
    }

    .user-basic-info,
    .user-points-info,
    .user-login-info,
    .user-status-actions {
        text-align: right;
    }

    .button-group {
        justify-content: flex-end;
    }

    .action-form {
        margin: 10px 0;
    }
}

@media (max-width: 480px) {
    .users-table td {
        padding: 10px 10px 10px 40% !important;
    }

    .users-table td:before {
        width: 35%;
        font-size: 0.9rem;
    }

    .button-group {
        flex-direction: column;
    }

    .inline-form {
        margin: 2px 0;
        width: 100%;
    }

    .btn-small {
        width: 100%;
        margin: 2px 0;
    }
}

/* 其他小部件样式 */
.form-control-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-family: 'Courier New', monospace;
    resize: vertical;
    min-height: 120px;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .main-nav {
        display: none;
        width: 100%;
        text-align: center;
    }
    
    .main-nav.mobile-active {
        display: block;
    }
    
    .main-nav a {
        display: block;
        margin: 10px 0;
    }
}