/* ==================== 全局样式 - Mystic Tarot 风格 ==================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Futura', 'Trebuchet MS', 'Segoe UI', Arial, sans-serif;
    background: #020617;
    color: #ffffff;
    min-height: 100vh;
}

/* ==================== 首页星空背景 ==================== */
.starry-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: url('pages/星空图.png') center/cover no-repeat;
    z-index: 0;
    overflow: hidden;
}

.starry-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.35);
    z-index: 1;
    pointer-events: none;
}

/* ==================== 抽牌页面 & 历史页面 共用容器 ==================== */
.page-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #0f0714 0%, #1a0b2e 50%, #0f0714 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    position: relative;
    overflow-x: hidden;
}

/* 动态光晕背景 */
.page-container::before {
    content: "";
    position: absolute;
    top: -30%;
    left: -20%;
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.3), transparent 70%);
    animation: floatGlow 8s ease-in-out infinite;
    pointer-events: none;
}

.page-container::after {
    content: "";
    position: absolute;
    bottom: -30%;
    right: -20%;
    width: 70%;
    height: 70%;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.25), transparent 70%);
    animation: floatGlow 6s ease-in-out infinite reverse;
    pointer-events: none;
}

@keyframes floatGlow {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.6; }
    50% { transform: translate(30px, 30px) scale(1.05); opacity: 0.4; }
}

/* ==================== 卡片容器 ==================== */
.tarot-card {
    background: rgba(255,255,255,0.03);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 28px;
    padding: 30px;
    max-width: 550px;
    width: 100%;
    text-align: center;
    box-shadow: 0 25px 45px rgba(0,0,0,0.3);
    position: relative;
    z-index: 2;
}

.tarot-card-wide {
    max-width: 650px;
}

.hidden {
    display: none;
}

/* 返回首页链接 */
.back-link {
    text-align: left;
    margin-bottom: 20px;
}

.back-link a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.back-link a:hover {
    color: #ec4899;
}

/* 标题样式 */
.page-title {
    font-size: 2.2rem;
    letter-spacing: 0.2em;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #fff, #e0b0ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.subtitle {
    color: rgba(255,255,255,0.5);
    font-style: italic;
    margin-bottom: 30px;
    font-size: 0.9rem;
}

/* 牌背 / 牌面区域 */
.card-area {
    margin: 20px 0;
    display: flex;
    justify-content: center;
}

.card-back {
    width: 220px;
    height: 330px;
    background: linear-gradient(145deg, #1e1b3a, #0f0d2a);
    border: 1px solid rgba(236, 72, 153, 0.5);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 15px 25px rgba(0,0,0,0.4);
    font-size: 48px;
    background-image: radial-gradient(circle at 30% 40%, rgba(236,72,153,0.2) 2px, transparent 2px);
    background-size: 20px 20px;
}

.card-back:hover {
    transform: translateY(-5px);
    border-color: #ec4899;
    box-shadow: 0 20px 30px rgba(236,72,153,0.2);
}

.card-back:active {
    transform: translateY(0);
}

/* 牌面样式 */
.card-front {
    width: 220px;
    background: linear-gradient(145deg, #1a1638, #0f0d2a);
    border: 1px solid rgba(139, 92, 246, 0.5);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 15px 25px rgba(0,0,0,0.4);
}

.card-front-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: #2a2045;
}

.card-front-title {
    padding: 12px;
    text-align: center;
    color: #e0b0ff;
    font-weight: bold;
    font-size: 1rem;
    border-top: 1px solid rgba(139,92,246,0.3);
}

/* 按钮样式 */
.button-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 25px 0 20px;
    flex-wrap: wrap;
}

.btn {
    background: linear-gradient(45deg, #8b5cf6, #7c3aed);
    border: none;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: bold;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.btn-pink {
    background: linear-gradient(45deg, #ec4899, #be185d);
}

.btn-secondary {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.2);
}

.btn-draw-again {
    margin-top: 15px;
    background: linear-gradient(45deg, #8b5cf6, #7c3aed);
}

.btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
}

.btn:active {
    transform: translateY(0);
}

/* 结果区域 */
.result-area {
    background: rgba(0,0,0,0.4);
    border-radius: 20px;
    padding: 20px;
    margin-top: 20px;
    text-align: left;
    border-left: 3px solid #ec4899;
}

.result-area h3 {
    color: #ec4899;
    margin-bottom: 10px;
}

.result-area p {
    margin: 8px 0;
    line-height: 1.5;
    color: rgba(255,255,255,0.8);
}

.result-area .meaning {
    font-style: italic;
    color: #e0b0ff;
}

/* 历史记录页面样式 */
.history-list {
    max-height: 400px;
    overflow-y: auto;
    margin: 20px 0;
}

.history-item {
    background: rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 15px;
    margin-bottom: 12px;
    border-left: 3px solid #8b5cf6;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.history-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.15);
}

.history-item .history-type-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: bold;
    margin-bottom: 8px;
}

.history-type-badge.single {
    background: rgba(139, 92, 246, 0.2);
    color: #c084fc;
}

.history-type-badge.spread {
    background: rgba(236, 72, 153, 0.2);
    color: #f472b6;
}

.history-type-badge.multi {
    background: rgba(52, 211, 153, 0.2);
    color: #34d399;
}

.history-item.history-spread {
    border-left-color: #ec4899;
}

.history-item.history-multi {
    border-left-color: #34d399;
}

.history-item .date {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.5);
    margin-bottom: 5px;
}

.history-item .card-name {
    font-weight: bold;
    color: #e0b0ff;
    margin-bottom: 5px;
}

.history-item .meaning {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.7);
    margin-bottom: 4px;
}

.history-item .question {
    font-size: 0.8rem;
    color: rgba(251, 191, 36, 0.8);
    margin-bottom: 4px;
    font-style: italic;
}

.history-item .interp-preview {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.save-status {
    margin-top: 12px;
    text-align: center;
}

.save-status.success {
    color: #34d399;
    font-size: 0.85rem;
}

.empty-history {
    text-align: center;
    color: rgba(255,255,255,0.5);
    padding: 40px;
}

/* 滚动条美化 */
.history-list::-webkit-scrollbar {
    width: 5px;
}

.history-list::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
}

.history-list::-webkit-scrollbar-thumb {
    background: #ec4899;
    border-radius: 10px;
}

/* 手机适配 */
@media (max-width: 550px) {
    .tarot-card { padding: 20px; }
    .card-back, .card-front { width: 170px; height: 255px; font-size: 36px; }
    .card-front-img { height: 170px; }
    .page-title { font-size: 1.6rem; letter-spacing: 0.1em; }
    .btn { padding: 8px 20px; font-size: 0.9rem; }
}
/* 抽中卡牌展示区 */
.drawn-card-display {
    min-height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}

.drawn-card {
    width: 180px;
    height: 270px;
    background: linear-gradient(145deg, #1a1638, #0f0d2a);
    border: 2px solid #ec4899;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5), 0 0 30px rgba(236,72,153,0.5);
    animation: cardReveal 0.5s ease;
}

@keyframes cardReveal {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.drawn-card .card-img {
    width: 100%;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 56px;
    background: linear-gradient(145deg, #2a2045, #1a1438);
    border-radius: 18px 18px 0 0;
    overflow: hidden;
}

.card-face-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: opacity 0.3s ease;
}

.drawn-card.reversed .card-face-img {
    transform: rotate(180deg);
}

.drawn-card .card-name {
    padding: 12px;
    text-align: center;
    color: #ec4899;
    font-weight: bold;
    font-size: 1.1rem;
}

.draw-mode-select {
    padding: 10px 16px;
    border-radius: 12px;
    border: 1px solid rgba(236,72,153,0.4);
    background: rgba(0,0,0,0.5);
    color: #fff;
    font-size: 0.9rem;
    cursor: pointer;
    outline: none;
    transition: border-color 0.3s ease;
}

.draw-mode-select:focus {
    border-color: #ec4899;
}

.draw-mode-select option {
    background: #1a1638;
    color: #fff;
}

/* 结果内容区域（解读在上，卡牌在下） */
.result-content {
    margin-top: 0;
    padding: 20px;
    background: rgba(0,0,0,0.6);
    border-radius: 20px;
    border-left: 3px solid #ec4899;
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-content h3 {
    color: #ec4899;
    margin-bottom: 10px;
}

.result-content .meaning {
    font-style: italic;
    margin: 12px 0;
    line-height: 1.6;
}

.result-content .advice {
    color: #e0b0ff;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* 停止时脉冲发光 */
@keyframes pulseGlow {
    0% { box-shadow: 0 0 0 0 rgba(236,72,153,0.7); }
    70% { box-shadow: 0 0 0 15px rgba(236,72,153,0); }
    100% { box-shadow: 0 0 0 0 rgba(236,72,153,0); }
}

/* 手机适配 */
@media (max-width: 600px) {
    .drawn-card { width: 150px; height: 225px; }
    .drawn-card .card-img { height: 150px; font-size: 42px; }
    .draw-mode-select { width: 100%; text-align: center; }
}

/* 平板适配 */
@media (min-width: 601px) and (max-width: 1024px) {
    .drawn-card { width: 200px; height: 300px; }
    .drawn-card .card-img { height: 200px; }
}

/* 大屏适配 */
@media (min-width: 1025px) {
    .drawn-card { width: 220px; height: 330px; }
    .drawn-card .card-img { height: 220px; }
}

/* ==================== draw.html 自主抽牌样式 ==================== */

.deck-container {
    position: relative;
    width: 100%;
    max-width: 520px;
    height: 360px;
    margin: 10px auto 20px;
    overflow: visible;
    perspective: 1200px;
}

.deck {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.deck-card {
    position: absolute;
    width: 100px;
    height: 150px;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.4s ease,
                opacity 0.5s ease;
    transform-style: preserve-3d;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    left: 50%;
    top: 50%;
    margin-left: -50px;
    margin-top: -75px;
}

.deck-card .card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.4, 0.0, 0.2, 1);
    border-radius: 12px;
}

.deck-card .card-back-face,
.deck-card .card-front-face {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 12px;
    overflow: hidden;
}

.deck-card .card-back-face {
    background: linear-gradient(145deg, #1e1b3a, #0f0d2a);
    border: 1px solid rgba(236, 72, 153, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-image: radial-gradient(circle at 30% 40%, rgba(236,72,153,0.15) 2px, transparent 2px);
    background-size: 16px 16px;
}

.deck-card .card-back-face .back-icon {
    font-size: 32px;
    opacity: 0.8;
    margin-bottom: 6px;
}

.deck-card .card-back-face .back-label {
    font-size: 8px;
    color: rgba(236,72,153,0.6);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.deck-card .card-front-face {
    background: linear-gradient(145deg, #1a1638, #0f0d2a);
    border: 1px solid rgba(139, 92, 246, 0.5);
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.deck-card .card-front-face img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.deck-card .card-front-face .front-placeholder {
    font-size: 40px;
    opacity: 0.5;
}

/* 悬停效果 - 牌面抬起 */
.deck-card:not(.selected):not(.flipped):hover {
    transform: translateY(-18px) scale(1.08);
    box-shadow: 0 16px 32px rgba(236,72,153,0.35);
    border-color: #ec4899;
    z-index: 100;
}

.deck-card:not(.selected):not(.flipped):hover .card-back-face {
    border-color: #ec4899;
}

/* 选中后翻转 */
.deck-card.flipped .card-inner {
    transform: rotateY(180deg);
}

.deck-card.flipped {
    z-index: 200;
    box-shadow: 0 20px 40px rgba(139,92,246,0.4);
}

/* 选中后其他牌淡出 */
.deck-card.fade-out {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.8);
}

/* 选中牌放大居中 */
.deck-card.selected {
    z-index: 300;
    width: 160px;
    height: 240px;
    margin-left: -80px;
    margin-top: -120px;
    box-shadow: 0 30px 60px rgba(139,92,246,0.5);
}

/* 牌堆控制按钮 */
.deck-controls {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
    margin: 8px 0 16px;
    flex-wrap: wrap;
}

/* 牌堆加载/洗牌动画 */
@keyframes dealCard {
    0% { transform: translateY(-60px) scale(0.5) rotate(-10deg); opacity: 0; }
    60% { transform: translateY(5px) scale(1.02) rotate(1deg); opacity: 1; }
    100% { transform: translateY(0) scale(1) rotate(0deg); opacity: 1; }
}

.deck-card.dealing {
    animation: dealCard 0.4s ease-out forwards;
}

/* 选中牌飞入展示区 */
@keyframes flyToCenter {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.deck-card.selected {
    animation: flyToCenter 0.6s ease;
}

/* 选中后发光脉冲 */
@keyframes selectedGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(236,72,153,0.4); }
    50% { box-shadow: 0 0 40px rgba(236,72,153,0.8); }
}

.deck-card.selected .card-front-face {
    animation: selectedGlow 2s ease-in-out infinite;
}

/* 响应式 */
@media (max-width: 600px) {
    .deck-container {
        height: 280px;
        max-width: 380px;
    }
    .deck-card {
        width: 72px;
        height: 108px;
        margin-left: -36px;
        margin-top: -54px;
    }
    .deck-card .card-back-face .back-icon {
        font-size: 24px;
    }
    .deck-card .card-back-face .back-label {
        font-size: 6px;
    }
    .deck-card.selected {
        width: 130px;
        height: 195px;
        margin-left: -65px;
        margin-top: -97px;
    }
    .deck-controls {
        flex-direction: column;
        gap: 8px;
    }
    .deck-controls .draw-mode-select {
        width: 100%;
        text-align: center;
    }
}

@media (min-width: 601px) and (max-width: 1024px) {
     .deck-card {
         width: 85px;
         height: 128px;
         margin-left: -42px;
         margin-top: -64px;
     }
     .deck-card.selected {
         width: 150px;
         height: 225px;
         margin-left: -75px;
         margin-top: -112px;
     }
 }

/* ==================== draw.html 多抽模式样式 ==================== */

.draw-mode-tabs {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 16px;
}

.draw-mode-tab {
    padding: 10px 24px;
    border-radius: 50px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.draw-mode-tab:hover {
    border-color: rgba(236,72,153,0.4);
    color: rgba(255,255,255,0.8);
}

.draw-mode-tab.active {
    background: linear-gradient(45deg, rgba(236,72,153,0.2), rgba(139,92,246,0.2));
    border-color: #ec4899;
    color: #fff;
    box-shadow: 0 0 20px rgba(236,72,153,0.15);
}

.multi-draw-config {
    text-align: center;
    margin-bottom: 12px;
    animation: fadeInUp 0.3s ease;
}

.multi-draw-label {
    display: block;
    color: rgba(255,255,255,0.6);
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.multi-draw-options {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.multi-draw-opt {
    padding: 8px 20px;
    border-radius: 50px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    font-family: inherit;
    min-width: 56px;
}

.multi-draw-opt:hover {
    border-color: rgba(139,92,246,0.4);
    color: rgba(255,255,255,0.8);
}

.multi-draw-opt.active {
    background: linear-gradient(45deg, rgba(139,92,246,0.25), rgba(236,72,153,0.2));
    border-color: #8b5cf6;
    color: #e0b0ff;
    box-shadow: 0 0 15px rgba(139,92,246,0.2);
}

/* 进度条 */
.progress-container {
    margin: 12px auto 16px;
    max-width: 400px;
    animation: fadeInUp 0.4s ease;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.progress-label {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
}

.progress-count {
    font-size: 0.85rem;
    color: #e0b0ff;
    font-weight: bold;
}

.progress-bar-track {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.08);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #8b5cf6, #ec4899);
    border-radius: 3px;
    transition: width 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    width: 0%;
}

.progress-cards {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 10px;
    flex-wrap: wrap;
}

.progress-card-dot {
    width: 36px;
    height: 54px;
    border-radius: 6px;
    background: linear-gradient(145deg, #1e1b3a, #0f0d2a);
    border: 1px solid rgba(236,72,153,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
}

.progress-card-dot.filled {
    border-color: #ec4899;
    background: linear-gradient(145deg, #2a2045, #1a1638);
    box-shadow: 0 0 12px rgba(236,72,153,0.25);
    animation: dotPop 0.4s ease;
}

.progress-card-dot.filled::after {
    content: '✓';
    position: absolute;
    top: -6px;
    right: -6px;
    font-size: 10px;
    color: #22c55e;
    background: rgba(0,0,0,0.8);
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-card-dot.current {
    border-color: #8b5cf6;
    box-shadow: 0 0 16px rgba(139,92,246,0.4);
    animation: dotPulse 1s ease-in-out infinite;
}

@keyframes dotPop {
    0% { transform: scale(0.5); opacity: 0; }
    60% { transform: scale(1.15); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes dotPulse {
    0%, 100% { box-shadow: 0 0 8px rgba(139,92,246,0.3); }
    50% { box-shadow: 0 0 20px rgba(139,92,246,0.6); }
}

/* 统一揭示区域 */
.multi-reveal-area {
    text-align: center;
    margin: 16px 0;
    animation: fadeInUp 0.5s ease;
}

.btn-reveal-all {
    padding: 16px 40px;
    font-size: 1.1rem;
    letter-spacing: 2px;
    animation: revealBtnPulse 2s ease-in-out infinite;
}

@keyframes revealBtnPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(236,72,153,0.3); }
    50% { box-shadow: 0 0 40px rgba(236,72,153,0.6); }
}

.reveal-hint {
    color: rgba(255,255,255,0.4);
    font-size: 0.8rem;
    margin-top: 8px;
    font-style: italic;
}

/* 多抽结果网格 */
.multi-result-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin: 20px 0;
    perspective: 1200px;
}

.multi-result-card {
    width: 110px;
    cursor: pointer;
    transition: transform 0.3s ease;
    animation: cardReveal 0.6s ease backwards;
}

.multi-result-card:hover {
    transform: translateY(-6px);
}

.multi-result-card .result-card-inner {
    width: 100%;
    aspect-ratio: 2 / 3;
    background: linear-gradient(145deg, #1a1638, #0f0d2a);
    border: 1px solid rgba(139,92,246,0.4);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.multi-result-card:hover .result-card-inner {
    border-color: #ec4899;
    box-shadow: 0 12px 28px rgba(236,72,153,0.2);
}

.multi-result-card.reversed .result-card-inner .card-face-img {
    transform: rotate(180deg);
}

.multi-result-card .result-card-img {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(145deg, #2a2045, #1a1438);
}

.multi-result-card .result-card-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.multi-result-card .result-card-footer {
    padding: 6px 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(139,92,246,0.15);
    background: rgba(0,0,0,0.3);
}

.multi-result-card .result-card-footer .rc-name {
    font-size: 0.65rem;
    color: #e0b0ff;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70px;
}

.multi-result-card .result-card-footer .rc-orient {
    font-size: 0.6rem;
    padding: 2px 6px;
    border-radius: 6px;
    font-weight: bold;
}

.multi-result-card .result-card-footer .rc-orient.up {
    background: rgba(34,197,94,0.15);
    color: #22c55e;
}

.multi-result-card .result-card-footer .rc-orient.rev {
    background: rgba(239,68,68,0.15);
    color: #ef4444;
}

/* 多抽结果解读区 */
.multi-result-interp {
    margin-top: 20px;
    padding: 20px;
    background: rgba(0,0,0,0.4);
    border-radius: 20px;
    border-left: 3px solid #8b5cf6;
    animation: fadeInUp 0.6s ease;
}

.multi-result-interp h3 {
    color: #8b5cf6;
    margin-bottom: 12px;
    font-size: 1.1rem;
}

.multi-result-interp .interp-stats {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.multi-result-interp .interp-stat {
    background: rgba(255,255,255,0.04);
    border-radius: 12px;
    padding: 10px 16px;
    text-align: center;
    flex: 1;
    min-width: 80px;
}

.multi-result-interp .interp-stat .stat-value {
    font-size: 1.4rem;
    font-weight: bold;
    color: #e0b0ff;
    display: block;
}

.multi-result-interp .interp-stat .stat-label {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.4);
    margin-top: 2px;
    display: block;
}

.multi-result-interp .interp-overall {
    color: rgba(255,255,255,0.7);
    line-height: 1.7;
    font-size: 0.9rem;
    padding: 12px;
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
}

.multi-result-interp .interp-advice {
    color: #e0b0ff;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.08);
    font-style: italic;
}

/* 揭示动画 - 逐张翻转 */
@keyframes revealFlip {
    0% { transform: rotateY(180deg) scale(0.8); opacity: 0; }
    60% { transform: rotateY(0deg) scale(1.05); }
    100% { transform: rotateY(0deg) scale(1); opacity: 1; }
}

.multi-result-card.revealing {
    animation: revealFlip 0.7s ease backwards;
}

/* 揭示时的光效 */
@keyframes revealFlash {
    0% { box-shadow: 0 0 0 rgba(236,72,153,0); }
    50% { box-shadow: 0 0 50px rgba(236,72,153,0.6), 0 0 100px rgba(139,92,246,0.3); }
    100% { box-shadow: 0 8px 20px rgba(0,0,0,0.3); }
}

.multi-result-card.revealing .result-card-inner {
    animation: revealFlash 0.7s ease;
}

/* 多抽模式响应式 */
@media (max-width: 600px) {
    .multi-result-card {
        width: 80px;
    }
    .multi-result-card .result-card-footer .rc-name {
        font-size: 0.55rem;
        max-width: 50px;
    }
    .multi-result-card .result-card-footer .rc-orient {
        font-size: 0.5rem;
        padding: 1px 4px;
    }
    .multi-result-grid {
        gap: 8px;
    }
    .draw-mode-tab {
        padding: 8px 16px;
        font-size: 0.8rem;
    }
    .multi-draw-opt {
        padding: 6px 14px;
        font-size: 0.8rem;
        min-width: 48px;
    }
    .btn-reveal-all {
        padding: 12px 24px;
        font-size: 0.95rem;
    }
    .progress-card-dot {
        width: 28px;
        height: 42px;
        font-size: 11px;
    }
}

@media (min-width: 601px) and (max-width: 1024px) {
    .multi-result-card {
        width: 95px;
    }
}

/* ==================== spread.html 交互抽牌集成样式 ==================== */

.spread-draw-section {
    padding: 10px 0;
    animation: fadeInUp 0.4s ease;
}

.spread-draw-header {
    text-align: center;
    margin-bottom: 16px;
}

.spread-draw-title {
    color: #e0b0ff;
    font-size: 1.15rem;
    margin-bottom: 6px;
}

.spread-draw-subtitle {
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.spread-draw-info {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 0.82rem;
}

.spread-draw-name {
    color: #8b5cf6;
    font-weight: bold;
    background: rgba(139,92,246,0.12);
    padding: 4px 14px;
    border-radius: 20px;
}

.spread-draw-count {
    color: rgba(255,255,255,0.6);
    background: rgba(255,255,255,0.06);
    padding: 4px 14px;
    border-radius: 20px;
}

.spread-deck-remain {
    text-align: center;
    margin: 6px auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.78rem;
}

.remain-label {
    color: rgba(255,255,255,0.4);
}

.remain-count {
    color: #8b5cf6;
    font-weight: bold;
    font-size: 0.95rem;
    background: rgba(139,92,246,0.1);
    padding: 2px 12px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.drawing-error {
    padding: 16px 20px;
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.3);
    border-radius: 14px;
    color: #ef4444;
    font-size: 0.9rem;
    text-align: center;
    margin: 12px 0;
    animation: fadeInUp 0.3s ease;
}

/* 在 spread.html 中覆盖 deck-container 最大宽度，适配牌阵宽版面 */
.tarot-card-spread .deck-container {
    max-width: 560px;
}

/* 在 spread.html 中确保进度条区域宽度合适 */
.tarot-card-spread .progress-container {
    max-width: 480px;
}

/* 在 spread.html 中多抽结果网格适配 */
.tarot-card-spread .multi-result-grid {
    gap: 10px;
}

.tarot-card-spread .multi-result-card {
    width: 100px;
}

@media (max-width: 600px) {
    .tarot-card-spread .multi-result-card {
        width: 72px;
    }
    .tarot-card-spread .multi-result-card .result-card-footer .rc-name {
        font-size: 0.5rem;
        max-width: 42px;
    }
    .spread-draw-title {
        font-size: 1rem;
    }
    .spread-draw-info {
        gap: 10px;
        font-size: 0.75rem;
    }
}

/* ==================== index.html 首页样式 ==================== */

.home-container {
    min-height: 100vh;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 20px 40px;
    position: relative;
    z-index: 2;
    overflow-x: hidden;
}

.home-container::before {
    content: "";
    position: fixed;
    top: -30%;
    left: -20%;
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.2), transparent 70%);
    animation: floatGlow 8s ease-in-out infinite;
    pointer-events: none;
}

.home-container::after {
    content: "";
    position: fixed;
    bottom: -30%;
    right: -20%;
    width: 70%;
    height: 70%;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.18), transparent 70%);
    animation: floatGlow 6s ease-in-out infinite reverse;
    pointer-events: none;
}

/* ===== 顶部导航 ===== */
.home-nav {
    width: 100%;
    max-width: 1200px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    margin-top: 8px;
    z-index: 10;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-logo {
    font-size: 1.6rem;
    filter: drop-shadow(0 0 8px rgba(139,92,246,0.5));
}

.nav-title {
    font-size: 1.1rem;
    font-weight: bold;
    letter-spacing: 0.12em;
    background: linear-gradient(135deg, #e0b0ff, #8b5cf6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-link {
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s ease;
    letter-spacing: 0.06em;
    padding: 6px 0;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: #8b5cf6;
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: rgba(255,255,255,0.85);
}

.nav-link:hover::after {
    width: 100%;
}

/* ===== 英雄区 ===== */
.hero-section {
    text-align: center;
    margin: 30px 0 50px;
    z-index: 2;
}

.hero-badge {
    display: inline-block;
    padding: 6px 20px;
    border-radius: 50px;
    background: rgba(139,92,246,0.12);
    border: 1px solid rgba(139,92,246,0.2);
    color: rgba(224,176,255,0.7);
    font-size: 0.78rem;
    letter-spacing: 0.15em;
    margin-bottom: 24px;
    backdrop-filter: blur(4px);
}

.hero-title {
    font-size: 4rem;
    letter-spacing: 0.4em;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #ffffff 0%, #e0b0ff 40%, #c084fc 70%, #8b5cf6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 40px rgba(139,92,246,0.3));
    font-weight: 800;
    line-height: 1.3;
}

.hero-subtitle {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.45);
    letter-spacing: 0.15em;
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.6;
    font-weight: 300;
}

.hero-decorations {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.hero-star {
    font-size: 1rem;
    color: rgba(139,92,246,0.3);
    animation: starTwinkle 2s ease-in-out infinite;
}

.hero-star:nth-child(2) {
    animation-delay: 0.7s;
    color: rgba(236,72,153,0.3);
}

.hero-star:nth-child(3) {
    animation-delay: 1.4s;
}

@keyframes starTwinkle {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.3); }
}

.cards-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 28px;
    margin-bottom: 60px;
    z-index: 2;
    width: 100%;
    max-width: 1100px;
}

.feature-card {
    position: relative;
    background: rgba(255,255,255,0.025);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 28px;
    padding: 36px 40px 32px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    min-width: 280px;
    flex: 1;
    max-width: 340px;
    overflow: hidden;
    animation: cardEntrance 0.6s ease backwards;
}

.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.25s; }
.feature-card:nth-child(3) { animation-delay: 0.4s; }

@keyframes cardEntrance {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.feature-card:hover,
.feature-card:focus-visible {
    transform: translateY(-8px);
    border-color: rgba(236, 72, 153, 0.35);
    background: rgba(255,255,255,0.045);
    outline: none;
}

.card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(139,92,246,0.06), transparent 60%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.feature-card:hover .card-glow {
    opacity: 1;
}

.card-icon-wrap {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.03);
    transition: all 0.4s ease;
}

.feature-card:hover .card-icon-wrap {
    border-color: rgba(139,92,246,0.2);
    background: rgba(139,92,246,0.06);
    transform: scale(1.05);
}

.card-icon {
    font-size: 2rem;
    transition: transform 0.4s ease;
}

.feature-card:hover .card-icon {
    transform: scale(1.15);
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.card-title-amber {
    background: linear-gradient(135deg, #f59e0b, #ec4899);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.card-title-pink {
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.card-title-purple {
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.card-desc {
    color: rgba(255,255,255,0.4);
    font-size: 0.88rem;
    line-height: 1.7;
    margin-bottom: 20px;
    min-height: 3.4em;
}

.card-footer {
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.04);
}

.card-btn {
    display: inline-block;
    padding: 10px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    letter-spacing: 0.04em;
}

.card-btn-amber {
    background: linear-gradient(135deg, rgba(245,158,11,0.15), rgba(236,72,153,0.15));
    color: #f59e0b;
    border: 1px solid rgba(245,158,11,0.15);
}

.feature-card:hover .card-btn-amber {
    background: linear-gradient(135deg, #f59e0b, #ec4899);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 20px rgba(245,158,11,0.3);
}

.card-btn-pink {
    background: linear-gradient(135deg, rgba(236,72,153,0.15), rgba(139,92,246,0.15));
    color: #ec4899;
    border: 1px solid rgba(236,72,153,0.15);
}

.feature-card:hover .card-btn-pink {
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 20px rgba(236,72,153,0.3);
}

.card-btn-purple {
    background: linear-gradient(135deg, rgba(139,92,246,0.15), rgba(99,102,241,0.15));
    color: #8b5cf6;
    border: 1px solid rgba(139,92,246,0.15);
}

.feature-card:hover .card-btn-purple {
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 20px rgba(139,92,246,0.3);
}

@media (max-width: 1024px) {
    .cards-grid {
        gap: 24px;
    }
    .feature-card {
        min-width: 260px;
        max-width: 320px;
        padding: 30px 32px 28px;
    }
}

@media (max-width: 768px) {
    .home-nav {
        padding: 16px 16px;
    }
    .nav-title {
        font-size: 0.95rem;
    }
    .nav-links {
        gap: 14px;
    }
    .nav-link {
        font-size: 0.78rem;
    }
    .hero-title {
        font-size: 2.5rem;
        letter-spacing: 0.25em;
    }
    .hero-subtitle {
        font-size: 0.9rem;
        letter-spacing: 0.08em;
    }
    .hero-section {
        margin: 10px 0 36px;
    }
    .cards-grid {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    .feature-card {
        min-width: 0;
        max-width: 400px;
        width: 100%;
        padding: 28px 28px 24px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
        letter-spacing: 0.2em;
    }
    .hero-subtitle {
        font-size: 0.82rem;
    }
    .card-title {
        font-size: 1.25rem;
    }
    .card-desc {
        font-size: 0.8rem;
    }
    .card-icon-wrap {
        width: 60px;
        height: 60px;
    }
    .card-icon {
        font-size: 1.6rem;
    }
    .card-btn {
        padding: 8px 22px;
        font-size: 0.8rem;
    }
}

/* ===== 页脚 ===== */
.home-footer {
    text-align: center;
    padding: 20px;
    z-index: 2;
    width: 100%;
}

.home-footer p {
    color: rgba(255,255,255,0.2);
    font-size: 0.75rem;
    letter-spacing: 0.12em;
}

/* ==================== spread.html 牌阵占卜样式 ==================== */

.tarot-card-spread {
    max-width: 900px;
}

.spread-question-section {
    margin-bottom: 24px;
}

.spread-label {
    display: block;
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
    margin-bottom: 8px;
    text-align: left;
}

.spread-input {
    width: 100%;
    padding: 14px 18px;
    border-radius: 14px;
    border: 1px solid rgba(236,72,153,0.3);
    background: rgba(0,0,0,0.4);
    color: #fff;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.spread-input:focus {
    border-color: #ec4899;
}

.spread-input::placeholder {
    color: rgba(255,255,255,0.3);
}

.spread-section-title {
    color: rgba(255,255,255,0.6);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 16px;
    text-align: left;
}

.spread-selector {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.spread-option {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: left;
}

.spread-option:hover,
.spread-option:focus-visible {
    border-color: rgba(236,72,153,0.5);
    background: rgba(236,72,153,0.06);
    transform: translateY(-2px);
    outline: none;
}

.spread-option.selected {
    border-color: #ec4899;
    background: rgba(236,72,153,0.1);
    box-shadow: 0 0 20px rgba(236,72,153,0.15);
}

.spread-option-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.spread-option-name {
    font-weight: bold;
    font-size: 1.05rem;
    color: #e0b0ff;
}

.spread-option-badge {
    font-size: 0.7rem;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: bold;
}

.badge-beginner {
    background: rgba(34,197,94,0.2);
    color: #22c55e;
}

.badge-intermediate {
    background: rgba(251,191,36,0.2);
    color: #fbbf24;
}

.badge-advanced {
    background: rgba(239,68,68,0.2);
    color: #ef4444;
}

.spread-option-meta {
    display: flex;
    gap: 12px;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.45);
    margin-bottom: 8px;
}

.spread-option-cat {
    color: rgba(139,92,246,0.7);
}

.spread-option-desc {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.55);
    line-height: 1.5;
}

.spread-info {
    background: rgba(236,72,153,0.06);
    border: 1px solid rgba(236,72,153,0.2);
    border-radius: 16px;
    padding: 18px;
    margin-bottom: 20px;
    text-align: left;
}

.spread-info h3 {
    color: #ec4899;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.spread-info p {
    color: rgba(255,255,255,0.7);
    font-size: 0.88rem;
    line-height: 1.6;
    margin-bottom: 6px;
}

.spread-suitable {
    color: rgba(255,255,255,0.5) !important;
    font-size: 0.8rem !important;
}

.spread-flow {
    color: rgba(139,92,246,0.7) !important;
    font-size: 0.78rem !important;
    margin-top: 8px !important;
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.spread-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.spread-status {
    padding: 20px;
    margin-bottom: 20px;
}

.drawing-animation {
    font-size: 1.1rem;
    color: #e0b0ff;
    animation: pulseGlow 1.5s ease-in-out infinite;
}

.drawing-error {
    font-size: 1rem;
    color: #ef4444;
    padding: 16px;
    background: rgba(239,68,68,0.1);
    border-radius: 12px;
    border: 1px solid rgba(239,68,68,0.3);
}

.spread-layout-container {
    margin: 20px 0;
    padding: 20px;
    background: rgba(0,0,0,0.3);
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.06);
    overflow-x: auto;
}

.spread-layout {
    min-height: 300px;
}

.spread-card-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.spread-card {
    width: 100px;
    height: 150px;
    background: linear-gradient(145deg, #1a1638, #0f0d2a);
    border: 1px solid rgba(139,92,246,0.4);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
    overflow: hidden;
}

.spread-card:hover {
    transform: translateY(-4px);
    border-color: #ec4899;
    box-shadow: 0 12px 24px rgba(236,72,153,0.2);
}

.spread-card.reversed .card-face-img {
    transform: rotate(180deg);
}

.spread-card-sm {
    width: 80px;
    height: 120px;
}

.spread-card-xs {
    width: 64px;
    height: 96px;
}

.spread-card-img {
    width: 100%;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #2a2045, #1a1438);
    overflow: hidden;
    font-size: 28px;
}

.spread-card-sm .spread-card-img {
    font-size: 22px;
}

.spread-card-xs .spread-card-img {
    font-size: 18px;
}

.spread-card-label {
    padding: 6px 4px;
    font-size: 0.7rem;
    color: #e0b0ff;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    border-top: 1px solid rgba(139,92,246,0.2);
}

.spread-card-label-sm {
    padding: 4px 2px;
    font-size: 0.6rem;
    color: #e0b0ff;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    border-top: 1px solid rgba(139,92,246,0.2);
}

.spread-card-label-xs {
    padding: 2px 1px;
    font-size: 0.5rem;
    color: #e0b0ff;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    border-top: 1px solid rgba(139,92,246,0.2);
}

.spread-position-tag {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.5);
    text-align: center;
    padding: 2px 8px;
    background: rgba(255,255,255,0.04);
    border-radius: 10px;
}

.zodiac-tag {
    font-size: 0.6rem;
}

.hex-center .spread-card {
    border-color: #ec4899;
    box-shadow: 0 0 20px rgba(236,72,153,0.3);
}

.hex-center .spread-position-tag {
    color: #ec4899;
}

/* ==================== 解读面板样式 ==================== */

.interpretation-container {
    margin-top: 20px;
    background: rgba(0,0,0,0.3);
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.06);
    overflow: hidden;
}

.interp-tabs {
    display: flex;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.interp-tab {
    flex: 1;
    padding: 14px 10px;
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: bold;
}

.interp-tab:hover {
    color: rgba(255,255,255,0.8);
    background: rgba(255,255,255,0.03);
}

.interp-tab.active {
    color: #ec4899;
    border-bottom: 2px solid #ec4899;
    background: rgba(236,72,153,0.05);
}

.interp-panels {
    padding: 20px;
}

.interp-panel {
    display: none;
}

.interp-panel.active {
    display: block;
    animation: fadeInUp 0.3s ease;
}

.interp-card-item {
    background: rgba(255,255,255,0.03);
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 10px;
    text-align: left;
}

.interp-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.interp-pos {
    font-size: 0.75rem;
    padding: 3px 10px;
    background: rgba(139,92,246,0.2);
    color: #8b5cf6;
    border-radius: 10px;
    font-weight: bold;
}

.interp-card-name {
    font-weight: bold;
    color: #e0b0ff;
    font-size: 0.95rem;
}

.interp-orientation {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 8px;
    font-weight: bold;
}

.interp-orientation.upright {
    background: rgba(34,197,94,0.15);
    color: #22c55e;
}

.interp-orientation.reversed {
    background: rgba(239,68,68,0.15);
    color: #ef4444;
}

.interp-meaning {
    color: rgba(255,255,255,0.7);
    font-size: 0.88rem;
    line-height: 1.6;
}

.interp-combo-item {
    background: rgba(255,255,255,0.03);
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 10px;
    text-align: left;
}

.interp-combo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 8px;
}

.interp-combo-pair {
    font-weight: bold;
    color: #e0b0ff;
    font-size: 0.9rem;
}

.interp-combo-type {
    font-size: 0.7rem;
    padding: 3px 10px;
    border-radius: 10px;
    font-weight: bold;
}

.interp-combo-type.harmonious {
    background: rgba(34,197,94,0.15);
    color: #22c55e;
}

.interp-combo-type.conflicting {
    background: rgba(239,68,68,0.15);
    color: #ef4444;
}

.interp-combo-type.neutral {
    background: rgba(251,191,36,0.15);
    color: #fbbf24;
}

.interp-combo-desc {
    color: rgba(255,255,255,0.7);
    font-size: 0.88rem;
    line-height: 1.6;
}

.interp-overall-section {
    text-align: left;
    margin-bottom: 16px;
}

.interp-overall-section h4 {
    color: #ec4899;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.interp-overall-section p {
    color: rgba(255,255,255,0.75);
    font-size: 0.9rem;
    line-height: 1.7;
}

.interp-advice {
    color: #e0b0ff !important;
    font-style: italic;
}

.spread-save-section {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

.btn-save {
    background: linear-gradient(45deg, #8b5cf6, #7c3aed);
}

/* ==================== 卡牌详情弹窗 ==================== */

.card-detail-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.card-detail-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.card-detail-modal {
    background: linear-gradient(145deg, #1a1638, #0f0d2a);
    border: 1px solid rgba(236,72,153,0.4);
    border-radius: 24px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
    animation: fadeInUp 0.3s ease;
}

.card-detail-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.card-detail-close:hover {
    background: rgba(239,68,68,0.4);
}

.card-detail-img {
    width: 180px;
    height: 270px;
    margin: 0 auto 20px;
    background: linear-gradient(145deg, #2a2045, #1a1438);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-size: 56px;
}

.card-detail-info {
    text-align: left;
}

.card-detail-info h3 {
    color: #e0b0ff;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.card-detail-info h3 .upright {
    color: #22c55e;
    font-size: 0.8rem;
}

.card-detail-info h3 .reversed {
    color: #ef4444;
    font-size: 0.8rem;
}

.card-detail-pos {
    color: rgba(255,255,255,0.5);
    font-size: 0.82rem;
    margin-bottom: 12px;
}

.card-detail-meaning {
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 12px;
    padding: 12px;
    background: rgba(255,255,255,0.04);
    border-radius: 10px;
    border-left: 3px solid #ec4899;
}

.card-detail-info p {
    color: rgba(255,255,255,0.6);
    font-size: 0.82rem;
    margin-bottom: 6px;
}

.card-detail-advice {
    color: #e0b0ff !important;
    font-style: italic;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

/* ==================== 牌阵响应式 ==================== */

@media (max-width: 600px) {
    .tarot-card-spread {
        padding: 16px;
    }

    .spread-selector {
        grid-template-columns: 1fr;
    }

    .spread-card {
        width: 70px;
        height: 105px;
    }

    .spread-card-sm {
        width: 56px;
        height: 84px;
    }

    .spread-card-xs {
        width: 44px;
        height: 66px;
    }

    .spread-card-label {
        font-size: 0.6rem;
    }

    .spread-card-label-sm {
        font-size: 0.5rem;
    }

    .spread-card-label-xs {
        font-size: 0.45rem;
    }

    .spread-position-tag {
        font-size: 0.6rem;
    }

    .spread-layout-container {
        padding: 8px;
    }

    .interp-tab {
        font-size: 0.78rem;
        padding: 10px 6px;
    }

    .card-detail-modal {
        padding: 20px;
    }

    .card-detail-img {
        width: 140px;
        height: 210px;
        font-size: 42px;
    }
}

@media (min-width: 601px) and (max-width: 1024px) {
    .spread-selector {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1025px) {
    .spread-selector {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ==================== 结果展示页面 ==================== */

.result-page-container {
    max-width: 100%;
    padding: 0;
}

.tarot-card-result {
    max-width: 100%;
    padding: clamp(14px, 3vw, 32px) clamp(10px, 3vw, 36px);
    border-radius: clamp(16px, 3vw, 28px);
}

.result-title {
    font-size: clamp(1.1rem, 3vw, 1.7rem);
    margin-bottom: 4px;
}

.result-question-badge {
    display: inline-block;
    margin: 12px auto 0;
    padding: 8px 20px;
    background: rgba(236,72,153,0.12);
    border: 1px solid rgba(236,72,153,0.25);
    border-radius: 20px;
    color: #e0b0ff;
    font-size: clamp(0.75rem, 1.8vw, 0.9rem);
    text-align: center;
    max-width: 90%;
}

/* ================================================================
   布局舞台
   ================================================================ */

.result-layout-stage {
    position: relative;
    margin: clamp(28px, 4.5vw, 52px) 0 clamp(28px, 4vw, 40px);
    padding: clamp(40px, 7vw, 80px) clamp(16px, 3.5vw, 36px);
    background: rgba(0,0,0,0.25);
    border-radius: clamp(14px, 2.5vw, 24px);
    border: 1px solid rgba(255,255,255,0.05);
    overflow: visible;
}

.result-error {
    text-align: center;
    color: #ef4444;
    padding: 40px 20px;
}

.result-error p {
    font-size: 1rem;
    margin-bottom: 8px;
}

.result-actions-top {
    display: flex;
    gap: clamp(8px, 1.5vw, 16px);
    justify-content: center;
    margin-bottom: clamp(18px, 2.5vw, 30px);
    flex-wrap: wrap;
}

.result-actions-top .btn {
    font-size: clamp(0.78rem, 1.6vw, 0.95rem);
    padding: clamp(8px, 1.4vw, 14px) clamp(16px, 3vw, 28px);
}

/* ================================================================
   卡片网格容器 — CSS Grid 布局，每个卡牌独占单元格，杜绝重叠
   ================================================================ */

.result-card-grid {
    display: grid;
    width: 100%;
    margin: 0 auto;
    gap: clamp(10px, 2vw, 24px);
    padding: clamp(12px, 2.5vw, 32px);
    justify-items: center;
    align-items: center;
}

/* ================================================================
   卡片槽 — 网格子项，宽 100% 填充单元格，max-width 限制最大尺寸
   ================================================================ */

.result-card-slot {
    width: 100%;
    max-width: 140px;
    min-width: 56px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(3px, 0.6vw, 6px);
}

.result-card-slot.result-card-center {
    z-index: 2;
}

/* ================================================================
   卡片本体
   ================================================================ */

.result-card {
    width: 100%;
    background: linear-gradient(145deg, #2a2045, #1a1438);
    border-radius: clamp(6px, 1.2vw, 13px);
    border: 2px solid rgba(139,92,246,0.3);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.result-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(139,92,246,0.35);
    border-color: #ec4899;
    z-index: 10;
}

.result-card.reversed {
    border-color: rgba(239,68,68,0.4);
}

.result-card.reversed:hover {
    border-color: #ef4444;
    box-shadow: 0 12px 32px rgba(239,68,68,0.35);
}

.result-card-img {
    width: 100%;
    aspect-ratio: 2 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(145deg, #2a2045, #1a1438);
    flex-shrink: 0;
}

.result-card-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.card-placeholder-lg {
    font-size: clamp(26px, 4.2vw, 42px);
    opacity: 0.5;
}

.result-card-info {
    padding: clamp(3px, 0.6vw, 6px) clamp(5px, 0.8vw, 8px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid rgba(139,92,246,0.2);
    background: rgba(0,0,0,0.3);
    flex-shrink: 0;
}

.result-card-name {
    font-size: clamp(0.5rem, 1vw, 0.68rem);
    color: #e0b0ff;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
    margin-right: 3px;
}

.result-card-orient {
    font-size: clamp(0.5rem, 0.9vw, 0.65rem);
    font-weight: bold;
    flex-shrink: 0;
}

.result-card-orient.up {
    color: #22c55e;
}

.result-card-orient.rev {
    color: #ef4444;
}

.result-position-label {
    display: flex;
    align-items: center;
    gap: clamp(3px, 0.6vw, 5px);
    flex-shrink: 0;
    background: rgba(0,0,0,0.5);
    padding: 1px 6px;
    border-radius: 8px;
    max-width: 100%;
}

.result-pos-num {
    width: clamp(13px, 2vw, 18px);
    height: clamp(13px, 2vw, 18px);
    border-radius: 50%;
    background: rgba(139,92,246,0.25);
    color: #8b5cf6;
    font-size: clamp(0.45rem, 0.8vw, 0.6rem);
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.result-pos-name {
    font-size: clamp(0.5rem, 1vw, 0.65rem);
    color: rgba(255,255,255,0.55);
    font-weight: bold;
    white-space: nowrap;
}

/* ================================================================
   桌面端 (>1024px) — 各牌阵坐标映射
   基于传统牌阵空间布局，使用相对定位法 (position:absolute + %)
   网格高度 = 竖直堆叠卡片数 × 单槽高度 + 层间间距
   ================================================================ */

/* ================================================================
   各牌阵独立布局样式已拆分至 css/spreads/ 目录：
     - three-card.css   (三张牌阵 — 线性布局)
     - celtic-cross.css (凯尔特十字 — 十字+权杖柱)
     - relationship.css (关系牌阵 — 十字形)
     - hexagram.css     (六芒星 — 七角星形)
     - two-choices.css  (二择一 — 叉形)
     - zodiac.css       (黄道十二宫 — 环形)
   请在页面中按需引入对应的牌阵 CSS 文件。
   ================================================================ */

/* ================================================================
   结果页通用响应式（平板 / 手机 / 超小屏）
   各牌阵网格高度响应式已移至对应独立 CSS 文件
   ================================================================ */

@media (max-width: 1024px) {
    .result-layout-stage {
        padding: clamp(28px, 5.5vw, 52px) clamp(12px, 2.5vw, 24px);
    }

    .result-card-slot {
        max-width: 100px;
    }
}

@media (max-width: 600px) {
    .result-layout-stage {
        padding: clamp(20px, 4.5vw, 36px) clamp(8px, 2vw, 16px);
    }

    .result-card-slot {
        max-width: 72px;
        min-width: 44px;
        gap: 2px;
    }

    .result-card {
        border-radius: 6px;
        border-width: 1.5px;
    }

    .result-card-info {
        padding: 2px 3px;
    }

    .result-card-name {
        font-size: 0.42rem;
    }

    .result-card-orient {
        font-size: 0.42rem;
    }

    .result-position-label {
        padding: 1px 4px;
        border-radius: 6px;
    }

    .result-pos-name {
        font-size: 0.42rem;
    }

    .result-pos-num {
        width: 11px;
        height: 11px;
        font-size: 0.38rem;
    }

    .result-actions-top {
        gap: 6px;
    }

    .result-actions-top .btn {
        font-size: 0.72rem;
        padding: 6px 14px;
    }
}

@media (max-width: 380px) {
    .result-layout-stage {
        padding: clamp(14px, 3.5vw, 24px) clamp(6px, 1.5vw, 10px);
    }

    .result-card-slot {
        max-width: 54px;
        min-width: 36px;
    }

    .result-card-name {
        font-size: 0.35rem;
    }

    .result-pos-name {
        font-size: 0.35rem;
    }

    .result-pos-num {
        width: 10px;
        height: 10px;
        font-size: 0.32rem;
    }
}

/* ===== 闪烁星星 ===== */
.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    z-index: 3;
    animation: starTwinkle 3s ease-in-out infinite;
}

@keyframes starTwinkle {
    0%, 100% {
        opacity: 0.2;
        transform: scale(0.8);
    }
    50% {
        opacity: 1;
        transform: scale(1);
    }
}

/* ===== 流星 ===== */
.shooting-star {
    position: absolute;
    width: 0px;
    height: 2px;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 200, 0.9) 50%,
        rgba(255, 255, 255, 1) 100%);
    border-radius: 50%;
    opacity: 0;
    transform: rotate(45deg);
    animation: meteorShoot 3s linear infinite;
    z-index: 3;
}

.shooting-star::before {
    content: "";
    position: absolute;
    right: 0;
    top: -3px;
    width: 5px;
    height: 5px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(255, 255, 200, 0.9);
}

.shooting-star.blue {
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0) 0%,
        rgba(180, 220, 255, 0.9) 50%,
        rgba(200, 230, 255, 1) 100%);
}

.shooting-star.blue::before {
    background: radial-gradient(circle, #aaddff, #6699cc);
    box-shadow: 0 0 8px rgba(100, 150, 255, 0.8);
}

.shooting-star.red {
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 180, 180, 0.9) 50%,
        rgba(255, 200, 200, 1) 100%);
}

.shooting-star.red::before {
    background: radial-gradient(circle, #ffaaaa, #cc6666);
    box-shadow: 0 0 8px rgba(255, 100, 100, 0.8);
}

@keyframes meteorShoot {
    0% {
        transform: translateX(0) translateY(0) rotate(45deg);
        opacity: 0;
        width: 0px;
    }
    5% {
        opacity: 1;
        width: 120px;
    }
    95% {
        opacity: 1;
        width: 120px;
    }
    100% {
        transform: translateX(-350px) translateY(200px) rotate(45deg);
        opacity: 0;
        width: 0px;
    }
}

/* ===== 星云 ===== */
.nebula {
    position: absolute;
    width: 60%;
    height: 60%;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.25;
    animation: nebulaFloat 25s ease-in-out infinite;
    z-index: 2;
}

.nebula-1 {
    background: radial-gradient(circle, rgba(139,92,246,0.4), transparent);
    top: 10%;
    left: -20%;
}

.nebula-2 {
    background: radial-gradient(circle, rgba(236,72,153,0.3), transparent);
    bottom: -10%;
    right: -20%;
    animation-delay: -10s;
}

@keyframes nebulaFloat {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(40px, 30px) scale(1.1);
    }
}