/*
 * 视界画廊 - 样式文件
 * 作者：吴义振
 * 版本：1.0.0
 */

/* ==================== 基础样式重置 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f8f9fa;
    transition: background-color 0.3s, color 0.3s;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
}

/* 暗色主题 */
body.dark-theme {
    background: #121212;
    color: #e0e0e0;
}

/* ==================== 加载动画 ==================== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-content {
    text-align: center;
    color: white;
}

.loading-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    font-size: 24px;
}

.loading-logo i {
    font-size: 36px;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.loading-screen p {
    font-size: 16px;
    opacity: 0.9;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==================== 顶部导航栏 ==================== */
.main-header {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s;
}

.dark-theme .main-header {
    background: #1e1e1e;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.logo-text h1 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 2px;
    color: #333;
}

.dark-theme .logo-text h1 {
    color: #fff;
}

.logo-text p {
    font-size: 12px;
    color: #666;
    opacity: 0.8;
}

.dark-theme .logo-text p {
    color: #aaa;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.header-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #f5f5f5;
    color: #666;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.dark-theme .header-btn {
    background: #2d2d2d;
    color: #aaa;
}

.header-btn:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
}

.dark-theme .header-btn:hover {
    background: #3d3d3d;
}

/* 搜索容器 */
.search-container {
    padding: 0 20px 15px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: none;
}

.search-container.active {
    display: block;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border-radius: 25px;
    padding: 5px 15px;
    margin-bottom: 10px;
}

.dark-theme .search-box {
    background: #2d2d2d;
}

.search-box i {
    color: #999;
    margin-right: 10px;
}

.dark-theme .search-box i {
    color: #777;
}

#searchInput {
    flex: 1;
    border: none;
    background: none;
    padding: 12px 0;
    font-size: 16px;
    color: #333;
    outline: none;
}

.dark-theme #searchInput {
    color: #e0e0e0;
}

#searchInput::placeholder {
    color: #999;
}

.dark-theme #searchInput::placeholder {
    color: #777;
}

.search-clear {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 5px;
    font-size: 14px;
    transition: color 0.3s;
}

.search-clear:hover {
    color: #ff4757;
}

.search-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.suggestion-tag {
    background: #f0f0f0;
    color: #666;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.dark-theme .suggestion-tag {
    background: #2d2d2d;
    color: #aaa;
}

.suggestion-tag:hover {
    background: #667eea;
    color: white;
}

/* ==================== 主内容区域 ==================== */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding: 0 20px;
}

/* 导航选项卡 */
.tab-navigation {
    position: sticky;
    top: 60px;
    z-index: 999;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.dark-theme .tab-navigation {
    background: #1e1e1e;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.tabs-container {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0 10px;
}

.tabs-container::-webkit-scrollbar {
    display: none;
}

.tab-item {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 20px;
    color: #999;
    cursor: pointer;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
    min-width: 80px;
}

.dark-theme .tab-item {
    color: #aaa;
}

.tab-item i {
    font-size: 20px;
    margin-bottom: 5px;
}

.tab-item span {
    font-size: 12px;
    font-weight: 500;
}

.tab-item.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.tab-item:hover:not(.active) {
    color: #333;
}

.dark-theme .tab-item:hover:not(.active) {
    color: #fff;
}

/* 内容区域 */
.content-area {
    flex: 1;
    padding-bottom: 30px;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 页面头部 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 10px 0;
}

.section-header h2 {
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #333;
}

.dark-theme .section-header h2 {
    color: #fff;
}

.section-controls {
    display: flex;
    gap: 10px;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f5f5f5;
    border: none;
    border-radius: 20px;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.dark-theme .filter-btn {
    background: #2d2d2d;
    color: #aaa;
}

.filter-btn:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
}

.dark-theme .filter-btn:hover {
    background: #3d3d3d;
}

/* ==================== 图片网格 ==================== */
.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* 图片卡片 */
.image-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.dark-theme .image-card {
    background: #1e1e1e;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.image-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.dark-theme .image-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.card-image-container {
    position: relative;
    width: 100%;
    padding-top: 75%; /* 4:3 宽高比 */
    overflow: hidden;
}

.card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.image-card:hover .card-image {
    transform: scale(1.05);
}

.image-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 20px;
}

.dark-theme .image-loading {
    background: #2d2d2d;
    color: #666;
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    opacity: 0;
    transition: opacity 0.3s;
}

.image-card:hover .card-overlay {
    opacity: 1;
}

.quick-view-btn,
.like-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.like-btn {
    position: relative;
}

.like-count {
    position: absolute;
    bottom: -20px;
    font-size: 11px;
    color: white;
    font-weight: 500;
}

.quick-view-btn:hover {
    background: white;
    transform: scale(1.1);
}

.like-btn:hover,
.like-btn.liked {
    background: #ff4757;
    color: white;
}

.featured-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 卡片内容 */
.card-content {
    padding: 15px;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dark-theme .card-title {
    color: #fff;
}

.card-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dark-theme .card-description {
    color: #aaa;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #999;
}

.dark-theme .meta-item {
    color: #777;
}

.meta-item i {
    font-size: 11px;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.image-tag {
    background: #f0f0f0;
    color: #666;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
}

.dark-theme .image-tag {
    background: #2d2d2d;
    color: #aaa;
}

/* ==================== 加载状态 ==================== */
.loading-placeholder {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
}

.loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.dark-theme .loader-spinner {
    border-color: #2d2d2d;
    border-top-color: #667eea;
}

.loader p {
    color: #666;
    font-size: 14px;
}

.dark-theme .loader p {
    color: #aaa;
}

.no-results,
.error-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
}

.no-results i,
.error-message i {
    font-size: 48px;
    color: #999;
    margin-bottom: 20px;
}

.no-results h3,
.error-message h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #333;
}

.dark-theme .no-results h3,
.dark-theme .error-message h3 {
    color: #fff;
}

.no-results p,
.error-message p {
    color: #666;
    margin-bottom: 20px;
}

.dark-theme .no-results p,
.dark-theme .error-message p {
    color: #aaa;
}

.retry-btn {
    padding: 10px 25px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.retry-btn:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
}

/* ==================== 分页控制 ==================== */
.pagination-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 30px 0;
}

.pagination-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 25px;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.dark-theme .pagination-btn {
    background: #1e1e1e;
    border-color: #3d3d3d;
    color: #e0e0e0;
}

.pagination-btn:hover:not(:disabled) {
    background: #f5f5f5;
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-2px);
}

.dark-theme .pagination-btn:hover:not(:disabled) {
    background: #2d2d2d;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: #666;
}

.dark-theme .page-indicator {
    color: #aaa;
}

.page-indicator span:first-child {
    color: #667eea;
    font-weight: 600;
}

/* 加载更多 */
.load-more-container {
    text-align: center;
    margin: 20px 0 40px;
}

.load-more-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.load-more-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ==================== 分类网格 ==================== */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.category-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.dark-theme .category-card {
    background: #1e1e1e;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.dark-theme .category-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.category-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    flex-shrink: 0;
}

.category-info h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.dark-theme .category-info h3 {
    color: #fff;
}

.category-info p {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.dark-theme .category-info p {
    color: #aaa;
}

/* 即将上线样式 */
.coming-soon {
    text-align: center;
    padding: 60px 20px;
}

.coming-soon i {
    font-size: 48px;
    color: #999;
    margin-bottom: 20px;
}

.coming-soon h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #333;
}

.dark-theme .coming-soon h3 {
    color: #fff;
}

.coming-soon p {
    color: #666;
    margin-bottom: 25px;
    font-size: 15px;
}

.dark-theme .coming-soon p {
    color: #aaa;
}

.login-prompt-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.login-prompt-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

/* ==================== 图片模态框 ==================== */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    display: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.image-modal.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    max-width: 900px;
    margin: 0 auto;
    background: transparent;
    min-height: 100vh;
    position: relative;
}

.modal-header {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 10;
}

.modal-close-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.modal-title {
    flex: 1;
    padding: 0 20px;
}

.modal-title h3 {
    font-size: 18px;
    color: white;
    margin-bottom: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.modal-title p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

.modal-actions {
    display: flex;
    gap: 10px;
}

.modal-action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.modal-action-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.modal-action-btn.liked {
    background: #ff4757;
    color: white;
}

.modal-body {
    padding: 20px;
}

.image-container {
    position: relative;
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
    background: #000;
}

.image-container img {
    width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: contain;
    display: block;
}

#modalImageLoading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.image-details {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.image-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
}

.meta-item i {
    color: #667eea;
}

.image-description p {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin-bottom: 15px;
}

.image-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.modal-footer {
    padding: 20px;
}

.related-images h4 {
    color: white;
    font-size: 16px;
    margin-bottom: 15px;
    font-weight: 600;
}

.related-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.related-image-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 1;
}

.related-image-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.related-image-card:hover img {
    transform: scale(1.05);
}

.related-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    opacity: 0;
    transition: opacity 0.3s;
}

.related-image-card:hover .related-overlay {
    opacity: 1;
}

.loading-small {
    grid-column: 1 / -1;
    text-align: center;
    padding: 30px;
    color: rgba(255, 255, 255, 0.7);
}

.no-related {
    grid-column: 1 / -1;
    text-align: center;
    padding: 30px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
}

/* ==================== 侧边菜单 ==================== */
.side-menu {
    position: fixed;
    top: 0;
    right: -320px;
    width: 320px;
    height: 100%;
    background: white;
    z-index: 2001;
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
}

.dark-theme .side-menu {
    background: #1e1e1e;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
}

.side-menu.active {
    right: 0;
}

.menu-header {
    padding: 25px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #eee;
}

.dark-theme .menu-header {
    border-bottom-color: #3d3d3d;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.user-details h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.dark-theme .user-details h3 {
    color: #fff;
}

.user-details p {
    font-size: 13px;
    color: #666;
}

.dark-theme .user-details p {
    color: #aaa;
}

.menu-close-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: #f5f5f5;
    color: #666;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.dark-theme .menu-close-btn {
    background: #2d2d2d;
    color: #aaa;
}

.menu-close-btn:hover {
    background: #e0e0e0;
    transform: rotate(90deg);
}

.dark-theme .menu-close-btn:hover {
    background: #3d3d3d;
}

.menu-nav {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 15px 25px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s;
}

.dark-theme .menu-item {
    color: #e0e0e0;
}

.menu-item:hover {
    background: #f5f5f5;
    padding-left: 30px;
}

.dark-theme .menu-item:hover {
    background: #2d2d2d;
}

.menu-item i:first-child {
    width: 24px;
    margin-right: 15px;
    font-size: 18px;
    color: #667eea;
}

.menu-item span {
    flex: 1;
    font-size: 15px;
    font-weight: 500;
}

.menu-item i:last-child {
    color: #999;
    font-size: 14px;
}

.menu-footer {
    padding: 25px 20px;
    border-top: 1px solid #eee;
}

.dark-theme .menu-footer {
    border-top-color: #3d3d3d;
}

.login-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
    transition: all 0.3s;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.app-info {
    text-align: center;
}

.app-info p {
    font-size: 13px;
    color: #999;
    margin-bottom: 5px;
}

.dark-theme .app-info p {
    color: #777;
}

.copyright {
    font-size: 12px;
    opacity: 0.7;
}

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: none;
}

.menu-overlay.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* ==================== 筛选面板 ==================== */
.filter-panel {
    position: fixed;
    bottom: -100%;
    left: 0;
    width: 100%;
    background: white;
    border-radius: 20px 20px 0 0;
    z-index: 2001;
    transition: bottom 0.3s ease;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.dark-theme .filter-panel {
    background: #1e1e1e;
}

.filter-panel.active {
    bottom: 0;
}

.filter-header {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #eee;
}

.dark-theme .filter-header {
    border-bottom-color: #3d3d3d;
}

.filter-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.dark-theme .filter-header h3 {
    color: #fff;
}

.filter-close-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: #f5f5f5;
    color: #666;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.dark-theme .filter-close-btn {
    background: #2d2d2d;
    color: #aaa;
}

.filter-close-btn:hover {
    background: #e0e0e0;
    transform: rotate(90deg);
}

.dark-theme .filter-close-btn:hover {
    background: #3d3d3d;
}

.filter-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.filter-section {
    margin-bottom: 25px;
}

.filter-section h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.dark-theme .filter-section h4 {
    color: #fff;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 8px 0;
}

.filter-option input[type="radio"],
.filter-option input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #667eea;
}

.filter-option span {
    flex: 1;
    font-size: 15px;
    color: #555;
}

.dark-theme .filter-option span {
    color: #ccc;
}

.filter-footer {
    padding: 20px;
    display: flex;
    gap: 15px;
    border-top: 1px solid #eee;
}

.dark-theme .filter-footer {
    border-top-color: #3d3d3d;
}

.filter-reset-btn {
    flex: 1;
    padding: 12px;
    background: #f5f5f5;
    border: none;
    border-radius: 25px;
    color: #666;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.dark-theme .filter-reset-btn {
    background: #2d2d2d;
    color: #aaa;
}

.filter-reset-btn:hover {
    background: #e0e0e0;
}

.dark-theme .filter-reset-btn:hover {
    background: #3d3d3d;
}

.filter-apply-btn {
    flex: 1;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-apply-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.filter-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: none;
}

.filter-overlay.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* ==================== 底部信息栏 ==================== */
.main-footer {
    background: white;
    padding: 30px 20px;
    text-align: center;
    border-top: 1px solid #eee;
    margin-top: auto;
}

.dark-theme .main-footer {
    background: #1e1e1e;
    border-top-color: #3d3d3d;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 20px;
    font-weight: 700;
    color: #333;
}

.dark-theme .footer-logo {
    color: #fff;
}

.footer-logo i {
    color: #667eea;
}

.footer-slogan {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
}

.dark-theme .footer-slogan {
    color: #aaa;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.footer-link {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.dark-theme .footer-link {
    color: #aaa;
}

.footer-link:hover {
    color: #667eea;
}

.footer-copyright {
    color: #999;
    font-size: 12px;
}

.dark-theme .footer-copyright {
    color: #777;
}

/* ==================== 回到顶部按钮 ==================== */
.scroll-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    font-size: 18px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transition: all 0.3s;
    z-index: 999;
}

.scroll-top-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* ==================== 提示消息 ==================== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    min-width: 200px;
    padding: 15px 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 10px;
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.3s;
}

.dark-theme .toast {
    background: #2d2d2d;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-info {
    border-left: 4px solid #3498db;
}

.toast-success {
    border-left: 4px solid #2ecc71;
}

.toast-warning {
    border-left: 4px solid #f39c12;
}

.toast-error {
    border-left: 4px solid #e74c3c;
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 768px) {
    .header-container {
        padding: 12px 15px;
    }

    .logo-text h1 {
        font-size: 16px;
    }

    .logo-text p {
        font-size: 11px;
    }

    .tab-item {
        padding: 12px 15px;
        min-width: 70px;
    }

    .tab-item i {
        font-size: 18px;
    }

    .tab-item span {
        font-size: 11px;
    }

    .images-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
    }

    .section-header h2 {
        font-size: 18px;
    }

    .filter-btn {
        padding: 6px 12px;
        font-size: 13px;
    }

    .categories-grid {
        grid-template-columns: 1fr;
    }

    .category-card {
        padding: 20px;
    }

    .modal-content {
        margin: 0;
    }

    .modal-header {
        padding: 15px;
    }

    .modal-body {
        padding: 15px;
    }

    .modal-title h3 {
        font-size: 16px;
    }

    .modal-title p {
        font-size: 12px;
    }

    .image-details {
        padding: 15px;
    }

    .side-menu {
        width: 280px;
        right: -280px;
    }

    .related-images-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .scroll-top-btn {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 16px;
    }

    .pagination-btn {
        padding: 8px 15px;
        font-size: 13px;
    }

    .page-indicator {
        font-size: 13px;
    }

    .load-more-btn {
        padding: 10px 25px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .images-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .section-controls {
        width: 100%;
        justify-content: flex-end;
    }

    .pagination-controls {
        flex-direction: column;
        gap: 15px;
    }

    .pagination-btn {
        width: 100%;
        justify-content: center;
    }

    .related-images-grid {
        grid-template-columns: 1fr;
    }

    .search-suggestions {
        justify-content: center;
    }
}

/* 列表视图 */
.images-grid.list-view {
    grid-template-columns: 1fr;
}

.images-grid.list-view .image-card {
    display: flex;
    max-width: 100%;
}

.images-grid.list-view .card-image-container {
    flex: 0 0 200px;
    padding-top: 0;
    height: 150px;
}

.images-grid.list-view .card-content {
    flex: 1;
}

.images-grid.list-view .card-overlay {
    display: none;
}

.images-grid.list-view .image-card:hover {
    transform: none;
}

@media (max-width: 768px) {
    .images-grid.list-view .image-card {
        flex-direction: column;
    }

    .images-grid.list-view .card-image-container {
        flex: 0 0 auto;
        height: auto;
        padding-top: 75%;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.dark-theme ::-webkit-scrollbar-track {
    background: #2d2d2d;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.dark-theme ::-webkit-scrollbar-thumb {
    background: #555;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

.dark-theme ::-webkit-scrollbar-thumb:hover {
    background: #666;
}