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

body {
    font-family: 'Inter', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

/* 头部 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
    margin-bottom: 30px;
}

.logo h1 {
    font-size: 24px;
    color: #333;
}

.nav {
    display: flex;
    gap: 20px;
}

.nav-link {
    text-decoration: none;
    color: #666;
    transition: color 0.2s;
    padding: 8px 16px;
    border-radius: 8px;
}

.nav-link:hover {
    color: #667eea;
    background: #f5f5f5;
}

.nav-link.login {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.nav-link.login:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102,126,234,0.4);
}

.nav-link.logout {
    background: #e74c3c;
    color: white;
}

.nav-link.logout:hover {
    background: #c0392b;
}

/* 搜索区域 */
.search-section {
    max-width: 700px;
    margin: 0 auto;
}

.search-section h2 {
    text-align: center;
    margin-bottom: 10px;
}

.subtitle {
    text-align: center;
    color: #888;
    margin-bottom: 30px;
}

/* 表单 */
.search-form, .login-form {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 16px;
}

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

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

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

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

.form-group.half {
    flex: 1;
}

/* 按钮 */
.btn {
    padding: 12px 30px;
    font-size: 16px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102,126,234,0.4);
}

/* 查询结果 */
.search-result {
    margin-top: 30px;
    background: #f8f9fa;
    border-radius: 16px;
    padding: 20px;
}

.result-summary {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}

.total-score {
    margin-top: 15px;
}

.total-score .label {
    font-size: 18px;
    color: #666;
}

.total-score .value {
    font-size: 48px;
    font-weight: bold;
    color: #667eea;
}

.result-details h4 {
    margin-bottom: 15px;
}

.details-list {
    max-height: 400px;
    overflow-y: auto;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: white;
    border-radius: 10px;
    margin-bottom: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.detail-item .date {
    color: #888;
    font-size: 14px;
}

.detail-item .title {
    flex: 1;
    margin-left: 20px;
    font-weight: 500;
}

.detail-item .points {
    color: #27ae60;
    font-weight: bold;
}

.empty {
    text-align: center;
    color: #888;
    padding: 30px;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.page-btn {
    padding: 8px 14px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.page-btn:hover {
    background: #f0f0f0;
}

.page-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* 错误消息 */
.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 12px 20px;
    border-radius: 10px;
    margin-top: 20px;
    text-align: center;
}

/* 登录页面 */
.login-section {
    max-width: 450px;
    margin: 0 auto;
}

.login-section h2 {
    text-align: center;
    margin-bottom: 30px;
}

/* 底部 */
.footer {
    text-align: center;
    padding-top: 30px;
    margin-top: 30px;
    border-top: 1px solid #eee;
    color: #888;
    font-size: 14px;
}

.footer-content {
    text-align: center;
}

.footer-gifs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.footer-gif {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.sponsor-text {
    font-size: 14px;
    color: #888;
    margin: 0;
}

/* 搜索区域 GIF 装饰 */
.search-gifs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.search-gif {
    width: 45px;
    height: 45px;
    object-fit: contain;
}

.search-gif.left {
    order: 1;
}

.search-gifs h2 {
    order: 2;
    margin-bottom: 0;
}

.search-gif.right {
    order: 3;
}

/* 管理员仪表板样式 */
.welcome-section {
    margin-bottom: 30px;
}

.welcome-section h2 {
    margin-bottom: 10px;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-4px);
}

.stat-icon {
    font-size: 40px;
    background: rgba(255,255,255,0.2);
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-info {
    flex: 1;
}

.stat-value {
    display: block;
    font-size: 28px;
    font-weight: bold;
    color: white;
}

.stat-label {
    display: block;
    font-size: 14px;
    color: rgba(255,255,255,0.8);
    margin-top: 5px;
}

/* 功能卡片网格 */
.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.admin-card {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 24px 20px;
    text-align: center;
    transition: all 0.2s;
    border: 1px solid #eee;
}

.admin-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-color: #667eea;
}

.card-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.admin-card h3 {
    margin-bottom: 10px;
    font-size: 18px;
    color: #333;
}

.admin-card p {
    font-size: 13px;
    color: #888;
    margin-bottom: 20px;
}

.card-btn {
    display: inline-block;
    padding: 8px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-size: 13px;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.card-btn:hover {
    transform: scale(1.05);
}

.card-btn.export {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
}

/* 最近活动区域 */
.recent-section {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 20px;
}

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

.section-header h3 {
    margin: 0;
}

.badge {
    background: #667eea;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
}

.event-item {
    background: white;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 12px;
    transition: all 0.2s;
    border-left: 4px solid #667eea;
}

.event-item:hover {
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.event-title {
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.event-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.event-meta span {
    font-size: 13px;
    color: #888;
}

.event-points {
    color: #27ae60 !important;
    font-weight: 500;
}

/* 响应式 */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    .header {
        flex-direction: column;
        gap: 15px;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .detail-item {
        flex-wrap: wrap;
        gap: 8px;
    }

    .detail-item .title {
        margin-left: 0;
        width: 100%;
    }

    .search-gif {
        width: 30px;
        height: 30px;
    }

    .footer-gif {
        width: 30px;
        height: 30px;
    }

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

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

    .event-meta {
        gap: 10px;
        flex-direction: column;
    }
}