/**
 * 蓝色导航主题样式
 * 简洁蓝白配色 + 毛玻璃卡片 + 清爽布局
 *
 * @version 1.0.0
 */

/* ===== 主题变量 ===== */
:root {
    --theme-color: #2563eb;
    --theme-color-secondary: #3b82f6;
    --bg-body: #f2f5f9;
    --bg-card: rgba(255, 255, 255, 0.92);
    --bg-card-hover: #ffffff;
    --text-color: #1e293b;
    --text-muted: #94a3b8;
    --border-color: #e5e9f0;
    --border-glow: rgba(37, 99, 235, 0.3);
    --card-radius: 12px;
    --card-shadow: 0 2px 12px rgba(30, 41, 59, 0.06);
    --gap: 12px;
    --link-cols: 4;
}

/* ===== 基础 ===== */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font: 14px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text-color);
    background-color: var(--bg-body);
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    overflow-x: hidden;
}

/* 背景图叠加 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: var(--bg-image, none);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.08;
    z-index: -1;
    pointer-events: none;
}

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

a:hover {
    text-decoration: none;
}

ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* ===== 顶部导航 ===== */
.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    z-index: 10;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #1e40af;
}

.site-logo img {
    width: 30px;
    height: 30px;
    border-radius: 8px;
}

.site-logo span {
    color: #1e293b;
}

.site-nav ul {
    display: flex;
    gap: 22px;
}

.site-nav a {
    position: relative;
    color: #64748b;
    font-size: 14px;
    transition: color 0.2s ease;
    padding: 4px 2px;
}

.site-nav a:hover {
    color: var(--theme-color);
}

.site-nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--theme-color);
    transform: translateX(-50%);
    transition: width 0.25s ease;
    border-radius: 2px;
}

.site-nav a:hover::after {
    width: 100%;
}

/* ===== 公告 ===== */
.notice-wrap {
    max-width: 900px;
    margin: 20px auto 0;
    padding: 0 24px;
}

.notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 18px;
    background: #eff6ff;
    border: 1px solid #dbeafe;
    border-radius: var(--card-radius);
    color: #475569;
    font-size: 13px;
    letter-spacing: 0.3px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.notice:hover {
    border-color: #bfdbfe;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
}

.notice-icon {
    flex-shrink: 0;
    width: 17px;
    height: 17px;
    color: var(--theme-color);
}

.notice-content {
    flex: 1;
    text-align: center;
    line-height: 1.6;
}

.notice-content a {
    color: var(--theme-color);
}

.notice-content a:hover {
    text-decoration: underline;
}

/* ===== 主体 ===== */
.site-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px;
    position: relative;
    z-index: 1;
}

/* ===== 时间显示 ===== */
.clock {
    margin-bottom: 14px;
    text-align: center;
}

.clock-time {
    display: block;
    font-size: 38px;
    font-weight: 300;
    letter-spacing: 4px;
    font-variant-numeric: tabular-nums;
    color: #1e293b;
}

.clock-date {
    font-size: 13px;
    color: var(--text-muted);
    letter-spacing: 2px;
    margin-top: 2px;
}

/* ===== 随机一言 ===== */
.yan {
    margin-bottom: 14px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    letter-spacing: 0.5px;
}

/* ===== 搜索区 ===== */
.search {
    width: 100%;
    max-width: 640px;
    margin: 0 auto 28px;
}

.search-form {
    display: flex;
    height: 48px;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-form:focus-within {
    border-color: var(--theme-color);
    box-shadow: 0 2px 16px rgba(37, 99, 235, 0.12);
}

.search-input {
    flex: 1;
    padding: 0 18px;
    border: 0;
    outline: 0;
    font-size: 14px;
    background: transparent;
    color: var(--text-color);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-btn {
    width: 88px;
    border: 0;
    cursor: pointer;
    font-size: 14px;
    color: #fff;
    letter-spacing: 1px;
    background: var(--theme-color);
    transition: background 0.2s ease;
}

.search-btn:hover {
    background: #1d4ed8;
}

/* ===== 搜索引擎列表 ===== */
.search-engines {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-top: 14px;
}

.engine {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.engine:hover {
    border-color: #bfdbfe;
}

.engine input {
    display: none;
}

.engine svg,
.engine img {
    width: 14px;
    height: 14px;
    vertical-align: middle;
    transition: transform 0.2s ease;
}

.engine-name {
    color: #64748b;
    font-size: 12px;
    transition: color 0.2s ease;
}

.engine input:checked + svg,
.engine input:checked + img {
    transform: scale(1.15);
}

.engine input:checked ~ .engine-name {
    color: var(--theme-color);
    font-weight: 600;
}

.engine:has(input:checked) {
    border-color: var(--theme-color);
    background: #eff6ff;
}

/* ===== 链接列表 ===== */
.links {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.link-group {
    display: grid;
    grid-template-columns: repeat(var(--link-cols), 1fr);
    align-content: start;
    gap: var(--gap);
    padding: 18px;
    background: var(--bg-card);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--border-color);
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    transition: box-shadow 0.2s ease;
}

.link-group:hover {
    box-shadow: 0 4px 20px rgba(30, 41, 59, 0.08);
}

.group-title {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    letter-spacing: 0.5px;
}

.group-title svg,
.group-title img {
    width: 16px;
    height: 16px;
}

/* 链接项 */
.link-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.link-item:hover {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.link-item:hover .link-name {
    color: var(--theme-color);
}

/* 链接图标 */
.link-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    background: #eff6ff;
    border-radius: 8px;
}

.link-icon svg,
.link-icon img {
    width: 16px;
    height: 16px;
}

/* 链接名称 */
.link-name {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 13px;
    transition: color 0.2s ease;
}

/* ===== 底部 ===== */
.site-footer {
    padding: 24px;
    font-size: 14px;
    color: var(--text-muted);
    text-align: center;
    letter-spacing: 0.5px;
    border-top: 1px solid var(--border-color);
    background: #fff;
}

.site-footer a {
    margin: 0 4px;
    color: #64748b;
    transition: color 0.2s ease;
}

.site-footer a:hover {
    color: var(--theme-color);
    text-decoration: none;
}

/* ===== 移动端 ===== */
@media (max-width: 768px) {
    .site-header {
        flex-direction: column;
        gap: 10px;
        padding: 12px 16px;
    }

    .site-nav ul {
        gap: 14px;
        font-size: 13px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .notice-wrap {
        padding: 0 16px;
        margin-top: 14px;
    }

    .notice {
        padding: 10px 14px;
        font-size: 12px;
        gap: 8px;
    }

    .notice-icon {
        width: 15px;
        height: 15px;
    }

    .site-main {
        padding: 28px 16px;
    }

    .clock-time {
        font-size: 30px;
    }

    .search-form {
        height: 44px;
    }

    .search-btn {
        width: 76px;
        font-size: 13px;
    }

    .engine {
        padding: 3px 8px;
    }

    .engine svg,
    .engine img {
        width: 12px;
        height: 12px;
    }

    .engine-name {
        font-size: 11px;
    }

    .link-group {
        grid-template-columns: repeat(2, 1fr);
        padding: 14px;
        gap: 10px;
    }

    .link-item {
        padding: 8px;
        gap: 6px;
    }

    .link-icon {
        flex: 0 0 24px;
        width: 24px;
        height: 24px;
        border-radius: 6px;
    }

    .link-icon svg,
    .link-icon img {
        width: 14px;
        height: 14px;
    }

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