/* ===============================================
   AI Story Club - P0-P2 设计改进
   基于对标平台（Wattpad、Royal Road、Medium、Substack）的设计改进
   =============================================== */

/* ========== Profile Tabs ========== */
.profile-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--gray-200);
    margin-bottom: 24px;
}

.tab-link {
    padding: 12px 24px;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.tab-link:hover {
    color: var(--primary);
    background: var(--gray-50);
}

.tab-link.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.tab-placeholder {
    padding: 48px;
    text-align: center;
    color: var(--text-secondary);
}

.about-section {
    max-width: 800px;
}

.about-section h3 {
    margin-bottom: 24px;
}

.about-section h4 {
    margin-top: 24px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.about-bio {
    line-height: 1.8;
}

.about-stats ul {
    list-style: none;
    padding: 0;
}

.about-stats li {
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-100);
}

/* ========== P0 改进 ========== */

/* 故事卡片改进 - 添加封面图支持 */
.story-card-cover-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s var(--ease-out);
}

.story-card:hover .story-card-cover-img {
    transform: scale(1.05);
}

.story-card-stats {
    display: flex;
    gap: 16px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--gray-200);
}

.story-card-stat {
    display: flex;
    align-items: center;
    gap: 4px;
}

.story-card-stat svg {
    width: 16px;
    height: 16px;
}

/* 阅读进度指示器 */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: transparent;
    z-index: 9999;
}

.reading-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--coral), var(--teal));
    width: 0%;
    transition: width 0.3s ease;
}

/* 排版优化 */
.story-content {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--gray-700);
    max-width: 720px;
    margin: 0 auto;
}

.story-content p {
    margin-bottom: 1.5em;
}

.story-content h2 {
    margin-top: 2em;
    margin-bottom: 0.5em;
}

/* 字体大小控制 */
.font-size-controls {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    padding: 8px;
    display: flex;
    gap: 4px;
    z-index: 100;
}

.font-size-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--gray-100);
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.font-size-btn:hover {
    background: var(--gray-200);
}

.font-size-btn.active {
    background: var(--coral);
    color: white;
}

/* ========== P1 改进 ========== */

/* 排行榜页面 */
.rankings-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.rankings-tabs {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
    border-bottom: 2px solid var(--gray-200);
}

.ranking-tab {
    padding: 12px 24px;
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
}

.ranking-tab:hover {
    color: var(--text);
}

.ranking-tab.active {
    color: var(--coral);
}

.ranking-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--coral);
}

.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ranking-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
}

.ranking-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}

.ranking-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--coral);
    min-width: 60px;
    text-align: center;
}

.ranking-info {
    flex: 1;
}

.ranking-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.ranking-meta {
    display: flex;
    gap: 16px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* 标签系统 */
.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0;
}

.tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background: var(--gray-100);
    color: var(--text-secondary);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
}

.tag:hover {
    background: var(--coral);
    color: white;
}

.tag.active {
    background: var(--coral);
    color: white;
}

/* 评论回复功能 */
.comment-reply {
    margin-left: 40px;
    padding-left: 20px;
    border-left: 2px solid var(--gray-200);
}

.comment-reply-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.comment-reply-btn:hover {
    background: var(--gray-100);
    color: var(--coral);
}

.comment-like-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.comment-like-btn:hover {
    background: var(--gray-100);
    color: var(--coral);
}

.comment-like-btn.liked {
    color: var(--coral);
}

/* ========== P2 改进 ========== */

/* 书签/保存功能 */
.bookmark-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s;
    color: var(--text-secondary);
}

.bookmark-btn:hover {
    background: var(--gray-100);
    color: var(--coral);
}

.bookmark-btn.bookmarked {
    color: var(--coral);
}

/* 分享功能 */
.share-buttons {
    display: flex;
    gap: 8px;
    margin: 16px 0;
}

.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--gray-100);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.2s;
}

.share-btn:hover {
    transform: scale(1.1);
    background: var(--coral);
    color: white;
}

/* 个性化推荐 */
.recommendations-section {
    margin: 40px 0;
    padding: 32px;
    background: var(--gray-50);
    border-radius: 16px;
}

.recommendations-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 20px;
}

.recommendations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* 作者资料改进 */
.author-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 32px 0;
}

.author-stat-card {
    padding: 24px;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.author-stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--coral);
    margin-bottom: 8px;
}

.author-stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* 移动端底部导航 */
@media (max-width: 768px) {
    .mobile-bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
        display: flex;
        justify-content: space-around;
        padding: 8px 0;
        z-index: 100;
    }
    
    .main-content {
        padding-bottom: 80px;
    }
}

/* 骨架屏加载 */
.skeleton {
    background: linear-gradient(90deg, 
        var(--gray-100) 25%, 
        var(--gray-200) 50%, 
        var(--gray-100) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-card {
    padding: 20px;
    border-radius: 12px;
    background: white;
    box-shadow: var(--shadow-sm);
}

.skeleton-cover {
    height: 200px;
    margin-bottom: 16px;
}

.skeleton-title {
    height: 24px;
    margin-bottom: 12px;
    width: 80%;
}

.skeleton-text {
    height: 16px;
    margin-bottom: 8px;
}

.skeleton-text:last-child {
    width: 60%;
}

/* 页面切换动画 */
.page-transition {
    animation: fadeInUp 0.4s ease;
}

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

/* 微交互改进 */
.btn {
    transition: all 0.2s ease;
}

.btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* 卡片悬浮效果增强 */
.story-card,
.comment-item,
.msg-item {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.story-card:hover,
.comment-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

/* 输入框焦点效果 */
input:focus,
textarea:focus,
select:focus {
    transform: scale(1.01);
    transition: transform 0.2s ease;
}

/* Toast 通知动画改进 */
.toast-notification {
    animation: toastSlideIn 0.3s ease;
}

@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ========== 2026设计趋势 - Bento Grid 布局 ========== */

/* Bento Grid 容器 */
.stories-bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    padding: 20px 0;
    margin-top: 20px;
}

/* 特色故事 - 大卡片 */
.story-card.featured {
    grid-column: span 2;
    grid-row: span 2;
    padding: 0;
    overflow: hidden;
}

.story-card.featured .story-card-cover {
    height: 100%;
    min-height: 300px;
}

.story-card.featured .story-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
}

.story-card.featured .story-card-title {
    font-size: 1.5rem;
    color: white;
}

.story-card.featured .story-card-excerpt {
    color: rgba(255,255,255,0.9);
}

/* 紧凑卡片 */
.story-card.compact {
    padding: 12px;
}

.story-card.compact .story-card-cover-img {
    height: 140px;
}

/* Bento Grid 微妙变化 - 卡片圆角多样化 */
.story-card:nth-child(3n+1) {
    border-radius: 24px 8px 24px 8px;
}

.story-card:nth-child(3n+2) {
    border-radius: 8px 24px 8px 24px;
}

.story-card:nth-child(3n+3) {
    border-radius: 16px;
}

/* 悬停效果增强 */
.story-card {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.story-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

/* 响应式调整 */
@media (max-width: 1024px) {
    .stories-bento-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 16px;
    }
    
    .story-card.featured {
        grid-column: span 1;
        grid-row: span 1;
    }
}

@media (max-width: 640px) {
    .stories-bento-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .story-card:nth-child(3n+1),
    .story-card:nth-child(3n+2),
    .story-card:nth-child(3n+3) {
        border-radius: 16px;
    }
}

/* ========== 2026设计趋势 - 动态排版 ========== */

/* 动态标题 */
.dynamic-heading {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 1em;
}

/* 文字动画 - 逐字显示 */
.text-reveal {
    overflow: hidden;
}

.text-reveal span {
    display: inline-block;
    animation: textReveal 0.8s ease forwards;
    opacity: 0;
    transform: translateY(100%);
}

.text-reveal span:nth-child(1) { animation-delay: 0.1s; }
.text-reveal span:nth-child(2) { animation-delay: 0.2s; }
.text-reveal span:nth-child(3) { animation-delay: 0.3s; }
.text-reveal span:nth-child(4) { animation-delay: 0.4s; }

@keyframes textReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 自适应字体大小控制 */
.font-size-control {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--bg);
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 8px;
    display: flex;
    gap: 4px;
    z-index: 100;
}

.font-size-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--gray-100);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    color: var(--text);
}

.font-size-btn:hover {
    background: var(--gray-200);
}

.font-size-btn.active {
    background: var(--coral);
    color: white;
}

/* ========== 微交互升级 - 2026设计趋势 ========== */

/* 按钮涟漪效果 */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, rgba(255,255,255,0.4) 10%, transparent 10%);
    background-repeat: no-repeat;
    background-position: 50%;
    transform: scale(10, 10);
    opacity: 0;
    transition: transform 0.5s, opacity 1s;
}

.btn-ripple:active::after {
    transform: scale(0, 0);
    opacity: 0.3;
    transition: 0s;
}

/* 开关吸附反馈 */
.toggle-switch {
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toggle-switch.active {
    transform: scale(1.05);
}

/* 表单实时引导效果 */
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 74, 0.15);
    border-color: var(--coral);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 输入框标签动画 */
.form-group {
    position: relative;
}

.form-label {
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    font-size: 1rem;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    pointer-events: none;
    background: var(--bg);
    padding: 0 4px;
}

.form-input:focus + .form-label,
.form-input:not(:placeholder-shown) + .form-label {
    top: 0;
    font-size: 0.85rem;
    color: var(--coral);
}

/* 卡片进入动画 */
.story-card {
    animation: fadeInUp 0.6s ease backwards;
}

.story-card:nth-child(1) { animation-delay: 0.1s; }
.story-card:nth-child(2) { animation-delay: 0.2s; }
.story-card:nth-child(3) { animation-delay: 0.3s; }
.story-card:nth-child(4) { animation-delay: 0.4s; }
.story-card:nth-child(5) { animation-delay: 0.5s; }
.story-card:nth-child(6) { animation-delay: 0.6s; }

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

/* 滚动显示动画 */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* 点赞动画 */
.like-btn {
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.like-btn.liked {
    animation: likePulse 0.5s ease;
}

@keyframes likePulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* 加载动画 */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--coral);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* 骨架屏脉冲动画 */
.skeleton {
    background: linear-gradient(90deg, 
        var(--gray-100) 25%, 
        var(--gray-200) 50%, 
        var(--gray-100) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

@keyframes skeleton-pulse {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* 主题切换动画 */
.theme-toggle {
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(15deg);
}

.theme-toggle:active {
    transform: scale(0.95);
}

/* 平滑页面过渡 */
.page-transition {
    animation: pageFadeIn 0.5s ease;
}

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

/* 通知气泡动画 */
.notification-badge {
    animation: badgePop 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes badgePop {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

/* 移动端优化 - 触摸反馈 */
@media (hover: none) {
    .story-card:active {
        transform: scale(0.98);
    }
    
    .btn:active {
        transform: scale(0.95);
    }
}

/* 暗色主题下的微交互优化 */

    background: var(--gray-800);
    border-color: var(--gray-700);
}






/* ========== 写作挑战页面样式 ========== */

/* 挑战过滤器 */
.challenge-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 20px;
    border-radius: 20px;
    background: var(--gray-100);
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.filter-btn:hover {
    background: var(--gray-200);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--coral);
    color: white;
    border-color: var(--coral);
}

/* 挑战网格 */
.challenges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

/* 挑战卡片 */
.challenge-card {
    background: var(--bg);
    border: 2px solid var(--gray-200);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.challenge-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--coral);
}

/* 挑战状态标签 */
.challenge-status {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-upcoming {
    background: #FFD166;
    color: #333;
}

.status-active {
    background: #06D6A0;
    color: white;
}

.status-ended {
    background: var(--gray-400);
    color: white;
}

/* 挑战标题 */
.challenge-title {
    font-size: 1.5rem;
    margin: 8px 0 16px 0;
    line-height: 1.3;
}

.challenge-title a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.2s;
}

.challenge-title a:hover {
    color: var(--coral);
}

/* 挑战描述 */
.challenge-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

/* 挑战元信息 */
.challenge-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.challenge-dates {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* 挑战统计 */
.challenge-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    font-size: 0.9rem;
}

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

/* 挑战操作 */
.challenge-actions {
    margin-top: 16px;
}

/* 挑战详情页面 */
.challenge-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 20px;
    background: linear-gradient(135deg, var(--coral-light), var(--teal-light));
    border-radius: 24px;
    color: white;
    position: relative;
}

.challenge-header .challenge-status {
    position: static;
    display: inline-block;
    margin-bottom: 16px;
}

.challenge-header .challenge-title {
    color: white;
    font-size: 2.5rem;
    margin: 16px 0;
}

.challenge-header .challenge-meta {
    justify-content: center;
    color: rgba(255,255,255,0.9);
}

/* 挑战内容布局 */
.challenge-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    margin-bottom: 40px;
}

@media (max-width: 1024px) {
    .challenge-content {
        grid-template-columns: 1fr;
    }
}

/* 挑战章节 */
.challenge-section {
    margin-bottom: 40px;
    padding: 24px;
    background: var(--bg);
    border-radius: 16px;
    border: 2px solid var(--gray-200);
}

.challenge-section h2 {
    font-size: 1.5rem;
    margin-bottom: 16px;
    color: var(--coral);
}

.challenge-description,
.challenge-rules,
.challenge-prizes {
    line-height: 1.8;
    color: var(--text-secondary);
}

/* 参赛作品网格 */
.entries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* 参赛作品卡片 */
.entry-card {
    background: var(--gray-50);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s;
    position: relative;
}

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

.entry-rank {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 32px;
    height: 32px;
    background: var(--coral);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.entry-cover {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 12px;
}

.entry-cover-default {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, var(--coral-light), var(--teal-light));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin-bottom: 12px;
}

.entry-title {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.entry-title a {
    color: var(--text);
    text-decoration: none;
}

.entry-title a:hover {
    color: var(--coral);
}

.entry-summary {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.5;
}

.entry-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.vote-btn {
    width: 100%;
}

/* 侧边栏 */
.challenge-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-card {
    background: var(--bg);
    border: 2px solid var(--gray-200);
    border-radius: 16px;
    padding: 20px;
}

.sidebar-card h3 {
    font-size: 1.2rem;
    margin-bottom: 16px;
    color: var(--coral);
}

.participate-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.challenge-info-list {
    list-style: none;
    padding: 0;
}

.challenge-info-list li {
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-200);
    font-size: 0.9rem;
}

.challenge-info-list li:last-child {
    border-bottom: none;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .challenges-grid {
        grid-template-columns: 1fr;
    }
    
    .challenge-header .challenge-title {
        font-size: 1.8rem;
    }
    
    .entries-grid {
        grid-template-columns: 1fr;
    }
}

/* 暗色主题优化 */




/* ========== 积分系统样式 ========== */

/* 导航栏积分显示 */
.nav-points-display {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #FFD166, #FFA62E);
    border-radius: 20px;
    text-decoration: none;
    color: #333;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(255, 166, 46, 0.3);
}

.nav-points-display:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 166, 46, 0.5);
    color: #333;
}

.points-icon {
    font-size: 1.1rem;
}

.points-amount {
    font-variant-numeric: tabular-nums;
}

/* 积分页面 */
.points-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.points-balance-card {
    background: linear-gradient(135deg, var(--coral), var(--teal));
    border-radius: 24px;
    padding: 40px;
    text-align: center;
    color: white;
    margin-bottom: 40px;
    box-shadow: var(--shadow-lg);
}

.points-balance-amount {
    font-size: 4rem;
    font-weight: 800;
    margin: 16px 0;
    text-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.points-balance-label {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* 积分操作按钮 */
.points-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 40px;
}

.points-action-card {
    background: var(--bg);
    border: 2px solid var(--gray-200);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
    text-decoration: none;
    color: var(--text);
}

.points-action-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--coral);
}

.points-action-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.points-action-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.points-action-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* 积分交易记录 */
.points-transactions {
    background: var(--bg);
    border-radius: 16px;
    padding: 24px;
    border: 2px solid var(--gray-200);
}

.points-transactions h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--coral);
}

.transaction-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-bottom: 1px solid var(--gray-200);
    transition: background 0.2s;
}

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

.transaction-item:hover {
    background: var(--gray-50);
}

.transaction-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.transaction-icon.earn {
    background: #06D6A0;
    color: white;
}

.transaction-icon.spend {
    background: #EF476F;
    color: white;
}

.transaction-info {
    flex: 1;
}

.transaction-description {
    font-weight: 500;
    margin-bottom: 4px;
}

.transaction-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.transaction-points {
    font-weight: 700;
    font-size: 1.1rem;
    font-variant-numeric: tabular-nums;
}

.transaction-points.earn {
    color: #06D6A0;
}

.transaction-points.spend {
    color: #EF476F;
}

/* ========== 打赏功能样式 ========== */

/* 打赏按钮 */
.tip-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #FFD166, #FFA62E);
    color: #333;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(255, 166, 46, 0.3);
}

.tip-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 166, 46, 0.5);
}

/* 虚拟礼物选择器 */
.gifts-selector {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
    margin: 20px 0;
}

.gift-item {
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.gift-item:hover {
    transform: translateY(-4px);
    border-color: var(--coral);
    box-shadow: var(--shadow-md);
}

.gift-item.selected {
    background: var(--coral-light);
    border-color: var(--coral);
}

.gift-icon {
    font-size: 2.5rem;
    margin-bottom: 8px;
}

.gift-name {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 4px;
}

.gift-cost {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.gift-rarity {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 8px;
    margin-top: 4px;
    display: inline-block;
}

.rarity-common {
    background: var(--gray-200);
    color: var(--text-secondary);
}

.rarity-rare {
    background: #3B82F6;
    color: white;
}

.rarity-epic {
    background: #A855F7;
    color: white;
}

.rarity-legendary {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: white;
}

/* 打赏模态框 */
.tip-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.tip-modal.active {
    display: flex;
}

.tip-modal-content {
    background: var(--bg);
    border-radius: 24px;
    padding: 32px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.tip-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.tip-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
}

.tip-modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--gray-100);
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.tip-modal-close:hover {
    background: var(--gray-200);
}

/* 打赏消息输入 */
.tip-message {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    resize: vertical;
    min-height: 80px;
    margin: 16px 0;
    font-family: inherit;
}

.tip-message:focus {
    outline: none;
    border-color: var(--coral);
}

/* 打赏提交按钮 */
.tip-submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--coral), var(--pink));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.tip-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 107, 74, 0.4);
}

.tip-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* 暗色主题优化 */





/* ============================================
   钱包和支付系统样式
   ============================================ */

/* 钱包余额展示 */
.wallet-balance {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 16px;
    margin-bottom: 2rem;
}

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

.balance-label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.balance-amount {
    font-size: 2rem;
    font-weight: 800;
}

/* 积分包卡片 */
.package-card {
    border: 2px solid #e9ecef;
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    position: relative;
    overflow: hidden;
}

.package-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.package-card.hot {
    border-color: #f5576c;
}

.package-badge {
    position: absolute;
    top: 1rem;
    right: -2rem;
    background: #f5576c;
    color: white;
    padding: 0.25rem 3rem;
    font-size: 0.8rem;
    font-weight: 700;
    transform: rotate(45deg);
}

.package-header {
    margin-bottom: 1.5rem;
}

.package-name {
    color: #495057;
    margin-bottom: 0.5rem;
}

.package-price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
}

.package-points {
    margin-bottom: 1rem;
}

.points-amount {
    font-size: 2.5rem;
    font-weight: 800;
    color: #f1c40f;
}

.points-label {
    font-size: 1rem;
    color: #6c757d;
    margin-left: 0.25rem;
}

.package-bonus {
    color: #28a745;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* 钱包统计卡片 */
.wallet-stat-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.wallet-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: #2d3436;
}

/* ========== 内容标记样式 ========== */

/* 精华标记 */
.badge-featured {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
}

/* 置顶标记 */
.badge-sticky {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3);
}

/* 故事卡片上的标记 */
.story-card-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    gap: 6px;
    z-index: 10;
}

.story-card-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.story-card-badge.featured {
    background: rgba(251, 191, 36, 0.9);
    color: white;
}

.story-card-badge.sticky {
    background: rgba(59, 130, 246, 0.9);
    color: white;
}

/* 故事列表中的标记 */
.story-list-badges {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}

.story-list-badge {
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
}

.story-list-badge.featured {
    background: #fef3c7;
    color: #92400e;
}

.story-list-badge.sticky {
    background: #dbeafe;
    color: #1e3a5f;
}

/* 管理后台标记 */
.admin-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.admin-badge.featured {
    background: #d1fae5;
    color: #065f46;
}

.admin-badge.sticky {
    background: #dbeafe;
    color: #1e40af;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .badge-featured,
    .badge-sticky {
        font-size: 11px;
        padding: 3px 6px;
    }
    
    .story-card-badges {
        top: 5px;
        left: 5px;
    }
    
    .story-card-badge {
        font-size: 10px;
        padding: 3px 6px;
    }
}
