* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --dark-bg: #0A0A12;
    --dark-card: #151522;
    --gold: #d4af37;
    --gold-light: #f4d03f;
    --gold-pale: #e8d48b;
    --white: #ffffff;
    --gray: #888888;
    --text-secondary: #B0B0C3;
    --border-gold: 2px solid #d4af37;
    --glow-gold: 0 0 20px rgba(212, 175, 55, 0.4);
    --glow-gold-strong: 0 0 40px rgba(212, 175, 55, 0.6);
}

html {
    scroll-padding-top: 5rem;
}
body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    background: var(--dark-bg);
    min-height: 100vh;
    color: var(--white);
    overflow-x: hidden;
    padding-top: 5rem;
    line-height: 1.65;
}

#starsCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

header, main, footer {
    position: relative;
    z-index: 1;
}

/* ============== GLOBAL INTERACTIONS ============== */

a, button, .nav-tab, .filter-tab, .card-item, .related-card-link, .related-link,
.lang-switch, .reading-link, .footer-domain, .modal-detail-link, .draw-btn, .reset-btn {
    transition: all 0.2s ease;
}

/* Global related-links component */
.related-cards {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}
.related-link,
.related-card-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--dark-card);
    border: 1px solid rgba(212,175,55,0.2);
    border-radius: 24px;
    color: var(--gold-pale);
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.2s;
}
.related-link:hover,
.related-card-link:hover {
    background: var(--gold);
    color: #0a0a0f;
    border-color: var(--gold);
}

/* Global section component */
.section,
.card-detail-section {
    background: var(--dark-card);
    border: 1px solid rgba(212,175,55,0.15);
    border-radius: 14px;
    padding: 1.8rem;
    margin-bottom: 1.5rem;
}
.section h2,
.card-detail-section h2 {
    color: var(--gold);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
}

h1, h2, h3, h4, h5, h6 {
    line-height: 1.3;
}

/* ============== HEADER / INTRO ============== */

header {
    padding: 2rem 2rem 0;
    text-align: center;
}

#headerContainer {
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 2rem;
}

.intro-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 24px 16px;
    text-align: center;
    background: var(--dark-card);
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 16px;
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.3),
        0 0 30px rgba(212, 175, 55, 0.08);
    position: relative;
    overflow: hidden;
}

.intro-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.04), transparent);
    animation: introShimmer 6s ease-in-out infinite;
}

@keyframes introShimmer {
    0%, 100% { left: -100%; }
    50% { left: 200%; }
}

.shimmer {
    background: linear-gradient(
        135deg,
        #d4af37 0%,
        #f4d03f 25%,
        #fff8dc 40%,
        #d4af37 55%,
        #f4d03f 75%,
        #d4af37 100%
    );
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: 3rem;
    margin-bottom: 1.2rem;
    letter-spacing: 0.15em;
    animation: shimmerText 4s ease-in-out infinite;
    filter: drop-shadow(0 0 15px rgba(212, 175, 55, 0.5));
}

@keyframes shimmerText {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.divider-line {
    display: block;
    width: 80px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.divider-star {
    color: var(--gold);
    font-size: 1.2rem;
    animation: starPulse 2s ease-in-out infinite;
}

@keyframes starPulse {
    0%, 100% { opacity: 0.3; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}

.intro-section p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.7;
    opacity: 0.85;
    letter-spacing: 0.02em;
}

/* ============== NAV TABS ============== */

nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    background: var(--dark-bg);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(212, 175, 55, 0.15);
    height: 48px;
    display: flex;
    align-items: center;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1300px;
    width: 100%;
    margin: 0 auto;
    padding: 0 1rem;
    height: 100%;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--gold);
    letter-spacing: 0.1em;
}

.lang-switch {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.9rem;
    border: 1px solid rgba(212,175,55,0.35);
    border-radius: 20px;
    color: var(--gold-pale);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: bold;
    transition: all 0.3s;
    white-space: nowrap;
    margin-left: 1rem;
}
.lang-switch:hover {
    background: var(--gold);
    color: #0a0a0f;
    border-color: var(--gold);
}

.brand-icon {
    font-size: 1.4rem;
    animation: float 3s ease-in-out infinite;
}

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

.nav-extra {
    margin-top: 0.5rem;
}

.reading-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.9), rgba(244, 208, 63, 0.85));
    color: #0a0a0f;
    text-decoration: none;
    border-radius: 25px;
    font-weight: bold;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
}

.reading-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.5);
}

.link-icon {
    font-size: 1.1rem;
}

.nav-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.nav-tab {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.65rem 1.2rem;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.95rem;
    position: relative;
    border-bottom: 2px solid transparent;
}

.nav-tab:hover {
    color: var(--gold);
}

.nav-tab:hover::after {
    width: 100%;
}

.nav-tab::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--gold), rgba(244, 208, 63, 0.5));
    transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-tab.active {
    color: var(--gold);
    font-weight: bold;
}

.nav-tab.active::after {
    width: 100%;
}

.tab-icon {
    margin-right: 0.4rem;
}

.nav-toggle {
    display: none;
    background: var(--dark-card);
    border: 1px solid rgba(212,175,55,0.4);
    border-radius: 24px;
    color: var(--gold);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.4rem 1rem;
    line-height: 1;
    transition: all 0.2s ease;
}
.nav-toggle:hover {
    background: rgba(212,175,55,0.1);
    border-color: var(--gold);
}

/* ============== FILTER TABS ============== */

.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
    padding: 1rem 2rem;
    max-width: 1300px;
    margin: 0 auto;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

.filter-tab {
    padding: 0.5rem 1.2rem;
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 24px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    background: var(--dark-card);
}

.filter-tab:hover {
    color: var(--gold);
    border-color: rgba(212, 175, 55, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.15);
}

.filter-tab.active {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.9), rgba(244, 208, 63, 0.85));
    color: #0a0a0f;
    border-color: transparent;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
    font-weight: bold;
}

/* ============== CARD GRID ============== */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 1.2rem;
    padding: 2.5rem 2rem 3rem;
    max-width: 1300px;
    margin: 0 auto;
}

.group-title {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1.2rem;
    margin: 1.5rem 0 1rem;
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.1), rgba(212, 175, 55, 0.05));
    border-left: 3px solid var(--gold);
    border-radius: 0 8px 8px 0;
    color: var(--gold);
    font-size: 1.1rem;
    font-weight: bold;
    letter-spacing: 0.08em;
}

.group-title:first-child {
    margin-top: 0;
}

.group-icon {
    font-size: 0.85rem;
}

.group-count {
    margin-left: auto;
    color: rgba(212, 175, 55, 0.6);
    font-size: 0.9rem;
    font-weight: normal;
}

.card-item {
    background: linear-gradient(145deg, rgba(21, 21, 34, 0.95), rgba(15, 15, 25, 0.98));
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    position: relative;
    display: flex;
    flex-direction: column;
}

.card-item::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 11px;
    background: linear-gradient(135deg, transparent 40%, rgba(212, 175, 55, 0.15), transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 2;
}

@media (hover: hover) {
    .card-item:hover {
        transform: translateY(-8px) rotateY(-3deg) rotateX(2deg);
        border-color: rgba(212, 175, 55, 0.6);
        box-shadow:
            0 15px 40px rgba(0, 0, 0, 0.6),
            0 0 30px rgba(212, 175, 55, 0.25),
            0 0 60px rgba(212, 175, 55, 0.1);
    }

    .card-item:hover img {
        transform: scale(1.04);
        filter: brightness(1.1) contrast(1.05);
    }
}

.card-item:hover::after {
    opacity: 1;
}

.card-item img {
    width: 100%;
    flex: 1;
    object-fit: contain;
    transition: transform 0.4s ease, filter 0.4s ease;
}

.card-item .card-name {
    padding: 0.6rem 0.5rem 0.7rem;
    text-align: center;
    color: var(--gold);
    font-size: 0.85rem;
    font-weight: bold;
    letter-spacing: 0.05em;
    background: linear-gradient(180deg, rgba(10, 10, 15, 0), rgba(10, 10, 15, 0.95));
    flex-shrink: 0;
}

.card-item .card-name {
    padding: 0.9rem 1rem;
    text-align: center;
    color: var(--gold);
    font-size: 0.92rem;
    letter-spacing: 0.04em;
    background: linear-gradient(180deg, rgba(212, 175, 55, 0.06), rgba(212, 175, 55, 0.02));
    border-top: 1px solid rgba(212, 175, 55, 0.1);
    position: relative;
    z-index: 1;
}

/* Card entrance animation */
.card-item {
    will-change: transform, opacity;
    transform: translateZ(0);
}

.card-item.card-enter {
    animation: cardEnter 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: var(--delay, 0ms);
    opacity: 0;
    transform: translateY(30px) scale(0.95);
}

@keyframes cardEnter {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ============== MODAL ============== */

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 1.5rem;
}

.modal-overlay.active {
    display: flex;
    animation: modalFadeIn 0.35s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: linear-gradient(160deg, #13132a 0%, #0a0a15 50%, #101020 100%);
    border-radius: 16px;
    max-width: 460px;
    max-height: 92vh;
    width: 100%;
    overflow: hidden;
    overflow: clip;
    position: relative;
    display: flex;
    flex-direction: column;
    box-shadow: 
        0 0 40px rgba(212, 175, 55, 0.15),
        0 20px 60px rgba(0, 0, 0, 0.8);
    animation: modalSlideUp 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-content::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 18px;
    padding: 2px;
    background: conic-gradient(
        from var(--border-angle),
        transparent,
        rgba(212, 175, 55, 0.6),
        transparent 40%,
        rgba(212, 175, 55, 0.3),
        transparent 60%,
        rgba(212, 175, 55, 0.6),
        transparent
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    animation: borderRotate 8s linear infinite;
}

@keyframes borderRotate {
    to { --border-angle: 360deg; }
}

@property --border-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

@keyframes modalSlideUp {
    from { 
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    position: relative;
    flex-shrink: 0;
}

.modal-header h2 {
    color: var(--gold);
    font-size: 1.4rem;
    letter-spacing: 0.06em;
}

.close-btn {
    width: 38px;
    height: 38px;
    border: 1px solid rgba(212, 175, 55, 0.5);
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.05);
    color: var(--gold);
    font-size: 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: var(--gold);
    color: #0a0a0f;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
    transform: rotate(90deg);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    min-height: 0;
}

.modal-image-frame {
    position: relative;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.modal-image-frame::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 10px;
    box-shadow: inset 0 0 30px rgba(212, 175, 55, 0.1);
    pointer-events: none;
}

.modal-body img {
    width: 100%;
    max-height: 45vh;
    height: auto;
    border-radius: 10px;
    object-fit: contain;
    background: rgba(0, 0, 0, 0.3);
    display: block;
}

.meaning-section {
    margin-bottom: 1.4rem;
    opacity: 1;
}

.meaning-section.animate {
    animation: meaningFadeIn 0.5s ease forwards;
    opacity: 0;
}

.meaning-section.animate:nth-child(2) { animation-delay: 0.1s; }
.meaning-section.animate:nth-child(3) { animation-delay: 0.25s; }

@keyframes meaningFadeIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.meaning-title {
    display: inline-block;
    padding: 0.4rem 1.1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.upright-title {
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid rgba(212, 175, 55, 0.5);
    color: var(--gold-light);
}

.reversed-title {
    background: rgba(136, 136, 136, 0.1);
    border: 1px solid rgba(136, 136, 136, 0.4);
    color: #b0b0b0;
}

.meaning-text {
    color: var(--white);
    line-height: 1.7;
    opacity: 0.85;
    padding-left: 0.3rem;
}

.modal-detail-link {
    display: block;
    text-align: center;
    margin-top: 1rem;
    padding: 0.7rem 1.5rem;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.9), rgba(244, 208, 63, 0.85));
    color: #0a0a0f;
    text-decoration: none;
    border-radius: 25px;
    font-weight: bold;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
}
.modal-detail-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
}

/* ============== FOOTER ============== */

footer {
    text-align: center;
    padding: 4rem 2rem 3rem;
    position: relative;
    overflow: hidden;
}

.cosmic-wheel {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 2rem;
}

.wheel-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(212, 175, 55, 0.3);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.wheel-ring-outer {
    width: 180px;
    height: 180px;
    animation: wheelSpin 20s linear infinite;
    border-style: dashed;
    border-color: rgba(212, 175, 55, 0.15);
}

.wheel-ring-mid {
    width: 130px;
    height: 130px;
    animation: wheelSpin 12s linear infinite reverse;
    border-color: rgba(212, 175, 55, 0.3);
}

.wheel-ring-inner {
    width: 80px;
    height: 80px;
    animation: wheelSpin 8s linear infinite;
    border-color: rgba(212, 175, 55, 0.45);
}

@keyframes wheelSpin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.wheel-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
}

.wheel-symbol {
    display: block;
    color: var(--gold);
    font-size: 1.8rem;
    animation: centerGlow 2s ease-in-out infinite;
}

@keyframes centerGlow {
    0%, 100% { 
        filter: drop-shadow(0 0 5px rgba(212, 175, 55, 0.5));
        transform: scale(1);
    }
    50% { 
        filter: drop-shadow(0 0 20px rgba(212, 175, 55, 0.9));
        transform: scale(1.3);
    }
}

.orbit-dot {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gold-light);
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.8);
    top: 50%;
    left: 50%;
}

.dot-1 { animation: orbit1 8s linear infinite; }
.dot-2 { animation: orbit2 10s linear infinite; }
.dot-3 { animation: orbit3 12s linear infinite; }
.dot-4 { animation: orbit4 14s linear infinite; }

@keyframes orbit1 {
    from { transform: translate(-50%, -50%) rotate(0deg) translateX(90px) rotate(0deg); }
    to   { transform: translate(-50%, -50%) rotate(360deg) translateX(90px) rotate(-360deg); }
}
@keyframes orbit2 {
    from { transform: translate(-50%, -50%) rotate(90deg) translateX(90px) rotate(-90deg); }
    to   { transform: translate(-50%, -50%) rotate(450deg) translateX(90px) rotate(-450deg); }
}
@keyframes orbit3 {
    from { transform: translate(-50%, -50%) rotate(180deg) translateX(65px) rotate(-180deg); }
    to   { transform: translate(-50%, -50%) rotate(540deg) translateX(65px) rotate(-540deg); }
}
@keyframes orbit4 {
    from { transform: translate(-50%, -50%) rotate(270deg) translateX(65px) rotate(-270deg); }
    to   { transform: translate(-50%, -50%) rotate(630deg) translateX(65px) rotate(-630deg); }
}

.footer-text {
    color: var(--gold);
    font-size: 1.15rem;
    letter-spacing: 0.08em;
    margin-bottom: 1rem;
    animation: footerGlow 3s ease-in-out infinite;
}

.footer-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 1.2rem;
}
.footer-links a,
.footer-links a:link,
.footer-links a:visited {
    color: var(--gold-pale);
    text-decoration: none;
    font-size: 0.82rem;
    opacity: 0.6;
    transition: all 0.3s;
}
.footer-links a:hover,
.footer-links a:active {
    opacity: 1;
    color: var(--gold);
}

.footer-domain {
    display: inline-block;
    color: var(--gold);
    font-size: 1rem;
    letter-spacing: 0.05em;
    text-decoration: none;
    margin-bottom: 1.5rem;
    padding: 0.5rem 1.5rem;
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 25px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.footer-domain::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(212, 175, 55, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 25px;
}

.footer-domain:hover {
    color: var(--gold-light);
    border-color: var(--gold);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
    transform: translateY(-2px);
}

.footer-domain:hover::before {
    opacity: 1;
}

@keyframes footerGlow {
    0%, 100% { 
        text-shadow: 0 0 10px rgba(212, 175, 55, 0.4);
        opacity: 0.8;
    }
    50% { 
        text-shadow: 0 0 25px rgba(212, 175, 55, 0.8), 0 0 50px rgba(212, 175, 55, 0.3);
        opacity: 1;
    }
}

.footer-stars {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.footer-star {
    color: var(--gold);
    font-size: 0.75rem;
    animation: starTwinkle 2s ease-in-out infinite;
}

.footer-star:nth-child(1) { animation-delay: 0s; }
.footer-star:nth-child(2) { animation-delay: 0.3s; }
.footer-star:nth-child(3) { animation-delay: 0.6s; }
.footer-star:nth-child(4) { animation-delay: 0.9s; }
.footer-star:nth-child(5) { animation-delay: 1.2s; }

@keyframes starTwinkle {
    0%, 100% { opacity: 0.2; transform: scale(0.6); }
    50% { opacity: 1; transform: scale(1.3); }
}

/* ============== HORIZONTAL SCROLL CARD LIST ============== */

.horizontal-scroll-section {
    margin-bottom: 2rem;
}

.horizontal-scroll-title {
    color: var(--gold);
    font-size: 1.2rem;
    font-weight: bold;
    letter-spacing: 0.05em;
    margin-bottom: 0.8rem;
    text-align: left;
}

.horizontal-scroll-container {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 8px 0;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.horizontal-scroll-container::-webkit-scrollbar {
    display: none;
}

.scroll-card-item {
    flex: 0 0 auto;
    width: 120px;
    height: 180px;
    background: var(--dark-card);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 12px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.scroll-card-item img {
    width: 100%;
    height: auto;
    max-height: 130px;
    object-fit: contain;
    border-radius: 6px;
    margin-bottom: 6px;
}

.scroll-card-item .scroll-card-name {
    color: var(--gold);
    font-size: 0.78rem;
    font-weight: bold;
    text-align: center;
    letter-spacing: 0.03em;
    line-height: 1.3;
}

@media (hover: hover) {
    .scroll-card-item:hover {
        transform: scale(1.05);
        border-color: rgba(212, 175, 55, 0.6);
        box-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
    }
}

/* ============== RESPONSIVE ============== */

@media (max-width: 1024px) {
    .card-grid {
        max-width: 900px;
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}

@media (max-width: 768px) {
    header {
        padding: 1rem 1rem 0;
    }

    .intro-section {
        padding: 1.5rem 1.25rem;
        margin: 0 0.5rem;
    }

    .shimmer {
        font-size: 2.2rem;
    }

    .intro-section p {
        font-size: 0.9rem;
        line-height: 1.7;
    }

    .card-grid {
        grid-template-columns: repeat(auto-fill, minmax(115px, 1fr));
        gap: 0.8rem;
        padding: 1.5rem 1rem 2rem;
        max-width: 600px;
    }

    .card-item img {
        max-height: none;
    }

    .card-item .card-name {
        padding: 0.7rem;
        font-size: 0.82rem;
    }

    .nav-tab {
        padding: 0.4rem 0.7rem;
        font-size: 0.78rem;
    }

    .nav-tabs {
        gap: 0.3rem;
    }

    .reading-link {
        padding: 0.5rem 1.2rem;
        font-size: 0.9rem;
    }

    .cosmic-wheel {
        width: 150px;
        height: 150px;
    }

    .wheel-ring-outer { width: 140px; height: 140px; }
    .wheel-ring-mid { width: 100px; height: 100px; }
    .wheel-ring-inner { width: 60px; height: 60px; }

    @keyframes orbit1 {
        from { transform: translate(-50%, -50%) rotate(0deg) translateX(70px) rotate(0deg); }
        to   { transform: translate(-50%, -50%) rotate(360deg) translateX(70px) rotate(-360deg); }
    }
    @keyframes orbit2 {
        from { transform: translate(-50%, -50%) rotate(90deg) translateX(70px) rotate(-90deg); }
        to   { transform: translate(-50%, -50%) rotate(450deg) translateX(70px) rotate(-450deg); }
    }
    @keyframes orbit3 {
        from { transform: translate(-50%, -50%) rotate(180deg) translateX(50px) rotate(-180deg); }
        to   { transform: translate(-50%, -50%) rotate(540deg) translateX(50px) rotate(-540deg); }
    }
    @keyframes orbit4 {
        from { transform: translate(-50%, -50%) rotate(270deg) translateX(50px) rotate(-270deg); }
        to   { transform: translate(-50%, -50%) rotate(630deg) translateX(50px) rotate(-630deg); }
    }

    .footer-text {
        font-size: 1rem;
    }

    .footer-domain {
        font-size: 0.9rem;
        padding: 0.4rem 1.2rem;
        margin-bottom: 1.2rem;
    }
}

@media (max-width: 480px) {
    header {
        padding: 0.5rem 0.5rem 0;
    }

    .intro-section {
        padding: 1.2rem 1rem;
        border-radius: 14px;
        margin: 0 0.5rem;
    }

    .shimmer {
        font-size: 1.7rem;
    }

    .intro-section p {
        font-size: 0.82rem;
        text-align: left;
    }

    .divider-line {
        width: 40px;
    }

    /* Container width constraints for mobile */
    .card-detail-container,
    .card-grid,
    .intro-section,
    .reading-container,
    .reading-detail,
    .daily-container,
    .combos-index-inner,
    .combo-hero-section,
    .spread-detail-container,
    .content-page .container,
    .breadcrumb {
        max-width: 480px;
    }

    .card-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.6rem;
        padding: 1rem 0.75rem 1.5rem;
    }

    .card-item {
        border-radius: 10px;
    }

    .card-item img {
        max-height: none;
        padding: 0.3rem;
    }

    .card-item .card-name {
        padding: 0.4rem 0.3rem;
        font-size: 0.7rem;
    }

    .nav-toggle {
        display: block;
    }
    .nav-tabs {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--dark-card);
        border-bottom: 1px solid rgba(212,175,55,0.2);
        border-radius: 0 0 12px 12px;
        padding: 0.5rem 1rem;
        gap: 0.2rem;
        box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    }
    .nav-tabs.open {
        display: flex;
    }
    .nav-tab {
        padding: 0.5rem 1rem;
        justify-content: center;
        font-size: 0.85rem;
    }

    .reading-link {
        padding: 0.4rem 1rem;
        font-size: 0.8rem;
    }

    .modal-header {
        padding: 0.9rem 1rem;
    }

    .modal-header h2 {
        font-size: 1.1rem;
    }

    .modal-body {
        padding: 1rem;
    }

    .modal-body img {
        max-height: 35vh;
    }

    .meaning-title {
        font-size: 0.78rem;
        padding: 0.3rem 0.8rem;
    }

    .meaning-text {
        font-size: 0.85rem;
    }

    .cosmic-wheel {
        width: 120px;
        height: 120px;
        margin-bottom: 1.5rem;
    }

    .wheel-ring-outer { width: 110px; height: 110px; }
    .wheel-ring-mid { width: 80px; height: 80px; }
    .wheel-ring-inner { width: 48px; height: 48px; }

    @keyframes orbit1 {
        from { transform: translate(-50%, -50%) rotate(0deg) translateX(55px) rotate(0deg); }
        to   { transform: translate(-50%, -50%) rotate(360deg) translateX(55px) rotate(-360deg); }
    }
    @keyframes orbit2 {
        from { transform: translate(-50%, -50%) rotate(90deg) translateX(55px) rotate(-90deg); }
        to   { transform: translate(-50%, -50%) rotate(450deg) translateX(55px) rotate(-450deg); }
    }
    @keyframes orbit3 {
        from { transform: translate(-50%, -50%) rotate(180deg) translateX(40px) rotate(-180deg); }
        to   { transform: translate(-50%, -50%) rotate(540deg) translateX(40px) rotate(-540deg); }
    }
    @keyframes orbit4 {
        from { transform: translate(-50%, -50%) rotate(270deg) translateX(40px) rotate(-270deg); }
        to   { transform: translate(-50%, -50%) rotate(630deg) translateX(40px) rotate(-630deg); }
    }

    .footer-text {
        font-size: 0.85rem;
    }

    .footer-domain {
        font-size: 0.8rem;
        padding: 0.35rem 1rem;
        margin-bottom: 1rem;
    }

    footer {
        padding: 2.5rem 1rem 2rem;
    }
}

@media (max-width: 380px) {
    .card-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.4rem;
        padding: 0.8rem 0.4rem 1.2rem;
    }

    .card-item {
        border-radius: 6px;
    }

    .card-item img {
        padding: 0.2rem;
    }

    .card-item .card-name {
        padding: 0.3rem 0.2rem;
        font-size: 0.65rem;
    }

    .intro-section {
        padding: 1rem 0.75rem;
    }

    .shimmer {
        font-size: 1.4rem;
    }
}

/* ============== READING PAGE ============== */

.reading-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem;
}

.reading-cards {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 2rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.card-position {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
}

.card-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s ease;
}

.card-info.info-reveal {
    opacity: 1;
    transform: translateY(0);
}

.card-info .card-name {
    color: var(--gold);
    font-size: 1rem;
    font-weight: bold;
    letter-spacing: 0.05em;
}

.card-reversal {
    font-size: 0.85rem;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    opacity: 0;
    transition: all 0.3s ease;
}

.card-reversal.upright {
    opacity: 1;
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid rgba(212, 175, 55, 0.4);
    color: var(--gold-light);
}

.card-reversal.reversed {
    opacity: 1;
    background: rgba(136, 136, 136, 0.15);
    border: 1px solid rgba(136, 136, 136, 0.4);
    color: #b0b0b0;
}

.position-label {
    color: var(--gold);
    font-size: 1.1rem;
    letter-spacing: 0.1em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.label-icon {
    font-size: 0.8rem;
    opacity: 0.6;
}

.card-slot {
    perspective: 1000px;
}

.card-face {
    width: 160px;
    height: 270px;
    background: var(--dark-card);
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(212, 175, 55, 0.1);
}

.card-face:hover {
    transform: translateY(-5px) rotateY(-5deg);
    border-color: rgba(212, 175, 55, 0.6);
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.6),
        0 0 30px rgba(212, 175, 55, 0.25);
}

.card-placeholder {
    font-size: 4rem;
    color: rgba(212, 175, 55, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

.card-back-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.card-front-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.card-front-img.reversed {
    transform: rotate(180deg);
}

@keyframes pulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

.card-face.card-reveal {
    animation: cardFlip 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes cardFlip {
    0% { transform: rotateY(0deg); }
    50% { transform: rotateY(90deg); }
    100% { transform: rotateY(0deg); }
}

.reading-card-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

.reading-card-img.reversed {
    transform: rotate(180deg);
}

.card-name-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.6rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: var(--gold);
    font-size: 0.85rem;
    text-align: center;
    letter-spacing: 0.05em;
}

.card-orientation {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    padding: 0.25rem 0.5rem;
    border-radius: 10px;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    background: rgba(0, 0, 0, 0.7);
    color: var(--gold-light);
}

.card-face:not(.card-reveal) .card-orientation,
.card-face:not(.card-reveal) .card-name-overlay {
    display: none;
}

.card-face.card-reveal .card-placeholder {
    display: none;
}

.reading-controls {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.draw-btn, .reset-btn {
    padding: 1rem 2.5rem;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: bold;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
}

.draw-btn {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.9), rgba(244, 208, 63, 0.85));
    color: #0a0a0f;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

.draw-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.6);
}

.draw-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.reset-btn {
    background: transparent;
    border: 1px solid rgba(212, 175, 55, 0.5);
    color: var(--gold);
}

.reset-btn:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: var(--gold);
    transform: translateY(-2px);
}

.btn-icon {
    font-size: 1.2rem;
}

.reading-info {
    text-align: center;
    margin-bottom: 2.5rem;
}

.info-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    letter-spacing: 0.05em;
}

.reading-detail {
    display: none;
    max-width: 500px;
    margin: 0 auto;
    padding: 2rem;
    background: var(--dark-card);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 16px;
    box-shadow: 
        0 0 40px rgba(212, 175, 55, 0.1),
        0 20px 60px rgba(0, 0, 0, 0.6);
}

.reading-detail.detail-fade-in {
    animation: detailFadeIn 0.5s ease;
}

@keyframes detailFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.detail-title {
    color: var(--gold);
    font-size: 1.3rem;
    text-align: center;
    margin-bottom: 1.5rem;
    letter-spacing: 0.05em;
}

.detail-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.detail-image {
    width: 100%;
    max-height: 300px;
    object-fit: contain;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.3);
    align-self: center;
}

.detail-image.reversed {
    transform: rotate(180deg);
}

.detail-meanings {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.detail-meaning {
    padding: 1rem 1.2rem;
    border-radius: 10px;
}

.detail-meaning.upright {
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.detail-meaning.reversed {
    background: rgba(136, 136, 136, 0.08);
    border: 1px solid rgba(136, 136, 136, 0.3);
}

.meaning-label {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
}

.detail-meaning.upright .meaning-label {
    color: var(--gold-light);
}

.detail-meaning.reversed .meaning-label {
    color: #b0b0b0;
}

.detail-meaning p {
    color: var(--white);
    opacity: 0.85;
    line-height: 1.7;
    font-size: 0.95rem;
}

/* ============== RESPONSIVE READING PAGE ============== */

@media (max-width: 768px) {
    .reading-cards {
        gap: 1.5rem;
        margin-bottom: 2rem;
    }

    .card-face {
        width: 125px;
        height: 210px;
    }

    .position-label {
        font-size: 0.95rem;
    }

    .card-placeholder {
        font-size: 3rem;
    }

    .draw-btn, .reset-btn {
        padding: 0.8rem 1.8rem;
        font-size: 0.95rem;
    }

    .reading-detail {
        padding: 1.5rem;
        margin: 0 1rem;
    }

    .detail-image {
        max-height: 250px;
    }
}

@media (max-width: 480px) {
    .reading-container {
        padding: 0.75rem;
    }

    .reading-cards {
        flex-direction: column;
        align-items: center;
        gap: 1.2rem;
    }

    .card-face {
        width: 105px;
        height: 175px;
    }

    .card-placeholder {
        font-size: 2.5rem;
    }

    .card-name-overlay {
        font-size: 0.75rem;
        padding: 0.4rem;
    }

    .card-orientation {
        font-size: 0.6rem;
        padding: 0.2rem 0.4rem;
        top: 0.4rem;
        right: 0.4rem;
    }

    .draw-btn, .reset-btn {
        padding: 0.6rem 1.4rem;
        font-size: 0.85rem;
        border-radius: 24px;
    }

    .info-text {
        font-size: 0.9rem;
    }

    .reading-detail {
        padding: 1rem;
        margin: 0 0.5rem;
    }

    .detail-title {
        font-size: 1.1rem;
    }

    .detail-image {
        max-height: 200px;
    }

    .detail-meaning p {
        font-size: 0.85rem;
    }
}

/* ============== SPREAD LAYOUTS (Reading Page) ============== */

.reading-cards.spread-3 { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.5rem; }
.reading-cards.spread-6 { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.2rem; }
.reading-cards.spread-10 { display: grid; grid-template-columns: repeat(5,1fr); gap: 0.8rem; }
.reading-cards.spread-single { display: flex; justify-content: center; }

/* ============== CELTIC CROSS LAYOUT ============== */
/* Two-area layout: cross (3×3 grid, left) + staff (vertical column, right) */
/*
   Cross (3×3):          Staff (vertical):
      [5:目标]               [10:结果]
   [4:过去] [1:现状]         [9:希望]
      [3:根源] [6:近未来]    [8:环境]
                             [7:自我]
   Card 2 (阻碍) overlaps Card 1 (现状) at center with slight offset.
*/

.reading-cards.celtic-cross-container {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    gap: 1.5rem;
    max-width: 750px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 3rem;
}

/* ---- Cross Area (cards 0-5) ---- */
.celtic-cross-area {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem 0.6rem;
    align-items: start;
    justify-items: center;
    flex: 0 0 auto;
}

/* Card placement in the 3×3 cross grid */
.celtic-cross-area .card-position:nth-child(1) { grid-column: 2; grid-row: 2; }  /* 现状 - center */
.celtic-cross-area .card-position:nth-child(2) { grid-column: 2; grid-row: 2; }  /* 阻碍 - overlaps center */
.celtic-cross-area .card-position:nth-child(3) { grid-column: 2; grid-row: 3; }  /* 根源 - below */
.celtic-cross-area .card-position:nth-child(4) { grid-column: 1; grid-row: 2; }  /* 过去 - left */
.celtic-cross-area .card-position:nth-child(5) { grid-column: 2; grid-row: 1; }  /* 目标 - above */
.celtic-cross-area .card-position:nth-child(6) { grid-column: 3; grid-row: 2; }  /* 近未来 - right */

/* Overlap: card 2 crosses card 1 */
.celtic-cross-area .card-position:nth-child(2) {
    z-index: 2;
    margin-left: 22px;
    margin-top: 6px;
}
.celtic-cross-area .card-position:nth-child(2) .card-slot {
    transform: rotate(2deg);
}

/* ---- Staff Area (cards 6-9) ---- */
.celtic-staff-area {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
    flex: 0 0 auto;
}

/* ---- Card sizes ---- */
.celtic-cross-container .card-face {
    width: 115px;
    height: 192px;
}
.celtic-cross-container .position-label {
    font-size: 0.8rem;
    white-space: nowrap;
}

/* ---- Tablet ---- */
@media (max-width: 768px) {
    .reading-cards.spread-6 { grid-template-columns: repeat(2,1fr); }
    .reading-cards.spread-10 { grid-template-columns: repeat(3,1fr); }

    .reading-cards.celtic-cross-container {
        gap: 0.8rem;
    }
    .celtic-cross-area {
        gap: 0.3rem;
    }
    .celtic-cross-area .card-position:nth-child(2) {
        margin-left: 16px;
        margin-top: 4px;
    }
    .celtic-cross-container .card-face {
        width: 90px;
        height: 150px;
    }
    .celtic-cross-container .position-label {
        font-size: 0.7rem;
    }
    .celtic-staff-area {
        gap: 0.3rem;
    }
}

/* ---- Mobile: stack cross above staff ---- */
@media (max-width: 480px) {
    .reading-cards.spread-6 { grid-template-columns: repeat(2,1fr); gap: 0.6rem; }
    .reading-cards.spread-10 { grid-template-columns: repeat(2,1fr); gap: 0.5rem; }

    .reading-cards.celtic-cross-container {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
        max-width: 100%;
    }
    .celtic-cross-area {
        gap: 0.4rem;
    }
    .celtic-cross-area .card-position:nth-child(2) {
        margin-left: 14px;
        margin-top: 4px;
    }
    .celtic-cross-container .card-face {
        width: 95px;
        height: 158px;
    }
    .celtic-cross-container .position-label {
        font-size: 0.7rem;
    }
    .celtic-staff-area {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.6rem;
    }
}

/* ============== READING V2：三阶段交互 ============== */

/* --- 阶段容器 --- */
.reading-stage {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1rem 1rem 2rem;
    min-height: 55vh;
}

/* ===== 阶段 1: 欢迎 ===== */
.welcome-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    text-align: center;
    animation: stageFadeIn 0.6s ease;
}

@keyframes stageFadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 牌背扇形 */
.card-fan {
    position: relative;
    height: 170px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.fan-card {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 77px;
    height: 130px;
    margin-left: -38px;
    transform-origin: bottom center;
    border-radius: 8px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.55);
}

.fan-card.center {
    box-shadow: 0 8px 32px rgba(212,175,55,0.2), 0 6px 24px rgba(0,0,0,0.6);
}


.fan-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid rgba(212,175,55,0.3);
}

/* 欢迎文案 */
.welcome-copy {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 0.4rem;
}

.welcome-deco {
    color: rgba(212,175,55,0.25);
    font-size: 18px;
    flex-shrink: 0;
}

.welcome-text {
    color: var(--gold-pale);
    font-size: 1.1rem;
    line-height: 1.9;
    margin: 0;
}

.welcome-hint {
    color: rgba(255,255,255,0.45);
    font-size: 0.9rem;
    margin-bottom: 1.8rem;
}

.btn-start-wrapper {
    position: relative;
    width: 150px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

/* 外层光晕：旋转渐变光环 — 佛光效果 */
.btn-start-wrapper::before {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        rgba(244,208,63,0.08) 20deg,
        rgba(212,175,55,0.2) 40deg,
        rgba(244,208,63,0.4) 55deg,
        rgba(255,220,120,0.5) 70deg,
        rgba(244,208,63,0.4) 85deg,
        rgba(212,175,55,0.2) 100deg,
        rgba(244,208,63,0.08) 120deg,
        transparent 140deg,
        transparent 360deg
    );
    animation: haloRotate 4s linear infinite;
    pointer-events: none;
}

/* 中层：微弱的逆向旋转光环 */
.btn-start-wrapper::after {
    content: '';
    position: absolute;
    inset: -14px;
    border-radius: 50%;
    background: conic-gradient(
        from 180deg,
        transparent 0deg,
        rgba(244,208,63,0.04) 30deg,
        rgba(212,175,55,0.12) 60deg,
        rgba(244,208,63,0.25) 90deg,
        rgba(212,175,55,0.12) 120deg,
        transparent 160deg,
        transparent 360deg
    );
    animation: haloRotate 6s linear infinite reverse;
    pointer-events: none;
}

@keyframes haloRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.btn-start {
    position: relative;
    z-index: 2;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(circle at 42% 38%,
        rgba(255,245,210,0.95),
        rgba(250,220,140,0.85) 30%,
        rgba(220,180,80,0.75) 60%,
        rgba(180,145,45,0.7) 100%
    );
    border: 2px solid rgba(212,175,55,0.55);
    color: #3d2b05;
    font-size: 1.15rem;
    font-weight: bold;
    letter-spacing: 0.1em;
    cursor: pointer;
    box-shadow:
        0 0 30px rgba(244,208,63,0.3),
        0 0 60px rgba(212,175,55,0.15),
        0 0 100px rgba(244,208,63,0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-start:hover {
    transform: scale(1.06);
    box-shadow:
        0 0 45px rgba(244,208,63,0.45),
        0 0 80px rgba(212,175,55,0.25),
        0 0 130px rgba(244,208,63,0.1);
}

/* ===== 阶段 2a: 洗牌 — 天女散花 ===== */
.shuffle-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem 3rem;
    text-align: center;
    animation: stageFadeIn 0.4s ease;
}

.shuffle-label {
    color: rgba(255,255,255,0.35);
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    letter-spacing: 0.1em;
}

/* 散射容器 */
.scatter-container {
    position: relative;
    width: 280px;
    height: 280px;
    margin-bottom: 1.5rem;
}

.scatter-card {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 52px;
    height: 88px;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 3px 16px rgba(0,0,0,0.5);
    animation: scatterBurst 2.2s cubic-bezier(0.36,0,0.64,1) var(--delay) forwards;
    transform-origin: center center;
    will-change: transform;
}

.scatter-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
    border: 1.5px solid rgba(212,175,55,0.35);
}

@keyframes scatterBurst {
    0% {
        transform: translate(-50%, -50%) translate(0, 0) rotate(0deg) scale(1);
        z-index: 10;
    }
    12% {
        transform: translate(-50%, -50%) translate(0, 0) rotate(0deg) scale(1);
        z-index: 10;
    }
    40% {
        transform: translate(-50%, -50%) translate(var(--tx), var(--ty)) rotate(var(--rot)) scale(0.94);
        z-index: 1;
    }
    70% {
        transform: translate(-50%, -50%) translate(var(--tx), var(--ty)) rotate(var(--rot)) scale(0.92);
        z-index: 1;
    }
    88% {
        transform: translate(-50%, -50%) translate(0, 0) rotate(0deg) scale(1);
        z-index: 10;
    }
    100% {
        transform: translate(-50%, -50%) translate(0, 0) rotate(0deg) scale(1);
        z-index: 10;
    }
}

.shuffle-text {
    color: var(--gold-pale);
    font-size: 1rem;
    letter-spacing: 0.05em;
    animation: pulseText 1.5s ease-in-out infinite;
}

@keyframes pulseText {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* ===== 阶段 2b: U形发牌 + 抽牌 ===== */

.picked-slots {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 1rem;
    min-height: 156px;
    align-items: flex-start;
}

.pick-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: default;
    position: relative;
}

.slot-inner {
    width: 72px;
    height: 122px;
    border: 2px dashed rgba(212,175,55,0.3);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    overflow: hidden;
    background: rgba(0,0,0,0.25);
}

.pick-slot.filled .slot-inner {
    border-style: solid;
    border-color: rgba(212,175,55,0.5);
    box-shadow: 0 0 20px rgba(212,175,55,0.2);
}

.pick-slot.filled {
    cursor: pointer;
}

.slot-q {
    font-size: 28px;
    color: rgba(212,175,55,0.15);
}

.slot-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slot-card-img.reversed {
    transform: rotate(180deg);
}

.slot-label {
    font-size: 0.75rem;
    color: rgba(212,175,55,0.65);
    letter-spacing: 0.06em;
    margin-top: 2px;
}

.deal-prompt {
    text-align: center;
    color: var(--gold-pale);
    font-size: 0.95rem;
    margin: 0 0 0.3rem;
}

.deal-prompt strong {
    color: var(--gold);
}

/* U形弧线区域 */
.arc-stage {
    position: relative;
    width: 100%;
    height: 310px;
    margin: 0 auto;
    overflow: visible;
}

.arc-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.arc-card {
    position: absolute;
    width: 44px;
    height: 74px;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1),
                box-shadow 0.25s ease,
                opacity 0.25s ease;
    z-index: 1;
    animation: cardDealIn 0.45s cubic-bezier(0.22,0.61,0.36,1) both;
    transform-origin: center center;
}

.arc-card:hover {
    z-index: 100 !important;
    transform: translate(-50%,-50%) scale(1.4) !important;
    box-shadow: 0 8px 28px rgba(212,175,55,0.4);
}

.arc-card.selected {
    opacity: 0.25;
    pointer-events: none;
    filter: grayscale(0.5);
}

/* 飞入槽位的牌 clone */
.fly-card {
    position: fixed;
    width: 44px;
    height: 74px;
    border-radius: 5px;
    overflow: hidden;
    z-index: 999;
    pointer-events: none;
    transition: all 0.45s cubic-bezier(0.22,0.61,0.36,1);
    box-shadow: 0 6px 24px rgba(212,175,55,0.35);
}

.fly-card.flipped {
    transform: rotateY(90deg);
}

.fly-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
    border: 1.5px solid rgba(212,175,55,0.4);
}

.arc-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
    border: 1.5px solid rgba(212,175,55,0.35);
    box-shadow: 0 2px 10px rgba(0,0,0,0.4);
    pointer-events: none;
    user-select: none;
}

@keyframes cardDealIn {
    from {
        opacity: 0;
        transform: translate(-50%,-50%) scale(0.3);
    }
    to {
        opacity: 1;
    }
}

.arc-hint {
    text-align: center;
    color: rgba(255,255,255,0.25);
    font-size: 0.72rem;
    margin-top: 0.3rem;
}

/* ===== 阶段 3: 结果页 ===== */
.result-stage {
    animation: stageFadeIn 0.6s ease;
    padding: 0.5rem 0;
}

.result-title {
    text-align: center;
    color: rgba(255,255,255,0.3);
    font-size: 0.9rem;
    margin-bottom: 1.2rem;
    letter-spacing: 0.05em;
}

/* PC 端：三列横排 */
.result-cards-pc {
    display: flex;
    gap: 20px;
    justify-content: center;
    max-width: 780px;
    margin: 0 auto 1.5rem;
}

.result-card-pc {
    flex: 1;
    max-width: 230px;
    background: rgba(212,175,55,0.04);
    border: 1px solid rgba(212,175,55,0.12);
    border-radius: 14px;
    padding: 1.2rem 1rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.result-card-pc:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}

.rcp-img {
    width: 100px;
    height: 169px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid rgba(212,175,55,0.4);
    margin-bottom: 0.6rem;
}

.rcp-img.reversed {
    transform: rotate(180deg);
}

.rcp-pos {
    color: var(--gold);
    font-size: 0.85rem;
    margin-bottom: 0.3rem;
    letter-spacing: 0.05em;
}

.rcp-tag {
    display: inline-block;
    font-size: 0.7rem;
    padding: 2px 12px;
    border-radius: 10px;
    margin-bottom: 0.4rem;
}

.tag-upright {
    background: rgba(212,175,55,0.15);
    color: var(--gold-light);
    border: 1px solid rgba(212,175,55,0.3);
}

.tag-reversed {
    background: rgba(136,136,136,0.12);
    color: #b0b0b0;
    border: 1px solid rgba(136,136,136,0.3);
}

.rcp-name {
    color: rgba(255,255,255,0.85);
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
}

.rcp-desc {
    color: rgba(255,255,255,0.55);
    font-size: 0.8rem;
    line-height: 1.6;
}

/* 移动端：纵向卡片堆叠 */
.result-cards-mobile {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
    margin: 0 auto 1.2rem;
}

.result-card-mobile {
    display: flex;
    gap: 12px;
    background: rgba(212,175,55,0.04);
    border: 1px solid rgba(212,175,55,0.12);
    border-radius: 12px;
    padding: 10px;
    align-items: center;
}

.rcm-left {
    flex-shrink: 0;
}

.rcm-img {
    width: 40px;
    height: 68px;
    object-fit: cover;
    border-radius: 5px;
    border: 1.5px solid rgba(212,175,55,0.35);
}

.rcm-img.reversed {
    transform: rotate(180deg);
}

.rcm-right {
    flex: 1;
    min-width: 0;
}

.rcm-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
}

.rcm-pos {
    color: var(--gold);
    font-size: 0.78rem;
}

.rcm-tag {
    font-size: 0.65rem;
    padding: 1px 8px;
    border-radius: 8px;
}

.rcm-name {
    color: rgba(255,255,255,0.85);
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 2px;
}

.rcm-desc {
    color: rgba(255,255,255,0.5);
    font-size: 0.75rem;
    line-height: 1.5;
}

/* 结果总结 */
.result-summary {
    max-width: 600px;
    margin: 0 auto 1.2rem;
    padding: 1rem 1.5rem;
    background: rgba(0,0,0,0.2);
    border-radius: 10px;
}

.result-summary p {
    color: rgba(255,255,255,0.5);
    font-size: 0.82rem;
    line-height: 1.6;
    margin: 0.25rem 0;
}

.result-summary strong {
    color: var(--gold-pale);
}

.btn-reshuffle {
    display: block;
    margin: 0 auto;
    padding: 0.6rem 2rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.55);
    border-radius: 22px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-reshuffle:hover {
    background: rgba(212,175,55,0.1);
    border-color: rgba(212,175,55,0.35);
    color: var(--gold-pale);
}

/* Result recommendations */
.result-recommend {
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(212,175,55,0.12);
    border-radius: 14px;
    padding: 1.2rem;
    margin-bottom: 1.2rem;
    text-align: center;
}
.result-recommend h3 {
    color: var(--gold);
    font-size: 1rem;
    margin-bottom: 0.8rem;
    letter-spacing: 0.04em;
}
.result-recommend .recommend-links {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 0.5rem;
}
.result-recommend .recommend-link {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(212,175,55,0.08);
    border: 1px solid rgba(212,175,55,0.2);
    border-radius: 20px;
    color: var(--gold-pale);
    text-decoration: none;
    font-size: 0.82rem;
    transition: all 0.2s;
}
.result-recommend .recommend-link:hover {
    background: var(--gold);
    color: #0a0a0f;
    border-color: var(--gold);
}
.result-recommend .recommend-empty {
    color: var(--text-secondary);
    font-size: 0.8rem;
    opacity: 0.5;
    font-style: italic;
}

/* Reading page guide sections */
.reading-guide {
    background: var(--dark-card);
    border: 1px solid rgba(212,175,55,0.15);
    border-radius: 14px;
    overflow: hidden;
    transition: border-color 0.2s;
}
.reading-guide[open] {
    border-color: rgba(212,175,55,0.3);
}
.reading-guide summary {
    color: var(--gold);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 1rem 1.5rem;
    user-select: none;
    transition: color 0.2s;
    list-style: none;
}
.reading-guide summary::-webkit-details-marker {
    display: none;
}
.reading-guide summary:hover {
    color: var(--gold-light);
}
.reading-guide summary::before {
    content: '▸ ';
    font-size: 0.8rem;
    transition: transform 0.2s;
    display: inline-block;
}
.reading-guide[open] summary::before {
    content: '▾ ';
}
.reading-guide > div {
    padding: 0 1.5rem 1.5rem;
}
.reading-guide ol,
.reading-guide ul {
    color: var(--white);
    opacity: 0.85;
    line-height: 2;
    font-size: 0.95rem;
    padding-left: 1.5rem;
}
.reading-guide li {
    margin-bottom: 0.3rem;
}
.seo-details summary {
    user-select: none;
    transition: color 0.2s;
}
.seo-details summary:hover {
    color: var(--gold-light);
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .card-fan { height: 140px; margin-bottom: 1.2rem; }
    .fan-card { width: 59px; height: 100px; margin-left: -29px; }
    .welcome-text { font-size: 0.95rem; }
    .welcome-hint { font-size: 0.8rem; margin-bottom: 2rem; }
    .btn-start-wrapper { width: 130px; height: 130px; }
    .btn-start { width: 84px; height: 84px; font-size: 1rem; }
    .scatter-container { width: 220px; height: 220px; }
    .scatter-card { width: 40px; height: 68px; }
    .picked-slots { gap: 12px; min-height: 125px; margin-bottom: 0.6rem; }
    .arc-stage { height: 270px; }
    .arc-card { width: 33px; height: 56px; }
    .fly-card { width: 33px; height: 56px; }
    .slot-inner { width: 54px; height: 91px; }
    .slot-q { font-size: 22px; }
    .slot-label { font-size: 0.68rem; }
    .result-cards-pc { gap: 10px; }
    .result-card-pc { padding: 0.7rem 0.5rem; }
    .rcp-img { width: 68px; height: 115px; }
    .rcp-name { font-size: 0.85rem; }
    .rcp-desc { font-size: 0.72rem; line-height: 1.45; }
    .result-summary { padding: 0.8rem 1rem; }
    .result-summary p { font-size: 0.75rem; }
}

@media (max-width: 480px) {
    .reading-stage { padding: 0.3rem 0.3rem 1.2rem; }
    .card-fan { height: 120px; margin-bottom: 1rem; }
    .fan-card { width: 48px; height: 81px; margin-left: -24px; }
    .fan-card-img { border-radius: 6px; }
    .welcome-text { font-size: 0.85rem; line-height: 1.7; }
    .welcome-deco { font-size: 14px; }
    .welcome-hint { font-size: 0.72rem; margin-bottom: 1.5rem; }
    .btn-start-wrapper { width: 115px; height: 115px; }
    .btn-start { width: 76px; height: 76px; font-size: 0.88rem; }
    .scatter-container { width: 200px; height: 200px; }
    .scatter-card { width: 34px; height: 57px; border-radius: 4px; }
    .scatter-card img { border-radius: 4px; }
    .shuffle-text { font-size: 0.85rem; }
    .picked-slots { gap: 8px; min-height: 94px; margin-bottom: 0.5rem; }
    .arc-stage { height: 230px; }
    .arc-card { width: 28px; height: 47px; border-radius: 3px; }
    .fly-card { width: 28px; height: 47px; }
    .arc-card-img { border-radius: 3px; border-width: 1px; }
    .slot-inner { width: 40px; height: 68px; border-radius: 6px; border-width: 1.5px; }
    .slot-q { font-size: 18px; }
    .slot-label { font-size: 0.62rem; }
    .deal-prompt { font-size: 0.78rem; }
    .arc-hint { font-size: 0.65rem; }
    .result-title { font-size: 0.75rem; }
    .result-card-mobile { gap: 6px; padding: 6px; }
    .rcm-img { width: 36px; height: 61px; }
    .rcm-name { font-size: 0.82rem; }
    .rcm-desc { font-size: 0.7rem; line-height: 1.45; }
    .rcm-pos { font-size: 0.72rem; }
    .rcm-tag { font-size: 0.6rem; }
    .rcm-header { gap: 6px; }
    .result-summary { padding: 0.7rem 0.8rem; margin-bottom: 1rem; }
    .result-summary p { font-size: 0.7rem; line-height: 1.5; }
    .btn-reshuffle { font-size: 0.75rem; padding: 0.5rem 1.5rem; }
}
