/* 全局样式 */
:root {
    --primary-color: #ff6b6b;
    --secondary-color: #4ecdc4;
    --accent-color: #ffd166;
    --dark-color: #2d3047;
    --light-color: #f8f9fa;
    --success-color: #06d6a0;
    --warning-color: #ffd166;
    --danger-color: #ef476f;
    --gray-color: #adb5bd;
    --border-radius: 12px;
    --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: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

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

/* 头部样式 */
.header {
    background: linear-gradient(135deg, var(--primary-color), var(--danger-color));
    color: white;
    padding: 1rem 0;
    box-shadow: var(--box-shadow);
}

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

.logo {
    font-size: 1.8rem;
    font-weight: bold;
}

.nav a {
    color: white;
    text-decoration: none;
    margin-left: 2rem;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.nav a:hover,
.nav a.active {
    background: rgba(255, 255, 255, 0.2);
}

/* 提示横幅 */
.tip-banner {
    background: var(--accent-color);
    padding: 1rem;
    border-radius: var(--border-radius);
    margin: 2rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: bold;
}

/* 统计摘要 */
.stats-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 2rem 0;
}

.stat-item {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--box-shadow);
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

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

/* 打击记录网格 */
.strikes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

@media (max-width: 768px) {
    .strikes-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-summary {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .strikes-grid {
        grid-template-columns: 1fr;
    }
}

.strike-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.strike-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* 图片轮播 */
.image-slider {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.slider-container {
    display: flex;
    transition: transform 0.5s ease;
    height: 100%;
}

.slide {
    min-width: 100%;
    height: 100%;
    overflow: hidden;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

.slider-nav {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 5px;
}

.slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
}

.slider-dot.active {
    background: white;
}

/* 打击信息 */
.strike-info {
    padding: 1rem;
}

.strike-info h3 {
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.strike-info p {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.3rem 0;
    color: #666;
    font-size: 0.9rem;
}

.strike-info i {
    color: var(--primary-color);
    width: 16px;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: var(--border-radius);
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    color: #333;
    cursor: pointer;
    z-index: 1;
}

.modal-body {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    padding: 2rem;
}

@media (max-width: 768px) {
    .modal-body {
        grid-template-columns: 1fr;
    }
}

.modal-body img {
    width: 100%;
    border-radius: var(--border-radius);
}

.image-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.image-info h3 {
    color: var(--dark-color);
    font-size: 1.5rem;
}

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

/* 提交表单样式 */
.submit-form-container {
    max-width: 800px;
    margin: 2rem auto;
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--box-shadow);
}

.form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.form-header h2 {
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.form-subtitle {
    color: var(--gray-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark-color);
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.upload-area {
    border: 2px dashed var(--gray-color);
    border-radius: var(--border-radius);
    padding: 3rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: rgba(255, 107, 107, 0.05);
}

.upload-area i {
    font-size: 3rem;
    color: var(--gray-color);
    margin-bottom: 1rem;
}

.upload-area input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.preview-image {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.preview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-image {
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 12px;
}

.btn-submit {
    background: linear-gradient(135deg, var(--primary-color), var(--danger-color));
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

.form-hint {
    text-align: center;
    color: var(--gray-color);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.suggestion-tag {
    background: #e9ecef;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.suggestion-tag:hover {
    background: var(--primary-color);
    color: white;
}

/* 个人记录 */
.personal-records {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #e9ecef;
}

.records-container {
    display: grid;
    gap: 1rem;
}

.record-item {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
}

.record-status {
    display: inline-block;
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.status-pending {
    background: var(--warning-color);
    color: #333;
}

.status-approved {
    background: var(--success-color);
    color: white;
}

.status-rejected {
    background: var(--danger-color);
    color: white;
}

/* 成功模态框 */
.success-modal {
    text-align: center;
    padding: 3rem 2rem;
}

.success-icon {
    font-size: 4rem;
    color: var(--success-color);
    margin-bottom: 1rem;
}

.btn-ok {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    margin-top: 1rem;
    font-size: 1rem;
}

/* 后台管理样式 */
.admin-body {
    background: #f0f2f5;
    height: 100vh;
    overflow: hidden;
}

.admin-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    height: 100vh;
}

.admin-sidebar {
    background: var(--dark-color);
    color: white;
    padding: 1rem 0;
}

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

.sidebar-nav {
    padding: 1rem 0;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-left-color: var(--primary-color);
}

.badge {
    background: var(--primary-color);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
    font-size: 0.8rem;
    margin-left: auto;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-logout {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    padding: 0.8rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.btn-logout:hover {
    background: rgba(255, 255, 255, 0.2);
}

.admin-main {
    padding: 2rem;
    overflow-y: auto;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.admin-title {
    color: var(--dark-color);
    margin-bottom: 2rem;
    font-size: 1.8rem;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--box-shadow);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
}

.stat-icon.total {
    background: rgba(255, 107, 107, 0.1);
    color: var(--primary-color);
}

.stat-icon.valid {
    background: rgba(6, 214, 160, 0.1);
    color: var(--success-color);
}

.stat-icon.invalid {
    background: rgba(239, 71, 111, 0.1);
    color: var(--danger-color);
}

.stat-icon.codes {
    background: rgba(255, 209, 102, 0.1);
    color: var(--warning-color);
}

.stat-card h3 {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.stat-card .stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--dark-color);
}

/* 最近活动 */
.recent-activity {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

/* 审核列表 */
.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.filter-controls select {
    padding: 0.5rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    background: white;
    font-size: 0.9rem;
}

.submissions-list {
    display: grid;
    gap: 1rem;
}

.submission-item {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1.5rem;
    align-items: center;
}

.submission-images {
    display: flex;
    gap: 0.5rem;
}

.submission-thumb {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
}

.submission-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.submission-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.submission-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-action {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: var(--transition);
}

.btn-approve {
    background: var(--success-color);
    color: white;
}

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

.btn-view {
    background: var(--secondary-color);
    color: white;
}

.btn-action:hover {
    opacity: 0.9;
}

/* 兑换码管理 */
.codes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.btn-add-code {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.btn-add-code:hover {
    background: #ff5252;
}

.codes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.code-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.code-value {
    font-family: monospace;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--dark-color);
    margin-bottom: 1rem;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 4px;
    text-align: center;
}

.code-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.stock-warning {
    color: var(--danger-color);
    font-size: 0.9rem;
}

/* 审核模态框 */
.review-modal {
    max-width: 600px;
}

.review-content {
    padding: 2rem;
}

.review-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.review-images img {
    width: 100%;
    border-radius: 8px;
    cursor: pointer;
}

.review-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: center;
}

/* 图表容器 */
.charts-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

@media (max-width: 992px) {
    .charts-container {
        grid-template-columns: 1fr;
    }
}

.chart-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

/* 排行榜 */
.leaderboard {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.leaderboard-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
    align-items: center;
    padding: 0.8rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.rank {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 3rem;
    color: var(--gray-color);
}

.loading i {
    font-size: 2rem;
    margin-bottom: 1rem;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .admin-container {
        grid-template-columns: 1fr;
    }
    
    .admin-sidebar {
        display: none;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .submission-item {
        grid-template-columns: 1fr;
    }
}