/* ============================================================
   首页专用样式 home.css
   ============================================================ */

/* ===== 容器宽度覆盖 ===== */
.home-page .container {
    max-width: 1400px !important;
    margin: 0 auto !important;
    padding: 0 32px !important;
}

@media (min-width: 1800px) {
    .home-page .container { max-width: 1600px !important; }
}

@media (max-width: 1200px) {
    .home-page .container {
        max-width: 96% !important;
        padding: 0 24px !important;
    }
}

@media (max-width: 768px) {
    .home-page .container {
        max-width: 100% !important;
        padding: 0 16px !important;
    }
}

@media (max-width: 480px) {
    .home-page .container {
        max-width: 100% !important;
        padding: 0 12px !important;
    }
}

/* ========== 全宽番剧卡片（横向长方形） ========== */
.home-page .home-anime-full {
    margin-bottom: 24px;
    padding: 20px 24px;
}

.home-page .anime-horizontal {
    display: flex;
    gap: 18px;
    align-items: stretch;
    background: #f8fafc;
    border-radius: 14px;
    padding: 14px 16px;
    border: 1px solid #eef2ff;
    transition: border-color 0.2s;
}

.home-page .anime-horizontal:hover {
    border-color: #3b82f6;
}

.home-page .anime-h-poster {
    flex-shrink: 0;
    width: 90px;
    height: 126px;
    border-radius: 10px;
    overflow: hidden;
    background: #e2e8f0;
}

.home-page .anime-h-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.home-page .anime-h-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    justify-content: center;
}

.home-page .anime-h-title {
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.4;
    word-break: break-word;
}

.home-page .anime-h-subtitle {
    display: flex;
    flex-wrap: wrap;
    gap: 3px 12px;
    font-size: 11px;
    color: #94a3b8;
}

.home-page .anime-h-subtitle .lang-tag {
    font-size: 9px;
    color: #b9c2d0;
    background: #f1f5f9;
    padding: 0 5px;
    border-radius: 3px;
}

.home-page .anime-h-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
}

.home-page .anime-h-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: #94a3b8;
    margin-top: 4px;
}

.home-page .anime-h-date {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.home-page .anime-h-comment {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 12px;
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
}

.home-page .anime-h-comment:hover {
    color: #3b82f6;
}

.home-page .anime-h-recommend {
    flex-shrink: 0;
    width: 320px;
    max-width: 40%;
    padding-left: 18px;
    border-left: 1px dashed #e2e8f0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.home-page .anime-h-recommend-label {
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.home-page .anime-h-recommend-text {
    font-size: 13px;
    color: #475569;
    line-height: 1.7;
    word-break: break-word;
    max-height: 100px;
    overflow-y: auto;
}

/* 番剧卡片通用组件 */
.home-page .anime-mini-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    padding: 1px 8px;
    border-radius: 12px;
    background: #eef2ff;
    color: #3b82f6;
    line-height: 1.6;
}

.home-page .anime-mini-tag.watching  { background: #dcfce7; color: #16a34a; }
.home-page .anime-mini-tag.watched   { background: #dbeafe; color: #2563eb; }
.home-page .anime-mini-tag.unwatched { background: #f1f5f9; color: #64748b; }
.home-page .anime-mini-tag.dropped   { background: #fee2e2; color: #dc2626; }

.home-page .anime-mini-stars {
    display: inline-flex;
    align-items: center;
    gap: 1px;
    font-size: 12px;
}

.home-page .anime-mini-stars .star-full  { color: #f59e0b; }
.home-page .anime-mini-stars .star-empty { color: #d1d5db; }
.home-page .anime-mini-stars .rating-text {
    font-size: 11px;
    color: #94a3b8;
    margin-left: 4px;
}

@media (max-width: 900px) {
    .home-page .anime-horizontal {
        flex-wrap: wrap;
    }
    .home-page .anime-h-recommend {
        width: 100%;
        max-width: 100%;
        padding-left: 0;
        padding-top: 12px;
        border-left: none;
        border-top: 1px dashed #e2e8f0;
        margin-top: 4px;
    }
}

@media (max-width: 768px) {
    .home-page .home-anime-full {
        margin-bottom: 20px;
        padding: 16px 18px;
    }
    .home-page .anime-h-poster {
        width: 76px;
        height: 106px;
    }
    .home-page .anime-h-title {
        font-size: 15px;
    }
    .home-page .anime-h-recommend-text {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .home-page .home-anime-full {
        margin-bottom: 16px;
        padding: 14px 14px;
    }
    .home-page .anime-horizontal {
        padding: 12px 12px;
        gap: 12px;
    }
    .home-page .anime-h-poster {
        width: 64px;
        height: 90px;
    }
    .home-page .anime-h-title {
        font-size: 14px;
    }
    .home-page .anime-h-recommend-text {
        font-size: 12px;
    }
}

/* ========== 首页双栏布局 ========== */
.home-page .home-row {
    display: flex;
    gap: 28px;
    align-items: flex-start;
    padding: 0 0 40px;
    position: relative;
}

.home-page .home-left {
    flex: 1;
    min-width: 0;
    transition: all 0.3s ease;
}

.home-page .home-right {
    flex: 1;
    min-width: 0;
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .home-page .home-row {
        flex-direction: column;
        gap: 20px;
        padding: 0 0 30px;
    }

    .home-page .home-left,
    .home-page .home-right {
        width: 100%;
        flex: none;
    }

    .home-page .home-right {
        display: none;
    }

    .home-page .home-right.active {
        display: block;
    }

    .home-page .home-left.hidden-mobile {
        display: none;
    }

    .home-page .mobile-panel-switch {
        display: flex;
        justify-content: center;
        gap: 12px;
        margin-bottom: 16px;
        background: #f5f7fb;
        padding: 8px 0;
        border-bottom: 1px solid #eef2ff;
    }

    .home-page .mobile-panel-switch button {
        padding: 8px 28px;
        border-radius: 30px;
        border: 1px solid #e2e8f0;
        background: white;
        font-size: 14px;
        font-weight: 500;
        color: #475569;
        cursor: pointer;
        transition: all 0.2s;
        font-family: inherit;
        flex: 1;
        max-width: 160px;
    }

    .home-page .mobile-panel-switch button.active {
        background: var(--primary-color, #3b82f6);
        color: white;
        border-color: var(--primary-color, #3b82f6);
        box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    }
}

@media (min-width: 769px) {
    .home-page .mobile-panel-switch {
        display: none;
    }

    .home-page .home-right {
        display: block !important;
    }

    .home-page .home-left {
        display: block !important;
    }
}

/* ========== 卡片通用 ========== */
.home-page .home-card {
    background: white;
    border-radius: 24px;
    padding: 24px 28px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid #f1f5f9;
    margin-bottom: 20px;
    transition: box-shadow 0.2s;
}

.home-page .home-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.home-page .home-card:last-child {
    margin-bottom: 0;
}

.home-page .home-card .card-title {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eef2ff;
}

.home-page .home-card .card-title .badge {
    font-size: 12px;
    font-weight: 400;
    color: #64748b;
    background: #f1f5f9;
    padding: 2px 10px;
    border-radius: 20px;
    margin-left: auto;
}

/* ========== 卡片标题右侧的"前往"按钮 ========== */
.home-page .home-card .card-title .card-more-link {
    font-size: 12px;
    color: #3b82f6;
    text-decoration: none;
    padding: 2px 10px;
    border-radius: 12px;
    background: #eef2ff;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
    font-weight: 500;
    margin-left: 6px;
}

.home-page .home-card .card-title .card-more-link:hover {
    background: #3b82f6;
    color: white;
}

@media (max-width: 480px) {
    .home-page .home-card .card-title {
        flex-wrap: wrap;
    }
    .home-page .home-card .card-title .card-more-link {
        font-size: 11px;
        padding: 2px 8px;
    }
}

/* ========== 日期时间 ========== */
.home-page .datetime-card {
    text-align: center;
    padding: 24px 24px 20px;
}

.home-page .datetime-gregorian {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}

.home-page .datetime-lunar {
    font-size: 14px;
    color: #94a3b8;
    margin-bottom: 12px;
}

.home-page .datetime-clock {
    font-size: 42px;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: 2px;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}

.home-page .datetime-clock .seconds {
    font-size: 28px;
    color: #94a3b8;
    font-weight: 500;
}

/* ========== 个人信息 ========== */
.home-page .profile-card {
    text-align: center;
}

.home-page .profile-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 12px;
    display: block;
    background: #e2e8f0;
    border: 3px solid #eef2ff;
}

.home-page .profile-name {
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 6px;
}

.home-page .profile-mbti-tag {
    font-size: 14px;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f1f5f9;
    padding: 3px 16px;
    border-radius: 20px;
    margin-bottom: 10px;
}

.home-page .profile-tagline {
    font-size: 14px;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.home-page .star-rating {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    cursor: help;
    position: relative;
}

.home-page .star-rating .star {
    font-size: 18px;
    color: #f59e0b;
    transition: transform 0.2s;
}

.home-page .star-rating .star.empty {
    color: #d1d5db;
}

.home-page .star-rating .star:hover {
    transform: scale(1.2);
}

.home-page .star-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: white;
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 12px;
    white-space: nowrap;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    z-index: 100;
    font-weight: 400;
    line-height: 1.5;
}

.home-page .star-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #1e293b;
}

.home-page .star-rating:hover .star-tooltip {
    display: block;
}

.home-page .profile-email {
    font-size: 14px;
    color: #3b82f6;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 16px;
    border-radius: 20px;
    background: #eef2ff;
    transition: background 0.2s;
    margin-bottom: 4px;
}

.home-page .profile-email:hover {
    background: #dbeafe;
}

/* ========== MBTI 性格特征条 ========== */
.home-page .mbti-traits {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 4px 0;
}

.home-page .mbti-trait {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.home-page .mbti-trait-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
}

.home-page .mbti-trait-label {
    color: #475569;
    font-weight: 500;
}

.home-page .mbti-trait-value {
    font-weight: 600;
    font-size: 13px;
}

.home-page .mbti-trait-bar {
    position: relative;
    height: 8px;
    width: 100%;
}

.home-page .mbti-trait-bar-bg {
    position: absolute;
    inset: 0;
    background: #e2e8f0;
    border-radius: 8px;
}

.home-page .mbti-trait-bar-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    border-radius: 8px;
    transition: width 0.6s ease;
}

.home-page .mbti-trait-bar-dot {
    position: absolute;
    top: 50%;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: white;
    border: 3px solid;
    transform: translate(-50%, -50%);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.home-page .mbti-trait-foot {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #94a3b8;
    margin-top: 2px;
}

.home-page .mbti-update-time {
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px dashed #eef2ff;
    font-size: 12px;
    color: #94a3b8;
    text-align: right;
}

/* ========== 最新一条动态 ========== */
.home-page .announce-single {
    padding: 14px 16px;
    border-radius: 14px;
    background: #f8fafc;
    border-left: 4px solid #3b82f6;
    font-size: 14px;
    line-height: 1.7;
    color: #334155;
}

.home-page .announce-single .announce-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    font-size: 12px;
    color: #94a3b8;
    margin-bottom: 8px;
}

.home-page .announce-single .announce-status {
    font-size: 11px;
    background: #eef2ff;
    padding: 1px 10px;
    border-radius: 10px;
    color: #475569;
}

.home-page .announce-single .announce-weather {
    font-size: 11px;
    color: #94a3b8;
}

.home-page .announce-single .announce-content {
    color: #1e293b;
    word-break: break-word;
}

.home-page .announce-single .announce-content a {
    color: #3b82f6;
    text-decoration: none;
}

/* ========== 说说最新一条 ========== */
.home-page .say-latest {
    background: #f8fafc;
    border-radius: 16px;
    padding: 16px 18px;
    border: 1px solid #eef2ff;
}

.home-page .say-latest-header {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.home-page .say-latest-title {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    flex: 1;
    min-width: 0;
    word-break: break-word;
    line-height: 1.4;
}

.home-page .say-latest-date {
    font-size: 12px;
    color: #94a3b8;
    flex-shrink: 0;
    line-height: 1.4;
    padding-top: 2px;
}

.home-page .say-latest-content {
    font-size: 14px;
    color: #334155;
    line-height: 1.7;
    position: relative;
    transition: max-height 0.3s ease;
    overflow: hidden;
    word-break: break-word;
    overflow-wrap: break-word;
}

.home-page .say-latest-content.collapsed {
    max-height: 80px;
}

.home-page .say-latest-content.collapsed::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(transparent, #f8fafc);
    pointer-events: none;
}

.home-page .say-latest-content img {
    max-width: 100%;
    border-radius: 8px;
    margin: 4px 0;
}

.home-page .say-latest-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eef2ff;
    flex-wrap: wrap;
    gap: 8px;
}

.home-page .say-latest-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.home-page .say-latest-actions .comment-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
    cursor: pointer;
}

.home-page .say-latest-actions .comment-link:hover {
    color: #3b82f6;
}

.home-page .say-toggle-btn {
    font-size: 12px;
    color: #3b82f6;
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 8px;
    border-radius: 12px;
    transition: background 0.2s;
    font-family: inherit;
}

.home-page .say-toggle-btn:hover {
    background: #eef2ff;
}

/* ========== 最新文章（3 篇列表，只显示标题） ========== */
.home-page .latest-post-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.home-page .latest-post-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #eef2ff;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.home-page .latest-post-item:hover {
    border-color: #3b82f6;
    background: #f0f7ff;
    transform: translateX(2px);
}

.home-page .latest-post-item-icon {
    font-size: 16px;
    flex-shrink: 0;
    line-height: 1;
}

.home-page .latest-post-item-title {
    font-size: 14px;
    font-weight: 500;
    color: #0f172a;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s;
}

.home-page .latest-post-item:hover .latest-post-item-title {
    color: #3b82f6;
}

/* ========== 空状态 ========== */
.home-page .empty-mini {
    text-align: center;
    padding: 30px 20px;
    color: #94a3b8;
    font-size: 14px;
}

.home-page .empty-mini .icon {
    font-size: 32px;
    display: block;
    margin-bottom: 8px;
}

/* ========== 响应式微调 ========== */
@media (max-width: 768px) {
    .home-page .home-card {
        padding: 18px 18px;
        border-radius: 18px;
    }

    .home-page .datetime-clock {
        font-size: 34px;
    }

    .home-page .datetime-clock .seconds {
        font-size: 22px;
    }

    .home-page .profile-avatar {
        width: 80px;
        height: 80px;
    }

    .home-page .profile-name {
        font-size: 19px;
    }
}

@media (max-width: 480px) {
    .home-page .home-card {
        padding: 14px 14px;
        border-radius: 16px;
    }

    .home-page .datetime-clock {
        font-size: 28px;
    }

    .home-page .datetime-clock .seconds {
        font-size: 18px;
    }

    .home-page .datetime-gregorian {
        font-size: 16px;
    }

    .home-page .latest-post-item {
        padding: 8px 12px;
    }

    .home-page .latest-post-item-title {
        font-size: 13px;
    }
}

/* ========== 个人信息卡片的按钮行 ========== */
.home-page .profile-buttons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 4px;
}

.home-page .profile-buttons .profile-email {
    margin-bottom: 0;
}

.home-page .profile-about-btn {
    font-size: 14px;
    color: #64748b;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 16px;
    border-radius: 20px;
    background: #f1f5f9;
    transition: all 0.2s;
    font-weight: 500;
}

.home-page .profile-about-btn:hover {
    background: #3b82f6;
    color: white;
}