/* ============ Spage 前台样式 ============ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    color: #222226;
    background-color: #6d8fb3;
    background-image: linear-gradient(160deg, #7fa3c7 0%, #5d7fa8 45%, #4a6a94 100%);
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* 全屏视频背景 */
.bg-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(135deg, #5b7cfa 0%, #7c5bfa 40%, #b06af8 75%, #f072a8 100%);
}

/* 页面内容层：置于视频背景之上 */
.page {
    position: relative;
    z-index: 1;
}

a {
    text-decoration: none;
    color: inherit;
}

a:hover {
    text-decoration: none;
}

::selection {
    background: rgba(91, 124, 250, 0.35);
    color: inherit;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.35);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.55);
}

::-webkit-scrollbar-track {
    background: transparent;
}

/* ---------- 公告栏（v2 胶囊格式，居中悬浮） ---------- */
.notice-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 680px;
    width: 100%;
    margin: 0 auto 22px;
    padding: 9px 14px;
    border-radius: 999px;
    background: rgba(32, 36, 51, 0.42);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #fff;
    font-size: 13px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(10, 25, 50, 0.22);
}

.notice-bar.hide {
    display: none;
}

.notice-bar .notice-tag {
    flex-shrink: 0;
    background: linear-gradient(135deg, #5b7cfa, #b06af8);
    color: #fff;
    padding: 2px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
}

.notice-bar .notice-scroll {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
}

.notice-bar .notice-scroll span {
    display: inline-block;
    padding-left: 100%;
    animation: notice-run 18s linear 3;
}

.notice-bar .notice-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.notice-bar .notice-close:hover {
    color: #fff;
}

@keyframes notice-run {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

@media screen and (max-width: 767px) {
    .notice-bar { font-size: 12px; padding: 8px 12px; }
}

/* ---------- 顶部导航（v2 格式：固定深色玻璃） ---------- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 28px;
    background: rgba(24, 30, 46, 0.55);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap;
}

.navbar .logo {
    display: flex;
    align-items: center;
    color: #fff;
    font-size: 17px;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
    white-space: nowrap;
}

.navbar .logo img {
    width: 30px;
    height: 30px;
    margin-right: 8px;
    flex-shrink: 0;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.navbar .logo:hover img {
    transform: rotate(-8deg) scale(1.08);
}

.navbar .nav-links {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    margin: 0;
    padding: 0;
}

.navbar .nav-links a {
    position: relative;
    color: rgba(255, 255, 255, 0.82);
    font-size: 15px;
    font-weight: 500;
    padding: 4px 2px;
    transition: color 0.2s;
}

.navbar .nav-links a::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -2px;
    width: 0;
    height: 2px;
    border-radius: 2px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    transition: width 0.25s ease, left 0.25s ease;
}

.navbar .nav-links a:hover {
    color: #fff;
}

.navbar .nav-links a:hover::after {
    left: 0;
    width: 100%;
}

/* ---------- 主体容器 ---------- */
.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 10;
}

.main {
    padding-top: 96px;
}

/* 页面载入渐入 */
@keyframes fade-up {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.navbar,
.main #show_time,
.main #show_date,
.main .one-word,
.main .title,
.main .search-wrap,
.main .mylist {
    animation: fade-up 0.55s cubic-bezier(0.22, 0.8, 0.36, 1) both;
}

.main #show_date { animation-delay: 0.05s; }
.main .one-word { animation-delay: 0.1s; }
.main .title { animation-delay: 0.15s; }
.main .search-wrap { animation-delay: 0.2s; }
.main .mylist { animation-delay: 0.28s; }

@media (prefers-reduced-motion: reduce) {
    .navbar, .main #show_time, .main #show_date,
    .main .one-word, .main .title, .main .search-wrap, .main .mylist {
        animation: none;
    }
}

/* ---------- 时间与一言 ---------- */
#show_time {
    text-align: center;
    color: #fff;
    font-size: 72px;
    font-weight: 700;
    line-height: 1.1;
    text-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
    letter-spacing: 4px;
    font-variant-numeric: tabular-nums;
}

#show_date {
    text-align: center;
    color: rgba(255, 255, 255, 0.92);
    font-size: 17px;
    margin: 6px 0 10px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.one-word {
    text-align: center;
    color: #fff;
    font-size: 14px;
    padding: 4px 0 2px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
    opacity: 0.95;
}

/* ---------- 首页标题 ---------- */
h2.title {
    text-align: center;
    color: #fff;
    font-size: 34px;
    font-weight: 600;
    letter-spacing: 2px;
    margin: 20px 0 6px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

/* ---------- 搜索区 ---------- */
.search-wrap {
    max-width: 620px;
    margin: 8px auto 18px;
}

.search-box {
    display: flex;
    align-items: center;
    height: 52px;
    backdrop-filter: saturate(140%) blur(16px);
    -webkit-backdrop-filter: saturate(140%) blur(16px);
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 16px;
    box-shadow: 0 6px 24px rgba(20, 35, 60, 0.18);
    transition: box-shadow 0.3s, background 0.3s, border-color 0.3s;
    padding: 0 12px 0 16px;
    overflow: hidden;
}

.search-box:hover {
    background: rgba(255, 255, 255, 0.68);
}

.search-box:focus-within {
    background: rgba(255, 255, 255, 0.75);
    border-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 32px rgba(20, 35, 60, 0.25), 0 0 0 4px rgba(91, 124, 250, 0.18);
}

.search-box #sou-flag {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    cursor: pointer;
    padding-right: 6px;
    margin-right: 4px;
}

.search-box #sou-flag .flag-icon {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    font-size: 9px;
    font-weight: 600;
    line-height: 1;
    color: #5b7cfa;
    overflow: hidden;
    flex-shrink: 0;
}

.search-box #sou-flag .flag-icon .flag-thumb {
    width: 10px;
    height: 10px;
    max-width: 10px;
    max-height: 10px;
    object-fit: contain;
    display: block;
}

.search-box #sou-flag .arrow {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid #666;
}

#search-text {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 17px;
    color: #222226;
    height: 52px;
    line-height: 52px;
}

#search-text::placeholder {
    color: #555666;
    font-size: 15px;
}

.search-btn {
    width: 42px;
    height: 42px;
    border: none;
    background: transparent;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    transition: background 0.25s, color 0.25s, transform 0.15s;
}

.search-btn:hover {
    background: linear-gradient(135deg, #5b7cfa, #b06af8);
    color: #fff;
    box-shadow: 0 4px 14px rgba(91, 124, 250, 0.45);
}

.search-btn:active {
    transform: scale(0.94);
}

.search-btn svg {
    width: 20px;
    height: 20px;
}

/* 搜索引擎切换列表（顶部图标点击展开） */
.search-type#chso {
    list-style: none;
    margin: 10px 0 0;
    padding: 10px;
    width: fit-content;
    max-width: 100%;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
    display: none;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
}

.search-type#chso.show {
    display: flex;
}

.search-type#chso .sou-item {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    transition: background 0.2s;
}

.search-type#chso .sou-item:hover {
    background: rgba(0, 0, 0, 0.06);
}

.search-type#chso .sou-item.active {
    background: linear-gradient(135deg, #5b7cfa, #b06af8);
    color: #fff;
}

.search-type#chso .sou-item.active .sou-letter {
    background: rgba(255, 255, 255, 0.3);
    color: #fff;
}

.search-type#chso .sou-letter {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: #fff;
    border: 1px solid #e8ebf1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: #5b7cfa;
}

.search-type#chso .sou-thumb {
    width: 12px;
    height: 12px;
    max-width: 12px;
    max-height: 12px;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}

/* 搜索建议候选词 */
#word {
    list-style: none;
    margin: 6px auto 0;
    max-width: 620px;
    width: 100%;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
    padding: 8px 4px;
    overflow: hidden;
}

#word li {
    padding: 9px 16px;
    font-size: 14px;
    color: #333;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

#word li .tag {
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 5px;
    background: #eef1f6;
    color: #8a93a6;
    flex-shrink: 0;
}

#word li .tag.site {
    background: #e8f0ff;
    color: #5b7cfa;
}

#word li:hover,
#word li.selected {
    background: rgba(91, 124, 250, 0.12);
    color: #5b7cfa;
}

/* ---------- 链接分组 ---------- */
.mylist {
    list-style: none;
    position: relative;
    z-index: 100;
    scroll-margin-top: 96px;
}

.mylist .group-title {
    width: 100%;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 2px;
    color: #fff;
    margin: 34px 0 4px;
    padding: 0 6px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
}

.mylist .group-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0));
    margin-left: 14px;
}

.link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 14px;
    margin-top: 10px;
}

.link-grid li {
    list-style: none;
    padding: 14px 6px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: 0 2px 12px rgba(10, 25, 50, 0.16);
    transition: transform 0.28s cubic-bezier(0.34, 1.4, 0.64, 1), background 0.28s, box-shadow 0.28s, border-color 0.28s;
}

.link-grid li:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.45);
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 12px 28px rgba(10, 25, 50, 0.28);
}

.link-grid a {
    width: 100%;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.link-grid .link-icon {
    display: block;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    margin-bottom: 8px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(10, 25, 50, 0.1);
    transition: transform 0.28s cubic-bezier(0.34, 1.4, 0.64, 1), box-shadow 0.28s;
}

.link-grid li:hover .link-icon {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(10, 25, 50, 0.18);
}

.link-grid .link-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

.link-grid .link-letter {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
}

.link-grid .link-name {
    width: 100%;
    text-align: center;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* ---------- 底部 ---------- */
.footer {
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    padding: 40px 20px 50px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    font-size: 13px;
}

.footer a {
    color: #fff;
}

.footer a.icp {
    color: rgba(255, 255, 255, 0.9);
}

.footer .disclaimer {
    max-width: 820px;
    margin: 14px auto 0;
    padding: 10px 14px;
    font-size: 12px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.78);
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    text-shadow: none;
}

.footer .copyright {
    margin-top: 6px;
}

.footer .visit {
    margin-top: 8px;
    font-size: 12px;
    opacity: 0.9;
}

.footer .visit b {
    color: #ffe9a8;
    font-weight: 600;
    margin: 0 2px;
}

/* ---------- 返回顶部 ---------- */
.back-top {
    position: fixed;
    right: 20px;
    bottom: 40px;
    z-index: 999;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 4px 14px rgba(10, 25, 50, 0.25);
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s, background 0.2s;
}

.back-top.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.back-top:hover {
    background: rgba(255, 255, 255, 0.55);
}

/* ---------- 申请收录 / 关于 页面 ---------- */
.page {
    min-height: 78vh;
    padding-top: 12vh;
}

.page-title {
    text-align: center;
    color: #fff;
    font-size: 30px;
    font-weight: 600;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
    margin-bottom: 24px;
}

.page-card {
    max-width: 680px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
    padding: 28px 32px;
    color: #333;
}

.page-card h3 {
    margin: 16px 0 8px;
    font-size: 17px;
}

.page-card h3:first-child {
    margin-top: 0;
}

.page-card p,
.page-card li {
    line-height: 1.9;
    font-size: 14px;
}

.page-card ul {
    padding-left: 20px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
    color: #444;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    border: 1px solid #d9dde3;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    background: #fff;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #5b7cfa;
}

.btn {
    display: inline-block;
    border: none;
    border-radius: 10px;
    padding: 10px 24px;
    font-size: 14px;
    cursor: pointer;
    transition: opacity 0.2s;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, #5b7cfa, #b06af8);
    color: #fff;
}

.btn-primary:hover {
    opacity: 0.88;
}

.alert {
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 14px;
    margin-bottom: 14px;
}

.alert-success {
    background: #e8f7ee;
    color: #1a7f43;
}

.alert-error {
    background: #fdecea;
    color: #b03a2e;
}

.apply-notice {
    background: #f6f8ff;
    border: 1px solid #dfe5ff;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 13px;
    color: #4a5aa0;
    margin-bottom: 20px;
    line-height: 1.8;
}

/* ---------- 站内搜索结果提示 ---------- */
.site-result {
    max-width: 620px;
    margin: 6px auto 0;
    text-align: center;
    color: #fff;
    font-size: 14px;
    padding: 8px 14px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.site-result a {
    color: #fff;
    text-decoration: underline;
}

/* ---------- 响应式 ---------- */
@media screen and (max-width: 1024px) {
    #show_time {
        font-size: 62px;
    }
}

@media screen and (max-width: 767px) {
    #show_time {
        font-size: 48px;
    }

    #show_date {
        font-size: 15px;
    }

    h2.title {
        font-size: 28px;
    }

    .link-grid {
        grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
        gap: 10px;
    }

    .link-grid li {
        padding: 11px 4px;
    }

    .link-grid .link-icon,
    .link-grid .link-letter {
        width: 40px;
        height: 40px;
    }

    .link-grid .link-name {
        font-size: 12px;
    }

    .search-wrap {
        margin: 6px auto 14px;
    }

    /* 移动端隐藏顶部栏（logo 名称 + 关于本站/申请收录），内容直接顶到公告下方 */
    .site-header {
        display: none;
    }

    .main {
        padding-top: 24px;
    }

    .mylist {
        scroll-margin-top: 0;
    }

    .page {
        padding-top: 16vh;
    }

    .navbar {
        padding: 14px 16px;
        justify-content: center;
        gap: 8px 18px;
    }

    .navbar .logo {
        font-size: 15px;
    }

    .navbar .nav-links {
        gap: 16px;
        justify-content: center;
        flex-wrap: wrap;
    }

    .navbar .nav-links a {
        font-size: 14px;
    }

    .page-card {
        padding: 22px 18px;
    }
}
