* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Noto Serif SC', serif;
}

body {
    background: linear-gradient(180deg, #0a0a0f 0%, #1a1015 50%, #0f0a0d 100%);
    color: #d4af37;
    min-height: 100vh;
}

#loading-screen {
    position: fixed;
    inset: 0;
    background: #000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 1.5s ease, visibility 1.5s ease;
}

#loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.loading-orbs {
    position: relative;
    width: 200px;
    height: 200px;
}

.loading-orb {
    position: absolute;
    border-radius: 50%;
    animation: orbFloat 3s ease-in-out infinite;
}

.loading-orb.outer {
    width: 180px;
    height: 180px;
    top: 10px;
    left: 10px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.15) 0%, transparent 70%);
    animation-delay: 0s;
}

.loading-orb.middle {
    width: 140px;
    height: 140px;
    top: 30px;
    left: 30px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.25) 0%, transparent 70%);
    animation-delay: -1s;
}

.loading-orb.inner {
    width: 100px;
    height: 100px;
    top: 50px;
    left: 50px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.35) 0%, rgba(212, 175, 55, 0.1) 60%, transparent 70%);
    animation-delay: -2s;
}

.loading-core {
    position: absolute;
    width: 60px;
    height: 60px;
    top: 70px;
    left: 70px;
    background: radial-gradient(circle, #ffd700 0%, #d4af37 50%, #b8860b 100%);
    border-radius: 50%;
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.8), 0 0 80px rgba(212, 175, 55, 0.5);
    animation: coreGlow 2s ease-in-out infinite;
}

.loading-rings {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.ring {
    position: absolute;
    border: 2px solid rgba(212, 175, 55, 0.5);
    border-radius: 50%;
    animation: ringExpand 2s ease-out infinite;
}

.ring:nth-child(1) {
    width: 80px;
    height: 80px;
    top: -40px;
    left: -40px;
}

.ring:nth-child(2) {
    width: 80px;
    height: 80px;
    top: -40px;
    left: -40px;
    animation-delay: 0.6s;
}

.ring:nth-child(3) {
    width: 80px;
    height: 80px;
    top: -40px;
    left: -40px;
    animation-delay: 1.2s;
}

@keyframes orbFloat {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.1); opacity: 1; }
}

@keyframes coreGlow {
    0%, 100% { transform: scale(1); box-shadow: 0 0 40px rgba(255, 215, 0, 0.8), 0 0 80px rgba(212, 175, 55, 0.5); }
    50% { transform: scale(1.15); box-shadow: 0 0 60px rgba(255, 215, 0, 1), 0 0 100px rgba(212, 175, 55, 0.7); }
}

@keyframes ringExpand {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(2.5); opacity: 0; }
}

.loading-text {
    margin-top: 40px;
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 2.5rem;
    color: #ffd700;
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.8), 0 0 60px rgba(212, 175, 55, 0.5);
    animation: textGlow 1.5s ease-in-out infinite;
    letter-spacing: 8px;
}

.loading-hint {
    margin-top: 15px;
    font-family: 'Noto Serif SC', serif;
    font-size: 1rem;
    color: #d4af37;
    opacity: 0.7;
    animation: textFade 2s ease-in-out infinite;
}

@keyframes textGlow {
    0%, 100% { opacity: 0.8; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.02); }
}

@keyframes textFade {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.8; }
}

.bg-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.nebula {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse at 30% 20%, rgba(212, 175, 55, 0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(212, 175, 55, 0.02) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(26, 16, 21, 0.8) 0%, transparent 70%);
}

.particles {
    position: absolute;
    inset: 0;
}

.gold-particle {
    position: absolute;
    border-radius: 50%;
    animation: particleFall linear infinite;
}

.gold-particle.coin {
    width: 16px;
    height: 16px;
    background: radial-gradient(circle, #ffd700 0%, #d4af37 60%, #b8860b 100%);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.8), inset 0 -2px 3px rgba(0,0,0,0.3);
}

.gold-particle.coin::before {
    content: '¥';
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 9px;
    color: #8b6914;
    font-weight: bold;
}

.gold-particle.ingot {
    width: 20px;
    height: 14px;
    background: linear-gradient(180deg, #ffd700 0%, #d4af37 50%, #b8860b 100%);
    border-radius: 50% 50% 35% 35%;
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.8), inset 0 -2px 3px rgba(0,0,0,0.3);
}

@keyframes particleFall {
    0% {
        transform: translateY(-30px) rotate(0deg);
        opacity: 0;
    }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% {
        transform: translateY(105vh) rotate(360deg);
        opacity: 0;
    }
}

.glow-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 80%;
    background: radial-gradient(ellipse, rgba(212, 175, 55, 0.12) 0%, rgba(212, 175, 55, 0.05) 40%, transparent 70%);
    animation: breathGlow 6s ease-in-out infinite;
}

@keyframes breathGlow {
    0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(0.95); }
    50% { opacity: 0.9; transform: translate(-50%, -50%) scale(1.05); }
}

.cloud-corner {
    position: absolute;
    width: 200px;
    height: 200px;
    opacity: 0.15;
    animation: cloudFloat 8s ease-in-out infinite;
}

.cloud-corner.left-top {
    top: 0;
    left: 0;
    background: radial-gradient(ellipse at 0% 0%, rgba(212, 175, 55, 0.3) 0%, transparent 60%);
}

.cloud-corner.right-top {
    top: 0;
    right: 0;
    background: radial-gradient(ellipse at 100% 0%, rgba(212, 175, 55, 0.3) 0%, transparent 60%);
    animation-delay: -2s;
}

.cloud-corner.left-bottom {
    bottom: 0;
    left: 0;
    background: radial-gradient(ellipse at 0% 100%, rgba(212, 175, 55, 0.3) 0%, transparent 60%);
    animation-delay: -4s;
}

.cloud-corner.right-bottom {
    bottom: 0;
    right: 0;
    background: radial-gradient(ellipse at 100% 100%, rgba(212, 175, 55, 0.3) 0%, transparent 60%);
    animation-delay: -6s;
}

@keyframes cloudFloat {
    0%, 100% { opacity: 0.1; transform: scale(1); }
    50% { opacity: 0.2; transform: scale(1.05); }
}

.main-wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
}

.header {
    text-align: center;
    flex-shrink: 0;
}

.title {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: clamp(2.2rem, 6vw, 3.5rem);
    font-weight: normal;
    background: linear-gradient(135deg, #ffd700 0%, #d4af37 30%, #ffd700 50%, #d4af37 70%, #ffd700 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: goldShine 4s linear infinite;
    margin-bottom: 8px;
    letter-spacing: 5px;
}

@keyframes goldShine {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.subtitle {
    font-size: clamp(1rem, 3vw, 1.3rem);
    color: #d4af37;
    opacity: 0.9;
    margin-bottom: 6px;
    transition: opacity 0.5s ease;
}

.slogans {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: clamp(0.85rem, 2vw, 1rem);
    color: #d4af37;
    opacity: 0.8;
}

.slogans .dot {
    opacity: 0.5;
}

.caishen-area {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
    min-height: 0;
    max-height: 50vh;
}

.aura-outer {
    position: absolute;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.18) 0%, rgba(212, 175, 55, 0.06) 40%, transparent 60%);
    animation: auraPulse 5s ease-in-out infinite;
}

.aura-inner {
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.3) 0%, rgba(212, 175, 55, 0.12) 40%, transparent 60%);
    animation: auraPulse 4s ease-in-out infinite;
    animation-delay: -1s;
}

@keyframes auraPulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.1); opacity: 1; }
}

.caishen-frame {
    position: relative;
    z-index: 2;
    padding: 10px;
    border: 2px solid rgba(212, 175, 55, 0.6);
    border-radius: 14px;
    background: rgba(26, 16, 21, 0.6);
    box-shadow: 0 0 35px rgba(212, 175, 55, 0.4);
}

.caishen-img {
    display: block;
    max-height: 35vh;
    width: auto;
    border-radius: 10px;
}

.treasures {
    position: absolute;
    bottom: 3%;
    display: flex;
    gap: 30px;
    z-index: 3;
}

.treasure {
    width: 16px;
    height: 16px;
    background: radial-gradient(circle, #ffd700 0%, #d4af37 60%, transparent 100%);
    border-radius: 50%;
    animation: floatUp 3s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.7);
}

.treasure.ingot {
    width: 20px;
    height: 14px;
    border-radius: 50% 50% 35% 35%;
}

.treasure:nth-child(2) {
    animation-delay: -1s;
}

.treasure:nth-child(3) {
    animation-delay: -2s;
}

@keyframes floatUp {
    0%, 100% { transform: translateY(0); opacity: 0.7; }
    50% { transform: translateY(-10px); opacity: 1; }
}

.qrcode-area {
    flex-shrink: 0;
    width: 100%;
    max-width: 580px;
    padding: 0 10px;
}

.qrcode-grid {
    display: flex;
    justify-content: center;
    gap: 18px;
}

.qrcode-item {
    flex: 1;
    text-align: center;
    max-width: 170px;
    transition: all 0.3s ease;
}

.qrcode-item.active {
    transform: scale(1.08);
}

.qrcode-item.main .qrcode-box {
    transform: scale(1.06);
    box-shadow: 0 0 28px rgba(212, 175, 55, 0.55);
}

.qrcode-box {
    width: 100px;
    height: 100px;
    margin: 0 auto 8px;
    border-radius: 12px;
    border: 2px solid #d4af37;
    background: rgba(26, 16, 21, 0.9);
    overflow: hidden;
    box-shadow: 0 0 18px rgba(212, 175, 55, 0.35);
    transition: all 0.3s ease;
    cursor: pointer;
}

.qrcode-box:hover {
    transform: scale(1.05);
    box-shadow: 0 0 28px rgba(212, 175, 55, 0.55);
    border-color: #ffd700;
}

.qrcode-box.active {
    transform: scale(1.15);
    box-shadow: 0 0 40px rgba(212, 175, 55, 0.8);
    border-color: #ffd700;
}

.qrcode-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.qrcode-box:hover .qrcode-img {
    transform: scale(1.1);
}

.qrcode-box.active:hover .qrcode-img {
    transform: scale(1.15);
}

.qrcode-title {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 1.15rem;
    color: #ffd700;
    margin-bottom: 4px;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
    transition: all 0.3s ease;
}

.qrcode-desc {
    font-size: 0.75rem;
    color: #d4af37;
    opacity: 0.85;
    line-height: 1.35;
    transition: all 0.3s ease;
}

.qrcode-item.active .qrcode-title {
    font-size: 1.3rem;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.7);
    color: #ffd700;
}

.qrcode-item.active .qrcode-desc {
    font-size: 0.85rem;
    opacity: 0.95;
}

.prayer-area {
    flex-shrink: 0;
    padding: 12px 0;
}

.prayer-btn {
    padding: 14px 55px;
    border: 2px solid #d4af37;
    border-radius: 35px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.25) 0%, rgba(212, 175, 55, 0.12) 100%);
    color: #ffd700;
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 1.4rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.25);
}

.prayer-btn:hover {
    background: linear-gradient(135deg, #d4af37 0%, #ffd700 100%);
    color: #0a0a0f;
    box-shadow: 0 0 45px rgba(212, 175, 55, 0.55);
    transform: scale(1.06);
}

.footer {
    flex-shrink: 0;
    text-align: center;
    padding: 10px 0;
}

.footer-text {
    font-size: clamp(0.75rem, 2vw, 0.9rem);
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.5) 0%, rgba(212, 175, 55, 0.9) 50%, rgba(212, 175, 55, 0.5) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1.5px;
}

@media (max-height: 750px) {
    .main-wrapper {
        padding: 8px 15px;
    }
    
    .title {
        font-size: clamp(1.8rem, 5vw, 2.8rem);
        margin-bottom: 5px;
    }
    
    .subtitle {
        font-size: clamp(0.9rem, 2.5vw, 1.1rem);
        margin-bottom: 4px;
    }
    
    .slogans {
        font-size: clamp(0.75rem, 1.8vw, 0.9rem);
    }
    
    .caishen-img {
        max-height: 28vh;
    }
    
    .qrcode-box {
        width: 85px;
        height: 85px;
    }
    
    .qrcode-title {
        font-size: 1.05rem;
    }
    
    .qrcode-desc {
        font-size: 0.7rem;
    }
    
    .prayer-btn {
        padding: 12px 50px;
        font-size: 1.3rem;
    }
}

@media (max-height: 600px) {
    .caishen-img {
        max-height: 22vh;
    }
    
    .caishen-area {
        max-height: 40vh;
    }
    
    .treasures {
        display: none;
    }
    
    .qrcode-box {
        width: 75px;
        height: 75px;
    }
}

@media (max-width: 480px) {
    .qrcode-grid {
        gap: 12px;
    }
    
    .qrcode-box {
        width: 90px;
        height: 90px;
    }
    
    .qrcode-item {
        max-width: 130px;
    }
    
    .qrcode-title {
        font-size: 1rem;
    }
}