/* Google Fonts Import - 高端商务风 - 使用国内镜像 */
@import url('https://fonts.geekzu.org/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Playfair+Display:wght@400;500;600;700&display=swap');

:root {
    /* Enhanced Color Palette */
    --primary-red: #B8212F;
    --deep-red: #7A1018;
    --accent-red: #D4363F;
    --luxury-gold: #E8C86B;
    --bright-gold: #FFD93D;
    --champagne-gold: #F5E6C8;
    --warm-white: #FFFDF7;
    --dark-bg: #0D0505;
    
    /* Gradients */
    --bg-gradient: radial-gradient(ellipse at 30% 20%, #6B1015 0%, #2A0808 50%, #0D0505 100%);
    --gold-gradient: linear-gradient(135deg, #E8C86B 0%, #FFD93D 50%, #E8C86B 100%);
    --card-gradient: linear-gradient(180deg, #FDF8EC 0%, #F5E6C8 100%);
    
    /* Shadows */
    --glow-gold: 0 0 30px rgba(232, 200, 107, 0.4);
    --glow-red: 0 0 40px rgba(184, 33, 47, 0.3);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html {
    overflow: hidden;
    width: 100%;
    height: 100%;
    touch-action: pan-x pan-y;
    -ms-touch-action: pan-x pan-y;
    -webkit-user-select: none;
    user-select: none;
}

body {
    font-family: "Noto Serif SC", "STSong", "SimSun", serif;
    background: var(--bg-gradient);
    color: var(--warm-white);
    overflow: hidden;
    height: 100%;
    width: 100%;
    position: relative;
    touch-action: pan-x pan-y;
    -ms-touch-action: pan-x pan-y;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

/* Enhanced Noise Texture */
body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

/* Ambient Light Effect */
body::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 30%, rgba(232, 200, 107, 0.08) 0%, transparent 40%);
    pointer-events: none;
    z-index: 0;
    animation: ambient-shift 15s ease-in-out infinite;
}

@keyframes ambient-shift {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(5%, 3%); }
}

#app {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.page {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100%;
    padding: 30px 20px;
    padding-bottom: 40px;
    opacity: 0;
    transition: opacity 0.6s ease;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    pointer-events: none; /* 非活动页面不接收交互事件 */
}

.page.active {
    display: flex;
    opacity: 1;
    pointer-events: auto; /* 活动页面可以接收交互事件 */
}

/* 首页居中显示 */
#landing.page {
    justify-content: center;
    padding-bottom: 80px; /* 增加底部空间，避免页脚与集装箱重叠 */
}

/* 摇晃页居中显示 */
#shaking.page {
    justify-content: center;
}

/* 结果页 - 卡片居中，按钮固定底部 */
#result.page {
    justify-content: center;
    padding-top: 15px;
    padding-bottom: 90px; /* 调整底部空间 */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- Enhanced Decorations --- */
.decor-circle {
    position: absolute;
    border-radius: 50%;
    z-index: 0;
    will-change: transform;
    pointer-events: none; /* 防止遮挡交互 */
}

.top-left {
    width: 300px;
    height: 300px;
    top: -100px;
    left: -100px;
    background: radial-gradient(circle, rgba(232, 200, 107, 0.2) 0%, transparent 60%);
    filter: blur(60px);
    animation: pulse-glow 6s ease-in-out infinite;
}

.bottom-right {
    width: 350px;
    height: 350px;
    bottom: -100px;
    right: -100px;
    background: radial-gradient(circle, rgba(184, 33, 47, 0.25) 0%, transparent 60%);
    filter: blur(80px);
    animation: pulse-glow 8s ease-in-out infinite reverse;
}

@keyframes pulse-glow {
    0%, 100% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.15);
        opacity: 1;
    }
}

/* Enhanced Sparkles with Staggered Animation */
.sparkles {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.sparkles::before,
.sparkles::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
}

.sparkles::before {
    background-image:
        radial-gradient(2px 2px at 15% 15%, rgba(255, 255, 255, 0.9), transparent),
        radial-gradient(2px 2px at 85% 25%, rgba(232, 200, 107, 0.9), transparent),
        radial-gradient(1.5px 1.5px at 45% 45%, rgba(255, 255, 255, 0.8), transparent),
        radial-gradient(2px 2px at 75% 65%, rgba(255, 217, 61, 0.9), transparent),
        radial-gradient(1.5px 1.5px at 25% 75%, rgba(232, 200, 107, 0.8), transparent),
        radial-gradient(2px 2px at 90% 85%, rgba(255, 255, 255, 0.9), transparent);
    animation: sparkle-dance 4s ease-in-out infinite;
}

.sparkles::after {
    background-image:
        radial-gradient(1.5px 1.5px at 35% 20%, rgba(255, 217, 61, 0.7), transparent),
        radial-gradient(2px 2px at 65% 40%, rgba(255, 255, 255, 0.8), transparent),
        radial-gradient(1.5px 1.5px at 20% 60%, rgba(232, 200, 107, 0.7), transparent),
        radial-gradient(2px 2px at 55% 80%, rgba(255, 255, 255, 0.8), transparent);
    animation: sparkle-dance 5s ease-in-out infinite 1s;
}

@keyframes sparkle-dance {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

/* --- Typography (Premium) --- */
.header {
    text-align: center;
    margin-bottom: 30px;
    z-index: 2;
    position: relative;
    animation: fade-slide-down 0.8s ease-out;
    display: flex;
    flex-direction: column;
    align-items: center;
}

@keyframes fade-slide-down {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.year-badge {
    display: inline-block;
    border: 2px solid var(--luxury-gold);
    color: var(--luxury-gold);
    padding: 10px 32px;
    border-radius: 50px;
    font-size: 22px;
    font-family: "Playfair Display", serif;
    font-weight: 600;
    letter-spacing: 6px;
    margin-bottom: 28px;
    background: rgba(232, 200, 107, 0.1);
    backdrop-filter: blur(10px);
    box-shadow: var(--glow-gold), inset 0 0 20px rgba(232, 200, 107, 0.1);
    animation: badge-glow 3s ease-in-out infinite;
}

@keyframes badge-glow {
    0%, 100% { box-shadow: var(--glow-gold), inset 0 0 20px rgba(232, 200, 107, 0.1); }
    50% { box-shadow: 0 0 40px rgba(232, 200, 107, 0.6), inset 0 0 30px rgba(232, 200, 107, 0.2); }
}

.main-title {
    font-family: "Noto Serif SC", "STSong", serif;
    font-size: 52px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 18px;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    filter: drop-shadow(0 4px 15px rgba(232, 200, 107, 0.4));
    letter-spacing: 6px;
    animation: title-shine 4s ease-in-out infinite;
    text-align: center;
}

@keyframes title-shine {
    0%, 100% { filter: drop-shadow(0 4px 15px rgba(232, 200, 107, 0.4)); }
    50% { filter: drop-shadow(0 4px 25px rgba(232, 200, 107, 0.7)); }
}

.subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 3px;
    font-family: "Noto Serif SC", serif;
    font-weight: 400;
    animation: fade-slide-down 0.8s ease-out 0.2s both;
}

/* --- Realistic Shipping Container --- */
.card-container {
    position: relative; /* 确保 z-index 生效 */
    margin: 35px 0;
    cursor: pointer;
    z-index: 15; /* 高于页脚的 z-index: 10，确保点击优先级 */
    animation: fade-scale-in 0.8s ease-out 0.4s both;
    pointer-events: auto; /* 确保可以接收点击事件 */
}

@keyframes fade-scale-in {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.shipping-container {
    width: 200px;
    height: 120px;
    position: relative;
    animation: float-3d 4s ease-in-out infinite;
    transition: transform 0.3s ease;
}

.card-container:hover .shipping-container {
    transform: translateY(-8px) scale(1.02);
}

.card-container:active .shipping-container {
    transform: scale(0.96);
}

/* 集装箱主体 */
.container-body {
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #D42D3A 0%, #B8232F 40%, #9A1D28 100%);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 8px 30px rgba(0, 0, 0, 0.4),
        0 2px 8px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        inset 0 -2px 0 rgba(0, 0, 0, 0.2);
    z-index: 2;
}

/* 波纹钢板效果 - 水平条纹 */
.container-stripes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(180deg,
        transparent 0px,
        transparent 8px,
        rgba(0, 0, 0, 0.06) 8px,
        rgba(0, 0, 0, 0.06) 9px,
        rgba(255, 255, 255, 0.04) 9px,
        rgba(255, 255, 255, 0.04) 10px,
        transparent 10px,
        transparent 11px);
    z-index: 1;
    pointer-events: none;
}

/* 顶部高光 */
.container-body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
    z-index: 10;
    pointer-events: none;
    border-radius: 4px 4px 0 0;
}

/* 顶部边框 */
.container-top-rail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 8px;
    background: linear-gradient(180deg, #8A1420 0%, #7A1018 100%);
    border-radius: 4px 4px 0 0;
    z-index: 3;
}

/* 底部边框 */
.container-bottom-rail {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 10px;
    background: linear-gradient(180deg, #6A0D12 0%, #4A080C 100%);
    border-radius: 0 0 4px 4px;
    z-index: 3;
}

/* 左右角柱 */
.container-corner-left,
.container-corner-right {
    position: absolute;
    top: 0;
    width: 10px;
    height: 100%;
    background: linear-gradient(90deg, #7A1018 0%, #9A1820 50%, #7A1018 100%);
    z-index: 4;
}

.container-corner-left {
    left: 0;
    border-radius: 4px 0 0 4px;
}

.container-corner-right {
    right: 0;
    border-radius: 0 4px 4px 0;
}

/* 门框区域 */
.container-door-frame {
    position: absolute;
    top: 10px;
    left: 12px;
    right: 12px;
    bottom: 12px;
    display: flex;
    gap: 3px;
    z-index: 2;
}

/* 门板 */
.door-panel {
    flex: 1;
    background: linear-gradient(180deg, #C82835 0%, #B02028 50%, #981820 100%);
    position: relative;
    border-radius: 2px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), inset 0 -1px 0 rgba(0,0,0,0.2);
}

/* 门板水平加强筋 */
.door-panel::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(180deg,
        transparent 0px,
        transparent 14px,
        rgba(0,0,0,0.12) 14px,
        rgba(0,0,0,0.12) 16px,
        rgba(255,255,255,0.03) 16px,
        rgba(255,255,255,0.03) 17px);
    z-index: 1;
    border-radius: 2px;
}

/* 锁杆 */
.door-lock {
    position: absolute;
    width: 3px;
    height: 65%;
    top: 17.5%;
    background: linear-gradient(90deg, #555 0%, #777 50%, #555 100%);
    border-radius: 1.5px;
    z-index: 2;
    box-shadow: 1px 0 2px rgba(0,0,0,0.3);
}

.door-panel:first-child .door-lock {
    right: 5px;
}

.door-panel:last-child .door-lock {
    left: 5px;
}

/* 锁杆把手 */
.door-lock::before,
.door-lock::after {
    content: "";
    position: absolute;
    left: -2px;
    width: 7px;
    height: 4px;
    background: linear-gradient(180deg, #666 0%, #444 100%);
    border-radius: 1px;
}

.door-lock::before {
    top: 15%;
}

.door-lock::after {
    bottom: 15%;
}

/* 美元符号 */
.dollar-sign {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 50px;
    font-family: "Playfair Display", serif;
    font-weight: 700;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 50%, #FFD700 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 8px rgba(255, 215, 0, 0.6)) drop-shadow(0 0 20px rgba(255, 165, 0, 0.4));
    animation: dollar-glow 2s ease-in-out infinite;
    z-index: 8;
}

@keyframes dollar-glow {
    0%, 100% { 
        filter: drop-shadow(0 2px 8px rgba(255, 215, 0, 0.6)) drop-shadow(0 0 20px rgba(255, 165, 0, 0.4));
    }
    50% { 
        filter: drop-shadow(0 4px 15px rgba(255, 215, 0, 0.8)) drop-shadow(0 0 30px rgba(255, 165, 0, 0.6));
    }
}

/* 隐藏不需要的3D元素 */
.container-roof,
.container-side {
    display: none;
}

@keyframes float-3d {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

/* --- Premium Result Card --- */
.result-container {
    animation: card-reveal 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-top: -30px; /* 轻微上移以达到视觉平衡 */
}

@keyframes card-reveal {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9) rotateX(10deg);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1) rotateX(0deg);
    }
}

.keyword-card {
    width: min(280px, 80vw);
    background: transparent;
    position: relative;
}

.card-glass {
    background: linear-gradient(180deg, #FFFDF7 0%, #F8F0DC 50%, #F0E4C8 100%);
    color: var(--deep-red);
    border-radius: 10px;
    padding: 16px 14px;
    box-shadow: 
        0 12px 35px rgba(0, 0, 0, 0.4),
        0 0 0 1.5px rgba(232, 200, 107, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Paper Texture */
.card-glass::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

/* Premium Gold Border with Corner Ornaments */
.card-border-decor {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 1px solid rgba(184, 144, 80, 0.35);
    border-radius: 6px;
    pointer-events: none;
    background: linear-gradient(135deg, 
        rgba(232, 200, 107, 0.06) 0%, 
        transparent 50%, 
        rgba(232, 200, 107, 0.04) 100%);
}

.card-border-decor::before,
.card-border-decor::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    border: 1.5px solid var(--luxury-gold);
    opacity: 0.6;
}

.card-border-decor::before {
    top: -1px;
    left: -1px;
    border-right: none;
    border-bottom: none;
    border-top-left-radius: 3px;
}

.card-border-decor::after {
    bottom: -1px;
    right: -1px;
    border-left: none;
    border-top: none;
    border-bottom-right-radius: 3px;
}

/* Subtle Glow Effects on Card */
.card-sparkle {
    position: absolute;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, rgba(232, 200, 107, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    filter: blur(10px);
    animation: card-glow-pulse 4s ease-in-out infinite;
}

.cs1 { top: 5%; left: 5%; animation-delay: 0s; }
.cs2 { top: 30%; right: 0%; animation-delay: 1.5s; }
.cs3 { bottom: 20%; left: 10%; animation-delay: 3s; }

@keyframes card-glow-pulse {
    0%, 100% { opacity: 0.3; transform: scale(0.8); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

/* Card Image */
.card-image {
    width: 100%;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
}

.card-image img {
    width: 80%; /* 增大图片显示宽度 */
    max-width: 220px; /* 增加最大宽度 */
    height: auto;
    border-radius: 8px; /* 增加圆角 */
    box-shadow: 0 4px 12px rgba(122, 16, 24, 0.15); /* 增强阴影 */
    object-fit: contain;
}

.card-image img[src=""],
.card-image img:not([src]) {
    display: none;
}

.card-header {
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(184, 144, 80, 0.15);
}

.year {
    font-size: 10px;
    font-weight: 600;
    color: var(--deep-red);
    letter-spacing: 1.5px;
    font-family: "Noto Serif SC", serif;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(232, 200, 107, 0.2) 20%, 
        rgba(232, 200, 107, 0.25) 50%, 
        rgba(232, 200, 107, 0.2) 80%, 
        transparent 100%);
    padding: 4px 12px;
    border-radius: 2px;
    display: inline-block;
    border-left: 1.5px solid var(--luxury-gold);
    border-right: 1.5px solid var(--luxury-gold);
}

.tagline {
    font-size: 10px;
    color: var(--primary-red);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 6px;
    font-family: "Playfair Display", serif;
    font-weight: 500;
    font-style: italic;
    position: relative;
    z-index: 1;
}

.keyword-title {
    font-family: "Noto Serif SC", "STSong", serif;
    font-size: 28px;
    margin-bottom: 10px;
    font-weight: 700;
    color: var(--deep-red);
    letter-spacing: 3px;
    position: relative;
    z-index: 1;
}

.blessing-box {
    margin-bottom: 10px;
    padding: 10px 12px;
    background: linear-gradient(180deg, rgba(122, 16, 24, 0.02) 0%, rgba(122, 16, 24, 0.04) 100%);
    border-radius: 6px;
    border: 1px solid rgba(184, 144, 80, 0.15);
    position: relative;
    z-index: 1;
}

.blessing-text p {
    font-size: 11px;
    line-height: 1.7;
    color: var(--deep-red);
    margin-bottom: 4px;
    font-family: "Noto Serif SC", serif;
    font-weight: 500;
}

.blessing-text p:last-child {
    margin-bottom: 0;
}

.blessing-text .blessing-message {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed rgba(184, 144, 80, 0.2);
    font-size: 10px;
    font-weight: 400;
    color: var(--primary-red);
    font-style: italic;
    line-height: 1.5;
}

.card-footer {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(184, 144, 80, 0.15);
    position: relative;
    z-index: 1;
}

.powered-by {
    font-size: 11px;
    color: var(--deep-red);
    text-decoration: none;
    opacity: 0.5;
    font-family: "Playfair Display", serif;
    letter-spacing: 1px;
    transition: opacity 0.3s;
}

.powered-by:hover {
    opacity: 0.8;
}

.powered-by strong {
    font-weight: 600;
    color: var(--primary-red);
}

/* --- Premium Buttons - Fixed Bottom --- */
.actions {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: none; /* 默认隐藏 */
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
    background: linear-gradient(180deg, transparent 0%, rgba(13, 5, 5, 0.9) 20%, rgba(13, 5, 5, 0.98) 100%);
    z-index: 20;
    pointer-events: none; /* 默认不接收交互事件 */
}

/* 只在活动的结果页面显示按钮 */
#result.page.active .actions {
    display: flex;
    pointer-events: auto; /* 活动时可以接收交互事件 */
}

@keyframes fade-slide-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.primary-btn {
    background: var(--gold-gradient);
    color: var(--dark-bg);
    border: none;
    padding: 12px 28px;
    font-size: 13px;
    font-family: "Noto Serif SC", serif;
    font-weight: 600;
    letter-spacing: 1px;
    border-radius: 25px;
    cursor: pointer;
    box-shadow: 
        0 4px 15px rgba(232, 200, 107, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.primary-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.primary-btn:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 12px 35px rgba(232, 200, 107, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.primary-btn:hover::before {
    left: 100%;
}

.primary-btn:active {
    transform: translateY(1px);
    box-shadow: 0 4px 15px rgba(232, 200, 107, 0.3);
}

.primary-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.secondary-btn {
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 10px 20px;
    font-size: 12px;
    font-family: "Noto Serif SC", serif;
    letter-spacing: 1px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.secondary-btn:hover {
    border-color: var(--luxury-gold);
    color: var(--luxury-gold);
    background: rgba(232, 200, 107, 0.1);
}

.special-btn {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--accent-red) 100%);
    color: #FFF;
    border: none;
    padding: 12px 24px;
    font-size: 12px;
    font-family: "Noto Serif SC", serif;
    letter-spacing: 1px;
    border-radius: 25px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(184, 33, 47, 0.4);
    transition: all 0.3s;
}

.special-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(184, 33, 47, 0.5);
}

.hidden {
    display: none !important;
}

/* Global Footer */
.global-footer {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    color: rgba(255, 255, 255, 0.35);
    text-decoration: none;
    z-index: 10;
    letter-spacing: 1px;
    font-family: "Playfair Display", serif;
    transition: color 0.3s;
    pointer-events: auto; /* 确保链接可以点击 */
}

.global-footer:hover {
    color: rgba(232, 200, 107, 0.7);
}

.global-footer strong {
    color: var(--luxury-gold);
    font-weight: 600;
    opacity: 0.8;
}

/* Instruction Text */
.instruction {
    text-align: center;
    margin-top: 35px;
    z-index: 2;
    animation: fade-slide-up 0.8s ease-out 0.6s both;
}

.action-text {
    color: var(--champagne-gold);
    font-size: 15px;
    letter-spacing: 3px;
    margin-bottom: 10px;
    font-family: "Noto Serif SC", serif;
}

.instruction .small {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 2px;
}

.shake-text {
    margin-top: 35px;
    font-size: 16px;
    color: var(--champagne-gold);
    letter-spacing: 3px;
    font-family: "Noto Serif SC", serif;
    animation: pulse-text 1.5s ease-in-out infinite;
}

@keyframes pulse-text {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* Poster Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 5, 5, 0.97);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: overlay-fade-in 0.3s ease;
}

@keyframes overlay-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.poster-wrapper {
    text-align: center;
    position: relative;
    animation: poster-scale-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes poster-scale-in {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.poster-wrapper img {
    max-width: 85vw;
    max-height: 70vh;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.poster-wrapper h3 {
    color: var(--champagne-gold);
    margin-bottom: 25px;
    font-weight: normal;
    font-size: 14px;
    letter-spacing: 2px;
    font-family: "Noto Serif SC", serif;
}

.close-btn {
    position: absolute;
    top: -55px;
    right: 0;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
}

/* Shaking Page */
.shake-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

/* Enhanced Shaking Animation */
.shaking-anim {
    animation: shake-vigorous 0.15s infinite;
}

@keyframes shake-vigorous {
    0% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(8deg) scale(1.02); }
    50% { transform: rotate(0deg) scale(1); }
    75% { transform: rotate(-8deg) scale(1.02); }
    100% { transform: rotate(0deg) scale(1); }
}

/* QR Code */
.qr-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 10px;
}

.qr-code {
    width: 80px;  /* 从 50px 增加到 80px */
    height: 80px; /* 从 50px 增加到 80px */
    background: #FFF;
    border: 2px solid var(--luxury-gold);
    border-radius: 6px;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.qr-code img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* QR Placeholder - will be replaced with real QR */
.qr-placeholder {
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(90deg, #000 25%, transparent 25%),
        linear-gradient(90deg, transparent 75%, #000 75%),
        linear-gradient(0deg, #000 25%, transparent 25%),
        linear-gradient(0deg, transparent 75%, #000 75%);
    background-size: 8px 8px;
    opacity: 0.3;
}

.qr-text {
    font-size: 9px;
    color: var(--deep-red);
    opacity: 0.6;
    letter-spacing: 0.5px;
    font-family: "Noto Serif SC", serif;
}

/* Loading Animation for Generate Button */
.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid var(--dark-bg);
    border-radius: 50%;
    border-top-color: transparent;
    animation: btn-spin 0.8s linear infinite;
}

@keyframes btn-spin {
    to { transform: rotate(360deg); }
}

/* Golden Confetti Effect */
.confetti-piece {
    position: fixed;
    top: -20px;
    pointer-events: none;
    z-index: 50;
    animation: confetti-fall linear forwards;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

@keyframes confetti-fall {
    0% {
        transform: translateY(0) translateX(0) rotate(0deg);
        opacity: 1;
    }
    25% {
        transform: translateY(25vh) translateX(-15px) rotate(180deg);
        opacity: 1;
    }
    50% {
        transform: translateY(50vh) translateX(15px) rotate(360deg);
        opacity: 0.9;
    }
    75% {
        transform: translateY(75vh) translateX(-10px) rotate(540deg);
        opacity: 0.6;
    }
    100% {
        transform: translateY(100vh) translateX(10px) rotate(720deg);
        opacity: 0;
    }
}

/* Mobile Responsive */
@media (max-width: 380px) {
    .main-title {
        font-size: 42px;
        letter-spacing: 4px;
    }
    
    .keyword-title {
        font-size: 38px;
        letter-spacing: 4px;
    }
    
    .shipping-container {
        width: 150px;
        height: 150px;
    }
    
    .dollar-sign {
        font-size: 50px;
    }
}

/* Landscape Mode Warning */
@media (orientation: landscape) and (max-height: 500px) {
    .page {
        justify-content: flex-start;
        padding-top: 10px;
    }
    
    .header {
        margin-bottom: 15px;
    }
    
    .main-title {
        font-size: 36px;
    }
    
    .card-container {
        margin: 15px 0;
    }
    
    .shipping-container {
        width: 120px;
        height: 120px;
    }
}
