/* ===== 全局样式 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: #f5f7fa;
    color: #333;
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: #0066cc; text-decoration: none; }
a:hover { opacity: 0.8; }

.container {
    max-width: 750px;
    margin: 0 auto;
    padding: 15px;
    padding-bottom: 80px;
}

/* ===== 卡片 ===== */
.card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.card h3 {
    font-size: 16px;
    margin-bottom: 12px;
    color: #333;
}

/* ===== Header ===== */
.header {
    text-align: center;
    padding: 15px 0;
}

.header h1 {
    font-size: 22px;
    color: #0066cc;
}

.header h2 {
    font-size: 20px;
    color: #333;
}

/* ===== 状态徽章 ===== */
.status-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    margin-top: 8px;
}

.status-ready {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-cooldown {
    background: #fff3e0;
    color: #e65100;
}

/* ===== 规则列表 ===== */
.rule-list { margin: 10px 0; }
.rule-list p { margin: 6px 0; }

.step-list {
    padding-left: 20px;
    margin: 8px 0;
}

.step-list li {
    margin: 6px 0;
    line-height: 1.8;
}

/* ===== 统计行 ===== */
.stats-row {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.stat-box {
    flex: 1;
    background: #fff;
    border-radius: 12px;
    padding: 15px 10px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.stat-num {
    font-size: 22px;
    font-weight: bold;
    color: #0066cc;
}

.stat-label {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

/* ===== 按钮 ===== */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    outline: none;
}

.btn-primary {
    background: #0066cc;
    color: #fff;
}

.btn-primary:hover { background: #0052a3; }

.btn-success {
    background: #4caf50;
    color: #fff;
}

.btn-danger {
    background: #f44336;
    color: #fff;
}

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

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

.btn-large {
    padding: 16px;
    font-size: 18px;
    margin-top: 10px;
}

.btn-sm {
    padding: 5px 12px;
    font-size: 12px;
}

.btn-disabled, .btn:disabled {
    background: #ccc;
    color: #999;
    cursor: not-allowed;
}

/* ===== 表单 ===== */
.form-group {
    margin-bottom: 15px;
}

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

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #0066cc;
}

.form-group small {
    color: #999;
    margin-top: 4px;
    display: block;
}

/* ===== 复制框 ===== */
.copy-box {
    background: #f8f9fa;
    border: 1px dashed #0066cc;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    white-space: pre-wrap;
    word-break: break-all;
    line-height: 1.8;
    font-size: 14px;
    max-height: 200px;
    overflow-y: auto;
}

.copy-btn {
    font-size: 16px;
    padding: 14px;
}

/* ===== 上传区域 ===== */
.upload-area {
    border: 2px dashed #ddd;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s;
    margin-bottom: 10px;
}

.upload-area:hover {
    border-color: #0066cc;
}

.upload-icon {
    font-size: 36px;
    margin-bottom: 8px;
}

.upload-text {
    color: #666;
    font-size: 14px;
}

/* ===== 操作指引 ===== */
.guide-steps { margin: 10px 0; }

.guide-step {
    display: flex;
    align-items: flex-start;
    margin: 12px 0;
}

.step-num {
    width: 28px;
    height: 28px;
    background: #0066cc;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: bold;
    flex-shrink: 0;
    margin-right: 12px;
}

.step-text strong {
    display: block;
    color: #333;
}

.step-text p {
    color: #666;
    font-size: 13px;
}

/* ===== 冷却倒计时 ===== */
.cooldown-notice {
    text-align: center;
    padding: 20px;
}

.cooldown-countdown {
    font-size: 20px;
    font-weight: bold;
    color: #e65100;
    margin: 10px 0;
}

/* ===== 底部导航 ===== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    display: flex;
    border-top: 1px solid #eee;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.06);
    z-index: 100;
    max-width: 750px;
    margin: 0 auto;
}

.nav-item {
    flex: 1;
    text-align: center;
    padding: 10px 0;
    color: #999;
    font-size: 12px;
    transition: color 0.2s;
}

.nav-item.active {
    color: #0066cc;
}

.nav-icon {
    display: block;
    font-size: 20px;
    margin-bottom: 2px;
}

/* ===== 弹窗 ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    width: 100%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.modal-header h3 {
    margin: 0;
}

.modal-close {
    font-size: 24px;
    cursor: pointer;
    color: #999;
    line-height: 1;
}

/* ===== 登录注册页 ===== */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #0066cc 0%, #004999 100%);
}

.auth-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.auth-title {
    text-align: center;
    color: #fff;
    font-size: 24px;
    margin-bottom: 30px;
}

.auth-form {
    background: #fff;
    border-radius: 16px;
    padding: 30px 24px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.auth-links {
    text-align: center;
    margin-top: 20px;
}

.auth-links a {
    color: rgba(255,255,255,0.9);
    margin: 0 10px;
    font-size: 14px;
}

/* ===== 个人中心 ===== */
.profile-card {
    text-align: center;
}

.profile-phone {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 15px;
}

.profile-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
}

.profile-stats > div {
    text-align: center;
}

.profile-stats .stat-num {
    display: block;
    font-size: 24px;
}

/* ===== Tab栏 ===== */
.tab-bar {
    display: flex;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 15px;
}

.tab-item {
    flex: 1;
    text-align: center;
    padding: 10px;
    cursor: pointer;
    color: #999;
    font-size: 14px;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.tab-item.active {
    color: #0066cc;
    border-bottom-color: #0066cc;
}

/* ===== 任务列表 ===== */
.task-list { min-height: 100px; }

.task-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: 13px;
}

.task-header span:first-child { color: #666; }

.reject-reason {
    background: #fff5f5;
    color: #f44336;
    padding: 8px;
    border-radius: 6px;
    font-size: 13px;
    margin-top: 6px;
}

.reward-info {
    color: #4caf50;
    font-size: 13px;
    margin-top: 4px;
}

/* ===== 状态标签 ===== */
.status-pending { color: #ff9800; }
.status-pass { color: #4caf50; }
.status-reject { color: #f44336; }
.text-danger { color: #f44336; }
.text-muted { color: #999; font-size: 12px; }
.text-center { text-align: center; }
.loading { text-align: center; color: #999; padding: 30px; }
.empty-state { text-align: center; color: #999; padding: 30px; }

.notice-box {
    background: #fff3e0;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.notice-card p {
    color: #666;
    line-height: 1.8;
}

.qrcode-current { margin-bottom: 10px; }
.qrcode-img { max-width: 200px; border-radius: 8px; }

/* ===== 管理后台 ===== */
.admin-body {
    background: #f0f2f5;
}

.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 220px;
    background: #1a1a2e;
    color: #fff;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    z-index: 50;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h2 {
    font-size: 18px;
    color: #fff;
}

.sidebar-nav {
    flex: 1;
    padding: 10px 0;
}

.sidebar-item {
    display: block;
    padding: 12px 20px;
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    transition: all 0.2s;
}

.sidebar-item:hover, .sidebar-item.active {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.sidebar-footer {
    padding: 15px 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-footer a { color: rgba(255,255,255,0.7); }

.admin-main {
    flex: 1;
    margin-left: 220px;
    padding: 20px;
    min-height: 100vh;
}

.admin-header {
    margin-bottom: 20px;
}

.admin-header h1 {
    font-size: 22px;
    color: #333;
}

.back-link {
    font-size: 14px;
    margin-right: 10px;
}

/* ===== 统计卡片网格 ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-icon.blue { background: #e3f2fd; }
.stat-icon.green { background: #e8f5e9; }
.stat-icon.red { background: #fce4ec; }
.stat-icon.orange { background: #fff3e0; }
.stat-icon.gold { background: #fff8e1; }

.stat-value {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

.stat-desc {
    font-size: 13px;
    color: #999;
}

/* ===== 数据表格 ===== */
.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table th,
.data-table td {
    padding: 10px 8px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
    white-space: nowrap;
}

.data-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #555;
}

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

/* ===== 搜索表单 ===== */
.search-form {
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-form input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}

/* ===== 筛选栏 ===== */
.filter-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-bar a {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    color: #666;
    background: #f0f0f0;
}

.filter-bar a.active {
    background: #0066cc;
    color: #fff;
}

/* ===== 审核详情 ===== */
.review-grid {
    display: grid;
    gap: 15px;
}

.video-container {
    border-radius: 8px;
    overflow: hidden;
    background: #000;
}

.review-video {
    width: 100%;
    max-height: 400px;
    display: block;
}

.qrcode-large {
    text-align: center;
}

.qrcode-large img {
    max-width: 300px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.info-list { margin: 10px 0; }

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.info-item label { color: #666; }
.info-item span { color: #333; font-weight: 500; }

.action-card {
    text-align: center;
}

.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 15px;
}

/* ===== 分页 ===== */
.pagination {
    display: flex;
    gap: 5px;
    justify-content: center;
    margin-top: 15px;
    flex-wrap: wrap;
}

.pagination a {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    color: #666;
}

.pagination a.active {
    background: #0066cc;
    color: #fff;
    border-color: #0066cc;
}

/* ===== 导出表单 ===== */
.export-form .form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

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

/* ===== Toast提示 ===== */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.75);
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 9999;
    pointer-events: none;
    animation: fadeInOut 2s ease;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
    15% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    75% { opacity: 1; }
    100% { opacity: 0; }
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .admin-sidebar {
        width: 60px;
        overflow: hidden;
    }
    
    .sidebar-header h2,
    .sidebar-item span,
    .sidebar-footer span {
        display: none;
    }
    
    .sidebar-item {
        padding: 12px;
        text-align: center;
        font-size: 18px;
    }
    
    .sidebar-header {
        padding: 15px 10px;
        text-align: center;
    }
    
    .sidebar-footer {
        justify-content: center;
    }
    
    .admin-main {
        margin-left: 60px;
        padding: 15px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .review-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-value {
        font-size: 18px;
    }
    
    .export-form .form-row {
        flex-direction: column;
        gap: 0;
    }
}
