/* ===== 地球 Online - 现代化UI设计 ===== */
/* 深色主题 + 毛玻璃效果 + 流畅动画 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 全局移除移动端浏览器默认焦点轮廓 */
*:focus,
*:focus-visible,
*:focus-within,
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus,
.dropdown-item:focus,
.mobile-dropdown-content .dropdown-item:focus {
    outline: none !important;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --success-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.18);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.3);
    --text-light: rgba(255, 255, 255, 0.9);
    --text-muted: rgba(255, 255, 255, 0.6);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    overflow: hidden;
    background: #0f172a;
    color: var(--text-light);
}

/* ===== 顶部悬浮导航栏（高德风格）==== */
.top-nav {
    position: absolute;
    top: 15px;
    left: 15px;
    right: auto;
    width: auto;
    height: 45px;
    background: #ffffff;
    border-radius: 3px;
    box-shadow: rgba(0, 0, 0, 0.15) 0px 2px 2px 0px;
    display: flex;
    align-items: center;
    padding: 0;
    z-index: 6201;
    transition: all 0.3s ease;
}

.top-nav:hover {
    box-shadow: rgba(0, 0, 0, 0.2) 0px 4px 8px 0px;
}

.nav-center {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
}

.search-box {
    display: flex;
    align-items: center;
    background: transparent;
    border: none;
    border-radius: 3px;
    overflow: visible;
    backdrop-filter: none;
    transition: all 0.3s ease;
    height: 45px;
}

.search-logo {
    padding: 0 12px 0 8px;
    font-size: 20px;
    color: #667eea;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

.search-logo i {
    font-size: 20px;
}

.search-box:focus-within {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

.search-box input {
    border: none;
    background: transparent;
    padding: 0 12px;
    color: #565656;
    outline: none;
    font-size: 14px;
    min-width: 200px;
    height: 45px;
    line-height: 45px;
}

.search-box input::placeholder {
    color: #999;
}

.search-box button {
    background: #f8f8f8;
    border: none;
    border-left: 1px solid #e8e8e8;
    color: #565656;
    padding: 0 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    border-radius: 0 3px 3px 0;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-box button:hover {
    background: #eeeeee;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    padding: 0 8px;
    border-left: 1px solid #e8e8e8;
    height: 45px;
}

.map-mode-toggle {
    width: 36px;
    height: 36px;
    border-radius: 3px;
    background: transparent;
    border: none;
    color: #565656;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-mode-toggle:hover {
    background: #f0f0f0;
}

.weather-display {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    padding: 0 12px;
    background: transparent;
    border: none;
    border-radius: 3px;
    backdrop-filter: none;
    color: #5f6477;
    height: 36px;
}

.weather-icon {
    font-size: 16px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 3px;
    height: 36px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 3px;
    object-fit: cover;
    border: none;
    box-shadow: none;
    transition: all 0.3s ease;
}

.user-avatar:hover {
    opacity: 0.8;
}

.user-avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 14px;
    border: none;
    box-shadow: none;
    transition: all 0.3s ease;
}

.user-avatar-placeholder:hover {
    opacity: 0.8;
}

.username {
    font-size: 14px;
    font-weight: 500;
}

.login-btn {
    padding: 0 16px;
    height: 36px;
    line-height: 36px;
    background: #f8f8f8;
    border-radius: 3px;
    color: #565656;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    border: none;
}

.login-btn:hover {
    background: #eeeeee;
}

/* ===== 导航按钮（高德风格）===== */
.nav-btn {
    width: auto;
    min-width: 36px;
    height: 36px;
    border-radius: 3px;
    background: transparent;
    border: none;
    color: #565656;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 12px;
}

.nav-btn i {
    font-size: 18px;
}

.nav-btn .btn-text {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

.nav-btn:hover {
    background: #f0f0f0;
}

/* ===== 下拉菜单 ===== */
.dropdown-menu {
    position: relative;
}

.dropdown-content {
    position: absolute;
    top: 45px;
    right: 0;
    background: #ffffff;
    border-radius: 3px;
    box-shadow: rgba(0, 0, 0, 0.15) 0px 4px 8px 0px;
    min-width: 160px;
    padding: 8px 0;
    z-index: 6202;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.dropdown-menu.active .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: transparent;
    border: none;
    color: #565656;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    text-align: left;
}

.dropdown-item i {
    width: 16px;
    text-align: center;
    font-size: 14px;
}

.dropdown-item:hover {
    background: #f5f5f5;
}

/* 移动端下拉菜单项特殊样式（椭圆形边框设计） */
@media (max-width: 768px) {
    .mobile-dropdown-content {
        padding: 12px !important; /* 增加容器内边距 */
        background: transparent !important; /* 透明背景 */
        box-shadow: none !important; /* 移除容器阴影 */
        border: none !important; /* 移除容器边框 */
        min-width: auto !important; /* 移除最小宽度限制 */
        width: auto !important; /* 自适应内容宽度 */
    }
    
    .mobile-dropdown-content .dropdown-item {
        padding: 10px 24px; /* 左右增加内边距，上下减小 */
        font-size: 15px; /* 稍大字体 */
        margin-bottom: 8px; /* 项之间间距 */
        border-radius: 50px; /* 椭圆形边框 */
        border: 1.5px solid #e8e8e8; /* 淡色边框 */
        background: #ffffff; /* 白色背景 */
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06); /* 轻微阴影 */
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        text-align: center; /* ✅ 文字水平居中 */
        justify-content: center; /* ✅ Flex水平居中 */
        align-items: center; /* ✅ Flex垂直居中 */
        white-space: nowrap; /* ✅ 不换行 */
        display: inline-flex; /* ✅ 行内Flex布局 */
        width: auto; /* ✅ 自适应内容宽度 */
        min-width: 140px; /* ✅ 最小宽度 */
        line-height: 1.5; /* ✅ 行高 */
        outline: none; /* ✅ 移除移动端点击时的蓝色焦点框 */
    }
    
    .mobile-dropdown-content .dropdown-item:focus {
        outline: none; /* ✅ 确保焦点状态无蓝色方框 */
    }
    
    .mobile-dropdown-content .dropdown-item:last-child {
        margin-bottom: 0; /* 最后一项无下边距 */
    }
    
    .mobile-dropdown-content .dropdown-item:hover {
        background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%); /* 渐变背景 */
        color: #667eea; /* 悬停时改变颜色 */
        border-color: #667eea; /* 边框变色 */
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2); /* 增强阴影 */
        transform: translateX(4px); /* 轻微右移 */
    }
    
    .mobile-dropdown-content .dropdown-item i {
        font-size: 16px; /* 增大图标 */
        width: 18px; /* ✅ 减小图标宽度 */
        color: inherit; /* 继承父元素颜色 */
        margin-right: 6px; /* ✅ 减小图标与文字间距，更紧凑 */
        text-align: center; /* ✅ 图标居中对齐 */
    }
}

/* 快捷操作下拉菜单特殊样式 */
#quickActionsPanel .dropdown-item {
    justify-content: flex-start;
}

#quickActionsPanel .dropdown-item:active {
    background: #e8e8e8;
}

/* 图层下拉菜单特殊样式 */
.layer-dropdown {
    min-width: 140px;
}

.layer-dropdown .layer-item input[type="checkbox"] {
    display: none;
}

.layer-dropdown .layer-item span {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.layer-dropdown .layer-item input[type="checkbox"]:checked + span {
    color: #667eea;
    font-weight: 500;
}

.layer-dropdown .layer-item input[type="checkbox"]:not(:checked) + span {
    color: #999;
    opacity: 0.6;
}

/* ===== 地图容器 ===== */
.map-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

/* ===== 左侧控制面板 ===== */
/* ===== 右侧信息面板（白色主题）===== */
.control-panel {
    position: fixed;
    top: 90px;
    width: 800px;  /* 增加宽度以支持左右两栏布局 */
    background: #ffffff;
    backdrop-filter: none;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    z-index: 1000;  /* 提高z-index，确保在地图上方 */
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.left-panel {
    left: 20px;
}

.right-panel {
    right: 20px;
    display: none;
}

/* 动态和时光胶囊详情页 - 窄面板 */
.right-panel.narrow-panel {
    width: 400px !important;
}

/* 风景详情页 - 宽面板（默认） */
.right-panel.wide-panel {
    width: 800px !important;
}

.right-panel.active {
    display: block;
    animation: slideInRight 0.4s ease;
    z-index: 1000 !important; /* 确保面板在最上层 */
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.panel-section {
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.panel-section:last-child {
    border-bottom: none;
}

.panel-section h3 {
    font-size: 16px;
    margin-bottom: 15px;
    color: #111827;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title.collapsible {
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
    justify-content: space-between;
}

.section-title.collapsible:hover {
    color: #111827;
}

.collapse-icon {
    font-size: 12px;
    transition: transform 0.3s ease;
    display: inline-block;
}

.collapsible-content {
    max-height: 500px;
    opacity: 1;
    padding: 10px 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.mode-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.mode-btn {
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    background: #ffffff;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 13px;
    color: #374151;
    font-weight: 500;
}

.mode-btn:hover {
    background: #f9fafb;
    transform: translateY(-2px);
}

.mode-btn.active {
    background: var(--primary-gradient);
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.layer-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.layer-item {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
    padding: 10px;
    border-radius: 10px;
    transition: background 0.3s ease;
}

.layer-item:hover {
    background: #f9fafb;
}

.layer-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #667eea;
}

.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.action-btn {
    padding: 14px;
    border: none;
    background: var(--primary-gradient);
    color: white;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.action-btn:nth-child(2) {
    background: var(--secondary-gradient);
}

.action-btn:nth-child(3) {
    background: var(--success-gradient);
}

/* ===== 右侧信息面板头部（白色主题）===== */
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
    border-radius: 16px 16px 0 0;
}

.panel-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

.close-btn {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background: #fee2e2;
    border-color: #fecaca;
    color: #ef4444;
    transform: rotate(90deg);
}

.panel-content {
    padding: 0;  /* 移除padding，让scenery-detail-layout自己控制 */
    max-height: calc(100vh - 180px);
    overflow-y: auto;
    height: 100%;
}

/* 动态详情页 - 左右两栏布局 */
.post-detail-layout {
    display: flex;
    gap: 20px;
    height: 100%;
    min-height: 500px;
    padding: 20px;
}

/* 左侧：动态详情 */
.post-detail-left {
    flex: 1;
    min-width: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

.post-detail-left::-webkit-scrollbar {
    width: 6px;
}

.post-detail-left::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.post-detail-left::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.post-detail-left::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* 右侧：评论区 */
.post-detail-right {
    flex: 0 0 320px;
    border-left: 2px solid #e5e7eb;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
}

.post-detail-right .comments-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.post-detail-right .comments-title {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e7eb;
}

.post-detail-right .comments-title i {
    margin-right: 8px;
    color: #667eea;
}

.post-detail-right .comments-list {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 15px;
    max-height: none;
}

.post-detail-right .comments-list::-webkit-scrollbar {
    width: 6px;
}

.post-detail-right .comments-list::-webkit-scrollbar-track {
    background: #f9fafb;
    border-radius: 3px;
}

.post-detail-right .comments-list::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.post-detail-right .comments-list::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

.post-detail-right .comment-form {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
}

/* 响应式设计：小屏幕时改为上下布局 */
@media (max-width: 768px) {
    .post-detail-layout {
        flex-direction: column;
        padding: 15px; /* 减小内边距 */
        gap: 15px; /* 减小间距 */
    }
    
    .post-detail-left {
        min-width: unset; /* 移除最小宽度限制 */
        width: 100%; /* 占满宽度 */
        padding-right: 0;
    }
    
    .post-detail-right {
        border-left: none;
        border-top: 2px solid #e5e7eb;
        padding-left: 0;
        padding-top: 15px;
        flex: 0 0 auto;
        width: 100%; /* 占满宽度 */
    }
}

/* 时光胶囊详情包装容器 - 限制最大宽度为400px */
.time-capsule-detail-wrapper {
    max-width: 400px;
    margin: 0 auto;
    padding: 20px;
}

.empty-tip {
    text-align: center;
    color: #9ca3af;
    padding: 60px 20px;
    font-size: 14px;
}

/* ===== 移动端底部工具栏（椭圆形设计）===== */
.mobile-toolbar {
    display: none; /* 默认隐藏，媒体查询中会覆盖 */
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: #ffffff;
    backdrop-filter: none;
    border: 1px solid #e8e8e8;
    border-radius: 50px; /* 椭圆形圆角 */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08); /* 增强阴影 */
    padding: 10px 20px; /* 增加内边距，更圆润 */
    z-index: 100;
    gap: 12px; /* 增大按钮间距 */
    min-width: 200px; /* 最小宽度 */
    align-items: center; /* ✅ 垂直居中对齐 */
    justify-content: center; /* ✅ 水平居中对齐 */
}

.toolbar-btn {
    width: 44px; /* 增大按钮尺寸 */
    height: 44px;
    border: none;
    background: transparent;
    color: #565656;
    border-radius: 50%; /* 圆形按钮 */
    font-size: 20px; /* 增大图标 */
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); /* 平滑过渡 */
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
}

.toolbar-btn:hover {
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%); /* 渐变背景 */
    color: #667eea; /* 悬停时改变颜色 */
    transform: scale(1.1); /* 轻微放大 */
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2); /* 添加阴影 */
}

.toolbar-btn:active {
    transform: scale(0.95); /* 点击时缩小 */
    box-shadow: none !important; /* ✅ 点击时移除阴影，防止闪烁 */
}

/* 移动端下拉菜单样式 */
.mobile-dropdown {
    position: relative;
}

.mobile-dropdown .mobile-dropdown-content {
    position: absolute;
    top: auto !important; /* 覆盖通用的top设置 */
    bottom: 56px !important; /* 在按钮上方显示，距离按钮56px */
    right: auto !important; /* 覆盖通用的right设置 */
    left: 50% !important;
    transform: translateX(-50%) translateY(10px) !important;
    background: #ffffff;
    border-radius: 16px; /* 圆角下拉菜单 */
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.1); /* 增强阴影 */
    min-width: 180px; /* 增加最小宽度 */
    padding: 10px 0;
    z-index: 101;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); /* 平滑过渡 */
    border: 1px solid #f0f0f0; /* 添加边框 */
}

.mobile-dropdown.active .mobile-dropdown-content {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(-50%) translateY(0) !important; /* 向上滑动到正常位置 */
}

/* ===== 弹窗样式 ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: #ffffff;
    backdrop-filter: none;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    width: 90%;
    max-width: 550px;
    max-height: 85vh;
    overflow-y: auto;
    animation: slideUpScale 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.small-modal {
    max-width: 450px;
}

@keyframes slideUpScale {
    from {
        transform: translateY(50px) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
    border-radius: 16px 16px 0 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

.close-modal {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    font-size: 20px;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal:hover {
    background: #fee2e2;
    border-color: #fecaca;
    color: #ef4444;
    transform: rotate(90deg);
}

.modal-body {
    padding: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #374151;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    color: #111827;
    transition: all 0.3s ease;
    box-sizing: border-box; /* 确保padding不会导致溢出 */
}

/* 日期时间输入框特殊优化 */
.form-group input[type="datetime-local"] {
    font-size: 14px;
    max-width: 100%;
}

/* 移动端日期时间输入框优化 */
@media (max-width: 768px) {
    .form-group input[type="datetime-local"] {
        font-size: 16px; /* 防止iOS自动缩放 */
        padding: 12px 14px; /* 增大点击区域 */
    }
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.submit-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* ===== 可见性选项样式 ===== */
.visibility-options {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.visibility-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px 12px;
    border: 1.5px solid;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.03);
    transition: all 0.2s ease;
    flex: 1;
    min-width: 0;
}

.visibility-public {
    border-color: rgba(102, 126, 234, 0.25);
    background: rgba(102, 126, 234, 0.03);
}

.visibility-public:hover {
    border-color: rgba(102, 126, 234, 0.5);
    background: rgba(102, 126, 234, 0.08);
}

.visibility-private {
    border-color: rgba(156, 163, 175, 0.25);
    background: rgba(156, 163, 175, 0.03);
}

.visibility-private:hover {
    border-color: rgba(156, 163, 175, 0.5);
    background: rgba(156, 163, 175, 0.08);
}

.visibility-option input[type="radio"] {
    margin-right: 0;          /* 移除右边距，由gap控制 */
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    cursor: pointer;
}

.visibility-label {
    display: flex;
    flex-direction: row; /* 水平排列 */
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
    line-height: 1;
}

.visibility-label i {
    font-size: 14px;
    flex-shrink: 0;
}

.visibility-label > span {
    font-weight: 500;
    white-space: nowrap;
}

.visibility-label small {
    display: inline;
    color: #9ca3af;
    font-size: 11px;
    line-height: 1;
    margin-left: 2px;
    white-space: nowrap;
}

/* 移动端可见性选项优化 */
@media (max-width: 768px) {
    .visibility-options {
        gap: 8px;
    }
    
    .visibility-option {
        padding: 8px 10px;
    }
    
    .visibility-option input[type="radio"] {
        width: 16px;
        height: 16px;
        margin-right: 0;      /* 由gap控制间距 */
    }
    
    .visibility-label {
        gap: 5px;
    }
    
    .visibility-label i {
        font-size: 13px;
    }
    
    .visibility-label > span {
        font-size: 13px;
    }
    
    .visibility-label small {
        font-size: 10px;
    }
}

/* 超小屏幕进一步优化 */
@media (max-width: 480px) {
    .visibility-options {
        gap: 6px;
    }
    
    .visibility-option {
        padding: 7px 9px;
    }
    
    .visibility-label {
        gap: 4px;
    }
    
    .visibility-label > span {
        font-size: 12px;
    }
    
    .visibility-label small {
        font-size: 9px;
    }
}

/* ===== 评论�?===== */
.comments-list {
    max-height: 350px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.comment-item {
    padding: 14px;
    border-bottom: 1px solid #e5e7eb;
    transition: background 0.3s ease;
}

.comment-item:hover {
    background: #f9fafb;
    border-radius: 8px;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 13px;
}

.comment-username {
    font-weight: 600;
    color: #667eea;
}

.comment-time {
    color: #9ca3af;
}

.comment-content {
    font-size: 14px;
    color: #374151;
    line-height: 1.6;
}

/* ===== 加载动画 ===== */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    z-index: 3000;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--glass-border);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}



.loading-overlay p {
    margin-top: 20px;
    color: var(--text-light);
    font-size: 16px;
}

/* ===== Toast 提示 ===== */
.toast {
    position: fixed;
    top: 90px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: #ffffff;
    backdrop-filter: none;
    border: 1px solid #e5e7eb;
    color: #111827;
    padding: 14px 28px;
    border-radius: 12px;
    z-index: 4000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.toast.success {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #065f46;
}

.toast.error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

/* ===== 详情面板样式（白色主题）===== */
.detail-item {
    padding: 15px 0;
}

.detail-item h3 {
    margin: 0 0 12px 0;
    font-size: 20px;
    color: #111827;
    font-weight: 600;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.detail-time {
    font-size: 13px;
    color: #9ca3af;
}

.detail-mood,
.detail-type,
.detail-desc,
.detail-price,
.detail-owner {
    margin: 10px 0;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.6;
}

.detail-content {
    margin: 15px 0;
    font-size: 15px;
    color: #374151;
    line-height: 1.8;
    padding: 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

.detail-stats {
    margin: 15px 0;
    padding: 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    font-size: 14px;
    color: #374151;
}

/* 店铺详情专用样式 */
.detail-product-image {
    margin: 12px 0;
}

.detail-product-name {
    margin: 10px 0;
    font-size: 15px;
    color: #374151;
    font-weight: 500;
}

.detail-product-name i {
    margin-right: 6px;
    color: #667eea;
}

.detail-address {
    margin: 10px 0;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.6;
}

.detail-address i {
    margin-right: 6px;
    color: #ef4444;
}

.detail-contact {
    margin: 12px 0;
    padding: 12px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
}

.detail-contact div {
    margin: 6px 0;
    font-size: 14px;
    color: #374151;
}

.detail-contact i {
    margin-right: 8px;
    width: 16px;
    text-align: center;
}

.detail-contact .fa-phone {
    color: #10b981;
}

.detail-contact .fa-weixin {
    color: #07c160;
}

/* 图片预览容器 */
.image-preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.image-preview-item {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #e5e7eb;
    transition: all 0.3s ease;
}

.image-preview-item:hover {
    border-color: #667eea;
    transform: scale(1.05);
}

.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-preview-item .remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s ease;
}

.image-preview-item .remove-btn:hover {
    background: rgba(239, 68, 68, 1);
    transform: scale(1.1);
}

/* 上传进度�?*/
.upload-progress {
    margin-top: 12px;
    padding: 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

.progress-text {
    text-align: center;
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
}

/* 店铺详情多图片展�?*/
.detail-product-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin: 12px 0;
}

.detail-product-image-item {
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #e5e7eb;
    transition: all 0.3s ease;
}

.detail-product-image-item:hover {
    border-color: #667eea;
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

/* 图片查看模态框 */
.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 5000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.image-modal.active {
    display: flex;
}

.image-modal-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
}

.image-modal-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
}

.image-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.image-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.detail-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.action-small {
    flex: 1;
    padding: 12px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 13px;
    color: #374151;
    font-weight: 500;
}

.action-small:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* ===== 图片预览网格 ===== */
.image-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.image-preview-item {
    position: relative;
    width: 100%;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #e5e7eb;
    transition: all 0.3s ease;
}

.image-preview-item:hover {
    border-color: #667eea;
    transform: scale(1.05);
}

.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-preview-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0;
}

.image-preview-item:hover .image-preview-remove {
    opacity: 1;
}

.image-preview-remove:hover {
    background: #dc2626;
    transform: scale(1.1);
}

/* ===== 上传进度�?===== */
.upload-progress {
    margin-top: 10px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    display: block;
    text-align: center;
    font-size: 12px;
    color: #6b7280;
    margin-top: 5px;
}

/* ===== 图片预览网格 ===== */
.image-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.image-preview-item {
    position: relative;
    width: 100%;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #e5e7eb;
    transition: all 0.3s ease;
}

.image-preview-item:hover {
    border-color: #667eea;
    transform: scale(1.05);
}

.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-preview-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0;
}

.image-preview-item:hover .image-preview-remove {
    opacity: 1;
}

.image-preview-remove:hover {
    background: #dc2626;
    transform: scale(1.1);
}

/* ===== 上传进度�?===== */
.upload-progress {
    margin-top: 10px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    display: block;
    text-align: center;
    font-size: 12px;
    color: #6b7280;
    margin-top: 5px;
}

/* ===== 响应式设�?===== */
@media (max-width: 768px) {
    .top-nav {
        top: 8px;
        left: 8px;
        right: auto;
        width: auto;
        min-width: auto;
        max-width: calc(100% - 16px);
        padding: 0;
        height: 44px;
        border-radius: 3px;
        flex-wrap: nowrap;
        overflow: hidden;
    }

    .nav-center {
        margin: 0;
        flex: 1;
        min-width: 0;
    }

    .search-box {
        height: 44px;
        width: 100%;
    }

    .search-logo {
        padding: 0 8px 0 6px;
        font-size: 18px;
    }

    .search-logo i {
        font-size: 18px;
    }

    .search-box input {
        padding: 0 8px;
        font-size: 13px;
        min-width: 80px;
        width: 100%;
        height: 44px;
        line-height: 44px;
    }

    .search-box button {
        padding: 0 10px;
        height: 44px;
    }

    .weather-display {
        display: none;
    }

    /* 手机端隐藏发布按钮和图层按钮 */
    #btnQuickActions,
    #btnLayerToggle {
        display: none !important;
    }

    .nav-right {
        gap: 4px;
        padding: 0 4px;
        height: 44px;
        flex-shrink: 0;
    }

    .nav-btn.with-text {
        padding: 0 6px;
        gap: 3px;
        min-width: auto;
    }

    .nav-btn.with-text i {
        font-size: 15px;
    }

    .nav-btn.with-text .btn-text {
        font-size: 11px;
        display: none; /* 手机端隐藏文字，只显示图标 */
    }

    .map-mode-toggle {
        width: 32px;
        height: 32px;
        font-size: 16px;
        min-width: 32px;
    }

    .user-avatar,
    .user-avatar-placeholder {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .login-btn {
        padding: 0 10px;
        height: 30px;
        line-height: 30px;
        font-size: 12px;
    }

    .nav-btn {
        width: 32px;
        height: 32px;
        font-size: 16px;
        min-width: 32px;
        padding: 0;
    }

    .dropdown-menu {
        position: relative;
    }

    .dropdown-content {
        min-width: 140px;
        right: -10px; /* 调整下拉菜单位置，防止溢出 */
    }

    .dropdown-item {
        padding: 10px 12px;
        font-size: 13px;
    }

    .map-container {
        top: 0;
    }

    .control-panel.left-panel {
        display: none !important; /* 移动端只隐藏左侧面板 */
    }

    .mobile-toolbar {
        display: flex;
    }

    .right-panel {
        left: 10px;
        right: 10px;
        width: auto;
        max-width: calc(100vw - 20px); /* 限制最大宽度，防止超宽 */
        top: 60px;
        max-height: calc(100vh - 130px);
        display: none; /* 默认隐藏，通过.active类显示 */
    }
    
    .right-panel.active {
        display: block !important;
        animation: slideInUp 0.4s ease;
        z-index: 1000 !important; /* 确保移动端面板在最上层 */
    }

    .modal-content {
        width: 95%;
        max-height: 75vh;
        border-radius: 12px; /* 移动端减小圆角 */
        max-width: calc(100vw - 20px); /* 限制最大宽度，防止超宽 */
    }
    
    /* 移动端表单优化 */
    .modal-body {
        padding: 16px; /* 减小内边距 */
    }
    
    .form-group {
        margin-bottom: 16px; /* 减小间距 */
    }
    
    .form-group label {
        font-size: 13px; /* 缩小标签字体 */
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* 防止iOS自动缩放 */
        padding: 12px; /* 增大点击区域 */
    }
    
    /* 日期时间输入框移动端优化 */
    .form-group input[type="datetime-local"] {
        font-size: 16px !important;
        padding: 12px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
}

@media (max-width: 480px) {
    .top-nav {
        top: 6px;
        left: 6px;
        right: auto;
        height: 40px;
        padding: 0;
        border-radius: 3px;
        max-width: calc(100% - 12px);
    }

    .search-box {
        height: 40px;
    }

    .search-logo {
        padding: 0 6px 0 4px;
        font-size: 16px;
    }

    .search-logo i {
        font-size: 16px;
    }

    .search-box input {
        padding: 0 6px;
        font-size: 12px;
        min-width: 60px;
        width: 100%;
        height: 40px;
        line-height: 40px;
    }

    .search-box input::placeholder {
        font-size: 11px;
    }

    .search-box button {
        padding: 0 8px;
        font-size: 14px;
        height: 40px;
    }

    .nav-right {
        gap: 2px;
        padding: 0 2px;
        height: 40px;
    }

    .map-mode-toggle {
        width: 28px;
        height: 28px;
        font-size: 14px;
        min-width: 28px;
    }

    .nav-btn.with-text {
        padding: 0 4px;
        gap: 2px;
        min-width: auto;
    }

    .nav-btn.with-text i {
        font-size: 14px;
    }

    .nav-btn.with-text .btn-text {
        display: none; /* 超小屏幕也隐藏文字 */
    }

    .nav-btn {
        width: 28px;
        height: 28px;
        font-size: 14px;
        min-width: 28px;
        padding: 0;
    }

    .dropdown-content {
        min-width: 120px;
        right: -5px;
    }

    .dropdown-item {
        padding: 8px 10px;
        font-size: 12px;
    }

    .user-avatar,
    .user-avatar-placeholder {
        width: 24px;
        height: 24px;
        font-size: 11px;
    }

    .login-btn {
        padding: 0 8px;
        height: 28px;
        line-height: 28px;
        font-size: 11px;
    }

    .toolbar-btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    /* 超小屏幕模态框优化 */
    .modal-content {
        width: 98%;
        max-height: 70vh;
        border-radius: 8px;
        max-width: calc(100vw - 10px); /* 限制最大宽度 */
    }
    
    .modal-body {
        padding: 12px;
    }
    
    .form-group {
        margin-bottom: 12px;
    }
    
    .form-group label {
        font-size: 12px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px !important; /* 保持16px防止iOS缩放 */
        padding: 10px;
    }
    
    /* 超小屏幕详情页优化 */
    .post-detail-layout,
    .scenery-detail-layout {
        padding: 10px; /* 进一步减小内边距 */
        gap: 10px; /* 进一步减小间距 */
    }
    
    .detail-header {
        margin-bottom: 12px;
    }
    
    .user-info {
        gap: 8px;
    }
    
    .user-avatar,
    .user-avatar-placeholder {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    .username {
        font-size: 14px;
    }
    
    .post-time {
        font-size: 11px;
    }
    
    .post-content,
    .scenery-description {
        font-size: 14px;
        line-height: 1.5;
    }
    
    .action-btn {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .location-info {
        font-size: 12px;
    }
    
    /* 超小屏幕闲置商品详情优化 */
    #secondhandDetailModal .modal-header h3 {
        font-size: 16px;
    }
    
    #secondhandDetailModal #detailTitle {
        font-size: 18px !important;
        margin: 10px 0 !important;
    }
    
    #secondhandDetailModal #detailPrice {
        font-size: 24px !important;
    }
    
    #secondhandDetailModal #detailOriginalPrice {
        font-size: 13px !important;
    }
    
    #secondhandDetailModal .modal-body > div > span {
        padding: 6px 12px !important;
        font-size: 13px !important;
    }
    
    #secondhandDetailModal p {
        font-size: 13px !important;
        margin-bottom: 6px !important;
    }
    
    #secondhandDetailModal strong {
        font-size: 13px !important;
    }
    
    #secondhandDetailModal #detailImages img {
        max-width: 100% !important;
        height: auto !important;
        border-radius: 8px !important;
        margin-bottom: 8px !important;
    }
    
    #secondhandDetailModal .modal-header {
        padding: 15px 16px !important;
    }
    
    #secondhandDetailModal .modal-body {
        padding: 15px !important;
    }
    
    #editSecondhandBtn {
        padding: 6px 12px !important;
        font-size: 12px !important;
    }
}

/* ===== 自定义滚动条 ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ===== 详情面板样式 ===== */
.detail-content {
    padding: 20px;
}

.detail-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e5e7eb;
}

.detail-header h2 {
    font-size: 20px;
    color: #111827;
    margin: 0 0 10px 0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.user-avatar,
.user-avatar-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e5e7eb;
}

.user-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.user-meta {
    flex: 1;
}

.username {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 4px;
}

.post-time {
    font-size: 13px;
    color: #6b7280;
}

.mood-badge {
    display: inline-block;
    padding: 6px 12px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}



.detail-body {
    margin-bottom: 20px;
}

.post-content {
    font-size: 15px;
    line-height: 1.6;
    color: #374151;
    margin: 0;
}



.detail-footer {
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
}

.location-info,
.creator-info,
.time-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 8px;
}

.location-info i,
.creator-info i,
.time-info i {
    width: 16px;
    color: #9ca3af;
}

.panel-header {
    padding: 15px 20px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h3 {
    margin: 0;
    font-size: 16px;
    color: #111827;
}

.close-btn {
    background: none;
    border: none;
    font-size: 18px;
    color: #6b7280;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: #f3f4f6;
    color: #111827;
}

.panel-content {
    padding: 0;  /* �Ƴ�padding����scenery-detail-layout�Լ����� */
    max-height: calc(100vh - 180px);
    overflow-y: auto;
    height: 100%;
}

/* ��̬�����װ���� - ���������Ϊ400px */
.post-detail-wrapper {
    max-width: 400px;
    margin: 0 auto;
    padding: 20px;
}

/* ʱ�⽺�������װ���� - ���������Ϊ400px */
.time-capsule-detail-wrapper {
    max-width: 400px;
    margin: 0 auto;
    padding: 20px;
}

.empty-tip {
    text-align: center;
    color: #9ca3af;
    padding: 40px 20px;
    font-size: 14px;
}

/* ===== 动态操作按�?===== */
.detail-actions {
    display: flex;
    gap: 15px;
    margin: 20px 0;
    padding: 15px 0;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #f3f4f6;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: #e5e7eb;
    color: #111827;
}

.action-btn.like-btn.liked {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.action-btn.like-btn.liked i {
    color: white;
}

.action-btn i {
    font-size: 16px;
}

/* ===== 评论区样�?===== */
.comments-section {
    margin-top: 20px;
}

.comments-title {
    font-size: 16px;
    color: #111827;
    margin-bottom: 15px;
    font-weight: 600;
}

.comments-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.comment-item {
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
    margin-bottom: 10px;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.comment-author {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

.comment-time {
    font-size: 12px;
    color: #9ca3af;
}

.comment-content {
    font-size: 14px;
    line-height: 1.5;
    color: #374151;
    margin: 0;
}

.no-comments,
.loading-comments,
.error-message {
    text-align: center;
    color: #9ca3af;
    padding: 20px;
    font-size: 14px;
}

.comment-form {
    margin-top: 15px;
}

.comment-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    resize: vertical;
    font-family: inherit;
    margin-bottom: 10px;
}

.comment-form textarea:focus {
    outline: none;
    border-color: #667eea;
}

/* 评论列表�?*/
.comment-item {
    padding: 12px;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.2s ease;
}

.comment-item:hover {
    background-color: #f9fafb;
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.comment-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e5e7eb;
}

.comment-author {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

.comment-time {
    font-size: 12px;
    color: #9ca3af;
    margin-left: auto;
}

.comment-content {
    font-size: 14px;
    line-height: 1.6;
    color: #374151;
    word-wrap: break-word;
}

.no-comments {
    text-align: center;
    color: #9ca3af;
    padding: 20px;
    font-size: 14px;
}

.error-message {
    text-align: center;
    color: #ef4444;
    padding: 20px;
    font-size: 14px;
}

.submit-comment-btn {
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.submit-comment-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* ===== 风景打卡详情样式 ===== */
.scenery-title {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 12px;
    line-height: 1.4;
}

.scenery-description {
    font-size: 15px;
    line-height: 1.6;
    color: #374151;
    margin-bottom: 16px;
    white-space: pre-wrap;
}

.scenery-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.scenery-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.scenery-image:hover {
    transform: scale(1.05);
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* ===== 风景打卡详情 - 左右两栏布局 ===== */
.scenery-detail-layout {
    display: flex;
    gap: 20px;
    height: 100%;
    min-height: 500px;
    padding: 20px;
}

/* 左侧：风景详�?*/
.scenery-detail-left {
    flex: 1;
    min-width: 400px;  /* 设置最小宽度，确保内容可见 */
    overflow-y: auto;
    padding-right: 10px;
}

.scenery-detail-left::-webkit-scrollbar {
    width: 6px;
}

.scenery-detail-left::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.scenery-detail-left::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.scenery-detail-left::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* 右侧：评论区 */
.scenery-detail-right {
    flex: 0 0 320px;  /* 调整�?20px，给左侧更多空间 */
    border-left: 2px solid #e5e7eb;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
}

.scenery-detail-right .comments-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.scenery-detail-right .comments-title {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e7eb;
}

.scenery-detail-right .comments-title i {
    margin-right: 8px;
    color: #667eea;
}

.scenery-detail-right .comments-list {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 15px;
    max-height: none;
}

.scenery-detail-right .comments-list::-webkit-scrollbar {
    width: 6px;
}

.scenery-detail-right .comments-list::-webkit-scrollbar-track {
    background: #f9fafb;
    border-radius: 3px;
}

.scenery-detail-right .comments-list::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.scenery-detail-right .comments-list::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

.scenery-detail-right .comment-form {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
}

/* 响应式设计：小屏幕时改为上下布局 */
@media (max-width: 768px) {
    .scenery-detail-layout {
        flex-direction: column;
        padding: 15px; /* 减小内边距 */
        gap: 15px; /* 减小间距 */
    }
    
    .scenery-detail-left {
        min-width: unset; /* 移除最小宽度限制 */
        width: 100%; /* 占满宽度 */
        padding-right: 0;
    }
    
    .scenery-detail-right {
        flex: 0 0 auto;
        border-left: none;
        border-top: 2px solid #e5e7eb;
        padding-left: 0;
        padding-top: 15px;
        min-height: 300px;
        width: 100%; /* 占满宽度 */
    }
}
