/* 长安夜市主题 - 梦幻西游长安夜晚灯会风格 */
/* 深夜蓝底 + 金漆描边 + 灯笼星河 */

/* ========== 主题变量 ========== */
:root {
    --night-bg: #131A30;
    --night-bg-light: #1E2947;
    --card-bg: #1E2947;
    --card-bg-light: #27355A;
    --gold: #E8C476;
    --gold-light: #F3D9A0;
    --gold-border: rgba(232, 196, 118, 0.4);
    --gold-border-light: rgba(232, 196, 118, 0.2);
    --text-primary: #F3E9D2;
    --text-secondary: #8B9BB4;
    --text-hint: #5A6B85;
    --cinnabar: #C4554D;
    --jade: #6BBF9A;
}

/* ========== 全局重置 ========== */
body, html {
    background-color: var(--night-bg) !important;
    color: var(--text-primary);
}

body {
    background: linear-gradient(180deg, #0D1424 0%, #131A30 30%, #1A2542 60%, #131A30 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* ========== 夜市天幕 ========== */
.xyj-sky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

/* 灯笼 */
.xyj-lantern {
    position: absolute;
    width: 40px;
    height: 50px;
    background: radial-gradient(ellipse at center, #E8C476 0%, #C4554D 70%, #8B3A35 100%);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    opacity: 0.6;
    animation: lanternFloat 8s ease-in-out infinite;
}

.xyj-lantern::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: #8B6914;
    border-radius: 2px;
}

.xyj-lantern::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 15px;
    background: linear-gradient(180deg, #C4554D, transparent);
}

.xyj-lantern-a {
    top: 10%;
    left: 5%;
    animation-delay: 0s;
}

.xyj-lantern-b {
    top: 15%;
    right: 8%;
    width: 30px;
    height: 38px;
    animation-delay: -3s;
    opacity: 0.4;
}

.xyj-lantern-c {
    top: 35%;
    left: 12%;
    width: 25px;
    height: 32px;
    animation-delay: -5s;
    opacity: 0.3;
}

@keyframes lanternFloat {
    0%, 100% {
        transform: translateY(0) rotate(-3deg);
    }
    50% {
        transform: translateY(-15px) rotate(3deg);
    }
}

/* 星星 */
.xyj-star {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #E8C476;
    border-radius: 50%;
    box-shadow: 0 0 6px 2px rgba(232, 196, 118, 0.5);
    animation: starTwinkle 3s ease-in-out infinite;
}

.xyj-star-a {
    top: 8%;
    left: 20%;
    animation-delay: 0s;
}

.xyj-star-b {
    top: 12%;
    right: 25%;
    width: 3px;
    height: 3px;
    animation-delay: -1s;
}

.xyj-star-c {
    top: 25%;
    left: 30%;
    animation-delay: -2s;
}

.xyj-star-d {
    top: 18%;
    right: 15%;
    width: 2px;
    height: 2px;
    animation-delay: -0.5s;
}

.xyj-star-e {
    top: 5%;
    right: 35%;
    animation-delay: -1.5s;
}

.xyj-star-f {
    top: 30%;
    right: 10%;
    width: 3px;
    height: 3px;
    animation-delay: -2.5s;
}

@keyframes starTwinkle {
    0%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* ========== 主容器 ========== */
.main {
    position: relative;
    z-index: 1;
}

/* ========== Logo 区域 ========== */
.logo-wrap {
    padding-top: 50px;
}

.xyj-logo-ring {
    position: relative;
    display: inline-block;
    padding: 8px;
    background: radial-gradient(circle, rgba(232, 196, 118, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    animation: logoGlow 4s ease-in-out infinite;
}

.xyj-logo-ring::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 2px solid var(--gold-border);
    border-radius: 50%;
    animation: ringRotate 20s linear infinite;
}

.xyj-logo-ring::after {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    border: 1px solid var(--gold-border-light);
    border-radius: 50%;
    border-style: dashed;
    animation: ringRotate 30s linear infinite reverse;
}

.xyj-logo-ring-lg {
    padding: 12px;
}

.xyj-logo-ring img {
    border-radius: 50% !important;
    width: 79px;
    height: 79px;
    border: 3px solid var(--gold);
    box-shadow: 0 0 20px rgba(232, 196, 118, 0.3), inset 0 0 10px rgba(0, 0, 0, 0.3);
    object-fit: cover;
}

.xyj-logo-ring-lg img {
    width: 90px;
    height: 90px;
}

@keyframes logoGlow {
    0%, 100% {
        filter: drop-shadow(0 0 5px rgba(232, 196, 118, 0.3));
    }
    50% {
        filter: drop-shadow(0 0 15px rgba(232, 196, 118, 0.5));
    }
}

@keyframes ringRotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* 标题 - 鎏金字 */
.xyj-gold-title {
    font-size: 28px !important;
    font-weight: 700;
    letter-spacing: 8px;
    background: linear-gradient(135deg, #E8C476 0%, #F3D9A0 30%, #E8C476 50%, #D4A84A 70%, #E8C476 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: goldShimmer 3s ease-in-out infinite;
    text-shadow: none;
    margin-top: 15px !important;
    padding: 5px 0;
}

@keyframes goldShimmer {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* 副标题 */
.xyj-subtitle {
    color: var(--text-secondary) !important;
    font-size: 14px !important;
    margin-top: 10px !important;
    letter-spacing: 2px;
}

/* 分隔线 */
.xyj-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    padding: 0 40px;
}

.xyj-divider i {
    flex: 1;
    max-width: 80px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-border), transparent);
}

.xyj-divider span {
    color: var(--gold);
    font-size: 12px;
    letter-spacing: 4px;
    white-space: nowrap;
}

.xyj-divider-left {
    justify-content: flex-start;
    padding: 0;
    margin-top: 15px;
}

.xyj-divider-left i:first-child {
    display: none;
}

.xyj-divider-left i {
    max-width: 100px;
}

/* ========== 覆盖旧样式残留 ========== */
.app-qrcode {
    border: none !important;
    background: #fff;
}

.tab-content.pc .tab-content-item,
.tab-content.pc .tab-content-item.app {
    height: auto !important;
    min-height: 0 !important;
    padding-bottom: 30px;
}

.tab-content.pc {
    border-bottom: none !important;
    padding: 30px 0 !important;
}

.pc-download {
    margin-top: 25px;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.pc-download .btn-download {
    margin: 0;
    width: auto;
    min-width: 220px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

/* ========== 二维码区域 ========== */
.tab-content {
    border: none !important;
    background: transparent;
}

.tab-content-item {
    padding: 20px 0;
}

.xyj-qrcode-frame {
    position: relative;
    display: inline-block;
    padding: 20px;
    background: linear-gradient(135deg, var(--card-bg) 0%, var(--card-bg-light) 100%);
    border: 2px solid var(--gold-border);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.xyj-qrcode-frame-lg {
    padding: 30px;
}

.xyj-qrcode-frame .app-qrcode {
    border: none !important;
    border-radius: 8px;
    display: block;
}

/* 金边角饰 */
.xyj-corner {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid var(--gold);
    pointer-events: none;
}

.xyj-corner-tl {
    top: -2px;
    left: -2px;
    border-right: none;
    border-bottom: none;
    border-top-left-radius: 16px;
}

.xyj-corner-tr {
    top: -2px;
    right: -2px;
    border-left: none;
    border-bottom: none;
    border-top-right-radius: 16px;
}

.xyj-corner-bl {
    bottom: -2px;
    left: -2px;
    border-right: none;
    border-top: none;
    border-bottom-left-radius: 16px;
}

.xyj-corner-br {
    bottom: -2px;
    right: -2px;
    border-left: none;
    border-top: none;
    border-bottom-right-radius: 16px;
}

/* 扫码提示 */
.app-tip {
    color: var(--gold) !important;
    font-size: 14px;
    margin-top: 20px !important;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(232, 196, 118, 0.3);
}

/* ========== 按钮样式 ========== */
.btn {
    border-radius: 25px !important;
    font-size: 14px;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.btn-download {
    background: linear-gradient(135deg, var(--card-bg) 0%, var(--card-bg-light) 100%) !important;
    border: 2px solid var(--gold-border) !important;
    color: var(--gold) !important;
    padding: 12px 30px;
    height: auto;
    line-height: 1.5;
    font-weight: 500;
    text-shadow: 0 0 8px rgba(232, 196, 118, 0.2);
}

.btn-download:hover {
    border-color: var(--gold) !important;
    box-shadow: 0 0 20px rgba(232, 196, 118, 0.2);
    transform: translateY(-2px);
}

.btn-download .icon {
    margin-right: 8px;
}

.pkg-download {
    background: linear-gradient(135deg, #E8C476 0%, #D4A84A 100%) !important;
    border: none !important;
    color: #3A2B10 !important;
    font-weight: 600;
    border-radius: 25px !important;
    box-shadow: 0 4px 15px rgba(232, 196, 118, 0.3);
}

.pkg-download:hover {
    box-shadow: 0 6px 25px rgba(232, 196, 118, 0.4);
    transform: translateY(-2px);
}

/* ========== 内容区域 ========== */
.desc-content, .screenshots-content {
    border-top: none !important;
    background: linear-gradient(135deg, rgba(30, 41, 71, 0.8) 0%, rgba(39, 53, 90, 0.6) 100%);
    border: 1px solid var(--gold-border-light);
    border-radius: 16px;
    margin: 30px 15px;
    padding: 25px 20px;
    position: relative;
    overflow: hidden;
}

.desc-content::before, .screenshots-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-border), transparent);
}

/* 小节标题 */
.xyj-section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    font-size: 18px !important;
    font-weight: 600;
    color: var(--gold) !important;
    letter-spacing: 4px;
    margin-bottom: 25px !important;
    text-align: center;
}

/* 祥云装饰 */
.xyj-cloud {
    display: inline-block;
    width: 30px;
    height: 20px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 20'%3E%3Cpath d='M5 15 Q0 15 0 10 Q0 5 5 5 Q7 0 12 0 Q17 0 19 5 Q24 5 24 10 Q24 15 19 15 Z' fill='%23E8C476' opacity='0.6'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
}

.xyj-cloud-r {
    transform: scaleX(-1);
}

/* 描述文本 */
.desc-content pre {
    color: var(--text-primary) !important;
    font-size: 14px;
    line-height: 1.8;
    text-align: left;
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

/* ========== 截图区域 ========== */
.list-wrap {
    margin: 0 0 40px 0;
    padding: 0 15px;
}

.list-wrap ul {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
    padding: 10px 5px;
}

.list-wrap ul li {
    flex-shrink: 0;
    margin: 0 !important;
}

.xyj-shot-frame {
    position: relative;
    display: inline-block;
    padding: 10px;
    background: linear-gradient(135deg, var(--card-bg) 0%, var(--card-bg-light) 100%);
    border: 2px solid var(--gold-border);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.xyj-shot-frame:hover {
    border-color: var(--gold);
    box-shadow: 0 8px 30px rgba(232, 196, 118, 0.15);
    transform: translateY(-5px);
}

.xyj-shot-frame img {
    display: block;
    width: 176px;
    height: 311px;
    border: none !important;
    border-radius: 8px;
    object-fit: cover;
}

/* ========== 底部装饰 ========== */
.xyj-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 30px 20px 50px;
    margin-top: 20px;
}

.xyj-footer-line {
    flex: 1;
    max-width: 100px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-border), transparent);
}

.xyj-footer-text {
    color: var(--gold);
    font-size: 12px;
    letter-spacing: 3px;
    white-space: nowrap;
    opacity: 0.8;
}

/* ========== Toast 提示 ========== */
.toast-text {
    background: linear-gradient(135deg, var(--card-bg) 0%, var(--card-bg-light) 100%) !important;
    color: var(--gold) !important;
    border: 1px solid var(--gold-border);
    border-radius: 20px !important;
    padding: 10px 25px !important;
    font-size: 14px;
    opacity: 1 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* ========== 滚动箭头 ========== */
.more img {
    filter: brightness(0) saturate(100%) invert(77%) sepia(58%) saturate(400%) hue-rotate(2deg) brightness(90%) contrast(85%);
}

/* ========== 下载提示 ========== */
.download-tip {
    color: var(--text-secondary) !important;
    margin-top: 15px;
    font-size: 13px;
}

/* ========== PC 端适配 ========== */
@media only screen and (min-width: 768px) {
    .pc-info {
        margin-top: 60px;
    }

    .pc-name .xyj-gold-title {
        font-size: 36px !important;
        letter-spacing: 12px;
        background: linear-gradient(135deg, #E8C476 0%, #FFF0CC 30%, #E8C476 50%, #D4A84A 70%, #E8C476 100%);
        background-size: 200% 200%;
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    .pc-name .xyj-subtitle {
        font-size: 18px !important;
        margin-top: 20px !important;
    }

    .desc-content h2, .screenshots-content h2 {
        font-size: 22px !important;
    }

    .desc-content, .screenshots-content {
        margin: 40px 0;
        padding: 35px 40px;
    }

    .list-wrap {
        margin: 0 0 60px 0;
        padding: 0;
    }

    .list-wrap ul {
        justify-content: center;
    }

    .xyj-shot-frame img {
        width: 200px;
        height: 354px;
    }

    .pc-download {
        margin-top: 30px;
    }

    .btn-download {
        margin: 10px;
        min-width: 220px;
    }
}

/* ========== 移动端适配 ========== */
@media only screen and (max-width: 767px) {
    .xyj-lantern {
        width: 30px;
        height: 38px;
    }

    .xyj-lantern-b {
        width: 22px;
        height: 28px;
    }

    .xyj-lantern-c {
        width: 18px;
        height: 23px;
    }

    .xyj-gold-title {
        font-size: 24px !important;
        letter-spacing: 6px;
    }

    .xyj-subtitle {
        font-size: 12px !important;
        padding: 0 20px;
    }

    .xyj-divider {
        padding: 0 30px;
    }

    .xyj-divider span {
        font-size: 10px;
        letter-spacing: 2px;
    }

    .desc-content, .screenshots-content {
        margin: 25px 12px;
        padding: 20px 15px;
    }

    .xyj-section-title {
        font-size: 16px !important;
        letter-spacing: 3px;
    }

    .xyj-cloud {
        width: 24px;
        height: 16px;
    }

    .xyj-footer {
        padding: 20px 15px 40px;
        gap: 15px;
    }

    .xyj-footer-text {
        font-size: 10px;
        letter-spacing: 2px;
    }
}

/* ========== 小屏手机适配 ========== */
@media only screen and (max-width: 360px) {
    .xyj-gold-title {
        font-size: 20px !important;
        letter-spacing: 4px;
    }

    .xyj-qrcode-frame {
        padding: 15px;
    }

    .xyj-shot-frame img {
        width: 150px;
        height: 266px;
    }
}

/* ========== 动画优化 - 减少动态效果偏好 ========== */
@media (prefers-reduced-motion: reduce) {
    .xyj-lantern, .xyj-star, .xyj-logo-ring, .xyj-logo-ring::before, .xyj-logo-ring::after, .xyj-gold-title {
        animation: none !important;
    }
}
