/* ==================== 基础样式重置 ==================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 黑夜主题（默认）- 更时尚的配色 */
    --primary-color: #8b5cf6;
    --primary-light: #a78bfa;
    --primary-dark: #7c3aed;
    --secondary-color: #ec4899;
    --accent-color: #06b6d4;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    
    /* 背景色 - 更有层次感的深色 */
    --bg-dark: #0f0f1a;
    --bg-dark-secondary: #1a1a2e;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    --bg-input: rgba(255, 255, 255, 0.05);
    
    /* 文字颜色 */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.45);
    
    /* 边框和阴影 */
    --border-color: rgba(255, 255, 255, 0.08);
    --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.2);
    --shadow-glow: 0 0 40px rgba(139, 92, 246, 0.15);
    
    /* 过渡动画 */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* 圆角 */
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 28px;
    --radius-xl: 32px;
}

/* 白天主题 - 更清新的配色 */
[data-theme="light"] {
    --primary-color: #7c3aed;
    --primary-light: #8b5cf6;
    --primary-dark: #6d28d9;
    --secondary-color: #db2777;
    --accent-color: #0891b2;
    
    --bg-dark: #fafafa;
    --bg-dark-secondary: #f0f0f5;
    --bg-card: rgba(255, 255, 255, 0.8);
    --bg-card-hover: rgba(255, 255, 255, 0.95);
    --bg-input: rgba(0, 0, 0, 0.03);
    
    --text-primary: #1a1a2e;
    --text-secondary: rgba(26, 26, 46, 0.7);
    --text-muted: rgba(26, 26, 46, 0.5);
    
    --border-color: rgba(0, 0, 0, 0.06);
    --shadow-card: 0 2px 16px rgba(0, 0, 0, 0.06);
    --shadow-glow: 0 0 40px rgba(139, 92, 246, 0.1);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 16px;
}

/* PC 端容器宽度限制 */
@media (min-width: 768px) {
    .container {
        max-width: 800px;
        padding: 0 24px;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 900px;
    }
}

/* ==================== 星空背景动画 - 更细腻 ==================== */
.stars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
    opacity: var(--star-opacity, 1);
    transition: opacity 1s ease;
}

.stars, .stars2, .stars3 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
}

.stars {
    width: 1px;
    height: 1px;
    background: transparent;
    box-shadow: 
        100px 200px #fff, 400px 500px #fff, 800px 100px #fff,
        1200px 300px #fff, 1500px 600px #fff, 200px 800px #fff,
        600px 400px #fff, 900px 700px #fff, 1300px 200px #fff,
        50px 600px #fff, 350px 100px #fff, 750px 500px #fff,
        1100px 800px #fff, 1400px 300px #fff, 1800px 600px #fff,
        250px 350px #fff, 550px 750px #fff, 850px 250px #fff,
        1150px 550px #fff, 1450px 150px #fff, 1750px 450px #fff,
        300px 900px #fff, 700px 200px #fff, 1000px 600px #fff,
        1600px 400px #fff, 1900px 800px #fff, 450px 450px #fff;
    animation: animStar 50s linear infinite;
}

.stars2 {
    width: 2px;
    height: 2px;
    background: transparent;
    box-shadow: 
        200px 300px #fff, 500px 100px #fff, 900px 500px #fff,
        1300px 800px #fff, 1600px 200px #fff, 100px 700px #fff,
        400px 400px #fff, 800px 200px #fff, 1200px 600px #fff,
        1500px 900px #fff, 300px 100px #fff, 700px 500px #fff,
        1100px 300px #fff, 1400px 700px #fff, 1800px 100px #fff,
        600px 800px #fff, 1000px 400px #fff, 1700px 600px #fff;
    animation: animStar 100s linear infinite;
}

.stars3 {
    width: 3px;
    height: 3px;
    background: transparent;
    box-shadow: 
        300px 400px #fff, 600px 200px #fff, 1000px 600px #fff,
        1400px 100px #fff, 1700px 500px #fff, 200px 800px #fff,
        500px 300px #fff, 900px 700px #fff, 1300px 400px #fff,
        1600px 800px #fff, 800px 100px #fff, 1200px 500px #fff;
    animation: animStar 150s linear infinite;
}

@keyframes animStar {
    from { transform: translateY(0); }
    to { transform: translateY(-2000px); }
}

/* 流星动画 */
.shooting-star {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #fff, transparent);
    animation: shooting 4s linear infinite;
    opacity: 0;
}

@keyframes shooting {
    0% {
        transform: translateX(0) translateY(0) rotate(-45deg);
        opacity: 1;
    }
    100% {
        transform: translateX(-500px) translateY(500px) rotate(-45deg);
        opacity: 0;
    }
}

/* ==================== 头部 - 玻璃拟态效果 ==================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 12px 0;
    background: rgba(15, 15, 26, 0.75);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border-color);
}

[data-theme="light"] .header {
    background: rgba(250, 250, 250, 0.85);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    font-size: 26px;
    animation: float 3s ease-in-out infinite;
    filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.5));
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-light), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.header-stats {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--bg-input);
    border-radius: 50px;
    font-size: 13px;
    border: 1px solid var(--border-color);
    transition: var(--transition-fast);
}

.stat-icon {
    font-size: 14px;
    transition: all 0.3s ease;
}

.stat-icon.online {
    animation: pulse 2s ease-in-out infinite;
    filter: drop-shadow(0 0 4px #10b981);
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(0.9); }
}

.stat-value {
    font-weight: 600;
    background: linear-gradient(135deg, var(--primary-light), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==================== 主内容区 ==================== */
.main {
    position: relative;
    z-index: 1;
    padding: 100px 0 100px;
    min-height: 100vh;
}

/* ==================== 英雄区域 - 更时尚的标题 ==================== */
.hero {
    text-align: center;
    padding: 20px 0 30px;
}

.hero-title {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 10px;
    letter-spacing: -1px;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary-color) 50%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: gradientShift 4s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    font-weight: 400;
    letter-spacing: 0.5px;
}

/* ==================== 发布表单区域 - 玻璃拟态卡片 ==================== */
.post-section {
    margin-bottom: 24px;
}

.post-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 20px;
    overflow: hidden;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 
        var(--shadow-card),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: var(--transition-normal);
}

.post-card:focus-within {
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 
        var(--shadow-card),
        0 0 0 4px rgba(139, 92, 246, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 30%, 
        rgba(139, 92, 246, 0.08), 
        transparent 50%);
    pointer-events: none;
}

.post-form {
    position: relative;
    z-index: 1;
}

.form-group {
    margin-bottom: 16px;
    position: relative;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 16px 18px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 16px;
    font-family: inherit;
    transition: var(--transition-fast);
    outline: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-muted);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    border-color: var(--primary-color);
    background: rgba(139, 92, 246, 0.05);
}

.form-select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238b5cf6' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.form-select option {
    background: var(--bg-dark);
    color: var(--text-primary);
}

.form-select.selected {
    background-color: rgba(139, 92, 246, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-light);
    font-weight: 600;
}

.form-textarea {
    resize: none;
    min-height: 110px;
    line-height: 1.7;
    padding-bottom: 32px;
}

.char-count {
    position: absolute;
    bottom: 12px;
    right: 14px;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    background: var(--bg-dark);
    padding: 2px 8px;
    border-radius: 10px;
}

/* 图片预览区域 - 更精致的样式 */
.image-preview-area {
    margin-bottom: 16px;
}

.preview-wrapper {
    position: relative;
    display: inline-block;
    max-width: 180px;
    max-height: 180px;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.preview-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* PC 端预览图更大 */
@media (min-width: 768px) {
    .preview-wrapper {
        max-width: 280px;
        max-height: 280px;
        border-radius: var(--radius-lg);
    }
}

.preview-wrapper img {
    width: 100%;
    height: auto;
    display: block;
}

.remove-image {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background: rgba(239, 68, 68, 0.95);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.remove-image:active {
    transform: scale(0.9);
}

/* 表单操作按钮 - 更时尚的渐变按钮 */
.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.upload-wrapper {
    position: relative;
}

.file-input {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.btn-upload,
.btn-submit {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 22px;
    border: none;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-upload {
    background: var(--bg-input);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-upload:active {
    background: rgba(139, 92, 246, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-light);
}

.btn-submit {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.35);
    position: relative;
    overflow: hidden;
}

.btn-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: 0.5s;
}

.btn-submit:active::before {
    left: 100%;
}

.btn-submit:active {
    transform: scale(0.96);
    box-shadow: 0 2px 12px rgba(139, 92, 246, 0.25);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-icon {
    font-size: 18px;
}

/* ==================== 留言列表区域 ==================== */
.messages-section {
    margin-bottom: 30px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 4px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.title-icon {
    font-size: 22px;
    filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.4));
}

.btn-refresh {
    width: 40px;
    height: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    box-shadow: var(--shadow-card);
}

.btn-refresh:active {
    background: var(--bg-card-hover);
    transform: rotate(180deg);
}

.btn-refresh.spinning span {
    display: inline-block;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 留言列表 - 更紧凑的间距 */
.messages-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* 留言卡片 - 更时尚的玻璃拟态设计 */
.message-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    animation: fadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transition: var(--transition-normal);
    box-shadow: var(--shadow-card);
}

.message-card:hover {
    border-color: rgba(139, 92, 246, 0.2);
    transform: translateY(-2px);
    box-shadow: 
        var(--shadow-card),
        0 8px 30px rgba(0, 0, 0, 0.15);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 不同用户的颜色标识 */
.message-card[data-author="MDB"] {
    border-left: 3px solid var(--primary-color);
}

.message-card[data-author="FJD"] {
    border-left: 3px solid var(--secondary-color);
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 14px;
}

.message-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.message-card[data-author="FJD"] .author-avatar {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.3);
}

.author-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.author-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.message-time {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.message-content {
    font-size: 15.5px;
    line-height: 1.75;
    color: var(--text-secondary);
    margin-bottom: 14px;
    word-wrap: break-word;
    letter-spacing: 0.2px;
}

/* 图片样式优化 */
.message-image {
    margin-bottom: 14px;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.message-image img {
    width: 100%;
    max-height: 350px;
    object-fit: contain;
    display: block;
    cursor: pointer;
    transition: var(--transition-fast);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.05), rgba(236, 72, 153, 0.05));
}

.message-image img:active {
    opacity: 0.9;
    transform: scale(0.98);
}

/* PC 端图片显示优化 */
@media (min-width: 768px) {
    .message-image img {
        max-height: 600px;
        border-radius: var(--radius-lg);
    }
    
    .message-image {
        border-radius: var(--radius-lg);
    }
}

@media (min-width: 1200px) {
    .message-image img {
        max-height: 700px;
    }
}

/* 留言底部操作栏 */
.message-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

/* 点赞按钮 - 更精致的样式 */
.btn-like {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-like:active {
    transform: scale(0.95);
}

.btn-like.liked {
    background: rgba(236, 72, 153, 0.1);
    border-color: rgba(236, 72, 153, 0.3);
    color: var(--secondary-color);
}

.like-icon {
    font-size: 16px;
    transition: var(--transition-fast);
}

.btn-like.liked .like-icon {
    animation: heartBeat 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.3); }
    50% { transform: scale(1.1); }
    75% { transform: scale(1.25); }
}

/* 删除按钮 */
.btn-delete {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-delete:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.btn-delete:active {
    transform: scale(0.95);
}

/* 加载状态 - 更精致的动画 */
.loading-state {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-muted);
}

.loading-spinner {
    width: 44px;
    height: 44px;
    margin: 0 auto 20px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.empty-state {
    text-align: center;
    padding: 70px 30px;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 72px;
    margin-bottom: 20px;
    opacity: 0.4;
    filter: drop-shadow(0 0 20px rgba(139, 92, 246, 0.3));
}

.empty-text {
    font-size: 16px;
    font-weight: 500;
}

/* 加载更多 */
.load-more {
    text-align: center;
    margin-top: 28px;
}

.btn-load-more {
    padding: 14px 36px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    box-shadow: var(--shadow-card);
}

.btn-load-more:active {
    background: var(--bg-card-hover);
    border-color: var(--primary-color);
    color: var(--primary-light);
}

/* ==================== 图片查看模态框 - 全屏沉浸式设计 ==================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(20px);
}

.modal-content {
    position: relative;
    z-index: 1;
    max-width: 95%;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: scaleIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes scaleIn {
    from { 
        opacity: 0;
        transform: scale(0.9);
    }
    to { 
        opacity: 1;
        transform: scale(1);
    }
}

.modal-content img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: var(--radius-md);
    object-fit: contain;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

/* PC 端模态框优化 */
@media (min-width: 768px) {
    .modal-content {
        max-width: 90%;
        max-height: 90vh;
    }
    
    .modal-content img {
        max-height: 85vh;
        border-radius: var(--radius-lg);
    }
}

.modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    backdrop-filter: blur(10px);
}

.modal-close:active {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(0.9);
}

/* ==================== 提示消息 - 更时尚的 Toast ==================== */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 16px 28px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 500;
    z-index: 3000;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast.success {
    border-color: rgba(16, 185, 129, 0.3);
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.toast.error {
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

/* ==================== 页脚 ==================== */
.footer {
    position: relative;
    padding: 30px 0 40px;
    text-align: center;
    z-index: 1;
}

.footer-text {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* ==================== 快速发布按钮 - 悬浮按钮 ==================== */
.fab {
    position: fixed;
    bottom: 30px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 6px 20px rgba(139, 92, 246, 0.4),
        0 2px 8px rgba(0, 0, 0, 0.2);
    transition: var(--transition-normal);
    z-index: 100;
    animation: fabPulse 2s ease-in-out infinite;
}

@keyframes fabPulse {
    0%, 100% { box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4), 0 2px 8px rgba(0, 0, 0, 0.2); }
    50% { box-shadow: 0 8px 30px rgba(139, 92, 246, 0.5), 0 4px 12px rgba(0, 0, 0, 0.25); }
}

.fab:active {
    transform: scale(0.92);
}

.fab.hidden {
    transform: scale(0);
    opacity: 0;
}

/* ==================== 响应式设计 - 针对移动端优化 ==================== */

/* 大屏手机 */
@media (min-width: 390px) {
    .container {
        padding: 0 20px;
    }
    
    .hero-title {
        font-size: 40px;
    }
    
    .post-card {
        padding: 24px;
    }
    
    .message-card {
        padding: 22px;
    }
}

/* PC 端优化 */
@media (min-width: 768px) {
    /* 整体布局 */
    .main {
        padding-top: 120px;
        padding-bottom: 120px;
    }
    
    /* 英雄区域 */
    .hero {
        padding: 40px 0 50px;
    }
    
    .hero-title {
        font-size: 48px;
        margin-bottom: 16px;
    }
    
    .hero-subtitle {
        font-size: 18px;
    }
    
    /* 发布卡片 */
    .post-card {
        padding: 32px;
        border-radius: 32px;
    }
    
    .form-textarea {
        min-height: 140px;
        font-size: 16px;
    }
    
    /* 留言卡片 */
    .message-card {
        padding: 28px;
        border-radius: 28px;
        margin-bottom: 20px;
    }
    
    .message-header {
        margin-bottom: 18px;
    }
    
    .author-avatar {
        width: 52px;
        height: 52px;
        font-size: 20px;
    }
    
    .author-name {
        font-size: 18px;
    }
    
    .message-time {
        font-size: 13px;
    }
    
    .message-content {
        font-size: 16px;
        line-height: 1.8;
        margin-bottom: 18px;
    }
    
    /* 按钮样式 */
    .btn-upload,
    .btn-submit {
        padding: 16px 28px;
        font-size: 16px;
    }
    
    .btn-like {
        padding: 12px 20px;
        font-size: 15px;
    }
    
    /* 模态框优化 */
    .modal-content {
        max-width: 90%;
    }
    
    .modal-content img {
        max-height: 85vh;
        max-width: 100%;
    }
    
    .modal-close {
        top: -60px;
        right: -10px;
        width: 48px;
        height: 48px;
        font-size: 28px;
    }
    
    /* 悬浮按钮位置 */
    .fab {
        width: 64px;
        height: 64px;
        font-size: 30px;
        right: 30px;
        bottom: 40px;
    }
}

/* 大屏 PC 优化 */
@media (min-width: 1200px) {
    .hero-title {
        font-size: 52px;
    }
    
    .message-card {
        padding: 32px;
    }
    
    .post-card {
        padding: 36px;
    }
}

/* 小屏手机优化 */
@media (max-width: 375px) {
    .hero-title {
        font-size: 32px;
    }
    
    .btn-upload .btn-text {
        display: none;
    }
    
    .btn-upload {
        padding: 14px;
    }
    
    .btn-submit {
        padding: 14px 20px;
    }
    
    .btn-icon {
        font-size: 20px;
    }
    
    .author-avatar {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

/* ==================== 触摸优化 ==================== */
@media (hover: none) {
    .btn-upload:hover,
    .btn-submit:hover,
    .btn-like:hover,
    .btn-delete:hover,
    .btn-refresh:hover,
    .btn-load-more:hover {
        transform: none;
    }
    
    .message-card:hover {
        border-color: var(--border-color);
        transform: none;
    }
}

/* ==================== 安全区域适配（iPhone X+）==================== */
@supports (padding-top: env(safe-area-inset-top)) {
    .header {
        padding-top: calc(12px + env(safe-area-inset-top));
    }
    
    .main {
        padding-top: calc(100px + env(safe-area-inset-top));
    }
    
    .footer {
        padding-bottom: calc(30px + env(safe-area-inset-bottom));
    }
    
    .fab {
        bottom: calc(30px + env(safe-area-inset-bottom));
    }
    
    .toast {
        bottom: calc(100px + env(safe-area-inset-bottom));
    }
}

/* PC 端移除安全区域适配 */
@media (min-width: 768px) {
    @supports (padding-top: env(safe-area-inset-top)) {
        .main {
            padding-top: 120px;
        }
        
        .fab {
            bottom: 40px;
        }
        
        .toast {
            bottom: 120px;
        }
    }
}

/* ==================== 主题切换动画 ==================== */
body {
    transition: background-color var(--transition-slow), color var(--transition-slow);
}

.form-input,
.form-textarea,
.form-select,
.btn-upload,
.btn-submit,
.btn-like,
.btn-delete,
.btn-refresh,
.btn-load-more,
.message-card,
.post-card {
    transition: background-color var(--transition-fast), 
                border-color var(--transition-fast), 
                color var(--transition-fast),
                transform var(--transition-fast),
                box-shadow var(--transition-fast);
}

/* ==================== 滚动条美化 ==================== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ==================== 选中文字样式 ==================== */
::selection {
    background: rgba(139, 92, 246, 0.3);
    color: var(--text-primary);
}
