/* LBS定位打卡任务平台 - 统一样式文件 */

* {
    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: #f5f5f5;
    color: #333;
    font-size: 14px;
    line-height: 1.5;
}

a {
    text-decoration: none;
    color: inherit;
}

input, button, select, textarea {
    font-family: inherit;
    font-size: inherit;
    outline: none;
}

input[type="text"],
input[type="password"],
input[type="tel"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #fff;
    transition: border-color 0.3s;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #1890ff;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

/* 容器 */
.container {
    max-width: 750px;
    margin: 0 auto;
    padding: 15px;
    padding-bottom: 70px;
}

/* 页面头部 */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: #fff;
    margin-bottom: 15px;
}

.page-header h1 {
    font-size: 18px;
    font-weight: 600;
}

.back-btn {
    font-size: 20px;
    color: #333;
    padding: 5px 10px;
}

/* 卡片 */
.card {
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #1890ff, #70b5ff);
    color: #fff;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1677cc, #5aabff);
}

.btn-success {
    background: linear-gradient(135deg, #52c41a, #73d13d);
    color: #fff;
}

.btn-danger {
    background: linear-gradient(135deg, #ff4d4f, #ff7875);
    color: #fff;
}

.btn-outline {
    background: #fff;
    border: 1px solid #ddd;
    color: #666;
}

.btn-outline:hover {
    border-color: #1890ff;
    color: #1890ff;
}

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

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

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

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #666;
}

/* 列表 */
.list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

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

/* 底部导航 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    background: #fff;
    border-top: 1px solid #eee;
    z-index: 100;
    max-width: 750px;
    margin: 0 auto;
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 0;
    color: #999;
    font-size: 12px;
}

.bottom-nav-item i {
    font-size: 22px;
    margin-bottom: 4px;
}

.bottom-nav-item.active {
    color: #1890ff;
}

/* 任务卡片 */
.task-card {
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.task-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 10px;
}

.task-card-title {
    font-size: 16px;
    font-weight: 600;
    flex: 1;
}

.task-card-status {
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 10px;
}

.task-card-status.pending {
    background: #fff7e6;
    color: #fa8c16;
}

.task-card-status.completed {
    background: #f6ffed;
    color: #52c41a;
}

.task-card-info {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 13px;
    color: #999;
    margin-bottom: 12px;
}

.task-card-info span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 进度条 */
.progress-bar {
    height: 6px;
    background: #f0f0f0;
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar-inner {
    height: 100%;
    background: linear-gradient(135deg, #1890ff, #70b5ff);
    border-radius: 3px;
    transition: width 0.3s;
}

/* 地图容器 */
#map-container {
    width: 100%;
    height: 400px;
    background: #eaeaea;
}

/* 点位列表 */
.point-list {
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    margin-top: 15px;
}

.point-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 10px;
    background: #f9f9f9;
}

.point-item.active {
    background: #e6f7ff;
    border: 1px solid #91d5ff;
}

.point-item.completed {
    background: #f6ffed;
    border: 1px solid #b7eb8f;
}

.point-item.locked {
    background: #f5f5f5;
    opacity: 0.6;
}

.point-name {
    font-size: 14px;
    font-weight: 500;
}

.point-distance {
    font-size: 12px;
    color: #999;
}

.point-status {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.point-status.active {
    background: #1890ff;
    color: #fff;
}

.point-status.completed {
    background: #52c41a;
    color: #fff;
}

.point-status.locked {
    background: #d9d9d9;
    color: #fff;
}

/* 弹窗 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    width: 90%;
    max-width: 350px;
    transform: scale(0.9);
    transition: transform 0.3s;
}

.modal-overlay.show .modal-content {
    transform: scale(1);
}

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

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

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

.modal-body {
    margin-bottom: 20px;
}

.modal-footer {
    display: flex;
    gap: 10px;
}

/* 登录页 */
.login-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 30px;
    background: linear-gradient(180deg, #e6f7ff 0%, #fff 100%);
}

.login-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1890ff, #70b5ff);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 36px;
    color: #fff;
}

.login-title {
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 30px;
}

.login-form {
    background: #fff;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.login-code-group {
    display: flex;
    gap: 10px;
}

.login-code-group input {
    flex: 1;
}

.login-code-btn {
    padding: 12px 15px;
    border-radius: 8px;
    background: #f0f0f0;
    color: #666;
    font-size: 13px;
    white-space: nowrap;
}

.login-code-btn.active {
    background: #e6f7ff;
    color: #1890ff;
}

/* 用户信息 */
.user-info {
    display: flex;
    align-items: center;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    margin-bottom: 15px;
}

.user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #f0f0f0;
    margin-right: 15px;
    overflow: hidden;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-details h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
}

.user-details p {
    font-size: 13px;
    color: #999;
}

/* 统计 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.stat-item {
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
}

.stat-value {
    font-size: 24px;
    font-weight: 600;
    color: #1890ff;
    margin-bottom: 5px;
}

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

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: #999;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 15px;
    color: #d9d9d9;
}

.empty-state p {
    font-size: 14px;
    margin-bottom: 15px;
}

/* 提示消息 */
.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: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.toast.show {
    opacity: 1;
    visibility: visible;
}

/* 加载中 */
.loading {
    text-align: center;
    padding: 30px;
    color: #999;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-top-color: #1890ff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

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

/* 管理后台 */
.admin-header {
    background: linear-gradient(135deg, #1890ff, #70b5ff);
    color: #fff;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.admin-header h2 {
    font-size: 18px;
    margin-bottom: 5px;
}

.admin-header p {
    font-size: 13px;
    opacity: 0.8;
}

.admin-form {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
}

.admin-form h3 {
    font-size: 16px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

/* 辅助类 */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-primary { color: #1890ff; }
.text-success { color: #52c41a; }
.text-danger { color: #ff4d4f; }
.text-warning { color: #fa8c16; }
.text-muted { color: #999; }

.mt-10 { margin-top: 10px; }
.mt-15 { margin-top: 15px; }
.mt-20 { margin-top: 20px; }
.mb-10 { margin-bottom: 10px; }
.mb-15 { margin-bottom: 15px; }
.mb-20 { margin-bottom: 20px; }

.flex { display: flex; }
.flex-1 { flex: 1; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-10 { gap: 10px; }
.gap-15 { gap: 15px; }

/* 答题页面 */
.question-box {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
}

.question-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    padding-left: 10px;
    border-left: 4px solid #1890ff;
}

.question-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.question-option {
    padding: 15px;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.question-option:hover {
    border-color: #1890ff;
    background: #f0f7ff;
}

.question-option.selected {
    border-color: #1890ff;
    background: #e6f7ff;
    color: #1890ff;
}

.question-option.correct {
    border-color: #52c41a;
    background: #f6ffed;
    color: #52c41a;
}

.question-option.incorrect {
    border-color: #ff4d4f;
    background: #fff2f0;
    color: #ff4d4f;
}

/* 响应式 */
@media screen and (max-width: 480px) {
    body {
        font-size: 13px;
    }

    .container {
        padding: 10px;
        padding-bottom: 70px;
    }

    .login-container {
        padding: 20px;
    }
}