/*
Theme Name: Daily Sentences
Theme URI: 
Description: 一个唯美的短句展示主题，每篇文章的段落会生成精美的句子卡片
Author: Your Name
Version: 1.0
Text Domain: dailysentences
*/

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

html {
    min-height: 100%;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    line-height: 1.8;
    color: #333;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* 容器样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* 句子卡片容器 - 瀑布流布局 */
.sentences-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.home .sentences-grid.sentences-refreshing {
    pointer-events: none;
}

.home .sentences-grid.sentences-refresh-out .sentence-card {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
}

.home .sentences-grid.sentences-refresh-in .sentence-card {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.home .sentences-grid.sentences-restoring {
    visibility: hidden;
}

.ds-home-order-restoring .home .sentences-grid {
    visibility: hidden;
}

/* 内页单列布局 */
.single-sentences-grid {
    grid-template-columns: 1fr;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    gap: 25px;
}

/* 句子卡片样式 */
.sentence-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 35px 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    min-height: 180px;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.sentence-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ff9a9e 0%, #fecfef 50%, #fecfef 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.sentence-card:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 154, 158, 0.6);
    box-shadow: 0 18px 38px rgba(255, 154, 158, 0.18);
}

.sentence-card:hover::before {
    transform: scaleX(1);
}

.sentence-featured-icon {
    position: absolute;
    left: 24px;
    bottom: clamp(12px, 2.6vw, 18px);
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    pointer-events: none;
}

.sentence-featured-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.single-sentence-card {
    min-height: auto;
    padding: 40px 40px 40px 60px;
    cursor: pointer;
    position: relative;
    background: rgba(255, 255, 255, 0.98);
    border-left: 4px solid rgba(255, 154, 158, 0.4);
    text-decoration: none;
    color: inherit;
    display: block;
}

/* 内页卡片移除首页的上边框动画效果 */
.single-sentence-card::before {
    display: none;
}

/* 内页卡片左上角引号装饰 */
.single-sentence-card::after {
    content: '"';
    position: absolute;
    top: 20px;
    left: 25px;
    font-size: 80px;
    font-family: Georgia, serif;
    color: rgba(255, 154, 158, 0.25);
    line-height: 1;
    font-weight: bold;
    z-index: 0;
}

.single-sentence-card:hover {
    transform: translateX(5px);
    border-left-color: rgba(255, 154, 158, 0.7);
    box-shadow: 0 15px 35px rgba(255, 154, 158, 0.15);
}

.single-sentence-card.sentence-card--collapsible {
    cursor: pointer;
}

.single-sentence-card.sentence-card--expanded {
    box-shadow: 0 18px 38px rgba(255, 154, 158, 0.08);
}

/* 内页卡片操作按钮区域 */
.sentence-actions {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 12px;
    z-index: 10;
}

/* 操作按钮样式 - 无边框 */
.action-btn {
    background: none;
    border: none;
    padding: 4px;
    font-size: 13px;
    color: #999;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    outline: none;
    display: flex;
    align-items: center;
    gap: 4px;
}

.action-btn span {
    font-size: 13px;
}

.no-tap-highlight,
.action-btn,
.profile-favorites-mobile__btn,
.floating-action,
.floating-toggle,
button,
a {
    -webkit-tap-highlight-color: rgba(255, 127, 156, 0.25);
}

.single-sentence-card,
.single-sentence-card *,
.profile-card,
.profile-card * {
    -webkit-tap-highlight-color: rgba(255, 127, 156, 0.25);
}

.sentence-action-icon {
    width: 22px;
    height: 22px;
    display: block;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.action-btn:hover {
    color: #ff9a9e;
}

.action-btn:active {
    transform: scale(0.95);
}

/* 复制按钮 */
/* 复制成功弹窗 */
.copy-toast {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: linear-gradient(135deg, rgba(255, 154, 158, 0.95) 0%, rgba(254, 207, 239, 0.95) 100%);
    color: #fff;
    padding: 14px 32px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 500;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(15px);
    box-shadow: 0 8px 32px rgba(255, 154, 158, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.3);
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.copy-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* 内页卡片文本容器 */
.sentence-text-wrapper {
    position: relative;
    z-index: 1;
    padding-left: 10px;
    padding-top: 20px;
    margin-top: 10px;
}

/* 内页卡片文本样式 - 默认三行 */
.single-sentence-card .sentence-text {
    font-size: 19px;
    line-height: 2;
    color: #2c3e50;
    min-height: 114px; /* 三行的高度：19px * 2 * 3 = 114px */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.3s ease;
}

/* 展开状态 */
.single-sentence-card .sentence-text.expanded {
    -webkit-line-clamp: none;
    display: block;
    min-height: auto;
}

/* 展开/收起按钮 */
.sentence-expand-btn {
    background: none;
    border: none;
    color: #ff9a9e;
    font-size: 13px;
    cursor: pointer;
    padding: 8px 0;
    margin-top: 8px;
    font-family: inherit;
    transition: all 0.3s ease;
    outline: none;
    display: block;
    text-align: left;
    padding-left: 10px;
}

.sentence-expand-btn:hover {
    color: #ff6b9d;
}

.sentence-expand-btn::before {
    content: '▼';
    display: inline-block;
    margin-right: 4px;
    font-size: 10px;
    transition: transform 0.3s ease;
}

.sentence-expand-btn.expanded::before {
    transform: rotate(180deg);
}

/* 内页卡片元信息样式 - 右下角（昵称和时间） */
.sentence-meta {
    position: absolute;
    bottom: 20px;
    right: 25px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    z-index: 2;
    pointer-events: none;
}

/* 允许链接点击 */
.sentence-meta a {
    pointer-events: auto;
}

.sentence-nickname {
    font-size: 13px;
    color: #999;
    font-style: italic;
}

.sentence-time {
    font-size: 12px;
    color: #bbb;
}

.sentence-uid {
    font-size: 11px;
    color: #ccc;
    font-family: monospace;
}

/* 昵称和时间之间的分隔符 */
.sentence-nickname::after {
    content: '·';
    margin-left: 4px;
    color: #ccc;
    font-style: normal;
}

/* 昵称链接样式 */
.sentence-nickname-link {
    text-decoration: none;
    color: inherit;
    pointer-events: auto;
    transition: all 0.3s ease;
}

.sentence-nickname-link:hover {
    color: #ff9a9e;
}

.sentence-nickname-link .sentence-nickname {
    cursor: pointer;
    transition: all 0.3s ease;
}

.sentence-nickname-link:hover .sentence-nickname {
    color: #ff9a9e;
    text-decoration: underline;
}

/* 来源文章链接样式 */
.sentence-source-link {
    text-decoration: none;
    color: inherit;
    pointer-events: auto;
    transition: all 0.3s ease;
    margin-left: 8px;
}

.sentence-source-link:hover {
    color: #ff9a9e;
}

.sentence-source-link .sentence-source {
    font-size: 12px;
    color: #bbb;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sentence-source-link:hover .sentence-source {
    color: #ff9a9e;
    text-decoration: underline;
}

/* 句子文本样式 */
.sentence-text {
    font-size: 18px;
    line-height: 1.8;
    color: #2c3e50;
    margin-bottom: 20px;
    font-weight: 400;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 1;
    min-height: 97.2px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 文章链接样式（用于首页卡片） */
.sentence-card:not(.single-sentence-card) .sentence-source {
    position: absolute;
    bottom: 20px;
    right: 25px;
    font-size: 13px;
    color: #999;
    text-decoration: none;
    transition: all 0.3s ease;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 5px;
    pointer-events: none;
}

/* 用户专属页的来源文本样式 */
.single-sentence-card .sentence-source {
    font-size: 12px;
    color: #bbb;
    transition: all 0.3s ease;
}

.sentence-source::before {
    content: '→';
    opacity: 0;
    transform: translateX(-5px);
    transition: all 0.3s ease;
}

.sentence-card:not(.single-sentence-card):hover .sentence-source {
    color: #ff9a9e;
}

.sentence-card:not(.single-sentence-card):hover .sentence-source::before {
    opacity: 1;
    transform: translateX(0);
}

.single-sentence-card:hover .sentence-source {
    color: #ff9a9e;
}

/* 返回按钮 */
.back-button {
    position: fixed;
    top: 30px;
    left: 30px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: #2c3e50;
    font-size: 20px;
    transition: all 0.3s ease;
    z-index: 100;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.back-button:hover {
    background: linear-gradient(135deg, rgba(255, 154, 158, 0.95) 0%, rgba(254, 207, 239, 0.95) 100%);
    color: #fff;
    transform: translateX(-3px);
    box-shadow: 0 6px 20px rgba(255, 154, 158, 0.4);
    border-color: rgba(255, 154, 158, 0.3);
}

.back-button span {
    display: block;
    line-height: 1;
}

/* 文章页标题 */
.article-header {
    text-align: center;
    margin-bottom: 50px;
    padding: 40px 0;
}

.article-title {
    font-size: 36px;
    font-weight: 300;
    color: #2c3e50;
    margin-bottom: 15px;
    letter-spacing: 2px;
}

.article-meta {
    font-size: 14px;
    color: #999;
}

/* 用户页面头部样式 */
.user-header {
    text-align: left;
    padding: 40px 0;
}

.user-info-section {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 800px;
    margin: 0 auto;
}

.user-info-text {
    flex: 1;
    min-width: 0;
}

.user-title {
    text-align: left;
    margin-bottom: 10px;
}

.user-nickname-link {
    text-decoration: none;
    color: #2c3e50;
    transition: color 0.3s ease;
    display: inline-block;
}

.user-nickname-link:hover {
    color: #ff9a9e;
}

.user-nickname-historical {
    font-size: 24px;
    color: #999;
    font-weight: 300;
    margin-left: 8px;
}

.user-uid-link {
    text-decoration: none;
    color: #999;
    transition: color 0.3s ease;
}

.user-uid-link:hover {
    color: #ff9a9e;
}

.meta-separator {
    margin: 0 8px;
    color: #ccc;
}

/* 页面标题区域 */
.page-header {
    text-align: center;
    margin-bottom: 40px;
}

.page-title-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 60px;
    margin-bottom: 20px;
}

/* 选项卡按钮样式 - 部分重叠效果 */
.tab-btn {
    font-size: 42px;
    font-weight: 300;
    letter-spacing: 3px;
    margin: 0;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 16px;
    font-family: inherit;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    outline: none;
    position: absolute;
    color: #999;
    z-index: 1;
    white-space: nowrap;
    overflow: visible;
}

/* 每日短句 - 左边一点 */
.tab-btn[data-tab="sentences"] {
    left: calc(50% - 40px);
    transform: translateX(-50%);
}

/* 精选专题 - 右边一点 */
.tab-btn[data-tab="articles"] {
    left: calc(50% + 40px);
    transform: translateX(-50%);
}

/* 选中的选项卡 - 在上层，居中位置 */
.tab-btn.active {
    color: #2c3e50;
    z-index: 2;
    left: 50%;
    transform: translateX(-50%) translateY(-6px);
    padding: 10px 18px;
    opacity: 1;
    mask-image: none;
    -webkit-mask-image: none;
    font-weight: 500;
}

/* 首页选项卡选中状态下的底部装饰线 - 已隐藏 */
/*
.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #ff9a9e 0%, #fecfef 100%);
    border-radius: 2px;
}
*/

/* 未选中的选项卡 - 在下层，稍微下沉，添加上下渐隐遮罩 */
.tab-btn:not(.active) {
    transform: translateX(-50%) translateY(8px);
    opacity: 0.8;
    /* 上下渐隐遮罩效果 - 顶部更多区域渐隐，减少重叠视觉干扰 */
    mask-image: linear-gradient(
        to bottom,
        transparent 0%,
        transparent 25%,
        rgba(0, 0, 0, 0.1) 35%,
        rgba(0, 0, 0, 0.3) 45%,
        rgba(0, 0, 0, 0.5) 55%,
        rgba(0, 0, 0, 0.7) 65%,
        rgba(0, 0, 0, 0.85) 75%,
        rgba(0, 0, 0, 1) 85%,
        rgba(0, 0, 0, 1) 100%
    );
    -webkit-mask-image: linear-gradient(
        to bottom,
        transparent 0%,
        transparent 25%,
        rgba(0, 0, 0, 0.1) 35%,
        rgba(0, 0, 0, 0.3) 45%,
        rgba(0, 0, 0, 0.5) 55%,
        rgba(0, 0, 0, 0.7) 65%,
        rgba(0, 0, 0, 0.85) 75%,
        rgba(0, 0, 0, 1) 85%,
        rgba(0, 0, 0, 1) 100%
    );
}

/* 未选中的选项卡悬停效果 */
.tab-btn:not(.active):hover {
    color: #ff9a9e;
    opacity: 0.95;
    transform: translateX(-50%) translateY(5px);
}

.page-subtitle {
    text-align: center;
    font-size: 16px;
    color: #999;
    margin-bottom: 40px;
}

/* 文章列表网格 */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

/* 文章卡片样式 */
.article-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    min-height: 150px;
}

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

.article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ff9a9e 0%, #fecfef 50%, #fecfef 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.article-card:hover::before {
    transform: scaleX(1);
}

.article-card-title {
    font-size: 22px;
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 12px;
    line-height: 1.5;
    letter-spacing: 0.5px;
    text-align: center;
}

.article-card-meta {
    font-size: 14px;
    color: #999;
    text-align: center;
}

/* 首页底部统计 */
.home-stats {
    margin-top: 80px;
    padding: 50px 0 100px;
}

.home-stats__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.home-stats__item {
    background: rgba(255, 255, 255, 0.92);
    border-radius: 24px;
    padding: 32px 28px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 20px 40px rgba(255, 154, 158, 0.15);
    backdrop-filter: blur(6px);
}

.home-stats__label {
    font-size: 16px;
    color: #999;
    margin-bottom: 18px;
    letter-spacing: 1px;
}

.home-stats__number {
    font-size: 48px;
    font-weight: 600;
    color: #ff7b9c;
    line-height: 1;
    margin-bottom: 18px;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
}

.home-stats__number span {
    font-size: inherit;
    line-height: 1;
}

.home-stats__number small {
    font-size: 16px;
    color: #ffb0c0;
}

.home-stats__desc {
    font-size: 14px;
    color: #7d8693;
    letter-spacing: 0.5px;
}

.home-promo {
    margin: 0 auto 120px;
    max-width: 920px;
    padding: 0 20px;
}

.home-promo__inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 24px 32px;
    border-radius: 20px;
    background: linear-gradient(130deg, #1c2233 0%, #2f3247 55%, #413050 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 45px rgba(21, 25, 41, 0.35);
    overflow: hidden;
}

.home-promo__inner::before,
.home-promo__inner::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    pointer-events: none;
}

.home-promo__inner::before {
    background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.08), transparent 45%),
        radial-gradient(circle at 80% 30%, rgba(255, 255, 255, 0.06), transparent 50%);
    opacity: 0;
    transform: scale(1.05);
    transition: opacity 0.4s ease;
}

.home-promo__inner::after {
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.home-promo__inner::selection {
    background: transparent;
}

.home-promo__text {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: rgba(255, 255, 255, 0.86);
}

.home-promo__eyebrow {
    font-size: 13px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.65);
}

.home-promo__title {
    font-size: 20px;
    font-weight: 600;
    color: #ffe3ee;
}

.home-promo__button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 22px;
    border-radius: 999px;
    border: none;
    color: #1c2233;
    background: linear-gradient(120deg, #ff9a9e, #fecfef);
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 10px 25px rgba(255, 154, 158, 0.35);
}

.home-promo__button:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 14px 30px rgba(255, 154, 158, 0.45);
}

.home-promo__inner::after,
.home-promo__inner::before {
    mix-blend-mode: screen;
}

.home-promo__inner::after {
    --wave-height: 15px;
    --wave-speed: 7s;
    border-style: none;
    background: transparent;
}

.home-promo__inner::after {
    background-image:
        radial-gradient(circle at 0 100%, transparent 14px, rgba(255, 255, 255, 0.15) 15px, transparent 16px),
        radial-gradient(circle at 50% 100%, transparent 14px, rgba(255, 255, 255, 0.12) 15px, transparent 16px),
        radial-gradient(circle at 100% 100%, transparent 14px, rgba(255, 255, 255, 0.1) 15px, transparent 16px);
    background-size: 120px 40px;
    background-position: 0 120%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.home-promo__inner:hover::before {
    opacity: 1;
}

.home-promo__inner:hover::after {
    animation: homePromoWave var(--wave-speed, 7s) linear infinite;
    opacity: 0.8;
}

@keyframes homePromoWave {
    0% {
        background-position: 0 120%, 60px 120%, 120px 120%;
    }
    50% {
        background-position: -60px 110%, 0 115%, 60px 120%;
    }
    100% {
        background-position: -120px 120%, -60px 110%, 0 120%;
    }
}

.home-promo__arrow {
    font-size: 16px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    /* 容器优化 */
    .container {
        padding: 20px 15px;
    }
    
    /* 首页网格布局 */
    .sentences-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 30px;
    }
    
    /* 首页卡片 */
    .sentence-card {
        padding: 25px 20px;
        min-height: 160px;
        border-radius: 15px;
    }
    
    /* 首页卡片文本 */
    .sentence-text {
        min-height: 86.4px;
        font-size: 16px;
        line-height: 1.7;
    }

    .sentence-featured-icon {
        left: 18px;
        bottom: 10px;
    }
    
    /* 首页统计 */
    .home-stats {
        margin-top: 50px;
        padding: 40px 0 70px;
    }
    
    .home-stats__grid {
        gap: 16px;
    }
    
    .home-stats__item {
        padding: 24px 20px;
    }

    .home-stats__number {
        font-size: 36px;
    }

    .home-promo {
        margin-bottom: 80px;
    }

    .home-promo__inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .home-promo__title {
        font-size: 18px;
    }

    .home-promo__button {
        width: 100%;
        justify-content: center;
    }

    /* 内页单列布局 */
    .single-sentences-grid {
        max-width: 100%;
        gap: 20px;
        margin-top: 30px;
    }
    
    /* 内页卡片 */
    .single-sentence-card {
        padding: 30px 20px 30px 45px;
        border-radius: 15px;
    }
    
    /* 内页卡片引号 */
    .single-sentence-card::after {
        font-size: 50px;
        top: 15px;
        left: 15px;
    }
    
    /* 内页卡片文本 */
    .sentence-text-wrapper {
        padding-left: 8px;
        padding-top: 15px;
        margin-top: 8px;
    }
    
    .single-sentence-card .sentence-text {
        font-size: 16px;
        line-height: 1.8;
        min-height: 86.4px; /* 三行的高度：16px * 1.8 * 3 = 86.4px */
    }
    
    .sentence-expand-btn {
        font-size: 12px;
        padding: 6px 0;
        margin-top: 6px;
        padding-left: 8px;
    }
    
    .sentence-meta {
        bottom: 15px;
        right: 20px;
        gap: 6px;
    }
    
    .sentence-nickname {
        font-size: 12px;
    }
    
    .sentence-nickname::after {
        margin-left: 3px;
    }
    
    .sentence-time {
        font-size: 11px;
    }
    
    /* 移动端链接样式 */
    .sentence-nickname-link:hover .sentence-nickname {
        color: #ff9a9e;
    }
    
    .sentence-source-link .sentence-source {
        font-size: 11px;
    }
    
    .sentence-source-link:hover .sentence-source {
        color: #ff9a9e;
    }
    
    /* 操作按钮区域 */
    .sentence-actions {
        top: 12px;
        right: 12px;
        gap: 8px;
    }
    
    /* 操作按钮 */
    .action-btn {
        padding: 6px 10px;
        font-size: 12px;
        min-width: 44px;
        min-height: 44px;
        justify-content: center;
    }
    
    .action-btn span {
        font-size: 12px;
    }
    
    /* 复制弹窗移动端适配 */
    .copy-toast {
        top: 20px;
        left: 50%;
        padding: 12px 24px;
        font-size: 14px;
        border-radius: 30px;
        max-width: 90%;
        white-space: normal;
        text-align: center;
    }
    
    /* 文章页标题 */
    .article-header {
        padding: 30px 0;
        margin-bottom: 40px;
    }
    
    .back-button {
        top: 20px;
        left: 20px;
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .article-title {
        font-size: 26px;
        letter-spacing: 1px;
        padding: 0 10px;
    }
    
    .article-meta {
        font-size: 13px;
    }
    
    /* 用户页面头部移动端适配 */
    .user-header {
        padding: 30px 0;
        margin-bottom: 30px;
    }
    
    .user-info-section {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 15px;
        padding: 0 20px;
    }
    
    .user-info-text {
        width: 100%;
    }
    
    .user-title {
        text-align: center;
        font-size: 24px;
    }
    
    .user-nickname-historical {
        font-size: 18px;
        display: block;
        margin-top: 5px;
        margin-left: 0;
    }
    
    .article-meta {
        text-align: center;
    }
    
    /* 页面标题 */
    .page-title-wrapper {
        height: 50px;
        margin-bottom: 15px;
    }
    
    .tab-btn {
        font-size: 28px;
        letter-spacing: 2px;
        padding: 6px 12px;
    }
    
    .tab-btn[data-tab="sentences"] {
        left: calc(50% - 30px);
    }
    
    .tab-btn[data-tab="articles"] {
        left: calc(50% + 30px);
    }
    
    .tab-btn.active {
        left: 50%;
        transform: translateX(-50%) translateY(-5px);
        padding: 7px 14px;
    }
    
    .tab-btn:not(.active) {
        transform: translateX(-50%) translateY(7px);
        opacity: 0.75;
    }
    
    .tab-btn:not(.active):hover {
        transform: translateX(-50%) translateY(4px);
        opacity: 0.9;
    }
    
    /* 首页选项卡选中状态下的底部装饰线 - 移动端 - 已隐藏 */
    /*
    .tab-btn.active::after {
        bottom: -6px;
        height: 2px;
    }
    */
    
    .page-subtitle {
        font-size: 14px;
        padding: 0 10px;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .article-card {
        padding: 35px 20px;
        border-radius: 15px;
        min-height: 130px;
    }
    
    .article-card-title {
        font-size: 19px;
        margin-bottom: 10px;
    }
    
    .article-card-meta {
        font-size: 13px;
    }
}

/* 加载动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* .sentence-card {
    animation: fadeInUp 0.6s ease forwards;
}

.sentence-card:nth-child(1) { animation-delay: 0.1s; }
.sentence-card:nth-child(2) { animation-delay: 0.2s; }
.sentence-card:nth-child(3) { animation-delay: 0.3s; }
.sentence-card:nth-child(4) { animation-delay: 0.4s; }
.sentence-card:nth-child(5) { animation-delay: 0.5s; }
.sentence-card:nth-child(6) { animation-delay: 0.6s; }
.sentence-card:nth-child(n+7) { animation-delay: 0.7s; } */

/* 个人中心 */
.profile-page {
    background: transparent;
    min-height: calc(100vh - 120px);
    padding: 80px 20px 60px;
}

.profile-page__inner {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.profile-shell {
    display: flex;
    flex-direction: column;
    gap: 32px;
    position: relative;
}

.profile-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
    padding: 8px 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    color: #ff7f9c;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(255, 154, 158, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.profile-back:hover {
    transform: translateX(-2px);
    box-shadow: 0 10px 24px rgba(255, 154, 158, 0.35);
}

.profile-back__icon {
    font-size: 16px;
}

.profile-nav {
    display: inline-flex;
    gap: 14px;
    align-self: center;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 999px;
    padding: 12px 30px;
    box-shadow: 0 20px 40px rgba(32, 43, 64, 0.12);
    position: sticky;
    top: 20px;
    z-index: 5;
    backdrop-filter: blur(8px);
    overflow: visible;
    position: sticky;
}

.profile-nav__btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    position: relative;
    z-index: 2;
}

.profile-nav__btn.active {
    color: #fff;
}

.profile-nav__btn:not(.active):hover {
    color: #ff9a9e;
    transform: translateY(-2px);
}

.profile-nav__icon {
    pointer-events: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.profile-nav__icon img {
    display: block;
    width: 22px;
    height: 22px;
}

.profile-nav__indicator {
    position: absolute;
    top: 50%;
    left: 0;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff9a9e, #fecfef);
    box-shadow: 0 12px 32px rgba(255, 154, 158, 0.35);
    transform: translate3d(0, -50%, 0);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s ease, height 0.3s ease;
    z-index: 1;
    pointer-events: none;
}

.profile-section {
    display: none;
}

.profile-section--active {
    display: block;
    animation: profile-section-enter 0.45s cubic-bezier(0.25, 0.1, 0.25, 1) both;
}

@keyframes profile-section-enter {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.profile-home-compose {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.user-sentence-form-card {
    padding: 32px;
}

.user-sentence-form textarea,
.user-sentence-edit-input {
    width: 100%;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    padding: 18px 20px;
    font-size: 16px;
    resize: vertical;
    min-height: 120px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.user-sentence-form textarea:focus,
.user-sentence-edit-input:focus {
    border-color: #ff9a9e;
    box-shadow: 0 0 0 3px rgba(255, 154, 158, 0.2);
    outline: none;
}

.user-sentence-form__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 18px;
    gap: 16px;
    flex-wrap: wrap;
}

.user-sentence-visibility {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.visibility-option {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #5c6b7f;
    font-weight: 600;
}

.visibility-option input {
    accent-color: #ff9a9e;
}

.visibility-option--disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.visibility-option--disabled input {
    cursor: not-allowed;
}

.user-sentence-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.user-sentence-list-wrapper {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.user-sentence-empty {
    text-align: center;
    padding: 40px 20px;
    color: #9aa6c0;
    border: 1px dashed #d9e2ef;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.6);
}

.user-sentence-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.user-sentence-card {
    position: relative;
    padding: 40px 30px;
}

.user-sentence-card .sentence-text {
    font-size: 18px;
    color: #2c3e50;
    line-height: 1.8;
}

.user-sentence-meta {
    margin-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.user-sentence-badge {
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
}

.user-sentence-badge--private {
    background: rgba(93, 105, 135, 0.15);
    color: #5d6987;
}

.user-sentence-badge--public {
    background: rgba(255, 154, 158, 0.2);
    color: #ff7f9c;
}

.user-sentence-card.editing {
    border-color: rgba(255, 154, 158, 0.5);
    padding-bottom: 12px;
}

.user-sentence-card.editing .user-sentence-meta {
    display: none;
}

.user-sentence-card.editing .user-sentence-edit-area {
    margin-top: 6px;
    border-top: none;
    padding-top: 0;
}

.user-sentence-edit-area {
    margin-top: 18px;
    border-top: 1px dashed rgba(255, 154, 158, 0.4);
    padding-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.user-sentence-edit-footer {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    align-items: center;
}

.user-sentence-visibility--inline {
    background: rgba(255, 255, 255, 0.6);
    padding: 8px 14px;
    border-radius: 999px;
}

.user-sentence-edit-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.user-sentence-edit-status {
    margin: 0;
}

.profile-favorite-card .sentence-actions {
    gap: 10px;
}

.profile-favorite-card .favorite-remove {
    color: #ff5d7a;
}

.profile-favorite-card .favorite-remove:hover {
    color: #ff3b60;
}

.profile-favorite-card .sentence-meta {
    margin-top: 20px;
    gap: 12px;
    align-items: center;
}

.profile-favorite-card .sentence-text {
    line-clamp: unset;
    -webkit-line-clamp: unset;
    display: block;
}

.profile-favorite-card .sentence-expand-btn {
    display: none !important;
}

.profile-favorite-card .sentence-source {
    display: flex;
    gap: 6px;
    color: #7a8ca3;
}

.profile-favorite-card .sentence-source a {
    color: #ff7f9c;
    text-decoration: none;
}

.profile-favorite-card .sentence-source a:hover {
    text-decoration: underline;
}

.profile-hero {
    background: linear-gradient(135deg, #ffe4f0, #fdf2f8);
    border-radius: 32px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    box-shadow: 0 20px 50px rgba(255, 154, 158, 0.15);
}

.profile-hero__text h1 {
    margin: 12px 0 10px;
    font-size: 32px;
    color: #2c3e50;
}

.profile-hero__text p {
    margin: 0;
    color: #5c6b7f;
}

.profile-hero__meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.profile-hero__meta strong {
    display: block;
    font-size: 18px;
    color: #2c3e50;
}

.profile-meta__label {
    font-size: 13px;
    color: #7a8ca3;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.profile-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
    color: #ff7f9c;
    font-size: 13px;
    font-weight: 600;
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.profile-card {
    background: #fff;
    border-radius: 24px;
    padding: 28px;
    box-shadow: 0 15px 40px rgba(32, 43, 64, 0.08);
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.profile-card--full {
    grid-column: 1 / -1;
}

.profile-card--center {
    text-align: center;
    align-items: center;
}

.profile-card__header h1,
.profile-card__header h2 {
    margin: 10px 0 4px;
    color: #2c3e50;
}

.profile-card__header p {
    margin: 0;
    color: #7a8ca3;
    font-size: 14px;
}

.profile-form__body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.profile-form__body--columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.profile-form__group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.profile-form__group label {
    font-size: 14px;
    color: #5c6b7f;
}

.profile-form input {
    width: 100%;
    padding: 12px 16px;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    font-size: 15px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.profile-form input:focus {
    border-color: #ff9a9e;
    box-shadow: 0 0 0 3px rgba(255, 154, 158, 0.2);
    outline: none;
}

.profile-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 12px 22px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, #ff9a9e, #fecfef);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
}

.profile-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(255, 154, 158, 0.25);
}

.profile-button--ghost {
    background: rgba(255, 255, 255, 0.4);
    color: #ff7f9c;
    border: 1px solid rgba(255, 154, 158, 0.4);
}

.profile-button--danger {
    background: #ff7272;
}

.profile-button--primary {
    width: fit-content;
    align-self: flex-start;
}

.profile-form__status {
    font-size: 13px;
    color: #99a6ba;
}

.profile-form__status.success {
    color: #3bb57d;
}

.profile-form__status.error {
    color: #ff5d7a;
}

.profile-tip {
    font-size: 13px;
    color: #99a6ba;
    margin: 0;
}

.profile-favorites__body {
    border: 1px dashed #e8eef5;
    border-radius: 18px;
    padding: 20px;
    background: #fdfdff;
}

.profile-favorites__empty {
    text-align: center;
    color: #99a6ba;
    font-size: 14px;
    display: none;
}

.profile-favorites__empty.active {
    display: block;
}

.profile-favorites__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

.profile-favorites__item {
    margin: 0;
}

/* 个人中心 - 移动端扁平收藏列表 */
.profile-favorites-mobile {
    display: none;
    margin-top: 12px;
}

.profile-favorites-mobile__empty {
    display: none;
    text-align: center;
    color: #99a6ba;
    font-size: 14px;
}

.profile-favorites-mobile__empty--active {
    display: block;
}

.profile-favorites-mobile__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.profile-favorites-mobile__item {
    margin: 0;
}

.profile-favorites-mobile__card {
    border-radius: 18px;
    padding: 26px 14px 10px 56px;
    box-shadow: 0 10px 24px rgba(32, 43, 64, 0.08);
    background: #ffffff;
    position: relative;
}

.profile-favorites-mobile__card::after {
    font-size: 48px;
    top: 6px;
    left: 20px;
    color: rgba(255, 127, 156, 0.35);
}

.profile-favorites-mobile__card *,
.profile-favorites-mobile__card {
    -webkit-tap-highlight-color: rgba(255, 127, 156, 0.25);
}
.profile-favorites-mobile__text {
    font-size: 15px;
    line-height: 1.7;
    color: #2c3e50;
    margin-bottom: 8px;
    /* 至少两行高度，即使内容只有一行也保留多一点留白 */
    min-height: calc(1.7em * 2);
    word-break: break-word;
}

.profile-favorites-mobile__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    font-size: 12px;
    color: #99a6ba;
}

.profile-favorites-mobile__nickname {
    font-weight: 500;
    color: #ff7f9c;
}

.profile-favorites-mobile__time {
    opacity: 0.85;
}

.profile-favorites-mobile__source {
    color: #7a8ca3;
    display: block;
    width: 100%;
    margin-top: 2px;
}

.profile-favorites-mobile__actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 8px;
}

.profile-favorites-mobile__btn {
    border: 1px solid rgba(255, 127, 156, 0.5);
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 13px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.9);
    color: #ff7f9c;
    box-shadow: 0 3px 8px rgba(255, 154, 158, 0.18);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.profile-favorites-mobile__btn--primary {
    background: #ff7f9c;
    color: #ffffff;
    border-color: #ff7f9c;
    box-shadow: 0 4px 12px rgba(255, 127, 156, 0.35);
}

.profile-favorites-mobile__btn--danger {
    background: rgba(255, 255, 255, 0.9);
    color: #ff7f9c;
}

.profile-favorites-mobile__btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(255, 154, 158, 0.3);
}

.profile-danger {
    border: 1px solid rgba(255, 99, 132, 0.2);
    background: linear-gradient(135deg, #fff5f6, #ffeef0);
}

.profile-danger__actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.profile-card--guest .profile-card__actions {
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: center;
}

.profile-stats-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 240px;
    background: linear-gradient(135deg, #fdf5ff, #f6fbff);
}

.profile-stats-card__body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.profile-stats-card__count {
    font-size: 32px;
    font-weight: 700;
    color: #ff7f9c;
    margin: 0;
}

.profile-stats-card__count span {
    font-size: 42px;
}

.profile-stats-card__count small {
    color: #9ba9c1;
    font-size: 16px;
    margin-left: 8px;
}

.profile-stats-card__tip {
    margin: 0;
    color: #7a8ca3;
    font-size: 14px;
}

.profile-stats-card__jump {
    width: fit-content;
    padding-inline: 28px;
}

/* 改密强制退出弹窗 */
.profile-force-logout {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(16, 22, 36, 0.45);
    backdrop-filter: blur(6px);
    z-index: 12000;
}

.profile-force-logout--active {
    display: flex;
}

.profile-force-logout__dialog {
    width: min(420px, 92vw);
    background: #ffffff;
    border-radius: 26px;
    padding: 36px 32px 32px;
    box-shadow: 0 25px 70px rgba(12, 22, 46, 0.25);
    text-align: center;
    position: relative;
}

.profile-force-logout__icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.profile-force-logout__message {
    font-size: 17px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 12px;
}

.profile-force-logout__tip {
    margin: 0 0 16px;
    color: #7a8ca3;
    font-size: 14px;
}

.profile-force-logout__error {
    min-height: 20px;
    margin-bottom: 6px;
    font-size: 13px;
    color: #ff5d7a;
}

.profile-force-logout__confirm {
    width: 100%;
    margin-top: 8px;
}

@media (max-width: 768px) {
    .profile-page {
        padding: 60px 0 50px;
    }
    .profile-nav {
        gap: 10px;
        padding: 10px 16px;
        position: static;
    }
    .profile-nav__btn {
        width: 46px;
        height: 46px;
        font-size: 20px;
    }
    .profile-hero {
        padding: 30px;
    }
    .profile-card {
        padding: 22px;
    }
    #profile-favorites-section .profile-card.profile-favorites {
        width: min(640px, 94vw);
        margin-inline: auto;
        padding-inline: 16px;
    }
    /* 手机端隐藏旧收藏列表容器，使用扁平版 */
    .profile-favorites__body {
        display: none;
    }
    .profile-favorites-mobile {
        display: block;
    }
    .user-sentence-form__footer {
        flex-direction: column;
        align-items: flex-start;
    }
    .user-sentence-buttons {
        width: 100%;
        justify-content: flex-start;
    }
    .user-sentence-list {
        grid-template-columns: 1fr;
    }
    .user-sentence-edit-footer {
        flex-direction: column;
        align-items: flex-start;
    }
    .profile-form__body--columns {
        grid-template-columns: 1fr;
    }
    .profile-favorites__list {
        grid-template-columns: 1fr;
    }
}

