html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    background: #0b0c10;
    color: #f3f4f6;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100vw;
}

.cinzel-font {
    font-family: 'Palatino', 'Times New Roman', 'Source Han Serif SC', 'Noto Serif SC', '宋体', serif;
}

/* 顶部与背景光晕 */
.bg-glow-container {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.glow-ball {
    position: absolute;
    width: 24rem;
    height: 24rem;
    border-radius: 9999px;
    filter: blur(64px);
    animation: pulse 4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.glow-ball-1 {
    top: 25%;
    left: 25%;
    background: rgba(217, 119, 6, 0.1);
}

.glow-ball-2 {
    bottom: 25%;
    right: 25%;
    background: rgba(124, 45, 18, 0.1);
    animation-duration: 4s;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: .5;
    }
}

#header-container,
#footer-container {
    position: relative;
    z-index: 10;
    padding: 1rem;
    text-align: center;
    transition: opacity 0.5s;
}

.title-main {
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 0.1em;
    color: rgba(245, 158, 11, 0.9);
    filter: drop-shadow(0 4px 3px rgba(0, 0, 0, 0.07));
}

.title-sub {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 0.25rem;
    letter-spacing: 0.05em;
}



/* 门的主场景 */
.main-container {
    position: relative;
    z-index: 10;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow: hidden;
}

.scene {
    perspective: 1400px;
    width: 100%;
    max-width: 28rem;
    height: 560px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.7s;
    position: relative;
}

.door-frame-container {
    transform-style: preserve-3d;
    position: relative;
    width: 20rem;
    height: 460px;
    border-top-left-radius: 140px;
    border-top-right-radius: 140px;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.door-interior-bg {
    position: absolute;
    inset: 1rem;
    border-top-left-radius: 120px;
    border-top-right-radius: 120px;
    overflow: hidden;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.6);
}

#interior-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top right, #fef3c7, #ffffff, #fde68a);
    opacity: 0;
    transition: opacity 0.7s;
}

/* 门面板动画 */
.door-panel {
    transform-style: preserve-3d;
    transform-origin: left center;
    transition: transform 1.2s cubic-bezier(0.77, 0, 0.175, 1);
    position: absolute;
    left: calc(1rem - 1px);
    top: 1rem;
    bottom: calc(1rem - 1px);
    width: calc(100% - 2rem + 2px);
    border-top-left-radius: 110px;
    border-top-right-radius: 110px;
    border: 4px solid #1f0e04;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.5rem;
    cursor: pointer;
    z-index: 10;
}

.door-panel.open {
    transform: rotateY(-112deg);
}

/* 铁质铰链、门牌、铆钉与拉手 */
.hinge {
    position: absolute;
    left: 0;
    width: 1rem;
    height: 2rem;
    background: #1c1917;
    border: 1px solid #444;
    border-top-right-radius: 0.25rem;
    border-bottom-right-radius: 0.25rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.hinge-top {
    top: 5rem;
}

.hinge-bottom {
    bottom: 4rem;
}

.door-plate {
    align-self: center;
    margin-top: 1.5rem;
    padding: 0.375rem 1.25rem;
    background: linear-gradient(to right, #292524, #44403c, #292524);
    border: 2px solid #57534e;
    border-radius: 0.25rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.9);
    text-align: center;
    position: relative;
    z-index: 10;
    pointer-events: none;
}

.nail {
    position: absolute;
    width: 0.25rem;
    height: 0.25rem;
    border-radius: 9999px;
    background: #0c0a09;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.nail-tl {
    top: 0.25rem;
    left: 0.25rem;
}

.nail-tr {
    top: 0.25rem;
    right: 0.25rem;
}

.nail-bl {
    bottom: 0.25rem;
    left: 0.25rem;
}

.nail-br {
    bottom: 0.25rem;
    right: 0.25rem;
}

.plate-number {
    color: #fef08a;
    font-family: monospace;
    font-size: 1.125rem;
    font-weight: bold;
    letter-spacing: 0.1em;
}

.door-panels-grid {
    position: absolute;
    inset: 7rem 1.5rem 2rem 1.5rem;
    border: 2px solid rgba(0, 0, 0, 0.6);
    border-radius: 0.5rem;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0.75rem;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.8);
}

.grid-box {
    height: 46%;
    border: 1px solid rgba(0, 0, 0, 0.5);
    border-radius: 0.25rem;
    background: rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.grid-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 9999px;
    background: #1c1917;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.6);
}

.grid-text {
    color: rgba(254, 240, 138, 0.5);
    font-family: 'Palatino', serif;
    font-size: 0.75rem;
    font-weight: bold;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-align: center;
    padding: 0 0.5rem;
}

.door-knocker-wrap {
    align-self: flex-end;
    margin: auto 1rem auto 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 10;
}

.knocker-base {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    background: linear-gradient(to bottom right, #44403c, #292524, #1c1917);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.8);
    border: 1px solid #57534e;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s;
}

.door-panel:hover .knocker-base {
    transform: scale(1.1);
}

.knocker-ring {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 9999px;
    border: 2px solid #78716c;
    display: flex;
    align-items: center;
    justify-content: center;
}

.knocker-dot {
    width: 0.375rem;
    height: 0.375rem;
    border-radius: 9999px;
    background: #a8a29e;
}

.door-shadow-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-top-left-radius: 140px;
    border-top-right-radius: 140px;
    box-shadow: inset 0 12px 25px rgba(0, 0, 0, 0.95);
    z-index: 20;
}

/* 材质与背景修饰 */
.stone-wall-bg {
    background-size: cover;
    background-position: center;
    border: 14px solid #1a1614;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.95), inset 0 20px 40px rgba(0, 0, 0, 0.9);
}

.wood-texture {
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.5) 0%, rgba(255, 255, 255, 0.03) 50%, rgba(0, 0, 0, 0.6) 100%),
        repeating-linear-gradient(0deg, transparent, transparent 35px, rgba(0, 0, 0, 0.2) 35px, rgba(0, 0, 0, 0.2) 37px),
        linear-gradient(135deg, #3d200c 0%, #221004 50%, #120702 100%);
}

/* 滚动条 */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #0f172a;
}

::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 3px;
}

/* 开启门后的主应用视图 (Iframe 视窗) */
#app-view {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0;
    z-index: 50;
    opacity: 0;
    pointer-events: none;
    transform: scale(0);
    transform-origin: center center;
    transition: all 1.1s cubic-bezier(0.16, 1, 0.3, 1);
    background: #0b0c10;
}

#app-view.active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.iframe-container {
    flex: 1;
    width: 100%;
    border: none;
    background: #fff;
}

/* Toast 提示容器 */
#toast-container {
    position: absolute;
    bottom: calc(100% + 5px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 10px;
    pointer-events: none;
    width: auto;
    max-width: 100%;
    box-sizing: border-box;
}

.toast-item {
    background: rgba(30, 30, 30, 0.95);
    color: #fff;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 14px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    border-left: 4px solid #2ed573;
    animation: toast-in 0.3s ease forwards;
    pointer-events: auto;
    width: fit-content;
    max-width: 100%;
    word-wrap: break-word;
    white-space: normal;
}

.toast-item.error {
    border-left-color: #ff4757;
}

@keyframes toast-in {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 加载进度条 */
#loading-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 100%;
    background: #222;
    overflow: hidden;
    z-index: 999999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#progress-bar-inner {
    position: absolute;
    inset: 0 auto 0 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ff4757, #2ed573, #ffa502);
}

@keyframes loading-anim {
    0% {
        transform: translateX(-100%);
    }

    50% {
        transform: translateX(0%);
    }

    100% {
        transform: translateX(100%);
    }
}

.loading-active {
    opacity: 1 !important;
    pointer-events: auto;
}

.loading-active #progress-bar-inner {
    width: 100%;
    animation: loading-anim 1.5s infinite linear;
}

/* 底部工具栏 */
.toolbar {
    min-height: 60px;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    border-top: 1px solid #333;
    box-sizing: border-box;
    flex-wrap: wrap;
    position: relative;
}

.toolbar-left {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #ccc;
    flex: 1;
    min-width: 200px;
    margin: 8px 0;
    position: relative;
}

.input-with-icon {
    position: relative;
    flex: 1;
    max-width: 300px;
    display: flex;
    align-items: center;
}

.toolbar-left input {
    width: 100%;
    padding: 7px 35px 7px 12px;
    background: #111;
    border: 1px solid #444;
    color: #fff;
    border-radius: 4px;
    font-size: 13px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.toolbar-left input:focus {
    outline: none;
    border-color: #ff4757;
}

.toolbar-left input.input-error {
    border-color: #ff4757 !important;
}

.submit-icon-btn {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    color: #aaa;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.submit-icon-btn:hover {
    color: #2ed573;
}

.submit-icon-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 8px 0;
    position: relative;
}

#site-title-tag {
    font-weight: bold;
    max-width: 150px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.like-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    font-size: 14px;
    margin-right:8px;
}

.heart-icon {
    /* font-size: 18px;
    margin-right: 4px;
    color: #aaa;
    transition: transform 0.2s ease, color 0.2s ease; */
}

.heart-icon.liked {
    color: #ff4757;
}

/* 工具栏分享按钮 */
.share-trigger:hover {
    color: #fff;
}

.toolbar-link {
    /* color: #aaa; */
    cursor: pointer;
    font-size: 14px;
    /* text-decoration: underline; */
    white-space: nowrap;
    position: relative;
}

.toolbar-link:hover {
    color: #fff;
}
.toolbar-link-m {
    display: none;
}

.toolbar-right button {
    padding: 6px 12px;
    border: none;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    white-space: nowrap;
}

.btn-secondary {
    background: #555 !important;
}

.btn-secondary:hover {
    background: #666 !important;
}

.btn-next {
    background: #2ed573 !important;
}

.btn-next:hover {
    background: #26af5f !important;
}

/* 抽屉与遮罩 */
#drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: none;
    z-index: 998;
}

#drawer-overlay.open {
    display: block;
}

#comment-drawer {
    position: fixed;
    right: 0;
    top: 0;
    width: 100%;
    max-width: 380px;
    height: 100%;
    background: #222;
    transition: transform 0.3s ease;
    z-index: 999;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    transform: translateX(100%);
}

#comment-drawer.open {
    transform: translateX(0);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
}

.drawer-header {
    padding: 20px;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drawer-close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
}

.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.comment-item {
    margin-bottom: 15px;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
    font-size: 13px;
}

/* 底部介绍框与版权 */
.intro-box {
    margin: 50px auto 0;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 18px 22px;
    max-width: 550px;
    text-align: left;
    font-size: 14px;
    line-height: 1.6;
    color: #ccc;
    box-sizing: border-box;
    width: 100%;
}

.intro-box h3 {
    margin: 0 0 8px 0;
    color: #fff;
    font-size: 16px;
    text-align: center;
}

.intro-box p {
    text-indent: 2rem;
}

.footer-copyright {
    margin-top: 20px;
    font-size: 12px;
    color: #666;
    letter-spacing: 0.5px;
}

/* 移动端收起/展开指引的箭头按钮（PC 端隐藏） */
.intro-toggle {
    display: none;
}

/* 响应式断点（保留所有文字/模块，仅对门按比例缩放） */
@media (max-width: 800px) {

    /* 核心修改：让大门整体等比例缩小而不变形，不隐藏任何内容 */
    .scene {
        transform: scale(0.78);
        transform-origin: center center;
        height: 440px;
        margin: -20px 0;
    }

    /* 移动端：intro-box 从底部滑出的浮动层，默认隐藏在版权之下 */
    .intro-box {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 50px;
        margin: 0;
        max-width: none;
        width: 100%;
        max-height: 68vh;
        overflow-y: auto;
        border-radius: 12px 12px 0 0;
        transform: translateY(calc(100% + 60px));
        transition: transform 0.42s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 40;
    }

    .intro-box.open {
        transform: translateY(0);
    }

    /* 箭头按钮：默认停在版权上方，展开时随浮动层升到其顶部 */
    .intro-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        left: 50%;
        bottom: 52px;
        transform: translateX(-50%);
        width: 46px;
        height: 34px;
        padding: 0;
        border: 1px solid rgba(255, 255, 255, 0.18);
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.08);
        color: #f59e0b;
        cursor: pointer;
        z-index: 41;
        transition: bottom 0.42s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s;
        -webkit-tap-highlight-color: transparent;
    }

    .intro-toggle:active {
        background: rgba(255, 255, 255, 0.16);
    }

    .intro-toggle svg {
        transition: transform 0.42s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .intro-toggle.open svg {
        transform: rotate(180deg);
    }

    .toolbar {
        height: auto;
        padding: 8px 10px;
        flex-direction: column;
        align-items: stretch;
    }

    .toolbar-left {
        width: 100%;
        margin: 0 0 5px 0;
    }

    .toolbar-left input {
        max-width: none;
    }

    .toolbar-right {
        justify-content: flex-end;
        gap: 8px;
    }

    #site-title-tag {
        display: none;
    }

    .btn-secondary {
        display: none;
    }

    .toolbar-link-m{
        display:inline; 
        margin-right: 8px;
        cursor: pointer;
    }

    .input-with-icon {
        max-width: 100%;
    }

    #comment-drawer {
        max-width: 100% !important;
        width: 100% !important;
        height: 100% !important;
        top: 0;
    }

    .toolbar-right button {
        padding: 6px;
    }

    .title-main {
        font-size: 1.875rem;
    }

    .title-sub {
        font-size: 0.875rem;
    }
}

/* 超小屏（如 iPhone SE 等）进行更紧凑的等比缩放 */
@media (max-width: 380px) {
    .scene {
        transform: scale(0.68);
    }

    .toolbar-link,
    .btn-next{
        font-size: 13px;
    }

    .like-container,
    .toolbar-link-m{
        margin-right: 5px;
    }

    .btn-next i{
        display: none;
    }
}


@font-face {
    font-family: "iconfont";
    /* Project id 5240818 */
    src: url('iconfont/iconfont.woff2?t=1791393187869') format('woff2'),
        url('iconfont/iconfont.woff?t=1791393187869') format('woff'),
        url('iconfont/iconfont.ttf?t=1791393187869') format('truetype');
}

.iconfont {
    font-family: "iconfont" !important;
    font-size: 16px;
    font-style: normal;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.icon-fenxiang:before {
    content: "\e64c";
}

.icon-pinglun:before {
    content: "\e601";
}

.icon-dianzan:before {
    content: "\e600";
}

.icon-dianzan_kuai:before {
    content: "\ec8c";
}

.icon-guanbichuangkou:before {
    content: "\e6f2";
}

.icon-youbian:before {
    content: "\e773";
}

.icon-xinchuangkoudakai2:before {
    content: "\e70d";
}