/* 任务派发监测系统 - 全局样式 */

:root {
    --primary-color: #ff6600;
    --primary-light: #ff8533;
    --secondary-color: #ff9933;
    --bg-color: #f5f5f5;
    --card-bg: #ffffff;
    --text-color: #333333;
    --text-light: #666666;
    --text-lighter: #999999;
    --border-color: #e5e5e5;
    --success-color: #52c41a;
    --warning-color: #faad14;
    --error-color: #ff4d4f;
    --border-radius: 12px;
    --shadow: 0 2px 12px rgba(0,0,0,0.1);
}

* {
    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-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
}

/* 移动端容器 */
.mobile-container {
    max-width: 480px;
    margin: 0 auto;
    background: var(--bg-color);
    min-height: 100vh;
    position: relative;
}

/* 头部 */
.header {
    background: var(--card-bg);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-name {
    font-size: 18px;
    font-weight: bold;
    color: var(--primary-color);
}

.header-icons {
    display: flex;
    gap: 15px;
}

.header-icons i {
    font-size: 20px;
    color: var(--text-color);
    cursor: pointer;
}

/* 头部通知徽章 */
.header-icon-btn {
    position: relative;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 20px;
    cursor: pointer;
    padding: 0;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4444;
    color: white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    font-size: 10px;
    text-align: center;
    line-height: 16px;
    font-weight: bold;
}

/* 模态框 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: bold;
    color: var(--text-color);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-light);
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    text-align: right;
}

/* 通知列表 */
.notification-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notification-item {
    padding: 12px;
    background: #f9f9f9;
    border-radius: 8px;
    border-left: 3px solid var(--primary-color);
}

.notification-title {
    font-size: 14px;
    font-weight: bold;
    color: var(--text-color);
    margin-bottom: 6px;
}

.notification-content {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.4;
    margin-bottom: 8px;
}

.notification-time {
    font-size: 12px;
    color: var(--text-lighter);
}

/* 导航栏 */
.nav-bar {
    background: var(--card-bg);
    display: flex;
    padding: 0 15px;
    border-bottom: 1px solid var(--border-color);
}

.nav-item {
    flex: 1;
    text-align: center;
    padding: 12px 5px;
    font-size: 14px;
    color: var(--text-light);
    cursor: pointer;
    position: relative;
    transition: all 0.3s;
}

.nav-item.active {
    color: var(--primary-color);
    font-weight: 600;
}

.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* 公告栏 */
.notice-bar {
    background: linear-gradient(90deg, #fff7e6, #fff);
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px;
    border-radius: 20px;
    font-size: 13px;
}

.notice-bar i {
    color: var(--primary-color);
}

.notice-text {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--text-light);
}

/* 轮播图 */
.banner-swiper {
    margin: 10px;
    border-radius: var(--border-radius);
    overflow: hidden;
    height: 160px;
    position: relative;
}

.banner-swiper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
}

.banner-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    transition: all 0.3s;
}

.banner-dot.active {
    width: 16px;
    border-radius: 3px;
    background: #fff;
}

/* 标签页 */
.tab-bar {
    background: var(--card-bg);
    display: flex;
    padding: 0 20px;
    margin-top: 10px;
}

.tab-item {
    flex: 1;
    text-align: center;
    padding: 15px 5px;
    font-size: 15px;
    color: var(--text-light);
    cursor: pointer;
    position: relative;
    font-weight: 500;
}

.tab-item.active {
    color: var(--text-color);
}

.tab-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* 活动卡片 */
.activity-list {
    padding: 10px;
}

.activity-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 15px;
    margin-bottom: 10px;
    box-shadow: var(--shadow);
}

.activity-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.activity-category {
    font-size: 13px;
    color: var(--primary-color);
    background: rgba(255,102,0,0.1);
    padding: 3px 10px;
    border-radius: 12px;
}

.activity-title-section {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.activity-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.activity-info {
    flex: 1;
}

.activity-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.activity-tag {
    font-size: 11px;
    color: var(--primary-color);
    background: rgba(255,102,0,0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.activity-desc {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.5;
}

.activity-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 13px;
}

.meta-item {
    color: var(--text-light);
}

.meta-item span {
    color: var(--text-color);
}

.requirements-box {
    background: #f8f8f8;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.requirements-text {
    font-size: 13px;
    color: var(--text-light);
}

.requirements-points {
    font-size: 14px;
    color: var(--primary-color);
    font-weight: 600;
}

.activity-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.status-left {
    display: flex;
    gap: 15px;
    font-size: 13px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.status-item .number {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 16px;
}

.join-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    border: none;
    padding: 10px 25px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.join-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.join-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* 进度条 */
.progress-bar {
    width: 100%;
    height: 6px;
    background: #e5e5e5;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 3px;
    transition: width 0.3s;
}

/* 底部导航 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: var(--card-bg);
    display: flex;
    padding: 8px 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    z-index: 100;
}

.bottom-nav-item {
    flex: 1;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.bottom-nav-item i {
    font-size: 22px;
    color: var(--text-lighter);
    display: block;
    margin-bottom: 3px;
}

.bottom-nav-item span {
    font-size: 11px;
    color: var(--text-lighter);
}

.bottom-nav-item.active i,
.bottom-nav-item.active span {
    color: var(--primary-color);
}

/* 页面内容区域 */
.page-content {
    padding-bottom: 70px;
}

/* 积分兑换页面 */
.points-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    padding: 30px 20px;
    text-align: center;
}

.points-number {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 5px;
}

.points-label {
    font-size: 14px;
    opacity: 0.9;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 10px;
}

.product-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.product-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.product-info {
    padding: 12px;
}

.product-name {
    font-size: 14px;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-points {
    color: var(--primary-color);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
}

.exchange-btn {
    width: 100%;
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 8px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
}

/* 合作中心 */
.partner-list {
    padding: 10px;
}

.partner-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 15px;
    margin-bottom: 10px;
    box-shadow: var(--shadow);
    display: flex;
    gap: 15px;
}

.partner-logo {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.partner-info {
    flex: 1;
}

.partner-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
}

.partner-contact {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.partner-desc {
    font-size: 12px;
    color: var(--text-lighter);
    line-height: 1.5;
    margin-bottom: 10px;
}

.partner-link {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    padding: 6px 15px;
    border-radius: 15px;
    font-size: 12px;
    text-decoration: none;
}

/* 个人中心 */
.profile-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    padding: 30px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.profile-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.3);
    object-fit: cover;
}

.profile-info h3 {
    font-size: 18px;
    margin-bottom: 5px;
}

.profile-info p {
    font-size: 13px;
    opacity: 0.9;
}

.profile-stats {
    background: var(--card-bg);
    display: flex;
    padding: 20px 0;
    margin: 10px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.stat-item {
    flex: 1;
    text-align: center;
    border-right: 1px solid var(--border-color);
}

.stat-item:last-child {
    border-right: none;
}

.stat-value {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-light);
}

.menu-list {
    background: var(--card-bg);
    margin: 10px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.3s;
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-item:active {
    background: #f5f5f5;
}

.menu-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255,102,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
}

.menu-icon i {
    color: var(--primary-color);
    font-size: 18px;
}

.menu-text {
    flex: 1;
    font-size: 15px;
}

.menu-arrow {
    color: var(--text-lighter);
    font-size: 14px;
}

/* 登录页面 */
.login-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, #fff7e6, #fff);
}

.login-logo {
    text-align: center;
    margin-bottom: 40px;
}

.login-logo h1 {
    color: var(--primary-color);
    font-size: 28px;
    margin-bottom: 10px;
}

.login-form {
    background: var(--card-bg);
    padding: 30px 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

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

.form-label {
    display: block;
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s;
}

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

.agreement-section {
    margin-bottom: 20px;
}

.agreement-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-size: 13px;
}

.agreement-item input {
    margin-right: 8px;
}

.agreement-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.login-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: opacity 0.3s;
}

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

.form-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
}

.form-footer a {
    color: var(--primary-color);
    text-decoration: none;
}

/* 拍照页面 */
.camera-container {
    min-height: 100vh;
    background: #000;
    display: flex;
    flex-direction: column;
}

.camera-preview {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.camera-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.camera-overlay {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.verify-code {
    font-size: 36px;
    font-weight: bold;
    letter-spacing: 10px;
    margin-bottom: 10px;
}

.location-info {
    font-size: 14px;
    opacity: 0.9;
}

.camera-controls {
    padding: 20px;
    display: flex;
    justify-content: center;
    gap: 30px;
    background: rgba(0,0,0,0.8);
}

.camera-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid #fff;
    background: transparent;
    cursor: pointer;
    position: relative;
}

.camera-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    background: #fff;
    border-radius: 50%;
}

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

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--card-bg);
    width: 90%;
    max-width: 400px;
    border-radius: var(--border-radius);
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    font-size: 24px;
    color: var(--text-lighter);
    cursor: pointer;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn {
    padding: 10px 20px;
    border-radius: 6px;
    border: none;
    font-size: 14px;
    cursor: pointer;
    transition: opacity 0.3s;
}

.btn:hover {
    opacity: 0.9;
}

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

.btn-default {
    background: #f0f0f0;
    color: var(--text-color);
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    font-size: 60px;
    color: var(--border-color);
    margin-bottom: 15px;
}

.empty-state p {
    color: var(--text-lighter);
    font-size: 14px;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Toast提示 */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    z-index: 2000;
    display: none;
}

.toast.active {
    display: block;
}

/* 响应式适配 */
@media (min-width: 481px) {
    .mobile-container {
        box-shadow: 0 0 20px rgba(0,0,0,0.1);
    }
}

/* 隐藏滚动条但保留功能 */
::-webkit-scrollbar {
    width: 0;
    height: 0;
}
