/* ==================== 卡牌组件 ==================== */
/* 抽牌提示信息 */
.cards-selected-info {
    text-align: center;
    font-size: 1.2rem;
    color: white;
    margin: 15px 0 30px 0;
    font-weight: bold;
}

.highlight-number {
    color: #ffd89b;
    font-size: 1.3em;
    text-shadow: 0 0 10px rgba(255, 215, 155, 0.5);
    padding: 0 5px;
}

.card-deck {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 40px 0;
}

.card-back {
    width: 100px;
    height: 160px;
    background: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
    border-radius: 10px;
    border: 3px solid #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: float 3s ease-in-out infinite;
}

.card-back::before {
    content: '✦';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.8);
}

.card-back:nth-child(2) {
    animation-delay: 0.5s;
}

.card-back:nth-child(3) {
    animation-delay: 1s;
}

/* 塔罗牌 */
.tarot-card {
    width: 120px;
    height: 200px;
    perspective: 1000px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s ease;
}

.tarot-card:hover {
    transform: translateY(-10px);
}

.card-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s;
}

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

.card-front,
.card-back-face {
    width: 100%;
    height: 100%;
    position: absolute;
    backface-visibility: hidden;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.card-back-face {
    background: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
    border: 3px solid #fff;
}

.card-back-face::before {
    content: '✦';
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.8);
}

.card-front {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border: 3px solid #667eea;
    transform: rotateY(180deg);
    color: #333;
    padding: 10px;
}

.card-front-image {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}

.card-symbol {
    font-size: 3rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 140px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
}

.card-name {
    font-size: 1.1rem;
    font-weight: bold;
    text-align: center;
    color: #667eea;
}

.reversed-card {
    color: #ff9999;
}

/* ==================== 按钮组件 ==================== */
/* 返回首页按钮 */
.btn-back-home {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-back-home:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateX(-3px);
}

/* 占卜分类 */
.spread-category {
    margin-bottom: 3rem;
    padding: 25px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.spread-category:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
}

.spread-category:last-child {
    margin-bottom: 0;
}

.category-title {
    font-size: 1.4rem;
    color: #ffd89b;
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid rgba(255, 215, 155, 0.3);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-shadow: 0 2px 10px rgba(255, 215, 155, 0.2);
}

.category-desc {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: normal;
    margin-left: 0.5rem;
}

/* 占卜主题选择按钮 */
.spread-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.8rem;
    margin-top: 1.5rem;
}

/* 快速占卜网格 - 2列布局 */
.quick-spreads {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.spread-btn {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(15px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 35px 25px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.spread-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.spread-btn:hover::before {
    opacity: 1;
}

.spread-btn:hover {
    transform: translateY(-8px) scale(1.02);
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 215, 155, 0.6);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 0 0 30px rgba(255, 215, 155, 0.2);
}

.spread-btn:active {
    transform: translateY(-4px) scale(1.01);
}

.spread-icon {
    font-size: 3.5rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    transition: all 0.4s ease;
}

.spread-btn:hover .spread-icon {
    transform: scale(1.15) rotate(5deg);
    filter: drop-shadow(0 6px 12px rgba(255, 215, 155, 0.4));
}

.spread-name {
    font-size: 1.4rem;
    font-weight: bold;
    letter-spacing: 0.5px;
}

.spread-desc {
    font-size: 0.95rem;
    opacity: 0.75;
    line-height: 1.4;
}

/* 特殊按钮样式 */
.spread-btn-random {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 182, 193, 0.15));
    border: 2px solid rgba(255, 215, 0, 0.4);
}

.spread-btn-random:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.25), rgba(255, 182, 193, 0.25));
    border-color: rgba(255, 215, 0, 0.7);
    box-shadow: 0 20px 50px rgba(255, 215, 0, 0.3), 0 0 40px rgba(255, 215, 0, 0.2);
}

.spread-btn-celtic {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.15), rgba(75, 0, 130, 0.15));
    border: 2px solid rgba(138, 43, 226, 0.4);
}

.spread-btn-celtic:hover {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.25), rgba(75, 0, 130, 0.25));
    border-color: rgba(138, 43, 226, 0.7);
    box-shadow: 0 20px 50px rgba(138, 43, 226, 0.3), 0 0 40px rgba(138, 43, 226, 0.2);
}

.spread-btn-custom {
    background: linear-gradient(135deg, rgba(0, 191, 255, 0.15), rgba(30, 144, 255, 0.15));
    border: 2px solid rgba(0, 191, 255, 0.4);
}

.spread-btn-custom:hover {
    background: linear-gradient(135deg, rgba(0, 191, 255, 0.25), rgba(30, 144, 255, 0.25));
    border-color: rgba(0, 191, 255, 0.7);
    box-shadow: 0 20px 50px rgba(0, 191, 255, 0.3), 0 0 40px rgba(0, 191, 255, 0.2);
}

.spread-btn-random:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(255, 105, 180, 0.3));
    border-color: rgba(255, 215, 0, 0.8);
    box-shadow: 0 15px 40px rgba(255, 215, 0, 0.3);
}

.spread-btn-celtic {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.2), rgba(75, 0, 130, 0.2));
    border: 2px solid rgba(138, 43, 226, 0.5);
}

.spread-btn-celtic:hover {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.3), rgba(75, 0, 130, 0.3));
    border-color: rgba(138, 43, 226, 0.8);
    box-shadow: 0 15px 40px rgba(138, 43, 226, 0.3);
}

.btn-repeat {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    border: 2px solid white;
    padding: 15px 40px;
    font-size: 1.1rem;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.btn-repeat:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(17, 153, 142, 0.4);
}

.btn-restart {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: 2px solid white;
    padding: 15px 40px;
    font-size: 1.1rem;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.btn-restart:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* 结果页面的返回首页按钮 */
#backHomeBtn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: 2px solid white;
    padding: 15px 40px;
    font-size: 1.1rem;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    margin: 0;
}

#backHomeBtn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(245, 87, 108, 0.4);
}

.btn-share {
    padding: 12px 30px;
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    margin: 10px;
}

.btn-share:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* ==================== 洗牌动画 ==================== */
.shuffle-animation {
    margin: 40px 0 20px 0;
    min-height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 洗牌进度条 */
.shuffle-progress {
    margin: 30px auto;
    max-width: 500px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-size: 200% 100%;
    border-radius: 10px;
    width: 0%;
    transition: width 0.3s ease;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.progress-text {
    text-align: center;
    margin-top: 15px;
    font-size: 1.1rem;
    color: #ffd89b;
    font-weight: bold;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.shuffle-cards {
    position: relative;
    width: 200px;
    height: 300px;
}

.shuffle-card {
    position: absolute;
    width: 120px;
    height: 200px;
    background: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
    border-radius: 15px;
    border: 3px solid #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    animation: shuffle 2s ease-in-out infinite;
}

.shuffle-card::before {
    content: '✦';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.8);
}

@keyframes shuffle {
    0%, 100% {
        transform: translate(-50%, -50%) rotate(0deg);
        opacity: 1;
    }
    25% {
        transform: translate(-30%, -60%) rotate(-15deg);
        opacity: 0.7;
    }
    50% {
        transform: translate(-70%, -50%) rotate(15deg);
        opacity: 0.5;
    }
    75% {
        transform: translate(-50%, -40%) rotate(-10deg);
        opacity: 0.7;
    }
}

/* ==================== 切牌组件 ==================== */
.cut-deck {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 60px 0;
    flex-wrap: wrap;
}

.deck-part {
    width: 140px;
    height: 220px;
    background: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
    border-radius: 15px;
    border: 3px solid #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.deck-part::before {
    content: '✦';
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.6);
    position: absolute;
}

.deck-part:hover {
    transform: translateY(-15px) scale(1.05);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border-color: #ffd89b;
}

.deck-indicator {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.1rem;
    font-weight: bold;
    white-space: nowrap;
    color: #ffd89b;
}

/* ==================== 结果显示 ==================== */
/* ==================== 占卜结果容器 ==================== */
.result {
    margin-top: 50px;
    background: #ffffff;
    border-radius: 20px;
    padding: 40px;
    border: 2px solid #ddd;
    animation: fadeIn 0.5s ease;
    color: #333;
}

.result h3 {
    font-size: 2rem;
    margin-bottom: 30px;
    color: #667eea;
    text-align: center;
    font-weight: bold;
}

/* ==================== 单张牌结果卡片 ==================== */
.card-result {
    background: #f9f9f9;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    text-align: left;
    animation: slideInUp 0.5s ease forwards;
    opacity: 0;
    border: 1px solid #e0e0e0;
}

.card-result h4 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #764ba2;
    font-weight: bold;
}

.card-result p {
    line-height: 1.8;
    font-size: 1.1rem;
    color: #333;
}

.card-description {
    font-style: italic;
    font-size: 1rem;
    margin-bottom: 15px;
    color: #666;
    border-left: 4px solid #667eea;
    padding: 10px 15px;
    background: #f0f4ff;
    border-radius: 5px;
}

.card-meaning {
    margin-top: 15px;
}

.card-meaning p {
    color: #333;
}

.card-position {
    font-weight: bold;
    color: #667eea;
    margin-bottom: 12px;
    font-size: 1.2rem;
    display: inline-block;
    background: #e8eeff;
    padding: 5px 15px;
    border-radius: 20px;
    border: 1px solid #667eea;
}

/* ==================== 增强信息区块 ==================== */
.card-enhancement {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
}

.deep-meaning-section,
.action-advice-section {
    margin-bottom: 20px;
}

.deep-meaning-section h5,
.action-advice-section h5 {
    color: #764ba2;
    font-size: 1.15rem;
    margin-bottom: 12px;
    font-weight: bold;
}

.deep-meaning-section h5::before {
    content: '🔮 ';
}

.action-advice-section h5::before {
    content: '💡 ';
}

.deep-meaning-section p {
    color: #333;
    line-height: 1.8;
    font-size: 1.05rem;
    background: #f5f0ff;
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid #764ba2;
}

.action-advice-section ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.action-advice-section li {
    color: #333;
    line-height: 1.7;
    margin-bottom: 10px;
    padding: 12px 15px 12px 35px;
    background: #f0f8f0;
    border-radius: 8px;
    border-left: 4px solid #4caf50;
    position: relative;
}

.action-advice-section li::before {
    content: '▸';
    position: absolute;
    left: 15px;
    color: #4caf50;
    font-weight: bold;
    font-size: 1.2em;
}

/* ==================== 组合解读样式 ==================== */
.combination-reading {
    background: #fff9e6;
    border: 2px solid #ffd89b;
    border-radius: 15px;
    padding: 25px;
    margin-top: 30px;
    margin-bottom: 30px;
}

.combination-reading h4 {
    color: #764ba2;
    font-size: 1.6rem;
    margin-bottom: 20px;
    text-align: center;
    font-weight: bold;
}

.story-section {
    margin-bottom: 20px;
}

.story-opening,
.story-development,
.story-climax,
.story-resolution {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 15px;
    padding: 12px 15px;
    border-radius: 8px;
    color: #333;
}

.story-opening {
    background: #f9f9f9;
}

.story-development {
    border-left: 4px solid #667eea;
    background: #f0f4ff;
}

.story-climax {
    background: #fff3e0;
    border-left: 4px solid #ff9800;
    font-weight: 500;
}

.story-resolution {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
}

.deep-insight {
    background: #f5f0ff;
    border: 2px solid #764ba2;
    padding: 20px;
    border-radius: 10px;
    margin-top: 15px;
}

.deep-insight p {
    color: #333;
    line-height: 1.8;
    margin-bottom: 10px;
}

.deep-insight strong {
    color: #764ba2;
    font-weight: bold;
}

.action-steps {
    background: #f0f8f0;
    border: 2px solid #4caf50;
    padding: 20px;
    border-radius: 10px;
    margin-top: 15px;
}

.action-steps p {
    color: #2e7d32;
    font-weight: bold;
    margin-bottom: 12px;
    font-size: 1.1rem;
}

.action-steps ul {
    list-style: none;
    padding-left: 0;
}

.action-steps li {
    color: #333;
    line-height: 1.7;
    margin-bottom: 10px;
    padding: 10px 15px 10px 30px;
    background: #ffffff;
    border-radius: 6px;
    position: relative;
    border: 1px solid #e0e0e0;
}

.action-steps li::before {
    content: '●';
    position: absolute;
    left: 12px;
    top: 10px;
    color: #4caf50;
    font-size: 0.8em;
}

/* ==================== 切牌显示 ==================== */
.cut-card-display {
    margin-top: 40px;
    background: #ffffff;
    border-radius: 20px;
    padding: 30px;
    border: 2px solid #ddd;
    animation: fadeIn 0.5s ease;
}

.cut-card-display h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #667eea;
    text-align: center;
    font-weight: bold;
}

.cut-card-meaning {
    font-size: 1.05rem;
    margin-bottom: 20px;
    font-style: italic;
    color: #666;
    text-align: center;
}

.cut-card-display p {
    color: #333;
    line-height: 1.8;
    font-size: 1.1rem;
}

/* ==================== 总结区域 ==================== */
.summary-section {
    background: #f0f4ff;
    border: 2px solid #667eea;
    border-radius: 15px;
    padding: 25px;
    margin: 30px 0;
}

.summary-section h3 {
    font-size: 1.7rem;
    margin-bottom: 20px;
    color: #667eea;
    text-align: center;
    font-weight: bold;
}

.summary-section p {
    color: #333;
    line-height: 1.8;
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.summary-section ul {
    list-style: none;
    padding-left: 0;
}

.summary-section li {
    color: #333;
    line-height: 1.7;
    margin-bottom: 10px;
    padding: 10px 15px 10px 35px;
    background: #ffffff;
    border-radius: 6px;
    position: relative;
    border: 1px solid #e0e0e0;
}

.summary-section li::before {
    content: '✨';
    position: absolute;
    left: 10px;
    top: 10px;
}

/* ==================== 高级总结 ==================== */
.advanced-summary {
    background: #fff9e6;
    border: 2px solid #ffd89b;
    border-radius: 15px;
    padding: 25px;
    margin: 30px 0;
}

.advanced-summary h4 {
    font-size: 1.6rem;
    margin-bottom: 20px;
    color: #764ba2;
    text-align: center;
    font-weight: bold;
}

.advanced-summary .summary-content {
    color: #333;
    line-height: 1.8;
    font-size: 1.1rem;
}

.advanced-summary p {
    color: #333;
    margin-bottom: 15px;
}

.advanced-summary strong {
    color: #764ba2;
    font-weight: bold;
}

.result-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 20px;
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 768px) {
    .spread-category {
        padding: 20px;
        margin-bottom: 2rem;
    }
    
    .category-title {
        font-size: 1.2rem;
    }
    
    .spread-options {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }
    
    .quick-spreads {
        grid-template-columns: 1fr;
    }
    
    .spread-btn {
        padding: 28px 20px;
    }
    
    .spread-icon {
        font-size: 3rem;
    }
    
    .spread-name {
        font-size: 1.3rem;
    }
    
    .spread-desc {
        font-size: 0.9rem;
    }
    
    .category-title {
        font-size: 1.1rem;
    }
    
    .cut-deck {
        gap: 20px;
    }

    .deck-part {
        width: 100px;
        height: 160px;
    }

    .deck-part::before {
        font-size: 2.5rem;
    }

    .deck-indicator {
        font-size: 0.9rem;
        bottom: -35px;
    }

    .tarot-card {
        width: 90px;
        height: 150px;
    }

    .card-symbol {
        font-size: 2rem;
    }

    .card-name {
        font-size: 0.85rem;
    }

    .result,
    .cut-card-display {
        padding: 20px;
    }

    .card-result {
        padding: 20px;
    }

    .shuffle-cards {
        width: 150px;
        height: 250px;
    }

    .shuffle-card {
        width: 100px;
        height: 160px;
    }

    .shuffle-card::before {
        font-size: 3rem;
    }

    .result-actions {
        flex-direction: column;
    }
    
    .btn-share, .btn-restart {
        width: 100%;
    }
}
