/* =====================================================
   网站档案库 前台样式（WebArchive）
   图标导航网格 + 详情弹窗（地址/介绍/截图/评分评论）
   ===================================================== */

/* 不设 min-height:100vh：由主题的 .main_screen(flex 列、min-height:100vh)
   与 main 的 flex:1 撑开，页脚才能自然贴在内容/视口底部，与其它页面一致 */
.wa-page {
    padding: 48px 20px 64px;
}

.wa-container {
    max-width: 960px;
    margin: 0 auto;
}

.wa-hero {
    text-align: center;
    margin-bottom: 26px;
}

.wa-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-main, #2b3a2d);
    letter-spacing: 2px;
    margin: 0 0 8px;
}

.wa-hero-desc {
    color: var(--text-secondary, #7d8a80);
    font-size: 14px;
    line-height: 1.8;
    max-width: 640px;
    margin: 0 auto;
}

/* 搜索 */
.wa-search {
    max-width: 420px;
    margin: 0 auto 26px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, .72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(43, 58, 45, .12);
    border-radius: 999px;
    padding: 9px 16px;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.wa-search:focus-within {
    border-color: var(--accent-brown, #a0774b);
    box-shadow: 0 4px 18px rgba(160, 119, 75, .18);
}

.wa-search svg {
    width: 17px;
    height: 17px;
    color: #9aa79d;
    flex: 0 0 auto;
}

.wa-search input {
    border: 0;
    outline: 0;
    background: transparent;
    width: 100%;
    font-size: 14px;
    color: var(--text-main, #2b3a2d);
}

/* 图标网格 */
#wa-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 18px 12px;
}

.wa-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 6px 10px;
    border-radius: 14px;
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    position: relative;
    transition: background .2s ease, border-color .2s ease, transform .15s ease, box-shadow .2s ease;
}

.wa-card:hover {
    background: rgba(255, 255, 255, .82);
    border-color: rgba(43, 58, 45, .1);
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(43, 58, 45, .1);
}

.wa-card-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 600;
    color: #fff;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
}

.wa-card-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
}

.wa-card-name {
    font-size: 13px;
    color: var(--text-main, #2b3a2d);
    max-width: 96px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
}

.wa-card-dead::after {
    content: '失联';
    position: absolute;
    top: 6px;
    right: 6px;
    font-size: 10px;
    line-height: 1;
    padding: 3px 5px;
    border-radius: 5px;
    background: #fdeaea;
    color: #c0392b;
    font-weight: 600;
}

.wa-card-stars {
    font-size: 11px;
    color: #f5a623;
    line-height: 1;
    letter-spacing: 1px;
    min-height: 11px;
}

.wa-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-secondary, #7d8a80);
    padding: 44px 0;
    font-size: 14px;
}

.wa-count {
    text-align: center;
    color: var(--text-secondary, #7d8a80);
    font-size: 12px;
    margin-top: 22px;
}

/* ============ 详情弹窗 ============ */
.wa-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 18, .55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    overflow-y: auto;
}

.wa-modal-overlay.open {
    display: flex;
}

.wa-modal-card {
    position: relative;
    width: 620px;
    max-width: 100%;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .3);
    padding: 24px 26px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.wa-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    background: #f1f3f2;
    color: #66706a;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: background .2s ease, color .2s ease;
}

.wa-modal-close:hover {
    background: #e4e8e5;
    color: #2b3a2d;
}

.wa-modal-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.wa-modal-icon {
    width: 52px;
    height: 52px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 600;
    color: #fff;
    overflow: hidden;
    flex: 0 0 auto;
}

.wa-modal-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
}

.wa-modal-head-info h2 {
    margin: 0 0 5px;
    font-size: 20px;
    color: #2b3a2d;
}

.wa-modal-sub {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
}

.wa-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
}

.wa-badge.ok {
    background: #e6f4ea;
    color: #1e7e34;
}

.wa-badge.dead {
    background: #fdeaea;
    color: #c0392b;
}

.wa-modal-stars {
    color: #f5a623;
    letter-spacing: 2px;
}

.wa-modal-rating-num {
    color: #8a938d;
}

.wa-modal-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.wa-modal-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}

.wa-modal-label {
    flex: 0 0 62px;
    font-size: 13px;
    color: #98a29b;
    font-weight: 600;
}

.wa-modal-url {
    font-size: 14px;
    color: #467b96;
    word-break: break-all;
    text-decoration: none;
}

.wa-modal-url:hover {
    text-decoration: underline;
}

.wa-visit-btn {
    display: inline-block;
    font-size: 12px;
    padding: 4px 14px;
    border-radius: 999px;
    background: var(--accent-brown, #a0774b);
    color: #fff;
    text-decoration: none;
    transition: opacity .2s ease;
}

.wa-visit-btn:hover {
    opacity: .85;
}

.wa-modal-desc {
    margin: 0;
    font-size: 14px;
    color: #4c5850;
    line-height: 1.8;
    flex: 1;
    min-width: 200px;
}

.wa-modal-desc:empty::after {
    content: '暂无介绍';
    color: #b6beb8;
}

/* 截图区 */
.wa-shot-box {
    flex: 1;
    min-width: 200px;
}

.wa-shot-year {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.wa-year-chip {
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid #dcdcdc;
    background: #fff;
    color: #666;
    cursor: pointer;
}

.wa-year-chip.on {
    background: #2b3a2d;
    border-color: #2b3a2d;
    color: #fff;
}

.wa-shot-img {
    width: 100%;
    border-radius: 10px;
    border: 1px solid #e8e8e8;
    background: #fafafa;
    cursor: zoom-in;
    display: block;
}

.wa-shot-empty {
    margin: 0;
    font-size: 13px;
    color: #b6beb8;
    padding: 26px 0;
    text-align: center;
    background: #fafafa;
    border: 1px dashed #e2e2e2;
    border-radius: 10px;
}

/* 截图大图预览 */
.wa-viewer {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .82);
    cursor: zoom-out;
}

.wa-viewer.open {
    display: flex;
}

.wa-viewer img {
    max-width: 94vw;
    max-height: 94vh;
    border-radius: 8px;
}

/* 评分区 */
.wa-rate-box {
    flex: 1;
    min-width: 220px;
}

.wa-rate-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.wa-rate-avg {
    font-size: 30px;
    font-weight: 700;
    color: #f5a623;
    line-height: 1;
}

.wa-rate-bigstars {
    color: #f5a623;
    font-size: 16px;
    letter-spacing: 3px;
}

.wa-rate-count {
    font-size: 12px;
    color: #98a29b;
    margin-top: 2px;
}

.wa-rate-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
}

.wa-rate-item {
    padding: 9px 12px;
    background: #f7f8f7;
    border-radius: 10px;
}

.wa-rate-item-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #98a29b;
}

.wa-rate-item-head .who {
    color: #4c5850;
    font-weight: 600;
}

.wa-rate-item-head .stars {
    color: #f5a623;
    letter-spacing: 1px;
}

.wa-rate-item-body {
    font-size: 13px;
    color: #4c5850;
    line-height: 1.7;
    margin-top: 4px;
    word-break: break-word;
}

.wa-rate-none {
    font-size: 13px;
    color: #b6beb8;
    padding: 4px 0 8px;
}

/* 提交表单 */
.wa-rate-form {
    border: 1px solid #ececec;
    border-radius: 12px;
    padding: 12px 14px;
    background: #fcfcfc;
}

.wa-rate-form-head {
    font-size: 13px;
    font-weight: 600;
    color: #4c5850;
    margin-bottom: 8px;
}

.wa-rate-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.wa-rate-inputs input {
    flex: 0 0 160px;
    border: 1px solid #dcdcdc;
    border-radius: 8px;
    padding: 7px 10px;
    font-size: 13px;
    outline: 0;
}

.wa-rate-inputs input:focus {
    border-color: var(--accent-brown, #a0774b);
}

/* 评论者信息：与文章评论表单同一套（昵称 / 邮箱 / 网址） */
.wa-visit-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.wa-visit-row input {
    flex: 1 1 150px;
    min-width: 0;
    border: 1px solid #dcdcdc;
    border-radius: 8px;
    padding: 7px 10px;
    font-size: 13px;
    outline: 0;
    box-sizing: border-box;
}

.wa-visit-row input:focus {
    border-color: var(--accent-brown, #a0774b);
}

.wa-rate-tip {
    font-size: 12px;
    color: #98a29b;
    margin-top: 6px;
    line-height: 1.5;
}

@media (max-width: 560px) {
    .wa-visit-row input {
        flex: 1 1 100%;
    }
}

.wa-star-pick {
    display: flex;
    align-items: center;
    gap: 2px;
}

.wa-star-pick button {
    border: 0;
    background: none;
    font-size: 20px;
    line-height: 1;
    color: #d9d9d9;
    cursor: pointer;
    padding: 0 1px;
    transition: color .15s ease, transform .15s ease;
}

.wa-star-pick button:hover {
    transform: scale(1.15);
}

.wa-star-pick button.on {
    color: #f5a623;
}

.wa-star-pick-label {
    font-size: 12px;
    color: #98a29b;
    margin-left: 6px;
}

.wa-rate-form textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #dcdcdc;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 13px;
    min-height: 62px;
    resize: vertical;
    outline: 0;
}

.wa-rate-form textarea:focus {
    border-color: var(--accent-brown, #a0774b);
}

.wa-rate-form-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
}

.wa-rate-msg {
    font-size: 12px;
    color: #c0392b;
}

.wa-rate-msg.ok {
    color: #1e7e34;
}

.wa-submit-btn {
    border: 0;
    border-radius: 999px;
    background: var(--accent-brown, #a0774b);
    color: #fff;
    font-size: 13px;
    padding: 7px 22px;
    cursor: pointer;
    transition: opacity .2s ease;
}

.wa-submit-btn:hover {
    opacity: .85;
}

.wa-submit-btn.busy {
    opacity: .5;
    pointer-events: none;
}

/* 移动端适配 */
@media (max-width: 640px) {
    .wa-page {
        padding: 30px 14px 48px;
    }

    .wa-title {
        font-size: 22px;
    }

    #wa-grid {
        grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
        gap: 14px 8px;
    }

    .wa-card-icon {
        width: 46px;
        height: 46px;
        border-radius: 11px;
        font-size: 20px;
    }

    .wa-modal-card {
        padding: 18px 16px;
    }

    .wa-modal-label {
        flex-basis: 100%;
    }
}
