/* 全局样式 */
:root {
    /* 颜色系统 */
    --primary-color: #2D6AE0;
    --primary-gradient: linear-gradient(135deg, #2D6AE0 0%, #1E88E5 100%);
    --primary-light: #E3F2FD;
    --primary-dark: #1E88E5;
    
    --success-color: #4CAF50;
    --warning-color: #FFC107;
    --error-color: #F44336;
    
    --text-primary: #1A1A1A;
    --text-secondary: #666666;
    --text-tertiary: #999999;
    
    --bg-primary: #FFFFFF;
    --bg-light: #F5F7FA;
    --bg-card: #FFFFFF;
    --border-color: #E5E7EB;
    
    /* 字体系统 */
    --font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-family-serif: 'Noto Serif SC', Georgia, serif;
    
    /* 间距系统 */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    
    /* 圆角系统 */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    
    /* 阴影系统 */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    
    /* 动画系统 */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 350ms ease;
}

/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    color: var(--text-primary);
    background-color: var(--bg-light);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 44px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--spacing-md);
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
}

.navbar-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
}

.navbar-action {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

/* 内容区域样式 */
.content {
    max-width: 390px;
    margin: 0 auto;
    padding: 60px var(--spacing-md) 80px;
    min-height: 100vh;
    padding-bottom: calc(56px + env(safe-area-inset-bottom) + var(--spacing-lg));
}

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition-fast);
    cursor: pointer;
    border: none;
    outline: none;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:active {
    transform: translateY(1px);
    box-shadow: var(--shadow-sm);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.btn-outline:active {
    background: var(--bg-light);
}

/* 标签样式 */
.tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
    margin-right: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.tag-primary {
    background: var(--primary-light);
    color: var(--primary-color);
}

.tag-warning {
    background: #FFF8E1;
    color: #FFA000;
}

.tag-success {
    background: #E8F5E9;
    color: var(--success-color);
}

/* 状态标签 */
.status-ongoing {
    background: var(--primary-light);
    color: var(--primary-color);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
}

.status-completed {
    background: #E8F5E9;
    color: var(--success-color);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
}

/* 加载动画 */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xl);
}

.loading-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid var(--primary-light);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 卡片样式 */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
}

/* 表单元素 */
.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-input:focus {
    border-color: var(--primary-color);
    outline: none;
}

.form-input::placeholder {
    color: var(--text-tertiary);
}

/* 按钮样式 */
.btn-secondary {
    display: inline-flex;
    align-items: center;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 14px;
    transition: all var(--transition-fast);
    background: var(--bg-light);
    border: none;
    cursor: pointer;
}

.btn-secondary:hover {
    background: var(--primary-light);
    color: var(--primary-color);
    transform: translateY(-1px);
}

.btn-secondary i {
    margin-right: var(--spacing-xs);
    font-size: 14px;
}

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

.btn-secondary.text-error:hover {
    background: var(--error-light);
}

/* 回复操作按钮样式 */
.reply-action {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.reply-action:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

.reply-action i {
    font-size: 14px;
}

.reply-action[onclick="reportComment(this)"] {
    margin-left: auto;
}

.reply-action[onclick="reportComment(this)"]:hover {
    color: var(--error-color);
    background: var(--error-light);
}

/* 展开更多回复按钮样式 */
.expand-replies {
    color: var(--primary-color);
    font-size: 14px;
    padding: var(--spacing-sm) var(--spacing-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    margin-top: var(--spacing-sm);
}

.expand-replies:hover {
    background: var(--primary-light);
}

.expand-replies i {
    transition: transform var(--transition-fast);
}

.expand-replies:hover i {
    transform: translateY(2px);
}

/* 标签样式 */
.tag-danger {
    background-color: rgba(235, 87, 87, 0.1);
    color: var(--danger-color);
}

/* 底部操作栏 */
.footer-bar {
    height: 60px;
    background-color: var(--bg-card);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

/* 悬浮按钮 */
.fab {
    position: fixed;
    bottom: 76px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 28px;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: var(--shadow-lg);
    z-index: 100;
    transition: transform 0.3s, background-color 0.3s;
}

.fab:hover {
    transform: scale(1.05);
    background-color: #1A73E8;
}

/* 头像样式 */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-sm {
    width: 32px;
    height: 32px;
}

.avatar-lg {
    width: 56px;
    height: 56px;
}

/* 分割线 */
.divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 16px 0;
}

/* 微交互动画 */
.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 卡片悬停效果 */
.card-hover {
    transition: transform 0.3s, box-shadow 0.3s;
}

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* 表格样式 */
.table {
    width: 100%;
    border-collapse: collapse;
}

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

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

/* 弹窗样式 */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    max-width: 90%;
    width: 320px;
    padding: 24px;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    margin-bottom: 16px;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
}

.modal-body {
    margin-bottom: 24px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* 响应式工具类 */
.d-flex {
    display: flex;
}

.flex-column {
    flex-direction: column;
}

.align-items-center {
    align-items: center;
}

.justify-content-between {
    justify-content: space-between;
}

.justify-content-center {
    justify-content: center;
}

.gap-2 {
    gap: 8px;
}

.gap-3 {
    gap: 12px;
}

.gap-4 {
    gap: 16px;
}

.mb-1 {
    margin-bottom: 4px;
}

.mb-2 {
    margin-bottom: 8px;
}

.mb-3 {
    margin-bottom: 12px;
}

.mb-4 {
    margin-bottom: 16px;
}

.mt-1 {
    margin-top: 4px;
}

.mt-2 {
    margin-top: 8px;
}

.mt-3 {
    margin-top: 12px;
}

.mt-4 {
    margin-top: 16px;
}

.mr-1 {
    margin-right: 4px;
}

.mr-2 {
    margin-right: 8px;
}

.ml-1 {
    margin-left: 4px;
}

.ml-2 {
    margin-left: 8px;
}

.p-0 {
    padding: 0;
}

.p-2 {
    padding: 8px;
}

.p-3 {
    padding: 12px;
}

.p-4 {
    padding: 16px;
}

.w-100 {
    width: 100%;
}

.h-100 {
    height: 100%;
}

.text-center {
    text-align: center;
}

/* 文本样式 */
.text-primary {
    color: var(--text-primary);
}

.text-secondary {
    color: var(--text-secondary);
}

.text-tertiary {
    color: var(--text-tertiary);
}

.text-success {
    color: var(--success-color);
}

.text-danger {
    color: var(--danger-color);
}

.font-sm {
    font-size: 14px;
}

.font-xs {
    font-size: 12px;
}

.font-lg {
    font-size: 18px;
}

.font-xl {
    font-size: 24px;
}

.font-bold {
    font-weight: 600;
}

.font-medium {
    font-weight: 500;
}

.font-normal {
    font-weight: 400;
}

/* 图片网格 */
.image-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.image-grid img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}

/* TabBar 样式 */
.tabbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding-bottom: env(safe-area-inset-bottom);
    z-index: 100;
}

.tabbar-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 12px;
    transition: all var(--transition-fast);
    position: relative;
}

.tabbar-item.active {
    color: var(--primary-color);
}

.tabbar-item i {
    font-size: 20px;
    margin-bottom: 4px;
}

/* 发布按钮样式 */
.publish-fab {
    position: fixed;
    bottom: 80px;  /* 位于底部导航栏上方 */
    left: 50%;
    transform: translateX(-50%);
    width: 48px;
    height: 48px;
    background: var(--primary-gradient);  /* 使用主题色渐变背景 */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: var(--shadow-lg);
    z-index: 101;  /* 确保在导航栏上方 */
    transition: all var(--transition-fast);
}

.publish-fab i {
    font-size: 24px;
}

.publish-fab:active {
    transform: translateX(-50%) scale(0.95);
}

/* 评论相关样式 */
/* 评论区域 */
.comment-section {
    margin-top: var(--spacing-xl);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.comment-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.comment-sort {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.sort-item {
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 14px;
    transition: all var(--transition-fast);
}

.sort-item.active {
    color: var(--primary-color);
    background: var(--bg-light);
}

/* 评论卡片 */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* 回复列表 */
.comment-replies {
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border-color);
}

.reply-item {
    display: flex;
    align-items: flex-start;
    padding: var(--spacing-sm) var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
    transition: all var(--transition-fast);
}

.reply-item:hover {
    background: var(--bg-light);
}

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

.reply-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: var(--spacing-sm);
    flex-shrink: 0;
}

.reply-content {
    flex: 1;
    font-size: 14px;
}

.reply-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    margin-bottom: 4px;
}

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

.reply-time {
    font-size: 12px;
    color: var(--text-secondary);
}

.reply-text {
    color: var(--text-primary);
    line-height: 1.5;
    margin-bottom: 4px;
}

.reply-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}

/* 评论输入框 */
.comment-input-container {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 390px;
    background: linear-gradient(to top, var(--bg-card) 90%, transparent);
    padding: var(--spacing-lg);
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    z-index: 1000;
}

.comment-input-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.comment-input {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    resize: none;
    min-height: 40px;
    max-height: 120px;
    transition: all var(--transition-fast);
    background: var(--bg-light);
}

.comment-input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: var(--shadow-sm);
}

/* 删除确认弹窗 */
.delete-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.delete-modal.show {
    display: flex;
}

.delete-modal-content {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    width: 80%;
    max-width: 320px;
    animation: modalSlideIn 0.3s ease-out;
}

.delete-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    text-align: center;
}

.delete-modal-message {
    color: var(--text-secondary);
    font-size: 14px;
    text-align: center;
    margin-bottom: var(--spacing-lg);
    line-height: 1.5;
}

.delete-modal-actions {
    display: flex;
    gap: var(--spacing-md);
}

.delete-modal-btn {
    flex: 1;
    padding: var(--spacing-sm);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.delete-modal-btn.cancel {
    background: var(--bg-light);
    color: var(--text-secondary);
}

.delete-modal-btn.confirm {
    background: var(--error-light);
    color: var(--error-color);
}

.delete-modal-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.delete-modal-btn:active {
    transform: translateY(0);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* 底部操作按钮样式 */
.action-buttons {
    position: fixed;
    bottom: var(--spacing-lg);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: var(--spacing-md);
    width: calc(100% - 32px);
    max-width: 358px;
    z-index: 100;
    padding-top: var(--spacing-lg);
}

.action-button {
    flex: 1;
    height: 44px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.action-button.draft {
    background: var(--bg-light);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.action-button.publish {
    background: var(--primary-gradient);
    color: white;
}

.action-button:active {
    transform: scale(0.98);
}

.action-button i {
    margin-right: var(--spacing-sm);
}

.action-button.draft:hover {
    background: var(--bg-card);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.action-button.publish:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(74, 144, 226, 0.2);
}

.action-button.publish:active {
    transform: translateY(0);
}

/* 全宽按钮样式 */
.btn-block {
    width: 100%;
    height: 56px;
    border-radius: var(--radius-lg);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-block:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-block:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(74, 144, 226, 0.2);
}

.btn-block:not(:disabled):active {
    transform: translateY(0);
}

.btn-block::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-block:not(:disabled):hover::after {
    opacity: 1;
}

.btn-block .btn-text {
    display: inline-block;
}

.btn-block .loading-spinner {
    display: none;
    width: 20px;
    height: 20px;
    margin: 0 auto;
} 

.sort-btn {
    padding: 6px 8px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    background: white;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.sort-btn:hover {
    background: var(--bg-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}
.sort-btn.active {
    background: var(--primary-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: 500;
}