/* 🎴 精美塔罗卡片系统 - 严格按照参考图片设计 */

/* 卡片容器 - 参考图片的精确比例和尺寸 */
.tarot-wish-card {
    width: 300px;
    height: 480px;
    position: relative;
    margin: 20px auto;
    perspective: 1200px;
    perspective-origin: 50% 50%;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.3));
    border-radius: 20px;
    overflow: hidden;
    
    /* 整体发光效果 */
    box-shadow: 
        0 0 30px rgba(212, 175, 55, 0.2),
        0 10px 40px rgba(0, 0, 0, 0.15);
}

/* 翻转容器 */
.tarot-card-inner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: transform 0.8s ease-in-out;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
    transform-origin: 50% 50%;
    -webkit-transform-origin: 50% 50%;
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.tarot-wish-card.flipped .tarot-card-inner {
    transform: rotateY(180deg);
    -webkit-transform: rotateY(180deg);
}

/* 卡片正反面基础 */
.tarot-card-face {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 20px;
    overflow: hidden;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
    transform-origin: center center;
    -webkit-transform-origin: center center;
}

.tarot-card-front {
    transform: rotateY(0deg);
    -webkit-transform: rotateY(0deg);
    z-index: 2;
}

.tarot-card-back {
    transform: rotateY(180deg);
    -webkit-transform: rotateY(180deg);
    z-index: 1;
}

/* 🎨 卡片正面设计 - 严格按照参考图片 */
.tarot-card-front {
    /* 木质纹理背景 */
    background: 
        linear-gradient(145deg, 
            #8B4513 0%,     /* 深棕色木质 */
            #A0522D 15%,    /* 中棕色 */
            #CD853F 30%,    /* 浅棕色 */
            #DEB887 45%,    /* 米棕色 */
            #F4A460 60%,    /* 沙棕色 */
            #D2691E 75%,    /* 巧克力色 */
            #8B4513 100%    /* 回到深棕色 */
        );
    
    position: relative;
    
    /* 木质纹理效果 */
    background-image: 
        /* 木纹纹理 */
        repeating-linear-gradient(
            90deg,
            rgba(139, 69, 19, 0.1) 0px,
            rgba(139, 69, 19, 0.1) 2px,
            transparent 2px,
            transparent 6px
        ),
        repeating-linear-gradient(
            0deg,
            rgba(160, 82, 45, 0.05) 0px,
            rgba(160, 82, 45, 0.05) 1px,
            transparent 1px,
            transparent 12px
        );
}

/* 华丽装饰边框 - 参考图片的复杂雕刻效果 */
.premium-ornate-border {
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: 8px;
    border: 4px solid #DAA520;
    border-radius: 16px;
    
    /* 复杂的装饰边框效果 */
    background: 
        /* 边框装饰纹理 */
        linear-gradient(45deg, 
            rgba(218, 165, 32, 0.3) 0%, 
            rgba(255, 215, 0, 0.2) 25%,
            rgba(218, 165, 32, 0.3) 50%,
            rgba(255, 215, 0, 0.2) 75%,
            rgba(218, 165, 32, 0.3) 100%
        ),
        /* 四角装饰花纹 */
        radial-gradient(ellipse at top left, rgba(255, 215, 0, 0.4) 0%, transparent 30%),
        radial-gradient(ellipse at top right, rgba(255, 215, 0, 0.4) 0%, transparent 30%),
        radial-gradient(ellipse at bottom left, rgba(255, 215, 0, 0.4) 0%, transparent 30%),
        radial-gradient(ellipse at bottom right, rgba(255, 215, 0, 0.4) 0%, transparent 30%);
    
    box-shadow: 
        /* 内部光泽 */
        inset 0 2px 4px rgba(255, 215, 0, 0.3),
        inset 0 -2px 4px rgba(139, 69, 19, 0.3),
        /* 外部阴影 */
        0 0 20px rgba(218, 165, 32, 0.4);
}

/* 顶部编号标签 - 参考图片的半圆形设计 */
.card-number-badge {
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 40px;
    background: 
        linear-gradient(180deg, 
            #FFD700 0%,
            #DAA520 50%,
            #B8860B 100%
        );
    border: 2px solid #8B4513;
    border-radius: 0 0 40px 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.3);
}

.card-number-text {
    font-family: 'Cinzel', serif;
    font-size: 16px;
    font-weight: 700;
    color: #8B4513;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
}

/* 中央圆形画面区域 - 参考图片的星空背景 */
.central-artwork {
    position: absolute;
    top: 50px;
    left: 20px;
    right: 20px;
    height: 280px;
    border-radius: 20px;
    overflow: hidden;
    border: 3px solid #DAA520;
    
    /* 深色星空背景 */
    background: 
        /* 星空渐变 */
        radial-gradient(ellipse at center, 
            #1a1a2e 0%,
            #16213e 30%,
            #0f0f23 60%,
            #000000 100%
        ),
        /* 星星效果 */
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.8) 1px, transparent 2px),
        radial-gradient(circle at 80% 30%, rgba(255, 215, 0, 0.6) 1px, transparent 2px),
        radial-gradient(circle at 30% 70%, rgba(255, 255, 255, 0.7) 1px, transparent 2px),
        radial-gradient(circle at 70% 80%, rgba(255, 215, 0, 0.5) 1px, transparent 2px);
    
    box-shadow: 
        inset 0 0 30px rgba(0, 0, 0, 0.5),
        0 4px 15px rgba(0, 0, 0, 0.3);
}

/* 角色和内容区域 */
.character-scene {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

/* 主角色 - 可爱的仙女形象 */
.main-character {
    font-size: 60px;
    margin-bottom: 10px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    animation: characterFloat 3s ease-in-out infinite;
}

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

/* 发光球体效果 */
.magical-orb {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: 
        radial-gradient(circle at 30% 30%, 
            rgba(255, 255, 255, 0.9) 0%,
            rgba(255, 215, 0, 0.8) 30%,
            rgba(255, 165, 0, 0.6) 60%,
            transparent 100%
        );
    box-shadow: 
        0 0 20px rgba(255, 215, 0, 0.8),
        0 0 40px rgba(255, 215, 0, 0.4);
    animation: orbGlow 2s ease-in-out infinite alternate;
}

@keyframes orbGlow {
    0% { 
        box-shadow: 
            0 0 20px rgba(255, 215, 0, 0.8),
            0 0 40px rgba(255, 215, 0, 0.4);
    }
    100% { 
        box-shadow: 
            0 0 30px rgba(255, 215, 0, 1),
            0 0 60px rgba(255, 215, 0, 0.6);
    }
}

/* 金币装饰效果 */
.floating-coins {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.coin {
    position: absolute;
    width: 16px;
    height: 16px;
    background: 
        radial-gradient(circle, 
            #FFD700 0%,
            #DAA520 70%,
            #B8860B 100%
        );
    border-radius: 50%;
    border: 1px solid #8B4513;
    animation: coinFloat 4s ease-in-out infinite;
}

.coin:nth-child(1) { top: 20%; left: 15%; animation-delay: 0s; }
.coin:nth-child(2) { top: 30%; right: 20%; animation-delay: 0.5s; }
.coin:nth-child(3) { bottom: 25%; left: 25%; animation-delay: 1s; }
.coin:nth-child(4) { bottom: 35%; right: 15%; animation-delay: 1.5s; }

@keyframes coinFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(180deg); }
}

/* 愿望文字显示 */
.wish-display {
    position: absolute;
    bottom: 60px;
    left: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 10px;
    padding: 8px 12px;
    text-align: center;
}

.wish-text {
    font-family: 'Noto Serif SC', serif;
    font-size: 11px;
    color: #FFD700;
    line-height: 1.3;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* 底部标题区域 - 参考图片的深色背景设计 */
.bottom-title-section {
    position: absolute;
    bottom: 8px;
    left: 20px;
    right: 20px;
    height: 50px;
    background: 
        linear-gradient(180deg, 
            rgba(0, 0, 0, 0.9) 0%,
            rgba(20, 20, 20, 0.95) 50%,
            rgba(0, 0, 0, 0.9) 100%
        );
    border-radius: 25px;
    border: 2px solid #DAA520;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.4),
        inset 0 1px 2px rgba(255, 215, 0, 0.2);
}

.card-title-main {
    font-family: 'Cinzel', serif;
    font-size: 14px;
    font-weight: 600;
    color: #FFD700;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    letter-spacing: 1px;
}

.card-icon {
    width: 24px;
    height: 24px;
    background: 
        radial-gradient(circle, 
            #FFD700 0%,
            #DAA520 70%,
            #B8860B 100%
        );
    border-radius: 50%;
    border: 2px solid #8B4513;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* 悬浮效果 */
.tarot-wish-card:hover {
    transform: translateY(-5px) scale(1.02);
    filter: drop-shadow(0 25px 50px rgba(0, 0, 0, 0.4));
    box-shadow: 
        0 0 40px rgba(212, 175, 55, 0.3),
        0 15px 50px rgba(0, 0, 0, 0.2);
}

/* 卡片背面设计 */
.tarot-card-back {
    background: 
        linear-gradient(145deg, 
            #2c1810 0%,
            #3d2817 50%,
            #2c1810 100%
        );
    
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    box-sizing: border-box;
}

.back-content {
    text-align: center;
    color: #FFD700;
}

.back-title {
    font-family: 'Cinzel', serif;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.back-description {
    font-family: 'Noto Serif SC', serif;
    font-size: 12px;
    line-height: 1.4;
    opacity: 0.9;
    margin-bottom: 20px;
}

/* 供奉按钮样式 */
.offerings-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 20px 0;
}

.offering-btn {
    background: rgba(218, 165, 32, 0.2);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 8px;
    padding: 10px 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    color: #FFD700;
}

.offering-btn:hover {
    background: rgba(218, 165, 32, 0.4);
    border-color: rgba(255, 215, 0, 0.6);
    transform: translateY(-2px);
}

.offering-icon {
    font-size: 20px;
    margin-bottom: 4px;
    display: block;
}

.offering-name {
    font-size: 10px;
    font-family: 'Cinzel', serif;
}

/* 进化按钮 */
.evolution-btn {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 20px;
    font-family: 'Cinzel', serif;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.evolution-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .tarot-wish-card {
        width: 280px;
        height: 448px;
    }
    
    .main-character {
        font-size: 50px;
    }
    
    .card-title-main {
        font-size: 12px;
    }
}
