/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #f8f9fa;
    --card-bg: #fff;
    --border-color: #ddd;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

a {
    text-decoration: none;
    color: var(--secondary-color);
    transition: all 0.3s ease;
}

a:hover {
    color: var(--primary-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
header {
    background: var(--card-bg);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
}

.logo span {
    color: var(--secondary-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-menu a {
    color: var(--text-color);
    font-weight: 500;
}

.nav-menu a:hover {
    color: var(--secondary-color);
}

.nav-menu a.active {
    color: var(--secondary-color);
    border-bottom: 2px solid var(--secondary-color);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.btn {
    display: inline-block;
    padding: 8px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--secondary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-color);
}

.btn-secondary {
    background: var(--border-color);
    color: var(--text-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

.btn-danger {
    background: var(--accent-color);
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #229954;
}

/* 移动端菜单按钮 */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-color);
}

/* 快速导航入口 */
.quick-nav {
    background: var(--primary-color);
    color: white;
    padding: 20px 0;
    margin-bottom: 30px;
}

.quick-nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.quick-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.quick-nav-item:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-5px);
}

.quick-nav-icon {
    font-size: 36px;
    margin-bottom: 10px;
}

.quick-nav-title {
    font-size: 16px;
    font-weight: 600;
}

/* 内容区域 */
.main-content {
    padding: 30px 0;
}

/* 卡片样式 */
.card {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-color);
}

/* 网格布局 */
.grid {
    display: grid;
    gap: 20px;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* 图片卡片 */
.image-card {
    background: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.image-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.image-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.image-card-content {
    padding: 15px;
}

.image-card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--primary-color);
}

.image-card-desc {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 10px;
}

.image-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-light);
}

.user-info-mini {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-info-mini img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

/* 互动按钮 */
.action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border: none;
    background: var(--bg-color);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: var(--secondary-color);
    color: white;
}

.action-btn.active {
    background: var(--accent-color);
    color: white;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.form-control-file {
    display: block;
    width: 100%;
    padding: 8px;
}

.form-text {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 5px;
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 30px 0;
}

.page-link {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    transition: all 0.3s ease;
}

.page-link:hover {
    background: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

.page-link.active {
    background: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

/* 评论样式 */
.comment-list {
    margin-top: 20px;
}

.comment-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.comment-author {
    font-weight: 600;
    color: var(--primary-color);
}

.comment-time {
    font-size: 12px;
    color: var(--text-light);
}

.comment-text {
    color: var(--text-color);
    line-height: 1.5;
}

/* 地图样式 */
.map-container {
    width: 100%;
    height: 400px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* 搜索框 */
.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 14px;
}

.search-input:focus {
    outline: none;
    border-color: var(--secondary-color);
}

/* 筛选器 */
.filter-section {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

.filter-btn.active {
    background: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

/* 提示信息 */
.alert {
    padding: 15px 20px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* 图片编辑器 */
.image-editor {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.editor-preview {
    max-width: 100%;
    margin-bottom: 20px;
}

.editor-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.filter-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 5px;
    cursor: pointer;
}

.filter-btn.active {
    background: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

/* 页脚 */
footer {
    background: var(--primary-color);
    color: white;
    padding: 30px 0;
    margin-top: 50px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.footer-section h3 {
    font-size: 18px;
    margin-bottom: 15px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section ul li a {
    color: rgba(255,255,255,0.8);
}

.footer-section ul li a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* 响应式设计 */
@media (max-width: 992px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--card-bg);
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--shadow);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .quick-nav-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .grid-2 {
        grid-template-columns: 1fr;
    }
    
    .grid-3 {
        grid-template-columns: 1fr;
    }
    
    .quick-nav-grid {
        grid-template-columns: 1fr;
    }
    
    .btn {
        padding: 8px 15px;
        font-size: 12px;
    }
}

/* 文章详情页 - 封面图 */
.post-cover {
    margin-bottom: 20px;
    border-radius: 10px;
    overflow: hidden;
}

.post-cover img {
    width: 100%;
    max-height: 480px;
    object-fit: contain;
    background: #f0f0f0;
    display: block;
}

/* 文章详情页 - 视频播放器 */
.post-video {
    margin: 20px 0;
    border-radius: 10px;
    overflow: hidden;
    background: #000;
}

.post-video video {
    display: block;
    width: 100%;
    max-height: 540px;
    background: #000;
}

/* 文章详情页 - 图片画廊 */
.post-gallery {
    margin: 20px 0;
}

.post-gallery h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.gallery-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.gallery-item img:hover {
    transform: scale(1.02);
}

/* 卡片列表 - 封面图统一缩略图展示 */
.card-cover img,
.content-card img,
.post-card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

