/* ==========================================================================
   博丽大结界巡检司 · 幻想乡ICP许可认证系统
   前台样式
   --------------------------------------------------------------------------
   主色   朱红   #DA291C
   辅色   深绀蓝 #1A2A4A
   点缀   金色   #C9A96E
   背景   米白   #F5F0E8
   ========================================================================== */

:root {
    --red: #DA291C;
    --red-dark: #B32016;
    --navy: #1A2A4A;
    --navy-light: #24365c;
    --gold: #C9A96E;
    --gold-light: #E4CFA4;
    --cream: #F5F0E8;
    --cream-dark: #E9E1D2;
    --ink: #2b2b2b;
    --muted: #7a7468;
    --line: rgba(26, 42, 74, 0.12);
    --serif: "Noto Serif SC", "Source Han Serif SC", "STZhongsong", "SimSun", serif;
    --sans: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--sans);
    color: var(--ink);
    line-height: 1.6;
    min-height: 100vh;
    background-color: var(--cream);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--serif);
    font-weight: 600;
    color: var(--navy);
    line-height: 1.35;
}

a {
    color: var(--red);
    text-decoration: none;
    transition: color 160ms ease;
}

a:hover {
    color: var(--red-dark);
}

img {
    max-width: 100%;
    display: block;
}

/* --------------------------------------------------------------------------
   页面背景
   -------------------------------------------------------------------------- */
.page-front {
    background-color: var(--cream);
    background-image:
        radial-gradient(circle at 18% 12%, rgba(201, 169, 110, 0.14), transparent 42%),
        radial-gradient(circle at 82% 88%, rgba(218, 41, 28, 0.07), transparent 45%),
        linear-gradient(180deg, #faf6ee 0%, var(--cream) 100%);
    background-attachment: fixed;
}

.page-front::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        repeating-linear-gradient(45deg, rgba(26, 42, 74, 0.018) 0, rgba(26, 42, 74, 0.018) 1px, transparent 1px, transparent 14px);
    z-index: 0;
}

.page-auth {
    background-color: var(--navy);
    background-image:
        radial-gradient(circle at 50% -10%, rgba(201, 169, 110, 0.28), transparent 55%),
        radial-gradient(circle at 100% 100%, rgba(218, 41, 28, 0.28), transparent 50%),
        linear-gradient(160deg, #0e1730 0%, var(--navy) 55%, #101c38 100%);
    background-attachment: fixed;
    color: #e8e6df;
}

/* --------------------------------------------------------------------------
   顶部导航
   -------------------------------------------------------------------------- */
.site-header {
    position: relative;
    z-index: 10;
    background: linear-gradient(180deg, var(--navy) 0%, #142036 100%);
    border-bottom: 2px solid var(--gold);
    box-shadow: 0 4px 18px rgba(14, 23, 48, 0.35);
}

.site-header .header-inner {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    gap: 16px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
}

.brand .brand-logo {
    height: 44px;
    width: auto;
    max-width: 180px;
    flex: 0 0 auto;
    object-fit: contain;
}

.brand .brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.brand .brand-org {
    font-family: var(--serif);
    font-size: 20px;
    font-weight: 700;
    color: #f4efe4;
    letter-spacing: 1px;
}

.brand .brand-sub {
    font-size: 11px;
    color: var(--gold-light);
    letter-spacing: 2px;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.site-nav a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 15px;
    border-radius: 4px;
    color: #dfdccf;
    font-size: 14px;
    letter-spacing: 1px;
    border: 1px solid transparent;
    transition: all 160ms ease;
}

.site-nav a:hover {
    color: #ffffff;
    background: rgba(201, 169, 110, 0.14);
    border-color: rgba(201, 169, 110, 0.5);
}

.site-nav a.nav-cta {
    background: var(--red);
    color: #fff;
    border-color: var(--red);
}

.site-nav a.nav-cta:hover {
    background: var(--red-dark);
    border-color: var(--red-dark);
}

/* --------------------------------------------------------------------------
   首页英雄区
   -------------------------------------------------------------------------- */
.hero {
    position: relative;
    z-index: 1;
    max-width: 1160px;
    margin: 0 auto;
    padding: 72px 24px 40px;
    text-align: center;
}

.hero-seal {
    height: 96px;
    width: auto;
    max-width: 320px;
    margin: 0 auto 22px;
    object-fit: contain;
    filter: drop-shadow(0 6px 16px rgba(218, 41, 28, 0.35));
}

.hero h1 {
    font-size: clamp(30px, 5vw, 48px);
    letter-spacing: 4px;
    color: var(--navy);
    margin-bottom: 12px;
}

.hero .hero-sub {
    font-family: var(--serif);
    font-size: 16px;
    color: var(--muted);
    letter-spacing: 3px;
}

.hero .hero-rule {
    width: 120px;
    height: 3px;
    margin: 22px auto 30px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* 搜索区 */
.search-panel {
    max-width: 720px;
    margin: 0 auto;
    background: #fffdf8;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 26px 28px;
    box-shadow: 0 18px 48px rgba(26, 42, 74, 0.12);
}

.search-panel form {
    display: flex;
    gap: 10px;
}

.search-panel .search-input {
    flex: 1;
    height: 52px;
    padding: 0 18px;
    font-size: 15px;
    border: 1px solid #d8cfc0;
    border-radius: 6px;
    outline: none;
    background: #fbf8f1;
    color: var(--ink);
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.search-panel .search-input:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(218, 41, 28, 0.12);
}

.search-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 52px;
    padding: 0 26px;
    font-size: 16px;
    font-family: var(--serif);
    letter-spacing: 2px;
    background: var(--red);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 160ms ease, transform 160ms ease;
}

.search-btn:hover {
    background: var(--red-dark);
    transform: translateY(-1px);
}

.search-hint {
    margin-top: 14px;
    font-size: 12px;
    color: var(--muted);
    letter-spacing: 1px;
}

/* 统计信息 */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-top: 34px;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat .stat-num {
    font-family: var(--serif);
    font-size: 34px;
    font-weight: 700;
    color: var(--red);
}

.stat .stat-label {
    font-size: 13px;
    color: var(--muted);
    letter-spacing: 2px;
}

/* --------------------------------------------------------------------------
   快捷入口卡片
   -------------------------------------------------------------------------- */
.section {
    max-width: 1160px;
    margin: 0 auto;
    padding: 40px 24px;
}

.section-title {
    text-align: center;
    font-size: 24px;
    letter-spacing: 3px;
    margin-bottom: 28px;
}

.section-title::after {
    content: "";
    display: block;
    width: 64px;
    height: 2px;
    margin: 12px auto 0;
    background: var(--gold);
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.quick-card {
    display: block;
    background: #fffdf8;
    border: 1px solid var(--line);
    border-top: 3px solid var(--gold);
    border-radius: 10px;
    padding: 34px 28px;
    text-align: center;
    text-decoration: none;
    transition: all 200ms ease;
}

.quick-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 38px rgba(26, 42, 74, 0.14);
    border-top-color: var(--red);
}

.quick-card .quick-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 16px;
    color: var(--red);
}

.quick-card h3 {
    font-size: 19px;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.quick-card p {
    font-size: 13px;
    color: var(--muted);
}

/* --------------------------------------------------------------------------
   页脚
   -------------------------------------------------------------------------- */
.site-footer {
    position: relative;
    z-index: 1;
    background: linear-gradient(180deg, #142036 0%, #0e1730 100%);
    border-top: 2px solid var(--gold);
    color: #c9c6bb;
    text-align: center;
    padding: 34px 24px 40px;
    margin-top: 40px;
}

.site-footer .footer-org {
    font-family: var(--serif);
    color: #f4efe4;
    font-size: 16px;
    letter-spacing: 2px;
}

.site-footer .footer-copy {
    font-size: 12px;
    margin-top: 10px;
    color: #8f8c80;
}

.site-footer .footer-icp {
    font-size: 12px;
    margin-top: 6px;
    color: var(--gold-light);
    letter-spacing: 1px;
}

.site-footer .footer-icp a {
    color: var(--gold-light);
    text-decoration: none;
}

.site-footer .footer-icp a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* --------------------------------------------------------------------------
   查询结果
   -------------------------------------------------------------------------- */
.result-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.result-toolbar h2 {
    font-size: 22px;
    letter-spacing: 2px;
}

.result-toolbar .result-count {
    font-size: 13px;
    color: var(--muted);
}

.result-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.cert-card {
    background: #fffdf8;
    border: 1px solid var(--line);
    border-left: 4px solid var(--gold);
    border-radius: 10px;
    padding: 24px 24px;
    box-shadow: 0 6px 20px rgba(26, 42, 74, 0.06);
}

.cert-card .cert-number {
    font-family: var(--serif);
    font-size: 17px;
    font-weight: 700;
    color: var(--red);
    letter-spacing: 1px;
    margin-bottom: 14px;
    word-break: break-all;
}

.cert-card .cert-row {
    display: flex;
    padding: 7px 0;
    font-size: 14px;
    border-bottom: 1px dashed var(--line);
}

.cert-card .cert-row:last-child {
    border-bottom: none;
}

.cert-card .cert-label {
    width: 88px;
    flex: 0 0 auto;
    color: var(--muted);
}

.cert-card .cert-value {
    flex: 1;
    word-break: break-all;
}

.cert-card .cert-value a {
    color: var(--navy);
}

.cert-card .cert-value a:hover {
    color: var(--red);
}

/* 状态徽章 */
.badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 12px;
    letter-spacing: 1px;
    line-height: 1.6;
}

.badge-green { background: #e2f4e6; color: #1d7a37; border: 1px solid #9fd7ab; }
.badge-gold  { background: #f7ecd4; color: #9a7420; border: 1px solid #e0c88f; }
.badge-red   { background: #fbe3e1; color: #b32016; border: 1px solid #eaa8a2; }
.badge-gray  { background: #ecebe6; color: #6b675e; border: 1px solid #d3d0c7; }

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--muted);
}

.empty-state .empty-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 16px;
    color: var(--gold);
}

/* --------------------------------------------------------------------------
   认证卡片（登录 / 注册）
   -------------------------------------------------------------------------- */
.auth-wrap {
    position: relative;
    z-index: 1;
    min-height: calc(100vh - 0px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.auth-card {
    width: 100%;
    max-width: 460px;
    background: rgba(255, 253, 248, 0.98);
    border: 1px solid rgba(201, 169, 110, 0.5);
    border-radius: 12px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
    padding: 38px 36px 34px;
    color: var(--ink);
}

.auth-card .auth-seal {
    height: 64px;
    width: auto;
    max-width: 220px;
    margin: 0 auto 16px;
    object-fit: contain;
}

.auth-card h2 {
    text-align: center;
    font-size: 22px;
    letter-spacing: 2px;
    color: var(--navy);
    margin-bottom: 6px;
}

.auth-card .auth-sub {
    text-align: center;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 22px;
    letter-spacing: 1px;
}

/* 表单 */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    color: var(--navy);
    margin-bottom: 6px;
    letter-spacing: 1px;
}

.form-control {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    font-size: 14px;
    border: 1px solid #d8cfc0;
    border-radius: 6px;
    outline: none;
    background: #fbf8f1;
    color: var(--ink);
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.form-control:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(218, 41, 28, 0.12);
}

textarea.form-control {
    height: auto;
    min-height: 90px;
    padding: 12px 14px;
    resize: vertical;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 46px;
    padding: 0 22px;
    font-size: 15px;
    font-family: var(--serif);
    letter-spacing: 2px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 160ms ease, transform 160ms ease;
}

.btn-primary {
    background: var(--red);
    color: #fff;
}

.btn-primary:hover {
    background: var(--red-dark);
}

.btn-navy {
    background: var(--navy);
    color: #fff;
}

.btn-navy:hover {
    background: var(--navy-light);
}

.btn-outline {
    background: transparent;
    color: var(--navy);
    border: 1px solid #cfc7b8;
}

.btn-outline:hover {
    border-color: var(--navy);
}

.btn-block {
    width: 100%;
}

.tip {
    font-size: 13px;
    margin: 10px 0;
}

.tip-error { color: var(--red); }
.tip-ok    { color: #1d7a37; }
.tip-info  { color: var(--navy); }

.auth-links {
    text-align: center;
    margin-top: 18px;
    font-size: 13px;
    color: var(--muted);
}

.auth-links a {
    margin: 0 4px;
}

.back-link {
    position: absolute;
    top: 20px;
    left: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #efece2;
    font-size: 14px;
    letter-spacing: 1px;
}

.back-link:hover {
    color: var(--gold-light);
}

/* 提示文字（注册分步） */
.step-panel {
    max-width: 560px;
    margin: 0 auto;
    text-align: center;
}

/* 邮箱 + 发送验证码 */
.email-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.email-row .form-control {
    flex: 1;
}

.email-row .btn {
    height: 44px;
    white-space: nowrap;
}

/* 选号分页 */
.num-pages {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.num-page-label {
    font-size: 13px;
    color: var(--muted);
}

.num-page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #d8cfc0;
    border-radius: 6px;
    font-size: 14px;
    color: var(--navy);
    background: #fbf8f1;
    transition: all 150ms ease;
}

.num-page:hover {
    border-color: var(--navy);
}

.num-page.active {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
}

/* 号码网格 */
.num-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 6px;
    max-height: 460px;
    overflow-y: auto;
    padding: 6px;
}

.num-item {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 34px;
    font-size: 12px;
    border: 1px solid #d8cfc0;
    border-radius: 4px;
    color: var(--navy);
    background: #fff;
    text-decoration: none;
    transition: all 140ms ease;
}

.num-item:hover {
    background: var(--red);
    color: #fff;
    border-color: var(--red);
}

.num-item.taken {
    background: #ecebe6;
    color: #b8b3a6;
    border-color: #e3e0d7;
    cursor: not-allowed;
}

/* 无效认证卡 */
.cert-card.invalid {
    border-left-color: var(--red);
    background: #fdf6f5;
}

.cert-invalid-note {
    background: #fbe3e1;
    color: #b32016;
    border: 1px solid #eaa8a2;
    border-radius: 6px;
    padding: 8px 14px;
    font-size: 13px;
    letter-spacing: 1px;
    margin-bottom: 14px;
}

/* --------------------------------------------------------------------------
   响应式
   -------------------------------------------------------------------------- */
@media (max-width: 860px) {
    .site-header .header-inner {
        height: auto;
        flex-direction: column;
        padding: 14px 16px;
    }
    .site-nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    .quick-grid {
        grid-template-columns: 1fr;
    }
    .result-list {
        grid-template-columns: 1fr;
    }
    .search-panel form {
        flex-direction: column;
    }
    .hero-stats {
        gap: 26px;
    }
}
