/* Xpanda 熊猫烧香 - 手绘风格CSS */
/* 企业级CSS - 性能优化和可维护性 */

/* CSS变量定义 - 便于主题管理 */
:root {
    --primary-color: #ff6b6b;
    --secondary-color: #ff8e8e;
    --accent-color: #4ecdc4;
    --text-color: #333;
    --background-gradient: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #fecfef 100%);
    --border-radius: 50px;
    --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    --transition: all 0.3s ease;
    --font-family: 'Comic Neue', cursive, sans-serif;
}

/* 重置样式 - 性能优化 */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Comic Neue', cursive, sans-serif;
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #fecfef 100%);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* 顶部导航栏 */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 3px solid #333;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: flex-end;
}

.nav-buttons {
    display: flex;
    gap: 15px;
}

.nav-btn {
    background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
    border: 3px solid #333;
    border-radius: 25px;
    padding: 12px 24px;
    font-family: 'Comic Neue', cursive;
    font-weight: 700;
    font-size: 16px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transform: rotate(-2deg);
}

.nav-btn:hover {
    transform: rotate(0deg) scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.buy-btn {
    background: linear-gradient(45deg, #000000 0%, #000000 25%, #ffffff 25%, #ffffff 50%, #000000 50%, #000000 75%, #ffffff 75%, #ffffff 100%);
    background-size: 40px 40px;
    transform: rotate(2deg);
    border: 3px solid #000000;
    color: #000000;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
}

.buy-btn:hover {
    transform: rotate(0deg) scale(1.05);
}

/* BUY按钮变大效果 - 移动到屏幕中央并变大 */
.buy-btn.buy-scale {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) scale(3) !important;
    z-index: 99999 !important;
    animation: buyScalePulse 0.5s ease-in-out infinite alternate, buyFlash 1s ease-in-out infinite !important;
    background: linear-gradient(45deg, #000000 0%, #000000 25%, #ffffff 25%, #ffffff 50%, #000000 50%, #000000 75%, #ffffff 75%, #ffffff 100%) !important;
    background-size: 40px 40px !important;
    border: 5px solid #000000 !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8) !important;
    font-size: 24px !important;
    padding: 20px 40px !important;
    border-radius: 15px !important;
    color: #000000 !important;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8) !important;
    font-weight: bold !important;
}

@keyframes buyScalePulse {
    0% {
        transform: translate(-50%, -50%) scale(3) !important;
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8) !important;
        background: linear-gradient(45deg, #000000 0%, #000000 25%, #ffffff 25%, #ffffff 50%, #000000 50%, #000000 75%, #ffffff 75%, #ffffff 100%) !important;
        background-size: 40px 40px !important;
    }
    100% {
        transform: translate(-50%, -50%) scale(3.5) !important;
        box-shadow: 0 20px 50px rgba(0, 0, 0, 1) !important;
        background: linear-gradient(45deg, #ffffff 0%, #ffffff 25%, #000000 25%, #000000 50%, #ffffff 50%, #ffffff 75%, #000000 75%, #000000 100%) !important;
        background-size: 40px 40px !important;
    }
}

/* BUY按钮每1秒在最上层闪烁 */
@keyframes buyFlash {
    0% {
        z-index: 99999 !important;
        opacity: 1 !important;
    }
    45% {
        z-index: 99999 !important;
        opacity: 1 !important;
    }
    50% {
        z-index: 99999 !important;
        opacity: 0.8 !important;
    }
    55% {
        z-index: 99999 !important;
        opacity: 1 !important;
    }
    100% {
        z-index: 99999 !important;
        opacity: 1 !important;
    }
}



.btn-icon {
    font-size: 20px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-5px);
    }
    60% {
        transform: translateY(-3px);
    }
}

/* 主内容区域 */
.main-content {
    padding-top: 100px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* 混乱游动容器 */
.chaos-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    pointer-events: auto;
    z-index: 10;
}

.chaos-item {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    animation: chaosMove 8s linear infinite;
    pointer-events: auto;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chaos-item:hover {
    transform: scale(1.2);
    z-index: 100;
}

.token-image {
    width: 84px;
    height: 84px;
    object-fit: contain;
    border-radius: 50%;
    border: 3px solid #333;
    background: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.token-name {
    font-size: 14px;
    font-weight: 700;
    color: #333;
    text-shadow: 1px 1px 0px white;
    background: rgba(255, 255, 255, 0.8);
    padding: 4px 8px;
    border-radius: 10px;
    border: 2px solid #333;
}

/* 混乱游动动画 - 多种不同的轨迹 */
@keyframes chaosMove1 {
    0% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(200px, -100px) rotate(90deg); }
    50% { transform: translate(-150px, 150px) rotate(180deg); }
    75% { transform: translate(100px, -200px) rotate(270deg); }
    100% { transform: translate(0, 0) rotate(360deg); }
}

@keyframes chaosMove2 {
    0% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(-180px, 120px) rotate(-90deg); }
    50% { transform: translate(160px, -80px) rotate(-180deg); }
    75% { transform: translate(-120px, -160px) rotate(-270deg); }
    100% { transform: translate(0, 0) rotate(-360deg); }
}

@keyframes chaosMove3 {
    0% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(150px, 200px) rotate(45deg); }
    50% { transform: translate(-200px, -100px) rotate(90deg); }
    75% { transform: translate(80px, -180px) rotate(135deg); }
    100% { transform: translate(0, 0) rotate(180deg); }
}

@keyframes chaosMove4 {
    0% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(-120px, -150px) rotate(-45deg); }
    50% { transform: translate(180px, 100px) rotate(-90deg); }
    75% { transform: translate(-80px, 200px) rotate(-135deg); }
    100% { transform: translate(0, 0) rotate(-180deg); }
}

@keyframes chaosMove5 {
    0% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(100px, -200px) rotate(60deg); }
    50% { transform: translate(-160px, 80px) rotate(120deg); }
    75% { transform: translate(200px, 120px) rotate(180deg); }
    100% { transform: translate(0, 0) rotate(240deg); }
}

@keyframes chaosMove6 {
    0% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(-200px, 80px) rotate(-60deg); }
    50% { transform: translate(120px, -180px) rotate(-120deg); }
    75% { transform: translate(-100px, -120px) rotate(-180deg); }
    100% { transform: translate(0, 0) rotate(-240deg); }
}

@keyframes chaosMove7 {
    0% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(80px, 180px) rotate(30deg); }
    50% { transform: translate(-140px, -200px) rotate(60deg); }
    75% { transform: translate(160px, 100px) rotate(90deg); }
    100% { transform: translate(0, 0) rotate(120deg); }
}

/* 为每个图标设置不同的动画和延迟 */
.chaos-item:nth-child(1) { 
    animation: chaosMove1 5.4s linear infinite;
    animation-delay: 0s; 
}
.chaos-item:nth-child(2) { 
    animation: chaosMove2 6.6s linear infinite;
    animation-delay: 0.6s; 
}
.chaos-item:nth-child(3) { 
    animation: chaosMove3 4.6s linear infinite;
    animation-delay: 1.4s; 
}
.chaos-item:nth-child(4) { 
    animation: chaosMove4 6s linear infinite;
    animation-delay: 2s; 
}
.chaos-item:nth-child(5) { 
    animation: chaosMove5 4s linear infinite;
    animation-delay: 2.6s; 
}
.chaos-item:nth-child(6) { 
    animation: chaosMove6 7.4s linear infinite;
    animation-delay: 3.4s; 
}
.chaos-item:nth-child(7) { 
    animation: chaosMove7 5.6s linear infinite;
    animation-delay: 4s; 
}


/* 中央BUY按钮2区域 - 点击Xpanda后出现 */
.center-buy-section {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 99999;
    text-align: center;
    display: none;
}

.center-buy-btn {
    background: linear-gradient(45deg, #000000 0%, #000000 25%, #ffffff 25%, #ffffff 50%, #000000 50%, #000000 75%, #ffffff 75%, #ffffff 100%);
    background-size: 40px 40px;
    border: 5px solid #000000;
    border-radius: 50px;
    padding: 30px 60px;
    font-family: 'Comic Neue', cursive;
    font-weight: 700;
    font-size: 3rem;
    color: #000000;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.8);
    transform: scale(1.5);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 20px;
    animation: buyScalePulse 0.5s ease-in-out infinite alternate, buyFlash 1s ease-in-out infinite;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.8);
}

.center-buy-btn:hover {
    transform: scale(1.8);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 1);
}

/* BUY按钮2脉冲动画 */
@keyframes buyScalePulse {
    0% {
        transform: scale(1.5);
        box-shadow: 0 15px 50px rgba(0, 0, 0, 0.8);
    }
    100% {
        transform: scale(1.8);
        box-shadow: 0 20px 60px rgba(0, 0, 0, 1);
    }
}

/* BUY按钮2闪烁动画 */
@keyframes buyFlash {
    0% {
        z-index: 99999;
        opacity: 1;
    }
    45% {
        z-index: 99999;
        opacity: 1;
    }
    50% {
        z-index: 99999;
        opacity: 0.8;
    }
    55% {
        z-index: 99999;
        opacity: 1;
    }
    100% {
        z-index: 99999;
        opacity: 1;
    }
}

/* Xpanda按钮区域 */
.xpanda-section {
    text-align: center;
    z-index: 100;
    position: relative;
}

/* Xpanda信息显示 */
.xpanda-info {
    margin-bottom: 20px;
    text-align: center;
}

.xpanda-token {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    text-shadow: 3px 3px 0px #ff6b6b;
    margin-bottom: 10px;
    animation: tokenGlow 2s ease-in-out infinite alternate;
}

.xpanda-ca {
    font-size: 1.2rem;
    font-weight: 600;
    color: #666;
    background: rgba(255, 255, 255, 0.9);
    padding: 8px 16px;
    border-radius: 20px;
    border: 2px solid #333;
    display: inline-block;
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

@keyframes tokenGlow {
    0% {
        text-shadow: 3px 3px 0px #ff6b6b, 0 0 10px rgba(255, 107, 107, 0.5);
    }
    100% {
        text-shadow: 3px 3px 0px #ff6b6b, 0 0 20px rgba(255, 107, 107, 0.8);
    }
}

.xpanda-btn {
    background: linear-gradient(45deg, #ff6b6b, #ff8e8e, #ffa8a8);
    border: 5px solid #333;
    border-radius: 50px;
    padding: 20px 40px;
    font-family: 'Comic Neue', cursive;
    font-weight: 700;
    font-size: 2rem;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform: rotate(-2deg);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 15px;
}

.xpanda-btn:hover {
    transform: rotate(0deg) scale(1.1);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.xpanda-icon {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 50%;
    border: 3px solid white;
}

.xpanda-text {
    text-shadow: 3px 3px 0px #333;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}


/* Xpanda全屏效果 */
.xpanda-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #ff6b6b, #ff8e8e, #ffa8a8, #ffb8b8);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
    animation: xpandaEntrance 0.5s ease-out;
}

.xpanda-overlay.show {
    display: flex;
}

@keyframes xpandaEntrance {
    0% {
        opacity: 0;
        transform: scale(0.5) rotate(180deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.xpanda-container {
    text-align: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10001;
}

.xpanda-main-image {
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    border-radius: 0;
    border: none;
    box-shadow: none;
    animation: xpandaBounce 1s ease-in-out infinite;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10000;
}

@keyframes xpandaBounce {
    0%, 100% { transform: translateY(0px) rotate(-5deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

.xpanda-text-large {
    font-size: 8rem;
    font-weight: 700;
    color: white;
    text-shadow: 5px 5px 0px #333;
    margin: 20px 0;
    animation: xpandaTextShake 0.5s ease-in-out infinite;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10002;
}

@keyframes xpandaTextShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.xpanda-subtitle-large {
    font-size: 3rem;
    color: white;
    text-shadow: 3px 3px 0px #333;
    animation: xpandaTextShake 0.5s ease-in-out infinite 0.25s;
    position: absolute;
    top: 60%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10002;
}

/* 排列后的图标区域 */
.arranged-tokens {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 200;
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    gap: 20px;
    pointer-events: none;
}

.arranged-tokens.show {
    display: flex;
    flex-direction: column;
    pointer-events: auto;
}

.token-row {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.arranged-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transform: scale(0);
    transition: all 0.5s ease;
}

.arranged-item.show {
    opacity: 1;
    transform: scale(1);
}

.arranged-item.fade-out {
    opacity: 0;
    transform: scale(0) rotate(180deg);
}

/* 裂变效果 */
.xpanda-main-image.fission {
    animation: fissionEffect 2s ease-in-out infinite;
}

@keyframes fissionEffect {
    0% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.5) rotate(90deg); }
    50% { transform: scale(2) rotate(180deg); }
    75% { transform: scale(2.5) rotate(270deg); }
    100% { transform: scale(3) rotate(360deg); }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .xpanda-btn {
        font-size: 1.5rem;
        padding: 15px 30px;
    }
    
    .xpanda-icon {
        width: 40px;
        height: 40px;
    }
    
    .xpanda-main-image {
        width: 200px;
        height: 200px;
    }
    
    .xpanda-text-large {
        font-size: 4rem;
    }
    
    .xpanda-subtitle-large {
        font-size: 1.5rem;
    }
    
    .token-image {
        width: 50px;
        height: 50px;
    }
    
    .token-name {
        font-size: 12px;
    }
}