@charset "UTF-8";
/*!
 * main.css —— 每日一言 dddn.net
 * 只保留本站真正用到的样式（原 xyjz.css 121KB，其中 90%+ 是影视模板遗留的无用规则）。
 * 视觉参数与原文件保持一致：主色 #ff4e4e、强调 #fe3355、卡片圆角 18px、黄色装饰 #f9d342。
 */

/* ==========================================================
   1. 变量
   ========================================================== */
:root {
    --c-text:      #282828;
    --c-muted:     #8a919e;
    --c-red:       #ff4e4e;
    --c-red-deep:  #fe3355;
    --c-yellow:    #f9d342;
    --c-pink:      #ffddd5;
    --c-bg-card:   #ffffff;
    --c-field:     #f3f5f7;
    --c-field-hover: #ffe3e3;
    --c-line:      #e3e6ea;
    --shadow-card: 0 .25rem .5rem rgba(0, 0, 0, .05), 0 1.5rem 2.2rem rgba(0, 0, 0, .1);
    --radius:      18px;
    --nav-h:       58px;
}

/* ==========================================================
   2. 基础重置（保留原 xyjz.css 的行为）
   ========================================================== */
* {
    margin: 0;
    padding: 0;
}

*, :after, :before {
    box-sizing: border-box;
}

body, html {
    height: 100%;
}

html {
    line-height: 1.6;
    font-size: 14px;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    color: var(--c-text);
    background: #f7f8f9;
    min-height: 100%;
    -webkit-font-smoothing: antialiased;
}

body, input, textarea, select, button {
    font-family: -apple-system-font, BlinkMacSystemFont, "helvetica neue", "pingfang sc",
        "hiragino sans gb", "microsoft yahei ui", "microsoft yahei", Arial, sans-serif;
    -webkit-touch-callout: none;
}

input, button, textarea, select {
    outline: none;
    border: none;
    background: none;
    color: inherit;
    font: inherit;
    -webkit-appearance: none;
    appearance: none;
    border-radius: 0;
}

button {
    cursor: pointer;
}

ol, ul, li {
    list-style: none;
}

a {
    text-decoration: none;
    color: var(--c-text);
    outline: none;
}

img {
    border: none;
}

.none {
    display: none;
}

/* ==========================================================
   3. 页面底色（原首页背景）
   ========================================================== */
.bj {
    background-color: #f7f8f9;
    background-image: url("../xyjz.svg");
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    background-attachment: fixed;
}

/* ==========================================================
   4. 顶部导航栏
   桌面端：整条半透明毛玻璃；手机端：收成一个浮动胶囊
   ========================================================== */
.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    height: var(--nav-h);
    padding: 0 20px;
    background: rgba(255, 255, 255, .86);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid rgba(0, 0, 0, .05);
    box-shadow: 0 1px 12px rgba(28, 36, 48, .05);
}

.site-nav__brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    overflow: hidden;
    font-size: 17px;
    font-weight: 900;
    letter-spacing: .5px;
    color: var(--c-text);
    white-space: nowrap;
}

.site-nav__brand .dot {
    flex: 0 0 auto;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--c-red);
    box-shadow: 0 0 0 4px rgba(255, 78, 78, .16);
}

.site-nav__brand span {
    overflow: hidden;
    text-overflow: ellipsis;
}

.site-nav__links {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 100%;
    flex: 0 0 auto;
}

.site-nav__link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 34px;
    padding: 0 16px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 700;
    color: #4a5160;
    transition: color .25s, background-color .25s;
    white-space: nowrap;
}

.site-nav__link:after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 3px;
    width: 0;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--c-red), var(--c-red-deep));
    transform: translateX(-50%);
    transition: width .25s ease;
}

.site-nav__link:hover {
    color: var(--c-red-deep);
    background: rgba(255, 78, 78, .08);
}

.site-nav__link:hover:after {
    width: 22px;
}

.site-nav__link.is-active {
    color: #fff;
    background: linear-gradient(135deg, var(--c-red), var(--c-red-deep));
    box-shadow: 0 6px 16px rgba(255, 78, 78, .32);
}

.site-nav__link.is-active:after {
    width: 0;
}

/* 内容区给导航栏让位 */
.page {
    min-height: 100%;
    padding-top: var(--nav-h);
}

/* ==========================================================
   5. 首页卡片（原 .popup / .popupShow 的视觉）
   ========================================================== */
.home-main {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - var(--nav-h));
    padding: 28px 14px 70px;
}

.popup {
    position: relative;
    width: 500px;
    max-width: 100%;
    padding: 0 30px;
    background: var(--c-bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.popup:after {
    content: "";
    position: absolute;
    height: 150px;
    width: 120%;
    background: var(--c-yellow);
    bottom: -95px;
    left: -10%;
    z-index: 0;
    border-radius: 50%;
    pointer-events: none;
}

.popup-header,
.popup-main,
.popup-footer {
    position: relative;
    z-index: 1;
}

.popup-header {
    padding: 25px 0 10px;
    text-align: center;
}

.popup-title {
    position: relative;
    display: inline-block;
    font-size: 20px;
    font-weight: 900;
}

.popup-title:before {
    content: "";
    position: absolute;
    left: -5px;
    bottom: 3px;
    width: 90px;
    height: 15px;
    background: var(--c-pink);
    border-radius: 4px;
    transform: skewX(-15deg);
    z-index: -1;
}

.popup-main {
    padding-bottom: 10px;
}

.popup-main > p:first-child {
    padding: 2px 0 0;
    font-size: 14px;
    color: var(--c-text);
}

.popup-domain {
    position: relative;
    margin: 35px 0 25px;
    padding: 10px 12px;
    background: var(--c-field);
    border-radius: 10px;
    text-align: center;
    transition: background-color .25s;
}

.popup-domain:nth-of-type(1) {
    margin-top: 45px;
}

.popup-domain:hover {
    background: var(--c-field-hover);
}

.popup-domain > span {
    position: absolute;
    left: 0;
    top: -20px;
    height: 32px;
    padding: 0 6px;
    font-size: 12px;
    line-height: 22px;
    color: #fff;
    background: var(--c-red);
    border-radius: 6px 6px 0 0;
    z-index: -1;
}

.popup-domain > strong {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: var(--c-text);
    line-height: 1.5;
    word-break: break-word;
    transition: color .25s;
}

.popup-domain > strong.copyable {
    cursor: pointer;
}

/* 悬停时才变红，和原版"黑字 + 悬停变色"保持一致 */
.popup-domain > strong.copyable:hover {
    color: var(--c-red-deep);
}

.popup-footer {
    padding: 10px 0 30px;
    text-align: center;
}

.popup-meta {
    color: var(--c-muted);
    font-size: 13px;
}

/* 复制成功反馈 */
.copied {
    background-color: rgba(76, 175, 80, .25);
    border-radius: 4px;
    transition: background-color .3s;
}

/* 备案号（跟随内容，长页面不遮挡内容） */
.site-copyright {
    display: block;
    padding: 14px 12px 18px;
    text-align: center;
    font-size: 13px;
    color: #7b8290;
}

.site-copyright:hover {
    color: var(--c-red-deep);
}

/* ==========================================================
   6. Toast
   ========================================================== */
.custom-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    padding: 12px 28px;
    max-width: 80vw;
    overflow: hidden;
    font-size: 16px;
    color: #fff;
    text-overflow: ellipsis;
    white-space: nowrap;
    background: rgba(0, 0, 0, .75);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
    pointer-events: none;
    z-index: 999999;
}

/* ==========================================================
   7. 手机端适配
   ========================================================== */
@media (max-width: 700px) {
    :root {
        --nav-h: 52px;
    }

    /* 悬浮胶囊导航，比通栏更贴合卡片风格 */
    .site-nav {
        top: 10px;
        left: 10px;
        right: 10px;
        height: 48px;
        padding: 0 8px 0 14px;
        border: 1px solid rgba(255, 255, 255, .7);
        border-radius: 999px;
        background: rgba(255, 255, 255, .9);
        box-shadow: 0 8px 24px rgba(28, 36, 48, .1);
    }

    .page {
        padding-top: 68px;
    }

    .home-main {
        min-height: calc(100vh - 68px);
        padding: 10px 12px 66px;
        align-items: flex-start;
    }

    .site-nav__brand {
        font-size: 15px;
    }

    .site-nav__brand .dot {
        width: 7px;
        height: 7px;
        box-shadow: 0 0 0 3px rgba(255, 78, 78, .16);
    }

    .site-nav__link {
        height: 36px;
        padding: 0 13px;
        font-size: 14px;
    }

    .popup {
        padding: 0 20px;
    }

    .popup-main > p:first-child {
        font-size: 13px;
    }

    .popup-domain {
        margin: 30px 0 22px;
    }

    .popup-domain:nth-of-type(1) {
        margin-top: 38px;
    }

    .popup-domain > strong {
        font-size: 17px;
    }

    .popup-footer {
        padding: 6px 0 26px;
    }
}

@media (max-width: 380px) {
    .site-nav {
        height: 46px;
        padding: 0 6px 0 11px;
    }

    .site-nav__brand {
        font-size: 13px;
        letter-spacing: 0;
    }

    .site-nav__brand .dot {
        width: 6px;
        height: 6px;
        box-shadow: 0 0 0 3px rgba(255, 78, 78, .16);
    }

    .site-nav__link {
        height: 34px;
        padding: 0 11px;
        font-size: 13px;
    }

    .popup {
        padding: 0 16px;
    }

    .popup-domain > strong {
        font-size: 16px;
    }
}

/* 尊重系统"减少动态效果"设置 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: .001ms !important;
        transition-duration: .001ms !important;
    }
}
