/* Yee.cx - 极简灰白风格（参照 evan.top） */

:root {
    --bg: #F2F2F2; --bg-img: url('/w.svg'); --stage: #FFFFFF; --fg: #000000; --sub: #666666;
    --hint: #999999; --line: #EAEAEA; --accent: #111111; --ad-bg: #FFFFFF;
    --th-bg: #FAFAFA; --overlay: rgba(0, 0, 0, 0.28); --shadow: 0 4px 30px rgba(0,0,0,0.02);
    --btn-bg: #111111; --btn-fg: #FFFFFF;
}
html[data-theme="dark"] {
    --bg: #111111; --bg-img: url('/b.svg'); --stage: #000000; --fg: #F2F2F2; --sub: #B0B0B0;
    --hint: #8A8A8A; --line: #2A2A2A; --accent: #F2F2F2; --ad-bg: #000000;
    --th-bg: #222222; --overlay: rgba(0, 0, 0, 0.55); --shadow: 0 4px 30px rgba(0,0,0,0.45);
    --btn-bg: #F2F2F2; --btn-fg: #111111;
}
* { box-sizing: border-box; -webkit-font-smoothing: antialiased; }
body {
    margin: 0; background: var(--bg) var(--bg-img) repeat; color: var(--fg);
    font-family: "Inter", -apple-system, "Helvetica Neue", system-ui, sans-serif;
    display: flex; justify-content: center; align-items: flex-start;
    min-height: 100vh; padding: 40px 20px;
}
.main-content {
    background: var(--stage); width: 100%; max-width: 760px;
    padding: 56px 64px 48px 64px; border-radius: 24px;
    box-shadow: var(--shadow);
}
.home-content { min-height: calc(100vh - 80px); display: flex; flex-direction: column; }
@media (max-width: 640px) {
    .main-content { padding: 40px 24px 32px 24px; border-radius: 16px; }
    body { padding: 16px 12px; }
    .home-content { min-height: calc(100vh - 32px); }
}

/* header */
.brand { margin-bottom: 40px; }
.brand-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 16px; }
.brand-line { display: inline-flex; align-items: baseline; gap: 10px; text-decoration: none; color: var(--fg); }
.site-title { font-size: 17px; font-weight: 700; letter-spacing: -0.5px; }
.site-sub { font-size: 11px; color: var(--hint); letter-spacing: 1px; text-transform: uppercase; }
.theme-toggle {
    position: relative; z-index: 10;
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; padding: 0; color: var(--sub);
    background: none; border: none; border-radius: 50%;
    cursor: pointer; transition: color 0.2s;
}
.theme-toggle:hover { color: var(--fg); }
.theme-icon { display: block; }
.theme-toggle .theme-icon-sun { display: none; }
.theme-toggle.dark .theme-icon-sun { display: block; }
.theme-toggle.dark .theme-icon-moon { display: none; }

/* hero */
.hero { margin-bottom: 24px; display: flex; flex-direction: column; }
.home-hero { flex: 1; position: relative; }
.hero-title { font-size: 26px; font-weight: 700; letter-spacing: -1px; margin: 0 0 10px 0; }
.home-logo { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 300px; max-width: 55%; opacity: 0.5; margin: 0; pointer-events: none; }
/* search bar（首页/结果页常驻吸顶） */
.search-form {
    position: sticky; top: 0; z-index: 30;
    display: flex; gap: 10px;
    padding: 12px 0;
    background: var(--stage);
}
.search-input {
    flex: 1; font-size: 15px; padding: 12px 16px; border: 1px solid var(--line);
    border-radius: 12px; outline: none; background: var(--stage); color: var(--fg);
    transition: border-color 0.2s;
}
.search-input:focus { border-color: var(--fg); }
.search-btn {
    font-size: 14px; font-weight: 600; padding: 12px 22px; border: 0;
    border-radius: 12px; background: var(--btn-bg); color: var(--btn-fg); cursor: pointer; transition: opacity 0.2s;
}
.search-btn:hover { opacity: 0.8; }
.hero-tip { font-size: 11px; color: var(--hint); margin: 0 0 16px; letter-spacing: 1px; text-align: center; }
.hero-tip + footer { margin-top: 0; }

/* result head */
.result-head { margin-bottom: 22px; }
.domain-display { display: flex; align-items: center; gap: 12px; margin-top: 20px;margin-bottom: 20px; }
.domain-name { font-size: 24px; font-weight: 700; letter-spacing: -0.5px; margin: 0; word-break: break-all; }
.domain-badge {
    font-size: 10px; font-weight: 700; color: var(--hint); border: 1px solid var(--line);
    padding: 3px 8px; border-radius: 20px; letter-spacing: 1px;
}
.meta-card {
    border: 1px solid var(--line); border-radius: 16px; padding: 6px 18px;
}
.meta-row { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.meta-row:last-child { border-bottom: 0; }
.meta-label { flex: 0 0 88px; color: var(--hint); }
.meta-value { flex: 1; word-break: break-all; }

/* section label */
.section-label {
    display: block; font-size: 10px; font-weight: 700; color: var(--hint);
    text-transform: uppercase; letter-spacing: 1.2px; margin: 0 0 14px 0;
    padding-bottom: 8px;
}

/* price */
.price-section, .meta-section, .dns-section, .raw-section { margin-bottom: 22px; }
.price-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .price-grid { grid-template-columns: 1fr; } }
.price-card {
    position: relative;
    border: 1px solid var(--line); border-radius: 16px; padding: 18px 16px;
    display: flex; flex-direction: column; gap: 6px;
}
.price-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.price-type { font-size: 11px; color: var(--hint); letter-spacing: 1px; text-transform: uppercase; }
.price-value { font-size: 14px; font-weight: 700; letter-spacing: -0.3px; }
.price-value .currency { font-size: 10px; font-weight: 500; color: var(--sub); margin-left: 2px; }
.price-link { font-size: 12px; color: var(--sub); text-decoration: none; word-break: break-all; text-align: right; }
.price-link:hover { color: var(--fg); }
.price-registrar { font-size: 12px; color: var(--sub); word-break: break-all; }
.price-loading { color: var(--hint); font-size: 13px; }

/* dns */
.dns-card { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.dns-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.dns-table th {
    text-align: left; font-size: 10px; color: var(--hint); font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.8px; padding: 10px 16px;
    border-bottom: 1px solid var(--line); background: var(--th-bg);
}
.dns-table td { padding: 9px 16px; border-bottom: 1px solid var(--line); word-break: break-all; }
.dns-table tr:last-child td { border-bottom: 0; }
.dns-type { font-weight: 700; color: var(--fg); }
.dns-empty { padding: 16px; font-size: 13px; color: var(--hint); }

/* raw */
.raw-details { border: 1px solid var(--line); border-radius: 16px; }
.raw-details summary {
    padding: 14px 18px; font-size: 13px; font-weight: 600; cursor: pointer;
    list-style: none; user-select: none;
}
.raw-details summary::before { content: "▸ "; color: var(--hint); }
.raw-details[open] summary::before { content: "▾ "; }
.raw-pre {
    margin: 0; padding: 4px 18px 18px 18px; font-size: 11px; line-height: 1.6;
    white-space: pre-wrap; word-break: break-all; color: var(--sub);
    max-height: 420px; overflow: auto;
}

/* footer */
footer { margin-top: 36px; border-top: 1px solid var(--line); padding-top: 16px; }
.footer-bar { display: flex; justify-content: space-between; align-items: center; }
.footer-copy { font-size: 11px; color: var(--hint); }
.about-btn {
    font-size: 11px; color: var(--sub); cursor: pointer;
    background: none; border: 0; padding: 0; text-decoration: none;
}
.about-btn:hover { color: var(--fg); }
.footer-note { font-size: 11px; color: var(--hint); margin: 4px 0; }
.footer-note a { color: var(--sub); text-decoration: none; }
.footer-note a:hover { color: var(--fg); }

/* about modal */
.about-modal {
    position: fixed; inset: 0; display: none; align-items: center; justify-content: center;
    background: var(--overlay); z-index: 100; padding: 20px;
}
.about-modal.open { display: flex; }
.about-card {
    background: var(--stage); border-radius: 16px; padding: 22px 24px;
    max-width: 420px; width: 100%; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}
.about-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.about-title { font-size: 15px; font-weight: 700; }
.about-close {
    font-size: 20px; line-height: 1; color: var(--hint);
    background: none; border: 0; cursor: pointer; padding: 2px 6px;
}
.about-close:hover { color: var(--fg); }
.about-text { font-size: 12px; color: var(--sub); line-height: 1.7; margin: 0; }
.about-text a { color: var(--sub); text-decoration: none; border-bottom: 1px solid var(--line); }
.about-text a:hover { color: var(--fg); }
.about-by { margin-top: 10px; text-align: right; font-size: 12px; color: var(--sub); }
.about-by a { color: var(--sub); text-decoration: none; border-bottom: 1px solid var(--line); }
.about-by a:hover { color: var(--fg); }

/* promo 券标（煮米网优惠，绝对定位：类型标签下方左缘，不参与布局） */
.promo-tag {
    position: absolute;
    left: 16px;
    top: 40px;
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 17px; height: 15px; padding: 0 4px;
    border: 0; border-radius: 4px; cursor: pointer;
    font-size: 9px; font-weight: 800; letter-spacing: 0; line-height: 1; color: #fff;
    background: linear-gradient(135deg, #ff6fa5, #ff9a5a);
    box-shadow: 0 1px 2px rgba(255, 111, 165, 0.3);
    z-index: 1;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.promo-tag:hover { transform: translateY(-1px); box-shadow: 0 2px 5px rgba(255, 111, 165, 0.4); }

/* promo modal（煮米网优惠弹窗） */
.promo-modal {
    position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
    background: var(--overlay); z-index: 120; padding: 16px;
}
.promo-card {
    background: var(--stage); border-radius: 10px; padding: 12px 14px;
    max-width: 264px; width: 100%; box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
}
.promo-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2px; }
.promo-title { font-size: 12px; font-weight: 700; }
.promo-close {
    font-size: 14px; line-height: 1; color: var(--hint);
    background: none; border: 0; cursor: pointer; padding: 0 4px;
}
.promo-close:hover { color: var(--fg); }
.promo-sub { font-size: 10px; color: var(--hint); margin-bottom: 4px; }
.promo-row {
    display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
    padding: 4px 0; border-bottom: 1px solid var(--line); font-size: 11px;
}
.promo-row:last-child { border-bottom: 0; }
.promo-label { flex: 0 0 auto; color: var(--hint); }
.promo-value { flex: 1; text-align: right; font-weight: 600; word-break: break-all; }
.promo-code {
    display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: 0.5px;
    padding: 1px 6px; border: 1px dashed var(--sub); border-radius: 5px;
    background: none; color: var(--fg); cursor: pointer; font-family: inherit; line-height: 1.5;
    transition: border-color 0.15s ease, color 0.15s ease;
}
.promo-code:hover { border-color: #ff6fa5; color: #ff6fa5; }
.promo-code.copied { border-color: #2ecc71; color: #2ecc71; }
.promo-note { margin-top: 8px; font-size: 10px; color: var(--hint); line-height: 1.5; }
