/* 星空主题全局样式 */
:root {
    --space-black: #0a0e27;
    --space-blue: #1a1f3a;
    --space-purple: #2d1b4e;
    --space-violet: #5a3d7b;
    --star-white: #ffffff;
    --star-gold: #ffd700;
    --nebula-blue: #4a90e2;
    --nebula-pink: #e94b8a;
    --cosmic-gradient: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 50%, #2d1b4e 100%);
}

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

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--cosmic-gradient);
    color: var(--star-white);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    width: 100%;
    max-width: 100vw;
}

/* 星空背景动画（大颗高亮 + 海量小星） */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* 大颗星（4~6px）+ 中星（2~3px） */
    background-image:
        radial-gradient(6px 6px at 8% 18%, rgba(255,255,255,0.98), transparent 55%),
        radial-gradient(6px 6px at 28% 72%, rgba(255,255,255,0.95), transparent 55%),
        radial-gradient(5px 5px at 50% 10%, rgba(255,255,255,0.95), transparent 55%),
        radial-gradient(5px 5px at 72% 38%, rgba(255,255,255,0.98), transparent 55%),
        radial-gradient(6px 6px at 88% 78%, rgba(255,255,255,0.98), transparent 55%),
        radial-gradient(5px 5px at 18% 88%, rgba(255,255,255,0.9), transparent 55%),
        radial-gradient(5px 5px at 38% 48%, rgba(255,255,255,0.95), transparent 55%),
        radial-gradient(3px 3px at 12% 40%, rgba(255,255,255,0.85), transparent 60%),
        radial-gradient(3px 3px at 62% 82%, rgba(255,255,255,0.85), transparent 60%),
        radial-gradient(3px 3px at 92% 26%, rgba(255,255,255,0.85), transparent 60%),
        radial-gradient(3px 3px at 5% 65%, rgba(255,255,255,0.8), transparent 60%),
        radial-gradient(3px 3px at 32% 25%, rgba(255,255,255,0.8), transparent 60%),
        radial-gradient(3px 3px at 55% 55%, rgba(255,255,255,0.8), transparent 60%),
        radial-gradient(3px 3px at 78% 90%, rgba(255,255,255,0.8), transparent 60%),
        radial-gradient(3px 3px at 95% 55%, rgba(255,255,255,0.8), transparent 60%);
    background-size: 200% 200%;
    background-position: 0% 0%;
    animation: starfield-move 60s linear infinite;
    opacity: 0.9;
    pointer-events: none;
    z-index: 0;
}

/* 第二层：大量小星，增加“星尘感” */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(1.8px 1.8px at 5% 10%, rgba(255,255,255,0.6), transparent 65%),
        radial-gradient(1.8px 1.8px at 15% 35%, rgba(255,255,255,0.5), transparent 65%),
        radial-gradient(1.8px 1.8px at 25% 80%, rgba(255,255,255,0.6), transparent 65%),
        radial-gradient(1.8px 1.8px at 40% 20%, rgba(255,255,255,0.55), transparent 65%),
        radial-gradient(1.8px 1.8px at 55% 75%, rgba(255,255,255,0.55), transparent 65%),
        radial-gradient(1.8px 1.8px at 68% 15%, rgba(255,255,255,0.5), transparent 65%),
        radial-gradient(1.8px 1.8px at 80% 60%, rgba(255,255,255,0.55), transparent 65%),
        radial-gradient(1.8px 1.8px at 92% 30%, rgba(255,255,255,0.6), transparent 65%),
        radial-gradient(1.8px 1.8px at 12% 55%, rgba(255,255,255,0.5), transparent 65%),
        radial-gradient(1.8px 1.8px at 48% 90%, rgba(255,255,255,0.55), transparent 65%);
    background-size: 260% 260%;
    background-position: 0% 0%;
    animation: starfield-dust 90s linear infinite;
    opacity: 0.6;
    pointer-events: none;
    z-index: 0;
}

@keyframes starfield-move {
    0%   { background-position: 0% 0%; }
    50%  { background-position: 40% 60%; }
    100% { background-position: 80% 100%; }
}

@keyframes starfield-dust {
    0%   { background-position: 100% 0%; }
    50%  { background-position: 60% 40%; }
    100% { background-position: 20% 80%; }
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(10, 14, 39, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(74, 144, 226, 0.3);
    z-index: 1000;
    border-bottom: 1px solid rgba(74, 144, 226, 0.2);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: bold;
}

.logo-icon {
    font-size: 2rem;
    animation: twinkle 2s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

.logo-text {
    background: linear-gradient(135deg, var(--star-gold), var(--nebula-blue), var(--nebula-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--star-white);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-item:hover {
    background: rgba(74, 144, 226, 0.2);
    transform: translateY(-2px);
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.3), rgba(233, 75, 138, 0.3));
    box-shadow: 0 0 20px rgba(74, 144, 226, 0.4);
}

.nav-item .icon {
    font-size: 1.2rem;
    font-style: normal; /* 避免 <i> 标签默认斜体，保证表情符号正常显示 */
}

.logout-btn {
    opacity: 0.8;
}

.logout-btn:hover {
    opacity: 1;
    background: rgba(233, 75, 138, 0.2);
}

/* 主容器 */
.main-container {
    position: relative;
    z-index: 1;
    padding-top: 80px;
    min-height: 100vh;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* 返回按钮 */
.back-button {
    position: fixed;
    top: 100px;
    left: 2rem;
    padding: 0.6rem 1.2rem;
    background: rgba(26, 31, 58, 0.9);
    border: 1px solid rgba(74, 144, 226, 0.3);
    border-radius: 20px;
    color: var(--star-white);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    backdrop-filter: blur(10px);
}

.back-button:hover {
    background: rgba(74, 144, 226, 0.3);
    border-color: var(--nebula-blue);
    transform: translateX(-3px);
}

.back-button span {
    font-size: 1.2rem;
}

@media (max-width: 768px) {
    .back-button {
        top: 135px;
        left: 1rem;
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
        z-index: 999;
        background: rgba(26, 31, 58, 0.95);
        backdrop-filter: blur(10px);
    }
    
    .back-button span {
        display: inline;
    }
}

/* 活动公告栏 */
.announcement-bar {
    max-width: 1400px;
    margin: 0 auto;
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    background: radial-gradient(circle at 0% 0%, rgba(233, 75, 138, 0.25), transparent 60%),
                radial-gradient(circle at 100% 100%, rgba(74, 144, 226, 0.25), transparent 60%),
                rgba(10, 14, 39, 0.9);
    border: 1px solid rgba(74, 144, 226, 0.6);
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.announcement-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding-right: 0.75rem;
    border-right: 1px solid rgba(255, 255, 255, 0.15);
    white-space: nowrap;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
}

.announcement-label-icon {
    font-size: 1.1rem;
}

.announcement-label-text {
    font-weight: 600;
    letter-spacing: 0.08em;
}

.announcement-list {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    overflow-x: auto;
    scrollbar-width: none;
}

.announcement-list::-webkit-scrollbar {
    display: none;
}

.announcement-item {
    flex: 0 0 auto;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.6);
    color: rgba(248, 250, 252, 0.95);
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.announcement-item:hover {
    border-color: rgba(248, 250, 252, 0.9);
    background: radial-gradient(circle at 0% 0%, rgba(233, 75, 138, 0.3), transparent 55%),
                radial-gradient(circle at 100% 100%, rgba(74, 144, 226, 0.4), transparent 55%);
    transform: translateY(-1px);
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.7);
}

.announcement-title {
    font-weight: 600;
}

.announcement-tag {
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    font-size: 0.75rem;
    background: rgba(55, 65, 81, 0.9);
    color: rgba(248, 250, 252, 0.9);
}

.announcement-badge {
    font-size: 0.75rem;
    color: rgba(248, 250, 252, 0.8);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.announcement-badge .dot {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.9);
}

/* 页面标题 */
.page-title {
    text-align: center;
    padding: 1.25rem 0 0.75rem 0;
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--star-gold), var(--nebula-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(74, 144, 226, 0.5);
}

/* 瀑布流容器（列布局，避免卡片内部空白） */
.gallery-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.masonry-grid {
    column-count: 3;
    column-gap: 15px;
}

/* 作品卡片 */
.work-card {
    background: rgba(26, 31, 58, 0.8);
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(74, 144, 226, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    margin-bottom: 15px;
    break-inside: avoid;
}

/* 首页&探索页：使用 3 列容器配合 JS 分配，实现“第一行三列都是最新作品”，仍保持列内错落 */
body[data-page="home"] .masonry-grid,
body[data-page="explore"] .masonry-grid {
    column-count: initial;              /* 关闭纯 CSS 列布局，改用 JS+列容器控制顺序 */
    column-gap: 0;
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

body[data-page="home"] .masonry-column,
body[data-page="explore"] .masonry-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

body[data-page="home"] .work-card,
body[data-page="explore"] .work-card {
    margin-bottom: 0;                   /* 间距由列容器的 gap 控制 */
}

.work-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(74, 144, 226, 0.4);
    border-color: rgba(74, 144, 226, 0.5);
}

/* 保留尺寸class用于语义，列布局下不再强制高度 */

.work-image {
    width: 100%;
    height: auto;
    max-height: 400px;
    max-width: 100%;
    display: block;
    object-fit: cover;
}

.work-video {
    width: 100%;
    height: auto;
    max-height: 400px;
    max-width: 100%;
    display: block;
    object-fit: cover;
}

.work-card .work-media {
    position: relative;
}

.media-count-badge {
    position: absolute;
    left: 10px;
    top: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.85rem;
    backdrop-filter: blur(4px);
}

.work-info {
    padding: 0.7rem;
}

.work-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    color: var(--star-white);
    line-height: 1.3;
}

.work-author {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.3rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.author-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--cosmic-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.work-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 0.4rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
}

.work-brief {
    margin: 0.2rem 0 0.3rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
}

.work-publish-time {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 0.3rem;
}

.work-meta-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    line-height: 1.2;
}

.work-meta-item .icon {
    font-size: 0.85rem;
    flex-shrink: 0;
}

.work-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.like-btn {
    background: none;
    border: none;
    color: var(--star-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    padding: 0.25rem 0.7rem;
    border-radius: 20px;
}

.like-btn:hover {
    background: rgba(233, 75, 138, 0.2);
    transform: scale(1.1);
}

.like-btn.liked {
    color: var(--nebula-pink);
}

.like-btn.liked .heart-icon {
    animation: heartbeat 0.6s ease;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.3); }
    50% { transform: scale(1.1); }
}

/* 上传表单样式 */
.upload-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
}

.upload-form {
    background: rgba(26, 31, 58, 0.8);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(74, 144, 226, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

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

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

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.8rem;
    background: rgba(10, 14, 39, 0.6);
    border: 1px solid rgba(74, 144, 226, 0.3);
    border-radius: 10px;
    color: var(--star-white);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--nebula-blue);
    box-shadow: 0 0 15px rgba(74, 144, 226, 0.3);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.file-upload-area {
    border: 2px dashed rgba(74, 144, 226, 0.4);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(10, 14, 39, 0.4);
}

.file-upload-area:hover {
    border-color: var(--nebula-blue);
    background: rgba(74, 144, 226, 0.1);
}

.file-upload-area.dragover {
    border-color: var(--nebula-pink);
    background: rgba(233, 75, 138, 0.1);
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.file-input {
    display: none;
}

.preview-area {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.preview-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 1;
}

.preview-item img,
.preview-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-preview {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(233, 75, 138, 0.9);
    border: none;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.remove-preview:hover {
    background: var(--nebula-pink);
    transform: scale(1.1);
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--nebula-blue), var(--nebula-pink));
    border: none;
    border-radius: 25px;
    color: var(--star-white);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(74, 144, 226, 0.5);
}

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

/* 表单分组和行布局 */
.form-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--nebula-blue);
    margin: 1.5rem 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(74, 144, 226, 0.3);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.form-label span {
    font-size: 1rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100vw;
        z-index: 1000;
        box-shadow: 0 2px 15px rgba(0, 0, 0, 0.4);
    }
    
    .nav-container {
        flex-direction: column;
        gap: 0.6rem;
        padding: 0.7rem 1rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .nav-logo {
        font-size: 1rem;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .logo-icon {
        font-size: 1.5rem;
    }
    
    .logo-text {
        font-size: 0.8rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: calc(100% - 2rem);
    }
    
    .nav-menu {
        gap: 0.4rem;
        width: 100%;
        flex-wrap: nowrap;
        justify-content: space-around;
        align-items: center;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding: 0.2rem 0;
    }
    
    .nav-menu::-webkit-scrollbar {
        display: none;
    }
    
    .nav-item {
        padding: 0.5rem 0.6rem;
        font-size: 0.85rem;
        flex-shrink: 0;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 12px;
        transition: all 0.2s ease;
        position: relative;
    }
    
    /* 隐藏所有导航项的span文字，统一只显示图标 */
    .nav-item span {
        display: none;
    }
    
    /* 用户名按钮特殊处理 - 显示用户名但限制宽度 */
    .nav-item[data-page="profile"] {
        flex: 0 0 auto;
        min-width: auto;
        max-width: 80px;
    }
    
    .nav-user-text {
        display: inline !important;
        font-size: 0.7rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 50px;
        margin-left: 0.3rem;
    }
    
    /* 退出按钮 - 只显示图标，和其他按钮保持一致 */
    .logout-btn {
        flex: 0 0 auto;
        min-width: 44px;
        max-width: 44px;
        opacity: 0.85;
        background: rgba(233, 75, 138, 0.15);
        border: 1px solid rgba(233, 75, 138, 0.3);
    }
    
    .logout-btn:active {
        opacity: 1;
        background: rgba(233, 75, 138, 0.25);
        transform: scale(0.95);
    }
    
    .logout-btn span {
        display: none !important;
    }
    
    /* 导航按钮图标优化 */
    .nav-item .icon {
        font-size: 1.3rem;
        line-height: 1;
        filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
    }
    
    /* 导航按钮悬停效果 */
    .nav-item:not(.logout-btn):hover {
        background: rgba(74, 144, 226, 0.2);
        transform: translateY(-2px);
    }
    
    /* 导航按钮激活状态优化 */
    .nav-item.active {
        background: linear-gradient(135deg, rgba(74, 144, 226, 0.5), rgba(233, 75, 138, 0.5));
        box-shadow: 0 2px 10px rgba(74, 144, 226, 0.4);
        transform: translateY(-1px);
    }
    
    /* 导航按钮点击效果 */
    .nav-item:active {
        transform: scale(0.92);
    }
    
    /* 用户名按钮特殊样式 */
    .nav-item[data-page="profile"] .icon {
        font-size: 1.2rem;
    }
    
    /* 确保所有按钮在同一行，如果空间不足可以横向滚动 */
    .nav-menu {
        min-height: 48px;
    }
    
    /* 移动端导航栏高度计算：logo + menu + padding ≈ 110px，优化后更紧凑 */
    .main-container {
        padding-top: 130px;
    }
    
    /* 活动公告栏：统一左右padding，确保对称 */
    .announcement-bar {
        max-width: 100% !important;
        margin-top: 0.5rem;
        margin-left: 1rem;
        margin-right: 1rem;
        padding: 0.6rem 1rem;
        border-radius: 20px;
        flex-wrap: nowrap;
        width: calc(100% - 2rem);
        box-sizing: border-box;
    }
    
    .announcement-label {
        font-size: 0.8rem;
        padding-right: 0.5rem;
        flex-shrink: 0;
    }
    
    .announcement-label-text {
        display: none;
    }
    
    .announcement-list {
        flex: 1;
        min-width: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .announcement-list::-webkit-scrollbar {
        display: none;
    }
    
    .announcement-item {
        font-size: 0.75rem;
        padding: 0.3rem 0.7rem;
        white-space: nowrap;
    }
    
    .masonry-grid {
        column-count: 2;
        column-gap: 10px;
    }
    
    body[data-page="home"] .masonry-grid,
    body[data-page="explore"] .masonry-grid {
        gap: 10px;
    }
    
    /* 画廊容器：统一左右padding，确保作品对称 */
    .gallery-container {
        max-width: 100% !important;
        padding: 1rem !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        width: 100%;
        box-sizing: border-box;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    /* 确保作品卡片容器也对称 */
    body[data-page="home"] .masonry-grid,
    body[data-page="explore"] .masonry-grid {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100%;
    }
    
    body[data-page="home"] .masonry-column,
    body[data-page="explore"] .masonry-column {
        padding-left: 0;
        padding-right: 0;
        margin-left: 0;
        margin-right: 0;
        flex: 1;
    }
    
    /* 确保作品卡片左右对称 */
    body[data-page="home"] .work-card,
    body[data-page="explore"] .work-card {
        margin-left: 0;
        margin-right: 0;
        width: 100%;
        box-sizing: border-box;
    }
    
    /* 确保页面标题也对称 */
    .page-title {
        font-size: 1.8rem;
        padding: 1rem 1rem 0.5rem 1rem;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    
    .back-button span {
        display: inline;
    }
}

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

::-webkit-scrollbar-track {
    background: var(--space-black);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--nebula-blue), var(--nebula-pink));
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--nebula-pink), var(--star-gold));
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--star-white);
    animation: spin 1s ease-in-out infinite;
}

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

