/* ==========================================================================
   Lumina · pages.css
   首页 Hero 轮播 / 归档头部 / 文章详情头部 / 上下篇 / 404
   ========================================================================== */

/* ------------------------------ 首页 Hero 轮播 ------------------------------ */

.hero-slider {
    position: relative;
    height: 288px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--surface-2);
    box-shadow: var(--shadow-card);
}

.hero-viewport {
    position: absolute;
    inset: 0;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: block;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

.hero-media {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
    transform: scale(1.02);
    transition: transform 6s ease;
}

.hero-slide.is-active .hero-media {
    transform: scale(1.07);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(17, 26, 41, 0.42) 0%, rgba(17, 26, 41, 0.04) 38%, rgba(13, 20, 33, 0.82) 100%);
}

.hero-badge {
    position: absolute;
    top: 18px;
    left: 18px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 10px;
    border-radius: 6px;
    background: var(--primary);
    color: #fff;
    font-size: 12px;
    line-height: 1;
    letter-spacing: 0.02em;
}

.hero-content {
    position: absolute;
    right: 30px;
    bottom: 26px;
    left: 30px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    color: #fff;
}

.hero-title {
    overflow: hidden;
    color: #fff;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 12px rgba(9, 15, 25, 0.35);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.hero-desc {
    overflow: hidden;
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 14px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px;
    margin-top: 14px;
}

.hero-meta .meta-item {
    color: rgba(255, 255, 255, 0.82);
    font-size: 12.5px;
}

.hero-meta .meta-item .icon {
    color: rgba(255, 255, 255, 0.72);
}

.hero-dots {
    position: absolute;
    right: 24px;
    bottom: 30px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 6px;
}

.hero-dot {
    width: 6px;
    height: 6px;
    padding: 0;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.55);
    transition: width 0.25s ease, background-color 0.25s ease;
}

.hero-dot.is-active {
    width: 18px;
    background: #fff;
}

.hero-dot:hover {
    background: rgba(255, 255, 255, 0.85);
}

/* ------------------------------ 归档头部 ------------------------------ */

.archive-head {
    padding: 24px 26px;
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-card);
}

.archive-title {
    margin-top: 12px;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: -0.02em;
}

.archive-desc {
    margin-top: 6px;
    color: var(--text-3);
    font-size: 13px;
    line-height: 1.7;
}

/* ------------------------------ 文章详情 ------------------------------ */

.article-breadcrumb {
    padding: 2px 2px 0;
}

/* 上一篇 / 下一篇 */
.post-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.post-nav-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    padding: 16px 20px;
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow-card);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.post-nav-item:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-1px);
}

.post-nav-item--next {
    align-items: flex-end;
    text-align: right;
}

.post-nav-label {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: var(--text-3);
    font-size: 12px;
}

.post-nav-label .icon {
    width: 11px;
    height: 11px;
}

.post-nav-item a {
    max-width: 100%;
    overflow: hidden;
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.post-nav-item a:hover {
    color: var(--primary);
}

.post-nav-empty {
    color: var(--text-4);
    font-size: 13px;
}

/* ------------------------------ 404 ------------------------------ */

.not-found {
    padding: 90px 24px;
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-card);
    text-align: center;
}

.not-found-code {
    color: var(--primary);
    font-size: 76px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.04em;
}

.not-found-title {
    margin-top: 16px;
    font-size: 22px;
    font-weight: 700;
}

.not-found-desc {
    margin-top: 8px;
    color: var(--text-3);
    font-size: 13.5px;
}

.not-found-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 26px;
}

.nf-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    padding: 0 24px;
    border-radius: var(--radius-sm);
    background: var(--primary);
    color: #fff;
    font-size: 14px;
}

.nf-button:hover {
    background: var(--primary-dark);
    color: #fff;
}

.nf-search {
    display: flex;
    align-items: center;
    width: 280px;
    height: 42px;
    padding: 0 10px 0 16px;
    border-radius: 21px;
    background: var(--surface-2);
}

/* ------------------------------ 独立页面：友情链接 ------------------------------ */

.links-intro,
.archive-intro {
    margin-top: 22px;
}

.friend-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 26px;
}

.friend-card {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface-2);
    transition: border-color 0.2s ease, background-color 0.2s ease,
        box-shadow 0.2s ease, transform 0.2s ease;
}

.friend-card:hover {
    border-color: rgba(37, 134, 254, 0.3);
    background: var(--surface);
    box-shadow: 0 8px 20px rgba(29, 41, 59, 0.08);
    transform: translateY(-2px);
}

.friend-avatar {
    display: grid;
    place-items: center;
    flex: none;
    width: 46px;
    height: 46px;
    border-radius: 13px;
    overflow: hidden;
    font-size: 17px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.01em;
}

.friend-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.friend-avatar--blue   { background: #eaf3ff; color: #2586fe; }
.friend-avatar--orange { background: #fff3e7; color: #f5a623; }
.friend-avatar--mint   { background: #e7f8f2; color: #10b981; }
.friend-avatar--violet { background: #f1ecff; color: #8b5cf6; }
.friend-avatar--indigo { background: #eceefe; color: #6366f1; }
.friend-avatar--teal   { background: #e5f8f8; color: #0ea5a5; }

.friend-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.friend-name {
    display: flex;
    align-items: center;
    gap: 5px;
    overflow: hidden;
    color: var(--text);
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.friend-go {
    display: flex;
    align-items: center;
    align-self: center;
    flex: none;
    color: var(--text-4);
    transition: color 0.2s ease, transform 0.2s ease;
}

.friend-go .icon {
    width: 14px;
    height: 14px;
}

.friend-card:hover .friend-name {
    color: var(--primary);
}

.friend-card:hover .friend-go {
    color: var(--primary);
    transform: translateX(2px);
}

.friend-desc {
    display: -webkit-box;
    overflow: hidden;
    margin-top: 5px;
    color: var(--text-3);
    font-size: 12.5px;
    line-height: 1.6;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.friend-domain {
    margin-top: 6px;
    overflow: hidden;
    color: var(--text-4);
    font-size: 11.5px;
    letter-spacing: 0.01em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ------------------------------ 独立页面：文章归档 ------------------------------ */

.archive-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 26px;
}

.stat-box {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
    padding: 14px 15px;
    border-radius: var(--radius-md);
    background: var(--surface-2);
}

.stat-icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 34px;
    height: 34px;
    border-radius: 10px;
}

.stat-icon .icon {
    width: 17px;
    height: 17px;
}

.stat-icon--blue   { background: #eaf3ff; color: #2586fe; }
.stat-icon--orange { background: #fff3e7; color: #f5a623; }
.stat-icon--mint   { background: #e7f8f2; color: #10b981; }
.stat-icon--violet { background: #f1ecff; color: #8b5cf6; }

.stat-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.stat-body strong {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

.stat-body span {
    color: var(--text-3);
    font-size: 11.5px;
    line-height: 1.4;
}

.archive-timeline {
    margin-top: 30px;
}

.timeline-group + .timeline-group {
    margin-top: 28px;
}

.timeline-year {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.timeline-year::before {
    content: "";
    width: 3px;
    height: 17px;
    border-radius: 2px;
    background: var(--primary);
}

.timeline-year em {
    color: var(--text-3);
    font-size: 12px;
    font-style: normal;
    font-weight: 500;
}

.timeline-list {
    margin-top: 8px;
}

.timeline-item {
    display: flex;
    align-items: baseline;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px dashed var(--border-strong);
}

.timeline-item:last-child {
    padding-bottom: 2px;
    border-bottom: 0;
}

.timeline-date {
    flex: none;
    width: 44px;
    color: var(--text-3);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.timeline-title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    color: var(--text);
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.timeline-title:hover {
    color: var(--primary);
}

.timeline-meta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: none;
    color: var(--text-4);
    font-size: 11.5px;
}

.timeline-meta .icon {
    width: 12px;
    height: 12px;
}

/* ------------------------------ 响应式 ------------------------------ */

@media (max-width: 1024px) {
    .hero-slider {
        height: 320px;
    }
}

@media (max-width: 768px) {
    .hero-slider {
        height: 280px;
    }

    .hero-title {
        font-size: 26px;
    }

    .hero-content {
        right: 22px;
        bottom: 22px;
        left: 22px;
    }

    .hero-dots {
        right: 20px;
        bottom: 24px;
    }

    .archive-title {
        font-size: 21px;
    }

    .not-found {
        padding: 64px 20px;
    }

    .not-found-code {
        font-size: 58px;
    }
}

@media (max-width: 640px) {
    .hero-slider {
        height: 232px;
    }

    .hero-title {
        font-size: 21px;
    }

    .hero-desc {
        font-size: 13px;
    }

    .hero-meta {
        gap: 12px;
        margin-top: 10px;
    }

    .hero-badge {
        top: 14px;
        left: 14px;
    }

    .archive-head {
        padding: 20px 18px;
    }

    .post-nav {
        grid-template-columns: minmax(0, 1fr);
    }

    .post-nav-item--next {
        align-items: flex-start;
        text-align: left;
    }

    .nf-search {
        width: 100%;
    }

    /* 友情链接 / 归档 */
    .friend-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
        margin-top: 22px;
    }

    .friend-card {
        gap: 12px;
        padding: 14px 15px;
    }

    .friend-avatar {
        width: 42px;
        height: 42px;
        border-radius: 12px;
        font-size: 16px;
    }

    .archive-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        margin-top: 22px;
    }

    .stat-box {
        padding: 12px 13px;
    }

    .timeline-item {
        gap: 10px;
    }

    .timeline-date {
        width: 40px;
    }

    .timeline-title {
        font-size: 13.5px;
    }
}

@media (max-width: 480px) {
    .hero-slider {
        height: 200px;
    }

    .hero-desc {
        font-size: 12px;
    }

    .hero-dots {
        bottom: 18px;
    }

    .not-found {
        padding: 52px 16px;
    }
}

/* ==========================================================================
   账号页：登录 / 注册 / 用户中心
   ========================================================================== */

.account-card {
    padding: 30px 34px 34px;
}

.account-head {
    margin-bottom: 16px;
}

/* ------------------------------ 登录 / 注册 ------------------------------ */

/* 登录 / 注册页：单面板居中 */
.account-single {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}

.account-switch {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    color: var(--text-3);
    font-size: 13px;
    text-align: center;
}

.account-switch a {
    color: var(--primary);
    font-weight: 600;
}

.account-switch a:hover {
    color: var(--primary-dark);
}

.account-panel {
    padding: 22px 24px 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface-2);
}

.account-panel-title {
    font-size: 16px;
    font-weight: 700;
}

.account-panel-desc {
    margin-top: 6px;
    color: var(--text-3);
    font-size: 13px;
    line-height: 1.7;
}

.account-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.account-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.account-field label {
    color: var(--text-2);
    font-size: 12.5px;
    font-weight: 500;
}

.account-field input {
    height: 42px;
    padding: 0 13px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    font-size: 13.5px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.account-field input::placeholder {
    color: var(--text-4);
}

.account-field input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
    outline: none;
}

.account-check {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--text-3);
    font-size: 12.5px;
}

.account-check input {
    width: 15px;
    height: 15px;
    accent-color: var(--primary);
}

.account-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    margin-top: 2px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, #46a0ff, var(--primary));
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.account-submit:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

.account-alert {
    margin-top: 14px;
    padding: 11px 14px;
    border-radius: 10px;
    font-size: 12.5px;
    line-height: 1.7;
}

.account-alert p {
    margin: 0;
}

.account-alert.is-error {
    background: rgba(239, 68, 68, 0.08);
    color: #d92d20;
}

.account-alert.is-notice {
    background: var(--primary-soft);
    color: var(--primary);
}

.account-alert.is-success {
    background: rgba(22, 163, 74, 0.1);
    color: #15803d;
}

/* ------------------------------ 通用按钮 ------------------------------ */

.account-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    padding: 0 18px;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-2);
    font-size: 13px;
    font-weight: 500;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.account-button:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.account-button.is-primary {
    border-color: transparent;
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(37, 134, 254, 0.25);
}

.account-button.is-primary:hover {
    color: #fff;
    opacity: 0.92;
}

.account-button.is-danger {
    border-color: rgba(239, 68, 68, 0.28);
    color: #d92d20;
}

.account-button.is-danger:hover {
    border-color: rgba(239, 68, 68, 0.5);
    background: rgba(239, 68, 68, 0.08);
    color: #d92d20;
}

/* ------------------------------ 未登录引导 ------------------------------ */

.account-guest {
    padding: 46px 20px 40px;
    text-align: center;
}

.account-guest-icon {
    display: inline-grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: var(--primary-soft);
    color: var(--primary);
}

.account-guest-icon .icon {
    width: 26px;
    height: 26px;
}

.account-guest-title {
    margin-top: 16px;
    font-size: 18px;
    font-weight: 700;
}

.account-guest-desc {
    margin-top: 8px;
    color: var(--text-3);
    font-size: 13.5px;
}

.account-guest-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 22px;
}

/* ------------------------------ 用户信息 ------------------------------ */

.account-hero {
    display: flex;
    align-items: center;
    gap: 18px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--border);
}

.account-avatar {
    display: grid;
    place-items: center;
    flex: none;
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f9cff, var(--primary));
    color: #fff;
    font-size: 26px;
    font-weight: 700;
    box-shadow: 0 6px 18px rgba(37, 134, 254, 0.25);
}

.account-hero-body {
    min-width: 0;
}

.account-name {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
}

.account-hero-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.account-chip {
    display: inline-flex;
    align-items: center;
    height: 21px;
    padding: 0 9px;
    border-radius: 5px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 12px;
    line-height: 1;
}

.account-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 22px;
}

.account-stat {
    padding: 16px 18px;
    border-radius: var(--radius-md);
    background: var(--surface-2);
    text-align: center;
}

.account-stat-value {
    display: block;
    color: var(--primary);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
}

.account-stat-label {
    display: block;
    margin-top: 4px;
    color: var(--text-3);
    font-size: 12px;
}

/* ------------------------------ 我的文章 ------------------------------ */

.account-section {
    margin-top: 26px;
}

.account-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.account-section-title {
    font-size: 15px;
    font-weight: 700;
}

.account-section-more {
    color: var(--text-3);
    font-size: 12.5px;
}

.account-section-more:hover {
    color: var(--primary);
}

.account-post-list {
    display: flex;
    flex-direction: column;
}

.account-post {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}

.account-post:last-child {
    border-bottom: 0;
}

.account-post-thumb {
    flex: none;
    width: 96px;
    height: 62px;
    border-radius: 9px;
    overflow: hidden;
    background: var(--surface-2);
}

.account-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.account-post:hover .account-post-thumb img {
    transform: scale(1.05);
}

.account-post-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.account-post-title {
    display: -webkit-box;
    overflow: hidden;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.account-post:hover .account-post-title {
    color: var(--primary);
}

.account-post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

.account-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.account-empty {
    padding: 38px 10px 30px;
}

@media (max-width: 768px) {
    .account-card {
        padding: 22px 18px 24px;
    }

    .account-panel {
        padding: 18px 16px 20px;
    }

    .account-hero {
        gap: 14px;
    }

    .account-avatar {
        width: 56px;
        height: 56px;
        font-size: 22px;
    }

    .account-name {
        font-size: 18px;
    }

    .account-stats {
        gap: 8px;
    }

    .account-stat {
        padding: 12px 10px;
    }

    .account-stat-value {
        font-size: 17px;
    }

    .account-post-thumb {
        width: 78px;
        height: 52px;
    }

    .account-guest {
        padding: 34px 10px 30px;
    }
}
