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

html, body {
    font-family: 'Arial', sans-serif;
    overflow-x: hidden;
    background-color: #1a1a1a;
    width: 100%;
    height: 100%;
    position: fixed;
    -webkit-overflow-scrolling: touch;
}

.container {
    width: 100%;
    height: 100%;
    position: relative;
    max-width: 414px;
    max-height: 896px;
    margin: 0 auto;
    background-color: #1a1a1a;
}

/* 首页背景 */
.home-page {
    width: 100%;
    height: 100%;
    background-image: url('resource/image/background image/background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    padding: 20px;
    position: absolute;
    bottom: 20%;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
}



.start-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    padding: 15px 40px;
    font-size: 1.2rem;
    color: white;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    margin-bottom: 2rem;
}

.start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.4);
}

.test-button {
    background: linear-gradient(45deg, #FFD700, #FFA500);
    color: #333;
    border: none;
    padding: 10px 20px;
    font-size: 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    margin-bottom: 15px;
    font-weight: bold;
}

.test-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    background: linear-gradient(45deg, #FFA500, #FFD700);
}

.start-btn:active {
    transform: translateY(0);
}

.daily-count {
    font-size: 1rem;
    color: #f0f0f0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

/* 视频页面样式 */
.video-page {
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 0;
}

.video-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

#cardVideo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* 卡片页面样式 */
.card-page {
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.card-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 0;
}

#cardImage {
    width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain;
    margin-top: 0;
}

/* 稀有卡片动画 */
.rare-card-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow: hidden;
    perspective: 1500px;
}

.rare-card-backdrop {
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 195, 0, 0.4) 0%, rgba(255, 165, 0, 0.2) 20%, transparent 40%);
    animation: backdrop-pulse 4s infinite ease-in-out;
}

@keyframes backdrop-pulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; }
}

.light-rays {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        repeating-conic-gradient(from 0deg, 
            rgba(255, 255, 255, 0.15) 0deg 5deg, 
            transparent 5deg 20deg
        );
    animation: rotate-rays 20s linear infinite;
    opacity: 0;
    animation-fill-mode: forwards;
    animation-delay: 0.5s;
}

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

.animated-card {
    width: 70%;
    max-width: 300px;
    height: auto;
    transform-style: preserve-3d;
    animation: reveal-card 5s forwards cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 0 25px 5px rgba(255, 195, 0, 0.7);
    border-radius: 15px;
    border: 3px solid #FFC300;
    margin-top: 0; /* 与顶部对齐 */
}

@keyframes reveal-card {
    0% {
        transform: scale(0) rotateY(180deg) translateZ(0);
        opacity: 0;
        filter: brightness(1.5) contrast(1.2);
    }
    40% {
        transform: scale(1.1) rotateY(0deg) translateZ(150px);
        opacity: 1;
        filter: brightness(1.2) contrast(1.1);
    }
    60% {
        transform: scale(0.9) rotateY(0deg) translateZ(100px);
        filter: brightness(1.1) contrast(1.05);
    }
    80% {
        transform: scale(1.05) rotateY(0deg) translateZ(120px);
        box-shadow: 0 0 40px 10px rgba(255, 195, 0, 1);
    }
    100% {
        transform: scale(1) rotateY(0deg) translateZ(0);
        opacity: 1;
        filter: brightness(1) contrast(1);
        box-shadow: 0 0 25px 5px rgba(255, 195, 0, 0.7);
    }
}




}
    30% {
        opacity: 1;
        transform: translateX(-50%) scale(1.3) rotateY(0deg);
    }
    60% {
        transform: translateX(-50%) scale(0.9) rotateY(0deg);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) scale(1) rotateY(0deg);
    }
}

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

.sparkles {
    position: absolute;
    width: 100%;
    height: 100%;
}

.sparkle {
    position: absolute;
    width: 15px;
    height: 15px;
    background: radial-gradient(circle, #FFD700 0%, #FFA500 30%, #FF8C00 60%, transparent 80%);
    border-radius: 50%;
    box-shadow: 0 0 10px #FFD700, 0 0 20px #FFA500, 0 0 30px #FF8C00;
    animation: sparkleAnimation 3s ease-in-out infinite;
}

.sparkle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 3px;
    height: 20px;
    background: linear-gradient(to bottom, transparent, #FFD700, transparent);
    transform: translate(-50%, -50%);
}

.sparkle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 3px;
    background: linear-gradient(to right, transparent, #FFD700, transparent);
    transform: translate(-50%, -50%);
}

.sparkle:nth-child(1) {
    top: 5%;
    left: 15%;
    animation-delay: 0s;
    animation-duration: 2.5s;
}

.sparkle:nth-child(2) {
    top: 25%;
    right: 10%;
    animation-delay: 0.4s;
    animation-duration: 3s;
}

.sparkle:nth-child(3) {
    bottom: 15%;
    left: 8%;
    animation-delay: 0.8s;
    animation-duration: 2.8s;
}

.sparkle:nth-child(4) {
    bottom: 25%;
    right: 15%;
    animation-delay: 1.2s;
    animation-duration: 3.2s;
}

.sparkle:nth-child(5) {
    top: 45%;
    left: 3%;
    animation-delay: 1.6s;
    animation-duration: 2.7s;
}

.sparkle:nth-child(6) {
    top: 55%;
    right: 5%;
    animation-delay: 2s;
    animation-duration: 3.1s;
}

@keyframes sparkleAnimation {
    0% {
        opacity: 0;
        transform: scale(0) rotate(0deg);
    }
    20% {
        opacity: 1;
        transform: scale(1.2) rotate(90deg);
    }
    40% {
        opacity: 0.8;
        transform: scale(0.8) rotate(180deg);
    }
    60% {
        opacity: 1;
        transform: scale(1.1) rotate(270deg);
    }
    80% {
        opacity: 0.6;
        transform: scale(0.9) rotate(360deg);
    }
    100% {
        opacity: 0;
        transform: scale(0) rotate(450deg);
    }
}

/* 光环效果 */
.gold-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300px;
    height: 300px;
    border: 3px solid transparent;
    border-radius: 50%;
    background: linear-gradient(45deg, #FFD700, #FFA500, #FFD700, #FF8C00);
    background-clip: padding-box;
    transform: translate(-50%, -50%);
    animation: ringPulse 2s ease-in-out infinite;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.6), inset 0 0 30px rgba(255, 215, 0, 0.3);
}

.gold-ring::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(45deg, #FFD700, #FFA500, #FFD700, #FF8C00);
    border-radius: 50%;
    z-index: -1;
}

.gold-ring-outer {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 400px;
    height: 400px;
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: ringRotate 4s linear infinite;
    box-shadow: 0 0 50px rgba(255, 215, 0, 0.4);
}

@keyframes ringPulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0.7;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 1;
    }
}

@keyframes ringRotate {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* 粒子效果 */
.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, #FFD700, #FFA500);
    border-radius: 50%;
    animation: particleFloat 4s ease-in-out infinite;
    box-shadow: 0 0 6px #FFD700;
}

.particle:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
    animation-duration: 3.5s;
}

.particle:nth-child(2) {
    left: 20%;
    animation-delay: 0.5s;
    animation-duration: 4s;
}

.particle:nth-child(3) {
    left: 30%;
    animation-delay: 1s;
    animation-duration: 3.8s;
}

.particle:nth-child(4) {
    left: 40%;
    animation-delay: 1.5s;
    animation-duration: 4.2s;
}

.particle:nth-child(5) {
    left: 50%;
    animation-delay: 2s;
    animation-duration: 3.6s;
}

.particle:nth-child(6) {
    left: 60%;
    animation-delay: 0.3s;
    animation-duration: 4.1s;
}

.particle:nth-child(7) {
    left: 70%;
    animation-delay: 0.8s;
    animation-duration: 3.9s;
}

.particle:nth-child(8) {
    left: 80%;
    animation-delay: 1.3s;
    animation-duration: 3.7s;
}

.particle:nth-child(9) {
    left: 90%;
    animation-delay: 1.8s;
    animation-duration: 4.3s;
}

.particle:nth-child(10) {
    left: 15%;
    animation-delay: 2.3s;
    animation-duration: 3.4s;
}

@keyframes particleFloat {
    0% {
        bottom: -10px;
        opacity: 0;
        transform: translateX(0) scale(0);
    }
    10% {
        opacity: 1;
        transform: translateX(10px) scale(1);
    }
    50% {
        opacity: 1;
        transform: translateX(-20px) scale(1.2);
    }
    90% {
        opacity: 1;
        transform: translateX(15px) scale(0.8);
    }
    100% {
        top: -10px;
        opacity: 0;
        transform: translateX(-10px) scale(0);
    }
}

/* 新增的闪烁星星样式 */
.sparkle:nth-child(7) {
    top: 35%;
    left: 25%;
    animation-delay: 0.2s;
    animation-duration: 2.9s;
}

.sparkle:nth-child(8) {
    bottom: 35%;
    right: 25%;
    animation-delay: 1.4s;
    animation-duration: 3.3s;
}



/* 弹窗样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    max-width: 300px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: modalAppear 0.3s ease-out;
}

@keyframes modalAppear {
    0% {
        transform: scale(0.7);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-content h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.modal-content p {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
}

.modal-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    padding: 10px 30px;
    font-size: 1rem;
    color: white;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* 移动端适配 - 默认就是移动端尺寸 */

.start-btn {
    padding: 15px 35px;
    font-size: 1.1rem;
    min-width: 160px;
}



.modal-content {
    padding: 25px;
    max-width: 300px;
    width: 85%;
}

/* 超小屏幕适配 */
@media (max-width: 375px) {
    .title {
        font-size: 1.9rem;
        margin-bottom: 2rem;
    }
    
    .start-btn {
        padding: 12px 28px;
        font-size: 1rem;
    }
    

}