/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
.header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* 主要内容区域 */
.main {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    margin-bottom: 40px;
}

/* 上传区域 */
.upload-section {
    margin-bottom: 40px;
}

.upload-area {
    border: 3px dashed #ddd;
    border-radius: 15px;
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafafa;
}

.upload-area.minimized {
    padding: 20px;
    border-radius: 10px;
    background: #f8f9fa;
    border-color: #e9ecef;
}

.upload-area.minimized .upload-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.upload-area.minimized .upload-content h3 {
    font-size: 1rem;
    margin-bottom: 5px;
}

.upload-area.minimized .upload-content p {
    font-size: 0.8rem;
    opacity: 0.7;
}

.upload-area:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.upload-area.dragover {
    border-color: #667eea;
    background: #e8f2ff;
    transform: scale(1.02);
}

.upload-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.upload-content h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #333;
}

.upload-content p {
    color: #666;
    font-size: 1rem;
}

/* 效果选择区域 */
.effects-section {
    margin-bottom: 40px;
}

.effects-section h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    text-align: center;
    color: #333;
}

.effects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.effect-btn {
    background: white;
    border: 2px solid #ddd;
    border-radius: 15px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.effect-btn:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.effect-btn.active {
    border-color: #667eea;
    background: #f0f4ff;
}

.effect-preview {
    width: 60px;
    height: 40px;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.regular-holo-preview {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4);
    background-size: 200% 200%;
    animation: shimmer 2s ease-in-out infinite;
}

.rainbow-holo-preview {
    background: linear-gradient(45deg, #ff0000, #ff8000, #ffff00, #80ff00, #00ff00, #00ff80, #00ffff, #0080ff, #0000ff, #8000ff, #ff00ff, #ff0080);
    background-size: 400% 400%;
    animation: rainbow 3s ease-in-out infinite;
}

.cosmos-holo-preview {
    background: radial-gradient(circle, #1a1a2e, #16213e, #0f3460);
    position: relative;
}

.cosmos-holo-preview::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="1" fill="white"/><circle cx="80" cy="30" r="0.5" fill="white"/><circle cx="60" cy="70" r="1.5" fill="white"/><circle cx="30" cy="80" r="0.8" fill="white"/></svg>');
    opacity: 0.8;
}

/* 新增效果预览样式 */
.amazing-rare-preview {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #ffeaa7);
    background-size: 300% 300%;
    animation: amazingShimmer 3s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.amazing-rare-preview::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent 0%,
        rgba(255,255,255,0.3) 25%,
        transparent 50%
    );
    background-size: 20px 20px;
    animation: glitterMove 2s linear infinite;
}

.secret-rare-preview {
    background: linear-gradient(45deg, #ffd700, #ffed4e, #f39c12, #e67e22);
    background-size: 200% 200%;
    animation: goldShimmer 2s ease-in-out infinite;
    position: relative;
}

.secret-rare-preview::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, transparent 70%);
    animation: goldGlow 1.5s ease-in-out infinite alternate;
}

.radiant-holo-preview {
    background: repeating-linear-gradient(
        45deg,
        #667eea 0%,
        #764ba2 25%,
        #f093fb 50%,
        #f5576c 75%,
        #667eea 100%
    );
    background-size: 400% 400%;
    animation: radiantFlow 4s linear infinite;
}

.shiny-rare-preview {
    background: linear-gradient(135deg, #1e3c72, #2a5298, #74b9ff, #0984e3);
    background-size: 300% 300%;
    animation: shinyWave 3s ease-in-out infinite;
    position: relative;
}

.shiny-rare-preview::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        90deg,
        transparent 0%,
        rgba(255,255,255,0.2) 50%,
        transparent 100%
    );
    background-size: 30px 100%;
    animation: shinyStripes 2s linear infinite;
}

.reverse-holo-preview {
    background: linear-gradient(45deg, #2d3436, #636e72, #b2bec3, #ddd);
    background-size: 200% 200%;
    animation: reverseShimmer 2.5s ease-in-out infinite;
    position: relative;
}

.reverse-holo-preview::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle, rgba(255,255,255,0.6) 30%, transparent 70%);
    animation: reverseGlow 2s ease-in-out infinite;
}

.ultra-rare-preview {
    background: linear-gradient(45deg, #6c5ce7, #a29bfe, #fd79a8, #fdcb6e);
    background-size: 400% 400%;
    animation: ultraShimmer 3.5s ease-in-out infinite;
    position: relative;
}

.ultra-rare-preview::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: conic-gradient(from 0deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: ultraSpin 3s linear infinite;
}

@keyframes shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes rainbow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* 新增动画效果 */
@keyframes amazingShimmer {
    0%, 100% { background-position: 0% 0%; }
    50% { background-position: 100% 100%; }
}

@keyframes glitterMove {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes goldShimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes goldGlow {
    0% { opacity: 0.3; }
    100% { opacity: 0.7; }
}

@keyframes radiantFlow {
    0% { background-position: 0% 0%; }
    100% { background-position: 100% 100%; }
}

@keyframes shinyWave {
    0%, 100% { background-position: 0% 0%; }
    50% { background-position: 100% 100%; }
}

@keyframes shinyStripes {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes reverseShimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes reverseGlow {
    0% { transform: scale(0.8); opacity: 0.4; }
    50% { transform: scale(1.2); opacity: 0.8; }
    100% { transform: scale(0.8); opacity: 0.4; }
}

@keyframes ultraShimmer {
    0%, 100% { background-position: 0% 0%; }
    25% { background-position: 100% 0%; }
    50% { background-position: 100% 100%; }
    75% { background-position: 0% 100%; }
}

@keyframes ultraSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 预览区域 */
.preview-section {
    text-align: center;
}

.preview-section h3 {
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: #333;
}

.card-container {
    display: flex;
    justify-content: center;
    margin-bottom: 80px;
    perspective: 1000px;
}

/* --- 全新的卡片和全息效果 --- */

/* 卡片容器和3D效果 */
.card-container {
    perspective: 1000px;
}

.card {
    width: 300px;
    height: 420px;
    cursor: pointer;
    transform-style: preserve-3d;
    transition: transform 0.1s linear, box-shadow 0.4s ease;
    transform: 
        translate3d(var(--translate-x, 0px), var(--translate-y, 0px), 0.1px) 
        scale(var(--card-scale, 1)) 
        rotateY(var(--rotate-y, 0deg)) 
        rotateX(var(--rotate-x, 0deg))
        rotateY(var(--rotate-delta-x, 0deg));
    z-index: calc(var(--card-scale, 1) * 10);
    will-change: transform, box-shadow, z-index;
    box-shadow: 
        0px 10px 20px -5px rgba(0,0,0,0.3), 
        0 2px 15px -5px rgba(0,0,0,0.2);
}

.card.active {
    z-index: 100;
    box-shadow: 
        0 0 3px -1px white, 
        0 0 3px 1px #667eea, 
        0 0 12px 2px #667eea, 
        0px 10px 20px -5px rgba(0,0,0,0.5), 
        0 0 40px -30px #667eea, 
        0 0 50px -20px #667eea;
}

.card.first-click {
    animation: firstClickSpin 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes firstClickSpin {
    0% { 
        transform: 
            translate3d(var(--translate-x, 0px), var(--translate-y, 0px), 0.1px) 
            scale(var(--card-scale, 1)) 
            rotateY(var(--rotate-y, 0deg)) 
            rotateX(var(--rotate-x, 0deg))
            rotateY(0deg);
    }
    100% { 
        transform: 
            translate3d(var(--translate-x, 0px), var(--translate-y, 0px), 0.1px) 
            scale(var(--card-scale, 1)) 
            rotateY(var(--rotate-y, 0deg)) 
            rotateX(var(--rotate-x, 0deg))
            rotateY(360deg);
    }
}

/* 卡片正面样式 (白边) */
.card__front {
    position: relative;
    width: 100%;
    height: 100%;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    padding: 15px;
    box-sizing: border-box;
    overflow: hidden; /* 确保效果不会溢出圆角 */
}

/* 用户上传的图片 */
#cardImage {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px; /* 图片的圆角，比卡片小一点 */
    z-index: 1;
}

/* 全息效果层 */
.card__shine {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease-out;
}

.card:hover .card__shine,
.card.force-hover .card__shine {
    opacity: 1;
}

/* 经典全息效果 */
.card[data-effect="regular-holo"] .card__shine {
    background: linear-gradient(
        115deg,
        transparent 30%,
        rgba(255, 255, 255, 0.6) 48%,
        rgba(192, 192, 255, 0.5) 50%,
        rgba(255, 255, 255, 0.6) 52%,
        transparent 70%
    );
    background-size: 200% 100%;
    background-position: calc((var(--pointer-from-left, 0.5) - 0.5) * 150%) 0;
    mix-blend-mode: screen;
    filter: brightness(1.1);
}

/* 彩虹全息效果 */
.card[data-effect="rainbow-holo"] .card__shine {
    background: linear-gradient(
        110deg,
        rgba(255, 0, 0, 0.4) 15%,
        rgba(255, 255, 0, 0.4) 30%,
        rgba(0, 255, 0, 0.4) 45%,
        rgba(0, 255, 255, 0.4) 60%,
        rgba(0, 0, 255, 0.4) 75%,
        rgba(255, 0, 255, 0.4) 90%
    );
    background-size: 250% 250%;
    background-position: var(--pointer-x) var(--pointer-y);
    mix-blend-mode: screen;
    filter: brightness(1.2);
}

/* 星空全息效果 */
.card[data-effect="cosmos-holo"] .card__shine {
    background-image: 
        url("data:image/svg+xml,%3Csvg width='6' height='6' viewBox='0 0 6 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.4' fill-rule='evenodd'%3E%3Cpath d='M5 0h1L0 6V5zM6 5v1H5z'/%3E%3C/g%3E%3C/svg%3E"),
        radial-gradient(
            circle at var(--pointer-x) var(--pointer-y),
            rgba(255, 255, 255, 0.8) 0%,
            rgba(150, 150, 255, 0.5) 50%,
            transparent 80%
        );
    mix-blend-mode: overlay;
    filter: brightness(1.3);
}

/* 惊艳稀有效果 */
.card[data-effect="amazing-rare"] .card__shine {
    background-image:
        repeating-linear-gradient(
            45deg,
            rgba(255, 255, 255, 0.1) 0%,
            rgba(255, 255, 255, 0.3) 25%,
            rgba(255, 255, 255, 0.1) 50%
        ),
        radial-gradient(
            farthest-corner circle at var(--pointer-x) var(--pointer-y),
            hsla(150, 20%, 10%, 1) 10%,
            hsla(177, 22%, 80%, 0.1) 50%,
            hsla(0, 0%, 95%, 0.98) 90%
        );
    background-size: 20px 20px, cover;
    background-position: 
        calc(var(--pointer-x) - 50%) calc(var(--pointer-y) - 50%),
        center center;
    background-blend-mode: soft-light, color-burn;
    filter: brightness(1) contrast(1) saturate(0.9);
    mix-blend-mode: screen;
}

/* 黄金秘藏效果 */
.card[data-effect="secret-rare"] .card__shine {
    background-image:
        repeating-linear-gradient(
            45deg,
            rgba(255, 215, 0, 0.2) 0%,
            rgba(255, 255, 255, 0.4) 25%,
            rgba(255, 215, 0, 0.2) 50%
        ),
        conic-gradient(
            from 0deg at var(--pointer-x) var(--pointer-y),
            #ffd700,
            #ffed4e,
            #f39c12,
            #e67e22,
            #ffd700
        ),
        radial-gradient(
            farthest-corner circle at var(--pointer-x) var(--pointer-y),
            hsla(150, 0%, 0%, 0.98) 10%,
            hsla(0, 0%, 95%, 0.15) 90%
        );
    background-size: 15px 15px, cover, cover;
    background-position: center, center, center;
    background-blend-mode: soft-light, overlay;
    mix-blend-mode: color-dodge;
    filter: brightness(calc(0.4 + (var(--pointer-from-center, 0.5) * 0.2))) contrast(1) saturate(2.7);
}

/* 辐射全息效果 */
.card[data-effect="radiant-holo"] .card__shine {
    background-image:
        repeating-linear-gradient(
            45deg,
            hsl(0,0%,10%) 0%,
            hsl(0,0%,20%) 1.2%,
            hsl(0,0%,35%) 2.4%,
            hsl(0,0%,50%) 3.6%,
            hsl(0,0%,35%) 4.8%,
            hsl(0,0%,20%) 6%,
            hsl(0,0%,10%) 7.2%
        ),
        repeating-linear-gradient(
            -45deg,
            hsl(0,0%,10%) 0%,
            hsl(0,0%,20%) 1.2%,
            hsl(0,0%,35%) 2.4%,
            hsl(0,0%,50%) 3.6%,
            hsl(0,0%,35%) 4.8%,
            hsl(0,0%,20%) 6%,
            hsl(0,0%,10%) 7.2%
        ),
        radial-gradient(
            farthest-corner ellipse at calc(var(--pointer-x) * 0.5 + 25%) calc(var(--pointer-y) * 0.5 + 25%),
            hsl(0, 0%, 95%) 20%,
            #667eea 130%
        );
    background-size: 210% 210%, 210% 210%, cover;
    background-position:
        calc((var(--pointer-x) - 50%) * 1.5 + 50%) calc((var(--pointer-y) - 50%) * 1.5 + 50%),
        calc((var(--pointer-x) - 50%) * 1.5 + 50%) calc((var(--pointer-y) - 50%) * 1.5 + 50%),
        center;
    background-blend-mode: exclusion, darken, color-dodge;
    filter: brightness(0.5) contrast(2) saturate(1.75);
    mix-blend-mode: color-dodge;
}

/* 闪亮稀有效果 */
.card[data-effect="shiny-rare"] .card__shine {
    background-image:
        repeating-linear-gradient(
            0deg,
            rgba(255, 107, 107, 0.3) calc(5% * 1),
            rgba(78, 205, 196, 0.3) calc(5% * 2),
            rgba(69, 183, 209, 0.3) calc(5% * 3),
            rgba(150, 206, 180, 0.3) calc(5% * 4),
            rgba(255, 234, 167, 0.3) calc(5% * 5),
            rgba(253, 121, 168, 0.3) calc(5% * 6),
            rgba(255, 107, 107, 0.3) calc(5% * 7)
        ),
        repeating-linear-gradient(
            133deg,
            rgba(14, 21, 46, 0.2) 0%,
            rgba(180, 180, 180, 0.4) 3.8%,
            rgba(200, 200, 255, 0.5) 4.5%,
            rgba(180, 180, 180, 0.4) 5.2%,
            rgba(14, 21, 46, 0.2) 10%,
            rgba(14, 21, 46, 0.2) 12%
        ),
        radial-gradient(
            farthest-corner circle at var(--pointer-x) var(--pointer-y),
            rgba(255, 255, 255, 0.6) 0%,
            rgba(255, 255, 255, 0.2) 40%,
            transparent 80%
        );
    background-position:
        0% var(--pointer-y),
        calc(var(--pointer-x) + (var(--pointer-y) * 0.2)) var(--pointer-y),
        var(--pointer-x) var(--pointer-y);
    background-blend-mode: overlay, screen, normal;
    background-size: 200% 700%, 300% 100%, 200% 100%;
    filter: brightness(1.2) contrast(1.2) saturate(1.5);
    mix-blend-mode: overlay;
}

/* 反向全息效果 */
.card[data-effect="reverse-holo"] .card__shine {
    background-image:
        radial-gradient(
            circle at var(--pointer-x) var(--pointer-y),
            #fff 5%,
            #000 50%,
            #fff 80%
        ),
        linear-gradient(
            -45deg,
            #000 15%,
            #fff,
            #000 85%
        );
    background-blend-mode: soft-light, difference;
    background-size: 120% 120%, 200% 200%;
    background-position: 
        center center, 
        calc(100% * var(--pointer-from-left, 0.5)) calc(100% * var(--pointer-from-top, 0.5));
    filter: brightness(0.55) contrast(1.5) saturate(1);
    mix-blend-mode: color-dodge;
    opacity: calc((1.5 * var(--card-opacity, 1)) - var(--pointer-from-center, 0.5));
}

/* 究极稀有效果 */
.card[data-effect="ultra-rare"] .card__shine {
    background-image:
        repeating-linear-gradient(
            0deg,
            rgba(108, 92, 231, 0.4) calc(5% * 1),
            rgba(162, 155, 254, 0.4) calc(5% * 2),
            rgba(253, 121, 168, 0.4) calc(5% * 3),
            rgba(253, 203, 110, 0.4) calc(5% * 4),
            rgba(225, 112, 85, 0.4) calc(5% * 5),
            rgba(0, 184, 148, 0.4) calc(5% * 6),
            rgba(108, 92, 231, 0.4) calc(5% * 7)
        ),
        repeating-linear-gradient(
            133deg,
            rgba(14, 21, 46, 0.1) 0%,
            rgba(200, 150, 255, 0.3) 3.8%,
            rgba(220, 180, 255, 0.4) 4.5%,
            rgba(200, 150, 255, 0.3) 5.2%,
            rgba(14, 21, 46, 0.1) 10%,
            rgba(14, 21, 46, 0.1) 12%
        ),
        radial-gradient(
            farthest-corner circle at var(--pointer-x) var(--pointer-y),
            rgba(255, 255, 255, 0.8) 0%,
            rgba(200, 150, 255, 0.3) 40%,
            transparent 80%
        );
    background-position:
        0% var(--pointer-y),
        calc(var(--pointer-x) + (var(--pointer-y) * 0.2)) var(--pointer-y),
        center center;
    background-blend-mode: overlay, screen, normal;
    background-size: 200% 400%, 195% 100%, 120% 150%;
    filter: brightness(1.1) contrast(1.3) saturate(1.2);
    mix-blend-mode: overlay;
}

/* 光斑效果 */
.card__glare {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    pointer-events: none;
    background: radial-gradient(
        circle at var(--pointer-x) var(--pointer-y),
        rgba(255, 255, 255, 0.6) 0%,
        transparent 40%
    );
    mix-blend-mode: overlay;
    opacity: 0;
    transition: opacity 0.2s ease-out;
}

.card:hover .card__glare,
.card.force-hover .card__glare {
    opacity: 1;
}

/* 水印样式 */
.watermark {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 500;
    z-index: 10;
    pointer-events: none;
}

/* 按钮样式 */
.actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 5;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #1da1f2;
    color: white;
}

.btn-secondary:hover {
    background: #1991db;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(29, 161, 242, 0.3);
}

.btn-outline {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

/* 广告插屏样式 */
.ad-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.ad-content {
    background: white;
    border-radius: 20px;
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
}

.ad-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px 0;
}

.ad-label {
    background: #ffd700;
    color: #333;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.ad-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.ad-close.show {
    opacity: 1;
    pointer-events: auto;
}

.ad-close:hover {
    color: #333;
}

.ad-body {
    padding: 20px;
    text-align: center;
}

.countdown {
    font-size: 3rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 20px;
    animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.ad-slot {
    margin-top: 20px;
    min-height: 250px;
    background: #f5f5f5;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

/* 页脚样式 */
.footer {
    text-align: center;
    color: white;
    opacity: 0.8;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .main {
        padding: 20px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .card {
        width: 250px;
        height: 350px;
    }

    .card-container {
        margin-bottom: 40px;
    }
    
    .actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 隐藏类 */
.hidden {
    display: none !important;
}

/* 淡入动画 */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 广告样式 - 暂时隐藏 */
.ad-container {
    margin: 20px 0;
    text-align: center;
    min-height: 90px;
    display: none; /* 隐藏广告位 */
    align-items: center;
    justify-content: center;
}

.header-ad {
    margin-top: 20px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 10px;
}

.preview-ad {
    margin: 30px 0;
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    border: 2px dashed #e9ecef;
}

.footer-ad {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
}

.sidebar-ad {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 160px;
    z-index: 100;
    display: none; /* 隐藏侧边栏广告 */
}

/* Cookie同意横幅 */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #333;
    color: white;
    padding: 20px;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.3);
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.cookie-content p {
    margin: 0;
    flex: 1;
}

.cookie-content a {
    color: #667eea;
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
}

.cookie-buttons .btn {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* 模态框样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 20px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px 0;
    border-bottom: 1px solid #eee;
}

.modal-header h2 {
    margin: 0;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
}

.modal-body h3 {
    color: #333;
    margin-top: 20px;
    margin-bottom: 10px;
}

.modal-body p, .modal-body li {
    line-height: 1.6;
    color: #666;
}

.modal-body ul {
    padding-left: 20px;
}

/* 页脚链接 */
.footer-links {
    margin-top: 10px;
    display: flex;
    gap: 20px;
    justify-content: center;
}

.footer-links a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    font-size: 0.9rem;
}

.footer-links a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* 广告屏蔽检测 */
.adblock-notice {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.9);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.adblock-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    max-width: 500px;
    width: 100%;
}

.adblock-content h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.adblock-content p {
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
}

/* 响应式广告 */
@media (max-width: 768px) {
    .sidebar-ad {
        display: none;
    }
    
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
    
    .cookie-buttons {
        justify-content: center;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 10px;
    }
    
    .ad-container {
        margin: 15px 0;
        min-height: 60px;
    }
}

@media (max-width: 1200px) {
    .sidebar-ad {
        display: none;
    }
}
