/* 自定义滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #16131c;
}

::-webkit-scrollbar-thumb {
    background: #2a243a;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #ff6b00;
}

/* 移除 number input 自带的上下箭头 */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.hero-title {
    display: inline-block;
    font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
    font-weight: 900;
    margin: 0;
    line-height: 0.98;
    letter-spacing: -0.04em;
    background: 
        linear-gradient(110deg, transparent 40%, rgba(255, 107, 0, 0.8) 50%, transparent 60%),
        linear-gradient(180deg, #ffffff 0%, #ffffff 40%, #777777 100%);
    background-size: 200% 100%, 100% 100%;
    background-position: -100% 0, 0 0;
    background-repeat: no-repeat;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
    animation: title-shimmer 5s infinite linear;
}

@keyframes title-shimmer {
    0% { background-position: 120% 0, 0 0; }
    20%, 100% { background-position: -100% 0, 0 0; }
}

@keyframes hero-bg-slide {
    0% {
        background-position: 160% center;
        opacity: 0.5;
    }
    100% {
        background-position: right center;
        opacity: 1;
    }
}

/* 动画辅助类 */
.animate__delay-05s {
    animation-delay: 0.5s !important;
}

.animate__delay-1-5s {
    animation-delay: 1.5s !important;
}

body.bg-brand-bg {
    background-color: #16131c;
    font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
}

.hero-section {
    position: relative;
}

.hero-stage {
    position: relative;
}

.hero-copy-shell {
    position: relative;
    z-index: 2;
}

.hero-copy {
    width: 100%;
    position: relative;
    z-index: 2;
    padding-bottom: 3rem;
}

.hero-badge {
    letter-spacing: 0.01em;
}

.hero-badge-dot {
    box-shadow: 0 0 0 4px rgba(255, 107, 0, 0.14);
}

.hero-title-wrap {
    width: 100%;
    overflow: visible;
}

.hero-subtitle {
    color: #a0a0a0;
    line-height: 1.6;
}

.hero-primary-btn {
    border: 1px solid rgba(255, 122, 0, 0.2);
    background: linear-gradient(135deg, #ff7a00 0%, #ff5500 100%);
}

.hero-primary-btn:hover {
    transform: translateY(-1px);
}

.hero-secondary-btn {
    border-color: #4a4a52;
    background: transparent;
}

.hero-secondary-btn:hover {
    border-color: #6b6b75;
    background: rgba(255, 255, 255, 0.02);
}

.hero-media {
    width: 100%;
    margin-top: -2rem;
}

.hero-media-glow {
    background:
            radial-gradient(circle at center, rgba(255, 107, 0, 0.1) 0%, rgba(255, 107, 0, 0.03) 34%, transparent 70%),
            radial-gradient(circle at 50% 30%, rgba(91, 116, 255, 0.1) 0%, rgba(91, 116, 255, 0.02) 42%, transparent 75%);
    filter: blur(30px);
}

.hero-media-frame {
    background: rgba(255, 255, 255, 0.02);
    box-shadow: 0 24px 72px rgba(0, 0, 0, 0.28);
}

.hero-media-mask {
    background:
            linear-gradient(90deg, rgba(22, 19, 28, 0.94) 0%, rgba(22, 19, 28, 0.88) 30%, rgba(22, 19, 28, 0.56) 48%, rgba(22, 19, 28, 0.16) 68%, rgba(22, 19, 28, 0.02) 100%),
            linear-gradient(180deg, rgba(22, 19, 28, 0.1) 0%, rgba(22, 19, 28, 0) 24%, rgba(22, 19, 28, 0.04) 68%, rgba(22, 19, 28, 0.34) 100%);
}

.hero-media-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    object-position: 68% center;
}

.hero-background-stage {
    position: relative;
    min-height: clamp(34rem, 58vw, 46rem);
    display: flex;
    overflow: hidden;
    padding: clamp(2rem, 6vw, 5rem);
    background-color: #181020;
    background-image: url("/static/image/main.png");
    background-repeat: no-repeat;
    background-size: contain;
    background-position: right center;
    animation: hero-bg-slide 1.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero-background-stage::before {
    content: none;
}

.hero-copy-overlay {
    position: relative;
    width: min(100%, 42rem);
    z-index: 1;
    margin-bottom: clamp(0.5rem, 2vw, 1.5rem);
}

.hero-background-stage .hero-title {
    font-family: "PingFang SC", "苹方-简", "PingFang TC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
    text-shadow: 0 14px 32px rgba(0, 0, 0, 0.42);
}

.hero-copy-text {
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 0 8px 24px rgba(0, 0, 0, 0.42);
}

.hero-figure {
    display: none !important;
}

.section-title-marker {
    width: 6.5rem;
    height: 3px;
    border-radius: 9999px;
    margin: 0 auto 1.25rem;
    background-color: #FF6600;
}

.feature-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.feature-card-icon {
    width: 3.5rem;
    height: 3.5rem;
    padding: 0.72rem;
    margin-bottom: 1.5rem;
    flex: none;
}

.feature-card-icon-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

@media (min-width: 1024px) {
    .feature-card-icon {
        width: 3.75rem;
        height: 3.75rem;
        padding: 0.78rem;
    }
}

body.modal-open {
    overflow: hidden;
}

.login-entry {
    position: relative;
}

.login-frame-clip {
    clip-path: inset(0 round 1.2rem);
}

.login-user-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 2.8rem;
    padding: 0.45rem 0;
    color: #ffffff;
    text-decoration: none;
    transition: transform 0.25s ease;
}

.login-user-credits {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-right: 0.25rem;
    padding: 0.25rem 0.75rem;
    background: rgba(255, 107, 0, 0.1);
    border: 1px solid rgba(255, 107, 0, 0.2);
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
}

.login-user-credits-value {
    color: #ff6b00;
}

.login-user-credits-unit {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.75rem;
    font-weight: 400;
}

.login-entry.is-open .login-user-button {
    transform: translateY(-1px);
}

.login-user-button:focus-visible {
    outline: 2px solid rgba(91, 116, 255, 0.72);
    outline-offset: 2px;
}

.login-user-avatar {
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 9999px;
    overflow: hidden;
    flex: none;
    border: 1px solid rgba(255, 107, 0, 0.32);
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.08);
    background: linear-gradient(135deg, rgba(255, 107, 0, 0.28), rgba(91, 116, 255, 0.24));
}

.login-user-avatar img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.login-user-avatar-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #ffffff;
    background:
            radial-gradient(circle at top, rgba(255, 255, 255, 0.18), transparent 40%),
            linear-gradient(135deg, #ff6b00, #5b74ff);
}

.login-user-meta {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.24rem;
    line-height: 1;
}

.login-user-label {
    font-size: 0.66rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #9ca3af;
}

.login-user-row {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.login-user-status {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 9999px;
    flex: none;
    background: #22c55e;
    box-shadow: 0 0 0 0.22rem rgba(34, 197, 94, 0.18);
}

.login-user-name {
    max-width: 8.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.95rem;
    font-weight: 600;
    color: #ffffff;
}

.login-user-caret {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    color: rgba(255, 255, 255, 0.72);
    transition:
            transform 0.24s ease,
            color 0.24s ease;
}

.login-entry.is-open .login-user-caret {
    transform: rotate(180deg);
    color: #ffffff;
}

.login-user-menu {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 70;
    min-width: 13.5rem;
    padding: 0.55rem;
    padding-top: 1rem; /* 增加上内边距，配合 ::after 覆盖间隙 */
    border: 1px solid rgba(255, 107, 0, 0.18);
    border-radius: 1rem;
    background:
            radial-gradient(circle at top, rgba(255, 107, 0, 0.12), transparent 44%),
            linear-gradient(180deg, rgba(24, 19, 38, 0.98), rgba(15, 12, 26, 0.98));
    backdrop-filter: blur(18px);
    box-shadow:
            0 18px 48px rgba(0, 0, 0, 0.42),
            0 10px 28px rgba(255, 107, 0, 0.08);
    opacity: 0;
    transform: translateY(-5px) scale(0.98);
    transform-origin: top right;
    pointer-events: none;
    transition:
            opacity 0.2s ease,
            transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.login-user-menu.is-open,
.login-entry[data-state="authenticated"]:hover .login-user-menu {
    opacity: 1;
    transform: translateY(0.45rem) scale(1);
    pointer-events: auto;
}

.login-user-menu::before {
    content: "";
    position: absolute;
    top: -0.35rem;
    right: 1.45rem;
    width: 0.85rem;
    height: 0.85rem;
    border-top: 1px solid rgba(255, 107, 0, 0.18);
    border-left: 1px solid rgba(255, 107, 0, 0.18);
    background: rgba(24, 19, 38, 0.96);
    transform: rotate(45deg);
    z-index: 1;
}

.login-user-menu::after {
    content: "";
    position: absolute;
    top: -1.2rem;
    left: 0;
    right: 0;
    height: 1.2rem;
    background: transparent;
}

.login-user-menu-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.82rem 0.9rem;
    border: 0;
    border-radius: 0.8rem;
    background: transparent;
    color: #e5e7eb;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition:
            transform 0.2s ease,
            color 0.2s ease,
            background-color 0.2s ease;
}

.login-user-menu-item:hover,
.login-user-menu-item:focus-visible {
    color: #ffffff;
    background: rgba(255, 107, 0, 0.12);
    transform: translateX(2px);
    outline: none;
}

.login-user-menu-item.danger:hover,
.login-user-menu-item.danger:focus-visible {
    background: rgba(248, 113, 113, 0.12);
}

.login-user-menu-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    flex: none;
    color: #ff9d55;
}

.login-user-menu-item.danger .login-user-menu-icon {
    color: #f87171;
}

@media (min-width: 1024px) {
    .hero-stage {
        min-height: clamp(35rem, 55vw, 46rem);
    }

    .hero-copy-shell {
        position: absolute;
        inset: 0;
        display: flex;
        align-items: flex-start;
    }

    .hero-copy {
        max-width: 44rem;
        padding: 3.5rem 0 0 3.25rem;
    }

    .hero-title-wrap {
        width: 100%;
        max-width: none;
        overflow: visible;
    }

    .hero-title {
        padding-bottom: 0.08em;
    }

    .hero-media {
        margin-top: 0;
    }

    .hero-media-image {
        aspect-ratio: 2 / 1;
        object-position: center center;
    }
}

@media (min-width: 1280px) {
    .hero-copy {
        max-width: 46rem;
        padding-top: 4rem;
        padding-left: 4rem;
    }

    .hero-title-wrap {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .hero-background-stage {
        min-height: 30rem;
        padding: 1.5rem 1.25rem 2rem;
        background-position: 78% center;
    }

    .hero-copy-overlay {
        width: 100%;
        gap: 1.75rem;
    }

    .hero-section {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .hero-actions {
        width: auto;
        justify-content: flex-start;
    }

    .hero-actions a {
        width: auto;
        justify-content: center;
    }

    .hero-title {
        letter-spacing: -0.03em;
    }

    .hero-copy {
        padding-bottom: 2.5rem;
    }

    .hero-media {
        margin-top: -1.5rem;
    }

    .login-user-button {
        min-width: auto;
        padding-right: 0.75rem;
    }

    .login-user-name {
        max-width: 5.75rem;
    }

    .login-user-menu {
        min-width: 12.25rem;
        right: -0.25rem;
    }
}
