/* IcePro — main.css (split from main.css) */

/* V9 导航 Logo 结构：.navbar-brand > .navbar-logo > img
   主题默认 height:36px + 左右 padding:30px，横向 lockup 会显得偏小。
   IcePro 统一加大光学尺寸（配合 Meowu 收紧 viewBox 的 SVG）。 */
.navbar-logo > img {
    height: 56px;
    width: auto;
    max-width: none;
    padding: 0 10px;
}

.navbar-top .navbar-logo > img {
    height: 56px;
}

/* 移动端侧栏 logo 略小一档，避免挤占标题行 */
.mobile-navbar .navbar-logo > img {
    height: 48px;
    padding: 0 8px;
}

@media (max-width: 768px) {
    .navbar-logo > img,
    .navbar-top .navbar-logo > img {
        height: 48px;
        padding: 0 8px;
    }
}

/* Compact Zibll-style official-store buttons: static controls, never cards. */
a.icepro-store-button,
a.icepro-store-button:hover,
a.icepro-store-button:focus,
a.icepro-store-button:active {
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 32px !important;
    padding: 6px 12px !important;
    margin: 0 !important;
    border-width: 1px !important;
    line-height: 1.45 !important;
    opacity: 1 !important;
    text-decoration: none !important;
    box-shadow: none !important;
    animation: none !important;
    transition: none !important;
    transform: none !important;
    scale: none !important;
    translate: none !important;
    rotate: none !important;
    will-change: auto !important;
}

.icepro-store-button *,
.icepro-store-button::before,
.icepro-store-button::after,
.icepro-store-button:hover::before,
.icepro-store-button:hover::after,
.icepro-store-button:focus::before,
.icepro-store-button:focus::after,
.icepro-store-button:active::before,
.icepro-store-button:active::after {
    animation: none !important;
    transition: none !important;
    transform: none !important;
    scale: none !important;
}

.icepro-store-button .fa {
    font-size: .82em;
    opacity: .8;
}

.icepro-store-inline {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 8px 0 0;
    color: var(--muted-color, #777);
    text-align: center;
}

#tab-signup-invit .icepro-sponsor-code-prompt {
    max-width: min(320px, 78vw);
    margin: 0 auto;
    line-height: 1.7;
    text-align: center;
}

#tab-signup-invit .icepro-sponsor-code-explain {
    margin: 0 0 10px;
    color: var(--muted-color, #777);
}

.icepro-balance-store-prompt {
    text-align: center;
}

/* Native Zibll system notice — presentation only; markup and lifecycle stay with the theme. */
#modal-system-notice .modal-dialog.modal-mini {
    width: min(400px, calc(100vw - 20px));
}

#modal-system-notice .modal-content {
    overflow: hidden;
    border: 0;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 0 0 1px rgba(196, 61, 103, 0.13), 0 28px 70px rgba(27, 31, 44, 0.22), 0 8px 26px rgba(194, 61, 103, 0.08);
}

#modal-system-notice .modal-body,
#modal-system-notice .modal-body > div {
    padding: 0 !important;
}

#modal-system-notice .modal-colorful-header {
    top: -120px;
    min-height: 118px;
    padding: 34px 22px 26px;
    background:
        radial-gradient(circle at 18% -12%, rgba(255, 255, 255, 0.22), transparent 42%),
        linear-gradient(128deg, #f77b98 0%, #ef5c83 54%, #f36f91 100%) !important;
}

#modal-system-notice .modal-colorful-header .text-center {
    position: relative;
    z-index: 2;
}

#modal-system-notice .modal-colorful-header .em12 {
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-shadow: 0 2px 8px rgba(143, 37, 70, 0.14);
}

#modal-system-notice .modal-colorful-header .close {
    top: 12px;
    right: 12px;
    z-index: 3;
    color: #fff;
    opacity: 0.86;
}

#modal-system-notice .icepro-entry-notice {
    padding: 18px 20px 12px;
    color: #747783;
    text-align: center;
}

#modal-system-notice .icepro-entry-notice p {
    margin: 0;
}

#modal-system-notice .icepro-entry-notice,
#modal-system-notice .icepro-entry-notice * {
    animation: none !important;
    transition: none !important;
}

#modal-system-notice .icepro-entry-notice__intro {
    background: linear-gradient(90deg, #d9436e 5%, #cf4d83 48%, #765fc7 100%);
    background-clip: text;
    -webkit-background-clip: text;
    color: #cf456d;
    -webkit-text-fill-color: transparent;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
    white-space: nowrap;
}

#modal-system-notice .icepro-entry-notice__points {
    display: grid;
    margin-top: 13px;
    gap: 8px;
}

#modal-system-notice .icepro-entry-notice__point {
    display: flex;
    align-items: baseline;
    justify-content: center;
    color: #777b86;
    font-size: 13.5px;
    line-height: 1.45;
    white-space: nowrap;
}

#modal-system-notice .icepro-entry-notice__point strong {
    margin-right: 4px;
    color: #3f424c;
    font-weight: 750;
}

#modal-system-notice .icepro-entry-notice__point:nth-child(1) strong,
#modal-system-notice .icepro-entry-notice__point:nth-child(2) strong,
#modal-system-notice .icepro-entry-notice__point:nth-child(3) strong {
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

#modal-system-notice .icepro-entry-notice__point:nth-child(1) strong {
    background-image: linear-gradient(90deg, #d54b73, #b95491);
}

#modal-system-notice .icepro-entry-notice__point:nth-child(2) strong {
    background-image: linear-gradient(90deg, #a15bb2, #7963c2);
}

#modal-system-notice .icepro-entry-notice__point:nth-child(3) strong {
    background-image: linear-gradient(90deg, #6870bd, #4f8ca4);
}

#modal-system-notice .icepro-entry-notice__founder {
    display: block;
    margin-top: 15px !important;
    padding: 12px 4px 1px;
    border: 0;
    border-top: 1px solid rgba(192, 75, 122, 0.16);
    border-radius: 0;
    background: transparent;
    color: #786b75;
    font-size: 11.8px;
    font-weight: 550;
    line-height: 1.35;
    white-space: nowrap;
}

#modal-system-notice .icepro-entry-notice__founder::before {
    content: "本站初创 · 现在注册";
    display: block;
    width: fit-content;
    margin: 0 auto 5px;
    background: linear-gradient(90deg, #d9416f, #b64fa2 58%, #705fc2);
    background-clip: text;
    -webkit-background-clip: text;
    color: #c84578;
    -webkit-text-fill-color: transparent;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: 0.025em;
}

#modal-system-notice .modal-buts {
    padding: 0 20px 18px !important;
    border-top: 0;
    background: #fff;
    text-align: center !important;
}

body.dark-theme #modal-system-notice .modal-content,
body.dark-theme #modal-system-notice .modal-buts {
    background: #25262d;
}

body.dark-theme #modal-system-notice .icepro-entry-notice__point {
    color: #c1c4ce;
}

body.dark-theme #modal-system-notice .icepro-entry-notice__point strong {
    color: #f0f1f4;
}

body.dark-theme #modal-system-notice .icepro-entry-notice__founder {
    border-color: rgba(219, 104, 162, 0.2);
    background: transparent;
    color: #c7bbc2;
}

@media (max-width: 420px) {
    #modal-system-notice .modal-colorful-header {
        min-height: 110px;
        padding: 31px 18px 24px;
    }

    #modal-system-notice .modal-colorful-header .em12 {
        font-size: 16px;
    }

    #modal-system-notice .icepro-entry-notice {
        padding: 16px 12px 11px;
    }

    #modal-system-notice .icepro-entry-notice__intro {
        font-size: 13px;
    }

    #modal-system-notice .icepro-entry-notice__point {
        font-size: 12.5px;
    }

    #modal-system-notice .icepro-entry-notice__founder {
        padding: 11px 0 0;
        font-size: 10.8px;
    }

    #modal-system-notice .icepro-entry-notice__founder::before {
        margin-bottom: 4px;
        font-size: 14px;
    }

    #modal-system-notice .modal-buts {
        padding: 0 12px 16px !important;
    }
}

/* V9 导航 Logo 结构：.navbar-brand > .navbar-logo > img */
body.icepro-logo-sweep .navbar-brand,
body.icepro-logo-sweep .navbar-brand .navbar-logo {
    position: relative;
    overflow: hidden;
}

body.icepro-logo-sweep .navbar-brand::before,
body.icepro-logo-sweep .navbar-brand .navbar-logo::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    z-index: 2;
    width: var(--icepro-sweep-width, 46%);
    height: 14px;
    pointer-events: none;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, var(--icepro-sweep-opacity, 0.75)),
        transparent
    );
    opacity: 0;
    transform: translate3d(-160%, -50%, 0) rotate(var(--icepro-sweep-angle, -35deg));
    animation: icepro-logo-sweep var(--icepro-sweep-duration, 6s) ease-in-out infinite;
}

/* 避免 brand 与 logo 双伪元素叠加扫两次 */
body.icepro-logo-sweep .navbar-brand:has(.navbar-logo)::before {
    content: none;
    display: none;
    animation: none;
}

@keyframes icepro-logo-sweep {
    0%,
    38% {
        opacity: 0;
        transform: translate3d(-160%, -50%, 0) rotate(var(--icepro-sweep-angle, -35deg));
    }

    45% {
        opacity: 1;
    }

    62% {
        opacity: 0.85;
        transform: translate3d(260%, -50%, 0) rotate(var(--icepro-sweep-angle, -35deg));
    }

    72%,
    100% {
        opacity: 0;
        transform: translate3d(260%, -50%, 0) rotate(var(--icepro-sweep-angle, -35deg));
    }
}

@media (prefers-reduced-motion: reduce) {
    body.icepro-logo-sweep .navbar-brand::before,
    body.icepro-logo-sweep .navbar-brand .navbar-logo::before {
        animation: none;
        display: none;
    }
}

/* Public UID: ordinary IDs stay quiet; administrator-assigned vanity IDs get
   a premium treatment that remains legible in Zibll light and dark themes. */
.author-header .user-identity > .icepro-founder-meowu {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

/* Zibll enlarges medal icons with transform: scale(136%). The transform does
   not participate in layout and makes this full-bleed SVG escape above the
   native pill, so give it a real centered size instead. */
.author-header .user-identity > .icepro-founder-meowu .medal-icon {
    display: block;
    width: auto;
    height: 17px;
    max-width: none;
    margin: 0 3px;
    vertical-align: middle;
    transform: none;
}

.icepro-public-uid {
    white-space: nowrap;
}

.icepro-public-uid--vanity {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    color: #583700 !important;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.8), transparent 38%),
        linear-gradient(110deg, #fff1b2 0%, #edc15a 46%, #fff0a6 100%) !important;
    box-shadow:
        0 3px 10px rgba(145, 91, 0, 0.18),
        inset 0 0 0 1px rgba(178, 119, 18, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.78),
        inset 0 -1px 0 rgba(136, 82, 0, 0.12);
}

.icepro-public-uid--vanity::after {
    content: "";
    position: absolute;
    top: -45%;
    left: -36%;
    z-index: 0;
    width: 24%;
    height: 190%;
    pointer-events: none;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.82), transparent);
    transform: rotate(18deg) translateX(-260%);
    animation: icepro-vanity-uid-shine 4.8s ease-in-out infinite;
}

.icepro-public-uid__label {
    position: relative;
    z-index: 1;
}

.icepro-public-uid__value {
    position: relative;
    z-index: 1;
}

body.dark-theme .icepro-public-uid--vanity {
    color: #ffe8a0 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.72);
    background:
        linear-gradient(145deg, rgba(255, 231, 151, 0.16), transparent 42%),
        linear-gradient(110deg, #5f420e 0%, #9c6d18 48%, #4c3309 100%) !important;
    box-shadow:
        0 4px 14px rgba(0, 0, 0, 0.3),
        inset 0 0 0 1px rgba(255, 211, 103, 0.36),
        inset 0 1px 0 rgba(255, 232, 159, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.22);
}

@keyframes icepro-vanity-uid-shine {
    0%,
    62% {
        opacity: 0;
        transform: rotate(18deg) translateX(-260%);
    }

    70% {
        opacity: 0.9;
    }

    84%,
    100% {
        opacity: 0;
        transform: rotate(18deg) translateX(760%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .icepro-public-uid--vanity::after {
        display: none;
        animation: none;
    }
}

/* Floating tools: one coherent dock instead of unrelated standalone tiles. */
.float-right:has(> .icepro-feedback-float) {
    --icepro-float-dock-width: 58px;
    --icepro-float-dock-inset: 4px;
    --icepro-feedback-band-height: 56px;
    box-sizing: border-box;
    width: var(--icepro-float-dock-width);
    right: 16px;
    padding: 0 var(--icepro-float-dock-inset) 5px;
    border: 0;
    border-radius: 17px;
    background:
        linear-gradient(150deg, #ff6687, #e94f78) top / 100% var(--icepro-feedback-band-height) no-repeat,
        rgba(255, 255, 255, 0.9);
    box-shadow: 0 11px 28px rgba(43, 48, 72, 0.13);
    -webkit-backdrop-filter: saturate(1.35) blur(16px);
    backdrop-filter: saturate(1.35) blur(16px);
}

/* The site only needs feedback, membership, mobile QR and back-to-top here. */
.float-right:has(> .icepro-feedback-float) > .more-btn,
.float-right:has(> .icepro-feedback-float) > a.service-wechat {
    display: none !important;
}

.float-right:has(> .icepro-feedback-float) > .float-btn:not(.icepro-feedback-float) {
    box-sizing: border-box;
    width: 100%;
    min-height: 38px;
    margin-right: auto;
    margin-left: auto;
    padding: 7px 0;
    border: 0;
    border-radius: 12px;
    box-shadow: none;
    transition: color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

.float-right:has(> .icepro-feedback-float) > .icepro-random-resource,
.float-right:has(> .icepro-feedback-float) > .icepro-support-float,
.float-right:has(> .icepro-feedback-float) > .qrcode-btn,
.float-right:has(> .icepro-feedback-float) > .ontop {
    background: transparent;
}

.float-right:has(> .icepro-feedback-float) > .ontop:not(.show) {
    display: none !important;
}

.float-right:has(> .icepro-feedback-float) > .ontop.show {
    display: flex !important;
}

.float-right.round:has(> .icepro-feedback-float) > .float-btn + .float-btn {
    margin-top: 2px;
}

.float-right:has(> .icepro-feedback-float) > .icepro-feedback-float {
    display: flex;
    box-sizing: border-box;
    width: calc(100% + (var(--icepro-float-dock-inset) * 2));
    min-height: var(--icepro-feedback-band-height);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 calc(var(--icepro-float-dock-inset) * -1) 4px;
    padding: 8px 2px 6px;
    cursor: pointer;
    color: #fff !important;
    border: 0;
    border-radius: 17px 17px 0 0;
    background: transparent !important;
    box-shadow: none;
    text-shadow: none;
    transition: opacity 0.18s ease;
}

.icepro-feedback-float__icon {
    display: block;
    margin-bottom: 4px;
    color: #fff !important;
    font-size: 19px;
    line-height: 1;
}

.icepro-feedback-float__label {
    display: block;
    color: #fff !important;
    font-size: 11px;
    font-weight: 750;
    line-height: 1.1;
    white-space: nowrap;
    letter-spacing: 0;
}

.float-right:has(> .icepro-feedback-float) > .icepro-labeled-float {
    display: flex;
    width: 100%;
    min-height: 46px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 4px 1px;
    color: #626b7a !important;
    border-radius: 13px;
    background: transparent !important;
    box-shadow: none !important;
    text-shadow: none;
    transform: none !important;
}

.float-right .icepro-labeled-float > i,
.float-right .icepro-labeled-float > svg {
    flex: 0 0 auto;
    margin: 0;
    font-size: 20px;
    line-height: 1;
}

.float-right .icepro-support-float > i {
    color: #7378dc;
}

.float-right .icepro-membership-float > i,
.float-right .icepro-membership-float > svg {
    color: #dc913c;
}

.float-right .icepro-random-resource > i {
    color: #67969b;
}

.icepro-float-label {
    display: block;
    color: #515a69 !important;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.12;
    white-space: nowrap;
    letter-spacing: 0;
}

.float-right:has(> .icepro-feedback-float) > .icepro-labeled-float:hover,
.float-right:has(> .icepro-feedback-float) > .icepro-labeled-float:focus {
    color: #626b7a !important;
    background: transparent !important;
    box-shadow: none !important;
    transform: none !important;
}

.float-right:has(> .icepro-feedback-float) > .qrcode-btn {
    position: relative;
    margin-top: 7px !important;
}

.float-right:has(> .icepro-feedback-float) > .qrcode-btn::before {
    content: "";
    position: absolute;
    top: -5px;
    left: 8px;
    width: 34px;
    height: 1px;
    background: rgba(90, 98, 126, 0.13);
}

.float-right:has(> .icepro-feedback-float) > .qrcode-btn > i,
.float-right:has(> .icepro-feedback-float) > .ontop > i {
    font-size: 18px;
    line-height: 1;
}

.float-right:has(> .icepro-feedback-float) .float-btn .icepro-float-banner {
    display: flex;
    align-items: center;
    right: calc(100% + 10px);
    left: auto;
    width: max-content;
    min-width: 0;
    max-width: calc(100vw - 94px);
    margin-right: 0;
    padding: 8px 10px;
    gap: 6px;
    color: var(--main-color);
    font-size: 12px;
    line-height: 1.2;
    text-align: left;
    white-space: nowrap;
    cursor: default;
}

.icepro-float-banner strong {
    color: var(--main-color);
    font-size: 12px;
    font-weight: 600;
}

.icepro-float-banner span {
    color: var(--muted-color);
    font-size: 11px;
    font-weight: 400;
}

body.dark-theme .float-right:has(> .icepro-feedback-float) {
    background:
        linear-gradient(150deg, #ff6687, #e94f78) top / 100% var(--icepro-feedback-band-height) no-repeat,
        rgba(31, 32, 39, 0.84);
    box-shadow: 0 13px 32px rgba(0, 0, 0, 0.32);
}

body.dark-theme .float-right:has(> .icepro-feedback-float) > .icepro-labeled-float,
body.dark-theme .float-right:has(> .icepro-feedback-float) > .icepro-labeled-float:hover,
body.dark-theme .float-right:has(> .icepro-feedback-float) > .icepro-labeled-float:focus {
    color: #c2c7d0 !important;
    background: transparent !important;
}

body.dark-theme .icepro-float-label {
    color: #c2c7d0 !important;
}

body.dark-theme .float-right:has(> .icepro-feedback-float) > .qrcode-btn::before {
    background: rgba(255, 255, 255, 0.12);
}

@media (min-width: 769px) {
    /* Center the complete rail, including the new primary entry. */
    .float-right:has(> .icepro-feedback-float) {
        top: 50%;
        bottom: auto;
        transform: translateY(-50%);
    }

    body:has(.modal.in) .float-right:has(> .icepro-feedback-float),
    .modal-open .float-right:has(> .icepro-feedback-float),
    .imgbox-show .float-right:has(> .icepro-feedback-float),
    .scroll-down .scroll-down-hide.float-right:has(> .icepro-feedback-float),
    .scroll-ing .scrolling-hide.float-right:has(> .icepro-feedback-float) {
        transform: translate(200%, -50%);
    }
}

@media (max-width: 768px) {
    /* Keep Zibll's safer bottom placement on narrow screens. */
    .float-right:has(> .icepro-feedback-float) {
        --icepro-float-dock-width: 58px;
        --icepro-feedback-band-height: 54px;
        right: 12px;
        border-radius: 16px;
    }

    .float-right:has(> .icepro-feedback-float) > .icepro-feedback-float {
        width: calc(100% + (var(--icepro-float-dock-inset) * 2));
        min-height: var(--icepro-feedback-band-height);
        margin-right: calc(var(--icepro-float-dock-inset) * -1);
        margin-left: calc(var(--icepro-float-dock-inset) * -1);
        padding: 7px 2px 5px;
        border-radius: 16px 16px 0 0;
    }

    .icepro-feedback-float__icon {
        font-size: 17px;
    }

    .icepro-feedback-float__label {
        font-size: 11px;
    }

    .float-right:has(> .icepro-feedback-float) > .icepro-labeled-float {
        min-height: 44px;
    }

    .icepro-float-label {
        font-size: 10px;
    }
}
