/* 基础样式与重置 */
:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --gray-color: #95a5a6;
    --text-color: #333;
    --text-light: #777;
    --bg-color: #fff;
    --bg-secondary: #f8f9fa;
    --border-color: #e0e0e0;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --radius: 8px;
    --transition: all 0.3s ease;
}

[data-theme="dark"] {
    --text-color: #f0f0f0;
    --text-light: #b0b0b0;
    --bg-color: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --border-color: #404040;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: var(--transition);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: #2980b9;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    text-align: center;
    font-size: 0.9rem;
    transition: var(--transition);
}

.btn:hover {
    background-color: #2980b9;
    color: white;
}

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

.btn-secondary:hover {
    background-color: #27ae60;
}

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

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

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

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

/* 头部样式 */
.header {
    background: linear-gradient(135deg, var(--primary-color), #6c5ce7);
    box-shadow: var(--shadow);
    position: sticky;
    /*top: 0;*/
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo h1 {
    font-size: 1.5rem;
    margin: 0;
}

.logo a {
    color: white;
    text-decoration: none;
}

.nav-list {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary-color);
}

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.5rem;
    border-radius: 50%;
    transition: var(--transition);
}

.theme-toggle:hover {
    background-color: var(--bg-secondary);
}

.theme-icon-dark {
    display: none;
}

[data-theme="dark"] .theme-icon-light {
    display: none;
}

[data-theme="dark"] .theme-icon-dark {
    display: inline;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 2px 0;
    transition: var(--transition);
}

/* 主内容区样式 */
.main {
    padding: 2rem 0;
    min-height: calc(100vh - 160px);
}

.section {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

/* 英雄区域样式 */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color), #6c5ce7);
    color: white;
    padding: 3rem 0;
    border-radius: var(--radius);
    margin-bottom: 3rem;
    text-align: center;
}

.hero-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* 页面头部样式 */
.page-header {
    text-align: center;
    margin-bottom: 2rem;
}

.page-title {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.page-subtitle {
    color: var(--text-light);
    font-size: 1.1rem;
}

.view-all-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.view-all-link:hover {
    color: var(--secondary-color);
}

/* 瀑布流布局 - 修复图片显示问题 */
.masonry-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.masonry-item {
    flex: 0 0 auto;
    margin-bottom: 1rem;
    transition: opacity 0.3s ease;
    break-inside: avoid;
}

/* 照片卡片样式 - 修复图片显示问题 */
.photo-card {
    display: block;
    background-color: var(--bg-color);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
}

.photo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.photo-thumbnail {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 250px; /* 固定高度确保一致性 */
}

.photo-image {
    width: 100%;
    height: 100%;
    object-fit: contain; /* 确保图片填充容器 */
    transition: transform 0.3s ease;
    background-color: var(--bg-secondary); /* 添加背景色防止空白 */
}

.photo-card:hover .photo-image {
    transform: scale(1.05);
}

.photo-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 1rem;
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.photo-card:hover .photo-overlay {
    opacity: 1;
}

.photo-info {
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.photo-card:hover .photo-info {
    transform: translateY(0);
}

.photo-title {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    font-weight: 500;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.photo-meta {
    font-size: 0.8rem;
    opacity: 0.9;
    margin: 0;
}

/* 相册网格样式 */
.albums-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

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

.album-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.album-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.album-cover {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
}

.album-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    background-color: var(--bg-secondary);
}

.album-card:hover .album-image {
    transform: scale(1.05);
}

.album-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    background-color: var(--bg-secondary);
    color: var(--text-light);
}

.album-overlay {
    position: absolute;
    bottom: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.5rem 1rem;
    border-top-left-radius: var(--radius);
}

.photo-count {
    font-size: 0.8rem;
    font-weight: 500;
}

.album-info {
    padding: 1.5rem;
}

.album-name {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.album-description {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0;
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-light);
}

.empty-state svg {
    margin-bottom: 1rem;
    color: var(--gray-color);
}

.empty-state h3 {
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

/* 表单样式 */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
    padding: 2rem 0;
}

.auth-card {
    background-color: var(--bg-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2rem;
    width: 100%;
    max-width: 400px;
}

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

.auth-title {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.auth-subtitle {
    color: var(--text-light);
}

.auth-form {
    margin-top: 1.5rem;
}

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

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

.form-control, .form-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background-color: var(--bg-color);
    color: var(--text-color);
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus, .form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.form-text {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: var(--text-light);
}

.form-check {
    display: flex;
    align-items: center;
}

.form-check-input {
    margin-right: 0.5rem;
}

.form-check-label {
    color: var(--text-color);
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-light);
}

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

/* 照片详情页样式 */
.photo-detail {
    max-width: 1000px;
    margin: 0 auto;
}

.photo-container {
    margin-bottom: 2rem;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.photo-full {
    width: 100%;
    display: block;
}

.photo-info-panel {
    background-color: var(--bg-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.photo-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.photo-description {
    margin-bottom: 1rem;
    color: var(--text-light);
}

.photo-details {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.photo-detail-item {
    color: var(--text-light);
    font-size: 0.9rem;
}

.photo-actions {
    display: flex;
    gap: 1rem;
}

/* 评论区域样式 */
.comments-section {
    background-color: var(--bg-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.comments-title {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
}

.comment-form {
    margin-bottom: 2rem;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.comment-item {
    display: flex;
    gap: 1rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.comment-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

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

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.comment-author {
    font-weight: 500;
    color: var(--text-color);
}

.comment-date {
    color: var(--text-light);
    font-size: 0.8rem;
}

.comment-text {
    color: var(--text-color);
    line-height: 1.5;
}

.comment-actions {
    margin-top: 0.5rem;
}

.empty-comments {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
}

/* 上传页面样式 */
.upload-container {
    max-width: 600px;
    margin: 0 auto;
}

.upload-card {
    background-color: var(--bg-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2rem;
}

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

.upload-title {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.upload-subtitle {
    color: var(--text-light);
}

.file-preview {
    margin-top: 1rem;
}

.file-list {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
}

.file-list-header {
    padding: 0.75rem;
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.file-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

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

.file-thumbnail {
    width: 50px;
    height: 50px;
    border-radius: 4px;
    overflow: hidden;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.file-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: var(--text-color);
}

.file-size {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* 管理后台样式 */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.admin-title {
    font-size: 2rem;
    color: var(--text-color);
}

.admin-subtitle {
    color: var(--text-light);
    margin-top: 0.5rem;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background-color: var(--bg-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(52, 152, 219, 0.1);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon svg {
    width: 24px;
    height: 24px;
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
    color: var(--text-color);
}

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

.admin-actions {
    margin-bottom: 2rem;
}

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

.action-card {
    background-color: var(--bg-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: block;
    color: inherit;
    text-decoration: none;
}

.action-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    color: inherit;
}

.action-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(52, 152, 219, 0.1);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.action-icon svg {
    width: 24px;
    height: 24px;
}

.action-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.action-description {
    color: var(--text-light);
    font-size: 0.9rem;
}

.admin-table-container {
    background-color: var(--bg-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.admin-table th {
    background-color: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-color);
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.table-thumbnail {
    width: 50px;
    height: 50px;
    border-radius: 4px;
    overflow: hidden;
}

.table-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.table-thumbnail.placeholder {
    background-color: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
}

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

.admin-form-container {
    background-color: var(--bg-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.admin-form {
    max-width: 600px;
}

/* 设置标签页 */
.settings-tabs {
    margin-bottom: 2rem;
}

.tab-nav {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.tab-link {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-light);
    transition: var(--transition);
}

.tab-link.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-link:hover:not(.active) {
    color: var(--text-color);
}

.tab-content {
    display: none;
}

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

/* 消息提示 */
.flash-messages {
    margin-bottom: 1.5rem;
}

.alert {
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.alert-success {
    background-color: rgba(46, 204, 113, 0.1);
    color: #27ae60;
    border: 1px solid rgba(46, 204, 113, 0.2);
}

.alert-error {
    background-color: rgba(231, 76, 60, 0.1);
    color: #c0392b;
    border: 1px solid rgba(231, 76, 60, 0.2);
}

.alert-info {
    background-color: rgba(52, 152, 219, 0.1);
    color: #2980b9;
    border: 1px solid rgba(52, 152, 219, 0.2);
}

.close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: inherit;
}

/* 页脚样式 */
.footer {
    background-color: var(--bg-color);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    text-align: center;
    color: var(--text-light);
}

.footer-content p {
    margin: 0;
}

/* 个人中心样式 */
.profile-container {
    max-width: 800px;
    margin: 0 auto;
}

.profile-card {
    background-color: var(--bg-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.profile-avatar {
    margin-bottom: 1.5rem;
}

.avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    margin: 0 auto;
}

.profile-info {
    margin-bottom: 1.5rem;
}

.info-item {
    display: flex;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.info-item label {
    font-weight: 500;
    margin-right: 0.5rem;
    color: var(--text-color);
}

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

.profile-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.user-photos-section {
    margin-top: 2rem;
}

.view-all {
    text-align: center;
    margin-top: 1.5rem;
}

/* 错误页面样式 */
.error-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    text-align: center;
}

.error-content h1 {
    font-size: 6rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0;
}

.error-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.error-content p {
    color: var(--text-light);
    margin-bottom: 2rem;
}

/* 加载更多容器 */
.load-more-container {
    text-align: center;
    margin: 2rem 0;
    padding: 1rem;
}

#load-more-btn {
    padding: 0.75rem 2rem;
    font-size: 1rem;
}

/* 加载指示器 */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: var(--text-light);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 图片懒加载效果 */
.photo-image {
    opacity: 1;
    transition: opacity 0.3s ease;
}

.photo-image.loaded {
    opacity: 1;
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        flex-wrap: wrap;
    }
    
    .nav {
        width: 100%;
        order: 3;
        margin-top: 1rem;
        display: none;
    }
    
    .nav.active {
        display: block;
    }
    
    .nav-list {
        flex-direction: column;
        gap: 0;
    }
    
    .nav-item {
        width: 100%;
    }
    
    .nav-link {
        display: block;
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav-item:last-child .nav-link {
        border-bottom: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .masonry-item {
        width: calc(50% - 0.5rem) !important;
    }
    
    .photo-thumbnail {
        height: 180px;
    }
    
    .albums-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .admin-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .admin-stats {
        grid-template-columns: 1fr;
    }
    
    .action-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .activity-card {
        padding: 1rem;
    }
    
    .action-card {
        padding: 1rem;
    }
    
    .photo-actions {
        flex-direction: column;
    }
    
    .tab-nav {
        flex-direction: column;
        border-bottom: none;
    }
    
    .tab-link {
        border-bottom: 1px solid var(--border-color);
        border-left: 2px solid transparent;
        border-bottom: none;
    }
    
    .tab-link.active {
        border-left-color: var(--primary-color);
        border-bottom: none;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .profile-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .masonry-item {
        width: 100% !important;
    }
    
    .photo-thumbnail {
        height: 200px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .masonry-item {
        width: calc(33.333% - 1rem) !important;
    }
}

@media (min-width: 1025px) and (max-width: 1440px) {
    .masonry-item {
        width: calc(25% - 1rem) !important;
    }
}

@media (min-width: 1441px) {
    .masonry-item {
        width: calc(20% - 1rem) !important;
    }
}

/* 暗黑模式优化 */
[data-theme="dark"] .header {
    background: linear-gradient(135deg, #2c3e50, #34495e);
}

[data-theme="dark"] .hero-section {
    background: linear-gradient(135deg, #2c3e50, #34495e);
}

[data-theme="dark"] .alert-success {
    background-color: rgba(46, 204, 113, 0.15);
    border-color: rgba(46, 204, 113, 0.3);
}

[data-theme="dark"] .alert-error {
    background-color: rgba(231, 76, 60, 0.15);
    border-color: rgba(231, 76, 60, 0.3);
}

[data-theme="dark"] .alert-info {
    background-color: rgba(52, 152, 219, 0.15);
    border-color: rgba(52, 152, 219, 0.3);
}

/* 下拉菜单样式 */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 1000;
    display: none;
    min-width: 160px;
    padding: 0.5rem 0;
    margin: 0.125rem 0 0;
    font-size: 1rem;
    color: var(--text-color);
    text-align: left;
    list-style: none;
    background-color: var(--bg-color);
    background-clip: padding-box;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 0.5rem 1rem;
    clear: both;
    font-weight: 400;
    color: var(--text-color);
    text-align: inherit;
    text-decoration: none;
    white-space: nowrap;
    background-color: transparent;
    border: 0;
    transition: var(--transition);
}

.dropdown-item:hover,
.dropdown-item:focus {
    color: var(--primary-color);
    background-color: var(--bg-secondary);
}

.dropdown-divider {
    height: 0;
    margin: 0.5rem 0;
    overflow: hidden;
    border-top: 1px solid var(--border-color);
}

/* 移动端下拉菜单适配 */
@media (max-width: 768px) {
    .dropdown-menu {
        position: static;
        float: none;
        width: 100%;
        margin-top: 0;
        border: none;
        box-shadow: none;
    }
    
    .nav-list .dropdown-menu {
        background-color: var(--bg-secondary);
    }
}

/* 瀑布流布局 - 修复图片显示问题 */
.masonry-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.masonry-item {
    flex: 1 1 calc(25% - 1rem);
    min-width: 250px;
    margin-bottom: 1rem;
    break-inside: avoid;
}

/* 照片卡片样式 - 修复图片显示问题 */
.photo-card {
    display: block;
    background-color: var(--bg-color);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: auto; /* 修改为自动高度 */
}

.photo-thumbnail {
    position: relative;
    overflow: hidden;
    width: 100%;
    /* 移除固定高度，改为由图片决定 */
    min-height: 200px; /* 仅设置最小高度 */
}

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

.stat-card {
    background-color: var(--bg-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(52, 152, 219, 0.1);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon svg {
    width: 24px;
    height: 24px;
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
    color: var(--text-color);
    line-height: 1;
}

.stat-label {
    color: var(--text-light);
    font-size: 0.9rem;
    margin: 0;
}

/* 最近活动样式 */
.recent-activity {
    margin-bottom: 3rem;
}

.activity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.activity-card {
    background-color: var(--bg-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.activity-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

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

.activity-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: var(--radius);
    transition: var(--transition);
}

.activity-item:hover {
    background-color: var(--bg-secondary);
}

.activity-thumb {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}

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

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

.user-avatar {
    background-color: var(--secondary-color);
}

.activity-info {
    flex: 1;
    min-width: 0;
}

.activity-text {
    margin: 0;
    color: var(--text-color);
    font-size: 0.9rem;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.activity-time {
    color: var(--text-light);
    font-size: 0.8rem;
}

/* 快捷操作样式 */
.admin-actions {
    margin-bottom: 2rem;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.action-card {
    background-color: var(--bg-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: block;
    color: inherit;
    text-decoration: none;
}

.action-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    color: inherit;
}

.action-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(52, 152, 219, 0.1);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.action-icon svg {
    width: 24px;
    height: 24px;
}

.action-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.action-description {
    color: var(--text-light);
    font-size: 0.9rem;
    margin: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .admin-stats {
        grid-template-columns: 1fr;
    }
    
    .activity-grid {
        grid-template-columns: 1fr;
    }
    
    .action-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .activity-card {
        padding: 1rem;
    }
    
    .action-card {
        padding: 1rem;
    }
}

/* 文件类型标签 */
.file-types-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.file-type-badge {
    background-color: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}