/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: rgba(46, 125, 50, 0.2);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8f4 100%);
    min-height: 100vh;
    color: #1b5e20;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    touch-action: manipulation;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 导航栏 */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand a {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2e7d32;
    text-decoration: none;
}

.navbar-menu {
    display: flex;
    gap: 20px;
    align-items: center;
}

.navbar-item {
    color: #666;
    text-decoration: none;
    transition: color 0.3s;
}

.navbar-item:hover {
    color: #2e7d32;
}

/* 主内容区 */
.main-content {
    padding: 30px 15px;
    min-height: calc(100vh - 160px);
}

/* 提示消息 */
.flash-messages {
    margin-bottom: 20px;
}

.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
}

.close-btn:hover {
    opacity: 1;
}

/* 登录页面 */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
}

.login-card {
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: #2e7d32;
    font-size: 2rem;
    margin-bottom: 10px;
}

.login-header p {
    color: #999;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-footer {
    margin-top: 20px;
    text-align: center;
}

.text-muted {
    color: #999;
    font-size: 0.9rem;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #2e7d32;
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

/* 防止移动端双击缩放 */
input, button, select, textarea {
    touch-action: manipulation;
}

/* 优化触摸滚动 */
.table-responsive,
.history-table-wrapper,
.modal-body {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

/* 图片加载优化 */
img {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

/* 按钮样式 */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: #2e7d32;
    color: white;
}

.btn-primary:hover {
    background: #1b5e20;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(46, 125, 50, 0.4);
}

.btn-success {
    background: #51cf66;
    color: white;
}

.btn-success:hover {
    background: #40c057;
}

.btn-danger {
    background: #ff6b6b;
    color: white;
}

.btn-danger:hover {
    background: #fa5252;
}

.btn-delete {
    background: #868e96;
    color: white;
}

.btn-delete:hover {
    background: #495057;
}

.btn-reward {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 1.1rem;
    padding: 15px 40px;
    margin-top: 20px;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.btn-reward:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.btn-warning {
    background: #ffd43b;
    color: #333;
}

.btn-warning:hover {
    background: #fcc419;
}

.btn-secondary {
    background: #868e96;
    color: white;
}

.btn-secondary:hover {
    background: #495057;
}

.btn-block {
    width: 100%;
    display: block;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.875rem;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 用户仪表盘 */
.user-dashboard {
    max-width: 600px;
    margin: 0 auto;
}

.dashboard-header {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.dashboard-header h2 {
    color: #2e7d32;
    margin-bottom: 10px;
}

/* 上传区域 */
.upload-section {
    margin-bottom: 30px;
}

.upload-card {
    background: white;
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.upload-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.upload-card h3 {
    color: #333;
    margin-bottom: 10px;
}

.file-input-wrapper {
    margin: 30px 0;
}

.file-input-wrapper input[type="file"] {
    display: none;
}

.file-input-wrapper label {
    cursor: pointer;
    margin: 0;
}

.image-preview {
    margin: 20px 0;
    border-radius: 10px;
    overflow: hidden;
    max-width: 100%;
}

.image-preview img {
    width: 100%;
    height: auto;
    display: block;
}

.upload-progress {
    margin-top: 20px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2e7d32;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 状态卡片 */
.status-card {
    background: white;
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.status-icon {
    font-size: 5rem;
    margin-bottom: 20px;
}

.status-card h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.photo-info {
    margin: 30px 0;
    text-align: left;
}

.uploaded-photo {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 20px;
}

.info-text p {
    margin: 10px 0;
    color: #666;
}

/* 徽章 */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
}

.badge-primary {
    background: #2e7d32;
    color: white;
}

.badge-secondary {
    background: #868e96;
    color: white;
}

.badge-success {
    background: #51cf66;
    color: white;
}

.badge-warning {
    background: #ffd43b;
    color: #333;
}

.badge-danger {
    background: #ff6b6b;
    color: white;
}

/* 管理员后台 */
.admin-dashboard {
    max-width: 1200px;
    margin: 0 auto;
}

.section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.section h3 {
    color: #2e7d32;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 1.1rem;
}

/* 照片网格 */
.photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.photo-card {
    border: 2px solid #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.photo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.photo-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: #f5f5f5;
}

.photo-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-details {
    padding: 15px;
    background: #fafafa;
}

.photo-details p {
    margin: 5px 0;
    font-size: 0.9rem;
    color: #666;
}

.photo-actions {
    padding: 15px;
}

.review-form textarea {
    margin-bottom: 10px;
}

.button-group {
    display: flex;
    gap: 10px;
}

.button-group button {
    flex: 1;
}

/* 表格样式 */
.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.data-table thead {
    background: #f8f9fa;
}

.data-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #555;
    border-bottom: 2px solid #dee2e6;
}

.data-table td {
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
    vertical-align: middle;
}

.data-table tbody tr:hover {
    background: #f8f9fa;
}

.table-photo {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
}

/* 用户管理 */
.user-management {
    max-width: 1200px;
    margin: 0 auto;
}

.add-user-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
}

.add-user-form {
    max-width: 100%;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    align-items: end;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.action-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #2e7d32;
}

.modal-body {
    padding: 30px;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #dee2e6;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* 图片预览模态框 */
.image-modal-content {
    max-width: 90vw;
    max-height: 90vh;
}

.image-preview-body {
    padding: 20px;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.image-preview-body img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
}

/* 页脚 */
.footer {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px 0;
    text-align: center;
    color: #666;
    margin-top: auto;
}

/* 响应式设计 - 移动端适配 */
@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        gap: 10px;
    }
    
    .navbar-menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .navbar-item {
        font-size: 0.9rem;
    }
    
    .login-card {
        padding: 30px 20px;
    }
    
    .dashboard-header {
        padding: 20px;
    }
    
    .dashboard-header h2 {
        font-size: 1.5rem;
    }
    
    .upload-card {
        padding: 25px 15px;
    }
    
    .upload-icon {
        font-size: 3rem;
    }
    
    .status-icon {
        font-size: 3.5rem;
    }
    
    .status-card {
        padding: 25px 15px;
    }
    
    .status-card h3 {
        font-size: 1.4rem;
    }
    
    .photos-grid {
        grid-template-columns: 1fr;
    }
    
    .section {
        padding: 20px 15px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .data-table {
        font-size: 0.85rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px 5px;
    }
    
    .table-photo {
        width: 50px;
        height: 50px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons .btn-sm {
        width: 100%;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .modal-content {
        width: 95%;
        margin: 0 10px;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 15px 20px;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 14px;
    }
    
    .navbar-brand a {
        font-size: 1.2rem;
    }
    
    .btn {
        padding: 10px 18px;
        font-size: 0.9rem;
    }
    
    .form-control {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    
    .login-header h1 {
        font-size: 1.6rem;
    }
    
    .status-card h3 {
        font-size: 1.2rem;
    }
    
    .data-table {
        font-size: 0.75rem;
    }
    
    .badge {
        font-size: 0.75rem;
        padding: 3px 8px;
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .btn {
        min-height: 44px;
    }
    
    .form-control {
        min-height: 44px;
    }
    
    .navbar-item {
        padding: 8px 12px;
    }
}

/* 进度条样式 */
.progress-bar {
    width: 100%;
    height: 20px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 15px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2e7d32, #4caf50);
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.85rem;
    font-weight: bold;
}

/* 地点信息卡片 */
.location-info-card {
    background: linear-gradient(135deg, #2e7d32, #4caf50);
    color: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(46, 125, 50, 0.3);
}

.location-badge-large {
    display: inline-block;
    background: rgba(255, 255, 255, 0.3);
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: bold;
    margin-bottom: 10px;
}

.location-info-card h3 {
    margin: 10px 0;
    font-size: 1.8rem;
}

.location-description {
    font-size: 1.1rem;
    margin: 15px 0;
    opacity: 0.95;
}

.clue-box {
    background: rgba(255, 255, 255, 0.2);
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
    border-left: 4px solid white;
}

.clue-box h4 {
    margin-top: 0;
    margin-bottom: 10px;
}

.clue-box p {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.6;
}

/* 完成状态卡片 */
.status-completed {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #333;
}

.completed-locations {
    margin-top: 30px;
    text-align: left;
    background: white;
    padding: 20px;
    border-radius: 10px;
}

.completed-locations h4 {
    color: #2e7d32;
    margin-bottom: 15px;
}

.completed-item {
    padding: 10px;
    margin: 8px 0;
    background: #f5f5f5;
    border-radius: 8px;
    border-left: 4px solid #2e7d32;
}

.location-badge {
    display: inline-block;
    background: #2e7d32;
    color: white;
    padding: 3px 10px;
    border-radius: 5px;
    font-size: 0.85rem;
    margin-right: 10px;
}

/* 历史记录样式 */
.history-section {
    margin-top: 30px;
    padding: 25px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.history-section h3 {
    color: #2e7d32;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e8f5e9;
}

.history-table-wrapper {
    overflow-x: auto;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.history-table thead {
    background: #e8f5e9;
}

.history-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #1b5e20;
    border-bottom: 2px solid #2e7d32;
}

.history-table td {
    padding: 12px;
    border-bottom: 1px solid #e0e0e0;
}

.history-table tr:hover {
    background: #f5f5f5;
}

.history-thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #ddd;
    transition: transform 0.3s;
}

.history-thumbnail:hover {
    transform: scale(1.1);
    border-color: #2e7d32;
}

/* 用户照片分组样式 */
.user-photos-section {
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-left: 4px solid #2e7d32;
}

.user-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e8f5e9;
}

.user-header h4 {
    color: #1b5e20;
    margin: 0;
    font-size: 1.3rem;
}

.user-stats {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.stat-badge {
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    background: #e8f5e9;
    color: #1b5e20;
    font-weight: 600;
}

.stat-badge.badge-success {
    background: #c8e6c9;
    color: #2e7d32;
}

.stat-badge.badge-warning {
    background: #fff9c4;
    color: #f57f17;
}

.stat-badge.badge-danger {
    background: #ffcdd2;
    color: #c62828;
}

/* 小按钮样式 */
.btn-sm {
    padding: 5px 10px;
    font-size: 0.85rem;
    margin: 0 2px;
}

/* 响应式表格 */
@media (max-width: 768px) {
    .history-table, .data-table {
        font-size: 0.85rem;
    }
    
    .history-thumbnail, .table-photo {
        width: 60px;
        height: 60px;
    }
    
    .user-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .user-stats {
        margin-top: 10px;
    }
}

/* ============================================ */
/* 移动端全面适配样式 */
/* ============================================ */

/* 平板设备适配 (768px - 1024px) */
@media (max-width: 1024px) {
    .container {
        max-width: 100%;
        padding: 0 20px;
    }
    
    .main-content {
        padding: 20px 10px;
    }
}

/* 移动设备适配 (最大 768px) */
@media (max-width: 768px) {
    /* 导航栏 */
    .navbar {
        padding: 12px 0;
    }
    
    .navbar .container {
        flex-wrap: wrap;
        padding: 0 10px;
    }
    
    .navbar-brand a {
        font-size: 1.2rem;
    }
    
    .navbar-menu {
        flex-wrap: wrap;
        gap: 10px;
        font-size: 0.9rem;
    }
    
    /* 主内容 */
    .main-content {
        padding: 15px 10px;
    }
    
    .container {
        padding: 0 10px;
    }
    
    /* 仪表板标题 */
    .dashboard-header h2 {
        font-size: 1.5rem;
    }
    
    .dashboard-header p {
        font-size: 0.9rem;
    }
    
    /* 进度条 */
    .progress-bar {
        height: 20px;
    }
    
    /* 位置信息卡片 */
    .location-info-card {
        padding: 20px 15px;
    }
    
    .location-badge-large {
        font-size: 1rem;
        padding: 8px 15px;
    }
    
    .location-info-card h3 {
        font-size: 1.3rem;
    }
    
    .clue-box {
        padding: 12px;
    }
    
    /* 上传区域 */
    .upload-card {
        padding: 20px 15px;
    }
    
    .upload-icon {
        font-size: 3rem;
    }
    
    .upload-card h3 {
        font-size: 1.2rem;
    }
    
    /* 状态卡片 */
    .status-card {
        padding: 20px 15px;
    }
    
    .status-icon {
        font-size: 3rem;
    }
    
    .status-card h3 {
        font-size: 1.3rem;
    }
    
    .uploaded-photo {
        max-width: 100%;
        max-height: 250px;
    }
    
    /* 照片网格 */
    .photos-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .photo-card {
        padding: 15px;
    }
    
    /* 表格 */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .data-table {
        min-width: 600px;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px;
        font-size: 0.85rem;
    }
    
    /* 按钮 */
    .btn {
        padding: 10px 20px;
        font-size: 0.95rem;
    }
    
    .btn-block {
        width: 100%;
    }
    
    .button-group {
        flex-direction: column;
        gap: 8px;
    }
    
    .button-group .btn {
        width: 100%;
    }
    
    /* 表单 */
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-control {
        font-size: 16px; /* 防止iOS自动缩放 */
    }
    
    textarea.form-control {
        font-size: 16px;
    }
    
    /* 登录卡片 */
    .login-card {
        padding: 25px 20px;
        margin: 20px 10px;
    }
    
    .login-card h2 {
        font-size: 1.5rem;
    }
    
    /* 管理员仪表板 */
    .admin-dashboard .section {
        padding: 15px;
    }
    
    .admin-dashboard h3 {
        font-size: 1.2rem;
    }
    
    /* 用户管理 */
    .users-grid {
        grid-template-columns: 1fr;
    }
    
    /* 地点管理 */
    .locations-grid {
        grid-template-columns: 1fr;
    }
    
    .location-card {
        padding: 15px;
    }
    
    /* 模态框 */
    .modal-content {
        width: 95%;
        margin: 10px;
        padding: 15px;
    }
    
    .modal-header h3 {
        font-size: 1.2rem;
    }
    
    .image-modal-content {
        width: 95%;
        max-width: none;
    }
    
    .modal-body img {
        max-height: 60vh;
    }
    
    /* 已完成地点 */
    .completed-locations {
        padding: 15px;
    }
    
    .completed-item {
        padding: 10px;
        font-size: 0.9rem;
    }
    
    /* 历史记录 */
    .history-section {
        padding: 15px;
        margin-top: 20px;
    }
    
    .history-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .history-table {
        min-width: 600px;
        font-size: 0.85rem;
    }
    
    .history-table th,
    .history-table td {
        padding: 8px;
    }
    
    /* 徽章 */
    .badge {
        font-size: 0.75rem;
        padding: 4px 8px;
    }
    
    .location-badge {
        font-size: 0.75rem;
        padding: 2px 8px;
    }
    
    /* 文件输入 */
    .file-input-wrapper {
        margin: 15px 0;
    }
    
    .file-input-wrapper label {
        width: 100%;
        padding: 12px;
        font-size: 1rem;
    }
    
    /* 图片预览 */
    .image-preview {
        margin: 15px 0;
    }
    
    .image-preview img {
        max-height: 300px;
    }
}

/* 小屏手机适配 (最大 480px) */
@media (max-width: 480px) {
    /* 导航栏 */
    .navbar-brand a {
        font-size: 1.1rem;
    }
    
    .navbar-menu {
        width: 100%;
        justify-content: center;
        margin-top: 10px;
        gap: 8px;
    }
    
    .navbar-item {
        font-size: 0.85rem;
    }
    
    /* 标题 */
    .dashboard-header h2 {
        font-size: 1.3rem;
    }
    
    h3 {
        font-size: 1.1rem;
    }
    
    h4 {
        font-size: 1rem;
    }
    
    /* 位置信息 */
    .location-info-card h3 {
        font-size: 1.2rem;
    }
    
    .location-description {
        font-size: 0.9rem;
    }
    
    /* 上传卡片 */
    .upload-card h3 {
        font-size: 1.1rem;
    }
    
    .text-muted {
        font-size: 0.85rem;
    }
    
    /* 状态卡片 */
    .status-card h3 {
        font-size: 1.2rem;
    }
    
    .photo-info .info-text p {
        font-size: 0.85rem;
    }
    
    /* 按钮 */
    .btn {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    /* 表格 */
    .history-table,
    .data-table {
        font-size: 0.75rem;
    }
    
    .history-thumbnail,
    .table-photo {
        width: 50px;
        height: 50px;
    }
    
    /* 用户统计 */
    .user-stats {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .stat-badge {
        font-size: 0.75rem;
        padding: 4px 10px;
    }
    
    /* 登录卡片 */
    .login-card {
        padding: 20px 15px;
    }
    
    .login-card h2 {
        font-size: 1.3rem;
    }
    
    /* 模态框 */
    .modal-content {
        width: 98%;
        margin: 5px;
        padding: 10px;
    }
    
    .modal-header {
        padding: 10px;
    }
    
    .modal-body {
        padding: 10px;
    }
    
    .close-btn {
        font-size: 1.5rem;
        padding: 5px 10px;
    }
    
    /* 空状态 */
    .empty-state {
        padding: 30px 15px;
        font-size: 0.9rem;
    }
}

/* 横屏适配 */
@media (max-height: 600px) and (orientation: landscape) {
    .modal-body img {
        max-height: 50vh;
    }
    
    .uploaded-photo {
        max-height: 200px;
    }
    
    .image-preview img {
        max-height: 200px;
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    /* 增大触摸目标 */
    .btn,
    .navbar-item,
    a {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    /* 移除悬停效果 */
    .btn:hover,
    .navbar-item:hover {
        transform: none;
    }
    
    /* 添加点击反馈 */
    .btn:active {
        transform: scale(0.95);
    }
    
    /* 改进滚动性能 */
    .table-responsive,
    .history-table-wrapper {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }
}

/* 超小屏设备 (最大 360px) */
@media (max-width: 360px) {
    .navbar-brand a {
        font-size: 1rem;
    }
    
    .dashboard-header h2 {
        font-size: 1.2rem;
    }
    
    .location-info-card,
    .upload-card,
    .status-card {
        padding: 15px 10px;
    }
    
    .btn {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    
    .history-table,
    .data-table {
        font-size: 0.7rem;
    }
    
    .history-table th,
    .history-table td,
    .data-table th,
    .data-table td {
        padding: 6px;
    }
}

/* 任务相关样式 */
.task-badge {
    background: linear-gradient(135deg, #2e7d32 0%, #43a047 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
    margin-right: 8px;
}

.route-description {
    color: #666;
    font-size: 1rem;
    margin: 10px 0 15px 0;
    font-style: italic;
}

.clue-image-wrapper {
    margin-top: 15px;
    text-align: center;
}

.clue-image {
    max-width: 100%;
    max-height: 400px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-bottom: 8px;
    transition: transform 0.3s ease;
}

.clue-image:hover {
    transform: scale(1.02);
}

.completed-tasks-section {
    margin-top: 30px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.completed-tasks-section h3 {
    color: #2e7d32;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.completed-tasks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.completed-task-card {
    padding: 15px;
    background: #f1f8f4;
    border-radius: 8px;
    border-left: 4px solid #2e7d32;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.completed-task-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.15);
}

.completed-task-card strong {
    display: block;
    margin: 8px 0 5px 0;
    color: #1b5e20;
    font-size: 1.05rem;
}

.completed-task-card .text-muted {
    font-size: 0.9rem;
    color: #666;
}

/* 线路管理页面样式 */
.routes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.route-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.route-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.route-card h3 {
    color: #2e7d32;
    margin-bottom: 10px;
}

.route-card .route-order {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 10px;
}

.route-card .route-description {
    color: #666;
    margin: 10px 0;
    min-height: 40px;
}

.route-card .route-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.route-card .btn-small {
    padding: 6px 12px;
    font-size: 0.85rem;
}

/* 任务管理页面样式 */
.tasks-list {
    margin-top: 20px;
}

.task-item {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border-left: 4px solid #2e7d32;
}

.task-item h4 {
    color: #2e7d32;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.task-item .task-clue {
    background: #f1f8f4;
    padding: 12px;
    border-radius: 8px;
    margin: 10px 0;
    font-style: italic;
    color: #1b5e20;
}

.task-item .task-clue-image {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    margin-top: 10px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.task-item .task-clue-image:hover {
    transform: scale(1.05);
}

.task-item .task-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

/* 打印样式 */
@media print {
    .navbar,
    .navbar-menu,
    .btn,
    button,
    .upload-section,
    .modal {
        display: none !important;
    }
    
    .main-content {
        padding: 0;
    }
    
    .container {
        max-width: 100%;
    }
    
    .photo-card,
    .status-card {
        page-break-inside: avoid;
    }
}


