/* 塔罗占卜专用样式 - 浅色古风风格（与其他功能统一） */

/* 顶部栏 */
.tarot-topbar {
    background: var(--paper) !important;
    border-bottom: 1px solid var(--line) !important;
}
.tarot-topbar h1 { color: var(--ink) !important; }
.tarot-topbar small { color: var(--muted) !important; }
.tarot-topbar .back-btn { color: var(--ink) !important; }

/* 卡片标题 */
.tarot-h2 {
    color: var(--red) !important;
    border-bottom: 2px solid var(--red) !important;
}

/* 牌阵选择网格 */
.spread-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 14px;
}
.spread-item {
    padding: 16px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(255, 252, 245, 0.7);
    cursor: pointer;
    transition: all 0.3s;
}
.spread-item:hover {
    border-color: var(--red);
    background: rgba(141, 40, 36, 0.05);
    transform: translateY(-2px);
}
.spread-item.active {
    border-color: var(--red);
    background: rgba(141, 40, 36, 0.08);
    box-shadow: 0 4px 16px rgba(141, 40, 36, 0.12);
}
.spread-item-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 6px;
}
.spread-item-desc {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.6;
}
.spread-item-count {
    display: inline-block;
    margin-top: 8px;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 11px;
    background: rgba(141, 40, 36, 0.08);
    color: var(--red);
    font-weight: 600;
}

/* 问题输入 */
.question-input-wrap textarea {
    width: 100%;
    padding: 14px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: rgba(255, 252, 245, 0.9);
    color: var(--ink);
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    font-family: inherit;
}
.question-input-wrap textarea:focus {
    outline: none;
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(141, 40, 36, 0.08);
}
.question-input-wrap textarea::placeholder {
    color: var(--muted);
}

/* 塔罗按钮 */
.tarot-btn {
    background: linear-gradient(135deg, var(--red), var(--red-dark)) !important;
    border: 1px solid var(--red) !important;
    color: #fff8eb !important;
}
.tarot-btn:hover {
    background: linear-gradient(135deg, #a03028, var(--red-dark)) !important;
}
.btn-secondary.tarot-btn {
    background: rgba(141, 40, 36, 0.08) !important;
    border: 1px solid rgba(141, 40, 36, 0.2) !important;
    color: var(--red) !important;
}

/* 提示文字 */
.tarot-hint {
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 20px;
}

/* 牌堆 */
.tarot-deck {
    position: relative;
    height: 260px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
}
.deck-card {
    position: absolute;
    width: 100px;
    height: 160px;
    border-radius: 10px;
    background: linear-gradient(135deg, #6b2c28, #4a1e1b);
    border: 2px solid #8d2824;
    box-shadow: 0 4px 16px rgba(74, 30, 27, 0.3);
    cursor: pointer;
    transition: all 0.3s;
    display: grid;
    place-items: center;
}
.deck-card::before {
    content: '✦';
    font-size: 32px;
    color: rgba(255, 248, 235, 0.4);
}
.deck-card:hover {
    transform: translateY(-10px) scale(1.05) !important;
    box-shadow: 0 8px 28px rgba(141, 40, 36, 0.35);
}
.deck-card.drawn {
    opacity: 0;
    transform: translateY(-50px) scale(0.8) !important;
    pointer-events: none;
}

/* 抽牌进度 */
.draw-progress {
    text-align: center;
    color: var(--red);
    font-size: 14px;
    margin-top: 10px;
    font-weight: 600;
}

/* 牌阵布局 */
.spread-layout {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    padding: 20px 0;
    min-height: 200px;
}
.tarot-card-wrapper {
    text-align: center;
    width: 120px;
}
.tarot-card-position {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 8px;
    font-weight: 600;
}
.tarot-card {
    width: 110px;
    height: 175px;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    position: relative;
    margin: 0 auto;
}
.tarot-card.flipped {
    transform: rotateY(180deg);
}
.tarot-card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
}
.tarot-card-back {
    background: linear-gradient(135deg, #6b2c28, #4a1e1b);
    border: 2px solid #8d2824;
}
.tarot-card-back::before {
    content: '✦';
    font-size: 36px;
    color: rgba(255, 248, 235, 0.4);
}
.tarot-card-front {
    background: linear-gradient(135deg, #fff8eb, #f5efe2);
    border: 2px solid var(--red);
    transform: rotateY(180deg);
    color: var(--ink);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.tarot-card-emoji {
    font-size: 36px;
    margin-bottom: 8px;
}
.tarot-card-name {
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 4px;
    color: var(--ink);
}
.tarot-card-orientation {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 8px;
    margin-top: 4px;
    font-weight: 600;
}
.tarot-card-orientation.upright {
    background: rgba(45, 106, 79, 0.12);
    color: var(--green);
}
.tarot-card-orientation.reversed {
    background: rgba(141, 40, 36, 0.1);
    color: var(--red);
}
.tarot-card.reversed-card .tarot-card-front {
    transform: rotateY(180deg) rotate(180deg);
}

/* 牌阵总览 */
.overview-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}
.overview-card {
    width: 100px;
    text-align: center;
    padding: 12px 10px;
    border-radius: 10px;
    background: rgba(255, 252, 245, 0.8);
    border: 1px solid var(--line);
}
.overview-position {
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 6px;
}
.overview-emoji {
    font-size: 28px;
    margin-bottom: 4px;
}
.overview-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 2px;
}
.overview-orientation {
    font-size: 10px;
    font-weight: 600;
}
.overview-orientation.upright { color: var(--green); }
.overview-orientation.reversed { color: var(--red); }

/* 逐张解读 */
.reading-item {
    padding: 16px;
    margin-bottom: 14px;
    border-radius: 12px;
    background: rgba(255, 252, 245, 0.7);
    border: 1px solid var(--line);
}
.reading-item:last-child { margin-bottom: 0; }
.reading-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
}
.reading-emoji {
    font-size: 28px;
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    background: rgba(141, 40, 36, 0.08);
    border-radius: 10px;
}
.reading-title {
    flex: 1;
}
.reading-position {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 2px;
}
.reading-name {
    font-size: 17px;
    font-weight: 700;
    color: var(--ink);
}
.reading-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}
.reading-keyword {
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 11px;
    background: rgba(141, 40, 36, 0.08);
    color: var(--red);
    font-weight: 600;
}
.reading-text {
    font-size: 13px;
    line-height: 1.85;
    color: var(--ink);
}

/* 综合解读 */
.comprehensive-text {
    font-size: 14px;
    line-height: 2;
    color: var(--ink);
    padding: 10px 0;
}
.comprehensive-text p {
    margin-bottom: 14px;
}
.comprehensive-text p:last-child {
    margin-bottom: 0;
}

/* 塔罗结论列表 - 复用默认样式，无需特殊覆盖 */
.tarot-advice-steps {
    margin: 9px 0 0;
    padding-left: 1.5em;
}
.tarot-advice-steps li {
    display: list-item;
    padding: 3px 0;
    border: 0;
    line-height: 1.75;
    list-style: decimal;
}

/* 免责声明 */
.tarot-disclaimer {
    color: var(--muted) !important;
}

/* 洗牌动画 */
@keyframes shuffle {
    0%, 100% { transform: translateX(0) rotate(0); }
    25% { transform: translateX(-20px) rotate(-5deg); }
    75% { transform: translateX(20px) rotate(5deg); }
}
.shuffling .deck-card {
    animation: shuffle 0.3s ease-in-out infinite;
}

/* 响应式 */
@media (max-width: 480px) {
    .spread-grid {
        grid-template-columns: 1fr;
    }
    .tarot-card-wrapper {
        width: 100px;
    }
    .tarot-card {
        width: 90px;
        height: 145px;
    }
    .deck-card {
        width: 85px;
        height: 135px;
    }
}
