/* debug: cyber_tarot */

/* QRCode.js 會同時產生 <canvas> 和 <img>，只保留 <img> 避免重複顯示 */
#qrcode canvas,
#disconnect-qrcode canvas {
    display: none !important;
}

:root {
    --gold: #d4af37;
    --gold-glow: rgba(212, 175, 55, 0.6);
    --void: #000000;
    --card-width: 300px;
    /* 調整以適?�新�??�?*/
    --card-ratio: 1.715;
    /* 828?1420 ??1420/828 = 1.715 */
}

body,
html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: var(--void);
    font-family: 'Cinzel', serif;
    color: var(--gold);
    user-select: none;
}

/* Background */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* Game Container */
#game-container {
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 10;
    perspective: 1000px;
}

/* UI Overlay */
#ui-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 50px 0;
    box-sizing: border-box;
}

#instruction {
    font-size: 2rem;
    font-weight: bold;
    color: white;
    text-shadow:
        0 0 15px var(--gold-glow),
        0 2px 6px rgba(0, 0, 0, 1),
        0 4px 12px rgba(0, 0, 0, 0.9),
        0 8px 24px rgba(0, 0, 0, 0.8);
    text-align: center;
    margin-top: 20px;
}

#hand-cursor {
    position: absolute;
    width: 30px;
    height: 30px;
    background: radial-gradient(circle, #fff, var(--gold));
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 20px var(--gold), 0 0 40px var(--gold);
    mix-blend-mode: screen;
    pointer-events: none;
    transition: transform 0.1s ease-out;
    z-index: 200;
}

/* Card Carousel */
#card-carousel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Full screen container to prevent any clipping */
    display: flex;
    align-items: center;
    overflow: visible;
    pointer-events: none;
    /* Fog Effect / Edge Masking */
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 25%, black 75%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 25%, black 75%, transparent 100%);
}

/* Re-enable pointer events for cards */
.tarot-card {
    pointer-events: auto;
}

#card-track {
    /* Absolute Positioning Anchor set by JS */
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
}

/* Tarot Card */
/* Tarot Card */
.tarot-card {
    width: 300px;
    height: 515px;
    /* 比例 1.715 (828x1420) → height = 300 × 1.715 ≈ 515 */
    margin: 0 -10px;
    position: relative;
    flex-shrink: 0;
    transform-style: preserve-3d;
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.4, 1),
        filter 0.3s ease,
        margin 0.3s ease;
    border-radius: 4px;
    overflow: visible;
    /* External glow must be visible */
}

/* Glow on the Card Wrapper to avoid clipping by face bounds */
.tarot-card.active {
    z-index: 100;
    /* Multi-layered glow for intensity, controlled by --glow-strength (0 to 1) */
    --glow-strength: 1;

    box-shadow:
        0 0 20px rgba(212, 175, 55, var(--glow-strength)),
        0 0 60px rgba(212, 175, 55, calc(0.6 * var(--glow-strength))),
        0 0 100px rgba(212, 175, 55, calc(0.2 * var(--glow-strength)));
    border-radius: 4px;
}

.face {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    /* Webkit support */
    backface-visibility: hidden;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    background-size: cover;
    background-position: center;
    overflow: hidden;
    /* MASK: Hides corners */
}

.face-back {
    /* Use custom back image */
    background: url('assets/back.png') no-repeat center center;
    background-size: cover;
    border: 2px solid #554400;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: box-shadow 0.3s ease;
    /* Ensure it sits slightly 'forward' in 0deg state */
    transform: rotateY(0deg) translateZ(1px);
}

/* Removed ::after moon overlay */

.face-front {
    background: #fff;
    /* Rotated 180deg and slightly separated */
    transform: rotateY(180deg) translateZ(1px);
    border: 2px solid var(--gold);
}

/* Overlay Layer for back02.png (Simple Fade In) */
.face-back-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-image: url('assets/back02.png');
    opacity: 0;
    z-index: 5;
    pointer-events: none;
    transition: opacity 0.1s linear;
}



/* Active Highlight Inner */
.tarot-card.active .face-back {
    border-color: rgba(255, 255, 255, var(--glow-strength, 1));
    box-shadow: inset 0 0 20px rgba(212, 175, 55, var(--glow-strength, 1));
}

/* QR Code Layer */
#qr-layer {
    transition: opacity 1s ease;
    text-align: center;
}


/* Homepage Titles */
.cyber-title {
    font-family: 'Cinzel', serif;
    font-size: 5rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    margin: 0;
    margin-bottom: -10px;
    /* Reduced gap */
    padding: 0;
    line-height: 1;
    /* Neon Glow Effect */
    text-shadow:
        0 0 10px #ff00de,
        0 0 20px #ff00de,
        0 0 40px #ff00de;
    animation: neonPulse 2s infinite alternate;
}

.sub-title {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    color: #d4af37;
    margin-top: 10px;
    margin-bottom: 30px;
    letter-spacing: 4px;
    text-shadow: 0 4px 15px #000;
    font-weight: 700;
}

@keyframes neonPulse {
    from {
        text-shadow:
            0 0 10px #ff00de,
            0 0 20px #ff00de;
    }

    to {
        text-shadow:
            0 0 20px #ff00de,
            0 0 40px #ff00de,
            0 0 60px #ff00de;
    }
}

/* --- REVEAL STAGE (New Architecture) --- */
#reveal-stage {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3000;
    /* Manual positioning for FLIP animation */
    display: block;
    perspective: 1200px;
    /* Scene Perspective */
    pointer-events: none;
}

.reveal-card {
    position: absolute;
    transform-style: preserve-3d;
    transition:
        top 1s cubic-bezier(0.2, 0.8, 0.2, 1),
        left 1s cubic-bezier(0.2, 0.8, 0.2, 1),
        width 1s cubic-bezier(0.2, 0.8, 0.2, 1),
        height 1s cubic-bezier(0.2, 0.8, 0.2, 1),
        transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);

    /* Initial state will be set by JS via inline styles to match source card */
    transform-origin: center center;
}



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

.reveal-face {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 4px;
    box-shadow: 0 0 50px var(--gold-glow);
    background-size: cover;
    background-position: center;
    overflow: hidden;
    /* Mask Corners */
}

.reveal-face.back {
    /* Custom Back */
    background: url('assets/back.png') no-repeat center center;
    background-size: cover;
    border: 3px solid #554400;
    transform: rotateY(0deg) translateZ(1px);
    /* Push forward slightly */
}

.reveal-face.front {
    background-color: #fff;
    border: 3px solid var(--gold);
    transform: rotateY(180deg) translateZ(1px);
    /* Push forward slightly */
}

/* Spread Display */
#spread-display {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    animation: fadeIn 1s forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

#spread-cards {
    display: flex;
    gap: 40px;
    margin-bottom: 50px;
    perspective: 1000px;
}

.result-card {
    width: 300px;
    height: 515px;
    /* 比例 1.715 (828x1420) → height = 300 × 1.715 ≈ 515 */
    background-size: cover;
    border-radius: 4px;
    border: 2px solid var(--gold);
    box-shadow: 0 0 50px rgba(212, 175, 55, 0.2);
    opacity: 0;
    transform: translateY(50px) rotateY(90deg);
    animation: revealCard 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.result-card.reversed {
    animation-name: revealCardReversed;
}

@keyframes revealCardReversed {
    to {
        opacity: 1;
        transform: translateY(0) rotateZ(180deg);
    }
}

@keyframes revealCard {
    to {
        opacity: 1;
        transform: translateY(0) rotateY(0);
    }
}

#interpretations {
    text-align: center;
}

.result-text {
    font-size: 1.5rem;
    color: #fff;
    margin: 10px 0;
    opacity: 0;
    animation: slideUp 1s forwards;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Buttons */
/* Premium Metallic Button */
button {
    /* Shape & Size */
    padding: 15px 60px;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    margin-top: 30px;

    /* Typography */
    font-family: 'Cinzel', serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
    /* Text Pop */

    /* Metallic Gold Gradient Background */
    background: linear-gradient(110deg,
            #aa771c 0%,
            #bf953f 25%,
            #fcf6ba 50%,
            #bf953f 75%,
            #aa771c 100%);
    background-size: 200% auto;

    /* Depth & Glow */
    box-shadow:
        0 5px 15px rgba(0, 0, 0, 0.5),
        /* Depth */
        0 0 30px rgba(212, 175, 55, 0.3),
        /* Outer Glow */
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    /* Top Highlight */

    /* Animation */
    animation: shine 4s linear infinite;
    transition: transform 0.2s, box-shadow 0.2s;
}

button:hover {
    transform: scale(1.05);
    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.6),
        0 0 50px rgba(212, 175, 55, 0.8),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

button:active {
    transform: scale(0.95);
}

@keyframes shine {
    to {
        background-position: 200% center;
    }
}

/* --- Card Disintegration Effects --- */
@keyframes shake {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    25% {
        transform: translate(-5px, 5px) rotate(-5deg);
    }

    50% {
        transform: translate(5px, -5px) rotate(5deg);
    }

    75% {
        transform: translate(-5px, -5px) rotate(-5deg);
    }

    100% {
        transform: translate(5px, 5px) rotate(5deg);
    }
}

.energy-overload {
    /* No transform override here! Parent keeps its position. */
    z-index: 9999 !important;
}

.energy-overload .reveal-face {
    /* Shake the inner faces instead */
    animation: shake 0.1s infinite;
    filter: brightness(2) drop-shadow(0 0 20px gold);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
}

/* ... Buttons ... */
.hidden {
    display: none !important;
}

/* --- ECO / CASTING MODE --- */
#btn-eco {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 500;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--gold);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 1.5rem;
    display: none;              /* 預設隱藏，由 JS 在手機版顯示 */
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s;
}

#btn-eco:hover {
    background: var(--gold);
    box-shadow: 0 0 20px var(--gold-glow);
}

#eco-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: black;
    /* Solid Black */
    opacity: 0;
    /* Hidden by default */
    pointer-events: none;
    /* Let clicks pass when hidden */
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 1s ease;
    color: #444;
    font-family: sans-serif;
    text-align: center;
}

/* Active Eco Mode */
body.eco-active #eco-overlay {
    opacity: 0.95;
    /* 95% Black */
    pointer-events: auto;
    /* Capture clicks to unlock */
}

body.eco-active #ui-overlay,
body.eco-active #btn-eco,
body.eco-active #qr-layer {
    opacity: 0;
    /* Hide UI interaction elements */
    transition: opacity 0.5s;
}

/* Pulse animation for Eco Text */
.eco-text {
    animation: pulse 3s infinite;
}

@keyframes pulse {
    0% {
        opacity: 0.3;
    }

    50% {
        opacity: 0.7;
    }

    100% {
        opacity: 0.3;
    }
}

/* --- Category Selector Styles --- */
.category-selector-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    background: rgba(0, 0, 0, 0.85);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: auto;
}

.category-selector-container.visible {
    opacity: 1;
}

.category-title-area {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(25% - 150px);
    transform: translateY(-50%);
    text-align: center;
}

.category-title {
    font-family: 'Cinzel', serif;
    font-size: 3.75rem;
    font-weight: bold;
    color: #ffffff;
    margin: 0;
    text-shadow: 0 0 20px #d4af37;
}

.category-title-en {
    font-family: 'Cinzel', serif;
    font-style: italic;
    font-size: 1.6rem;
    color: #667152;
    letter-spacing: 0.05em;
    margin: 0.5rem 0 0 0;
    text-shadow: none;
}

.category-list {
    display: flex;
    gap: 90px;
    perspective: 100px;
}

.category-card {
    width: 300px;
    height: auto;
    background: transparent;
    position: relative;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: visible;
    border: none;
    /* Removed border */
}

.category-card .cat-img {
    width: 100%;
    height: 515px;
    /* 比例 1.715 (828x1420) → height = 300 × 1.715 ≈ 515 */
    background-size: cover;
    background-position: center;
    opacity: 0.7;
    transition: opacity 0.3s, border-color 0.3s, box-shadow 0.3s;

    /* Move Border/Style here */
    border: 3px solid #554400;
    border-radius: 22px;
    background-color: rgba(0, 0, 0, 0.5);
    position: relative;
    /* For Progress Bar */
    overflow: hidden;
}

.category-card .cat-label {
    height: auto;
    width: 100%;
    margin-top: 22px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: transparent;
    border: none;
    transition: color 0.3s, text-shadow 0.3s;
}

.category-card .cat-label-zh {
    color: #ccc;
    font-family: 'Noto Sans TC', sans-serif;
    font-size: 2.2rem;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    transition: color 0.3s, text-shadow 0.3s;
}

.category-card .cat-label-en {
    color: #999;
    font-family: 'Cinzel', serif;
    font-size: 1.4rem;
    font-weight: 400;
    margin-top: 6px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    text-transform: capitalize;
    transition: color 0.3s, text-shadow 0.3s;
}

.category-card.hover,
.category-card:hover {
    transform: scale(1.15) translateY(-20px);
    z-index: 10;
}

.category-card.hover .cat-img,
.category-card:hover .cat-img {
    opacity: 1;
    border-color: #fff;
    box-shadow: 0 0 30px var(--gold-glow);
}

.category-card.hover .cat-label-zh,
.category-card:hover .cat-label-zh {
    color: var(--gold);
    text-shadow: 0 0 10px var(--gold);
}

.category-card.hover .cat-label-en,
.category-card:hover .cat-label-en {
    color: var(--gold);
    text-shadow: 0 0 8px var(--gold);
}

.category-card.selected {
    transform: scale(1.15);
}

.category-card.selected .cat-img {
    border-color: #ff00de;
    box-shadow: 0 0 50px #ff00de;
}

.cat-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 8px;
    background: transparent;
}

.cat-progress-fill {
    height: 100%;
    width: 0%;
    background: #ff00de;
    transition: width 0.1s linear;
    box-shadow: 0 0 10px #ff00de;
}

/* --- Direction Selector Styles (Two-Option) --- */
.direction-selector-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.85);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: auto;
}

.direction-selector-container.visible {
    opacity: 1;
}

.direction-title {
    font-family: 'Cinzel', serif;
    font-size: 3.75rem;
    color: #ffffff;
    margin-bottom: 0;
    transform: translateY(-140px);
    text-shadow: none;
    text-align: center;
}

.direction-method-sub {
    font-family: 'Noto Sans TC', sans-serif;
    font-size: 1.15rem;
    color: #667152;
    text-align: center;
    margin-top: 10px;
    margin-bottom: 16px;
    transform: translateY(-160px);
    letter-spacing: 0.5px;
    line-height: 1.6;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.direction-subtitle {
    font-family: 'Noto Sans TC', sans-serif;
    font-size: 1.05rem;
    color: #aaa;
    text-align: center;
    margin-bottom: 30px;
    transform: translateY(-180px) scale(1.5);
    letter-spacing: 1px;
}

.direction-list {
    display: flex;
    gap: 150px;
    perspective: 100px;
}

.direction-card {
    width: 375px;
    height: auto;
    background: transparent;
    position: relative;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: visible;
    border: none;
}

.direction-card .dir-img {
    width: 100%;
    height: 643px;
    /* 375 × 1.715 ≈ 643 */
    background-size: cover;
    background-position: center;
    opacity: 0.7;
    transition: opacity 0.3s, border-color 0.3s, box-shadow 0.3s;
    border: 3px solid #554400;
    border-radius: 22px;
    background-color: rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.direction-card .dir-label {
    width: 100%;
    margin-top: 14px;
    margin-bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-size: 2.25rem;
    font-weight: bold;
    background: transparent;
    border: none;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    transition: color 0.3s, text-shadow 0.3s;
    white-space: nowrap;
}

.direction-card .dir-subtext {
    color: #888;
    font-size: 1.35rem;
    margin-top: 6px !important;
    display: block;
    text-align: center;
}

.direction-card.hover,
.direction-card:hover {
    transform: scale(1.15) translateY(-20px);
    z-index: 10;
}

.direction-card.hover .dir-img,
.direction-card:hover .dir-img {
    opacity: 1;
    border-color: #fff;
    box-shadow: 0 0 30px var(--gold-glow);
}

.direction-card.hover .dir-label,
.direction-card:hover .dir-label {
    color: var(--gold);
    text-shadow: 0 0 10px var(--gold);
}

.direction-card.selected {
    transform: scale(1.15);
}

.direction-card.selected .dir-img {
    border-color: #ff00de;
    box-shadow: 0 0 50px #ff00de;
}

/* === 已付費待啟動：卡牌發光效果 === */
.direction-card.paid-ready {
    position: relative;
}

.direction-card.paid-ready .dir-img {
    opacity: 1;
    border-color: #e49314;
    box-shadow: 0 0 25px rgba(228, 147, 20, 0.6), 0 0 50px rgba(228, 147, 20, 0.3);
    animation: paid-card-glow 2.5s ease-in-out infinite;
}

.direction-card.paid-ready .dir-label {
    color: #e49314;
    text-shadow: 0 0 10px rgba(228, 147, 20, 0.6);
}

@keyframes paid-card-glow {
    0%, 100% {
        box-shadow: 0 0 25px rgba(228, 147, 20, 0.6), 0 0 50px rgba(228, 147, 20, 0.3);
    }
    50% {
        box-shadow: 0 0 35px rgba(228, 147, 20, 0.8), 0 0 70px rgba(228, 147, 20, 0.4);
    }
}

/* 已付費標籤（卡牌上方） */
.paid-badge-container {
    position: absolute;
    top: -95px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    pointer-events: none;
}

.paid-badge {
    background: rgba(0, 0, 0, 0.85);
    border: 2px solid #ff9c00;
    border-radius: 8px;
    padding: 6px 16px;
    color: #ff9c00;
    font-size: 1.1rem;
    font-weight: bold;
    white-space: nowrap;
    text-shadow: 0 0 6px rgba(255, 156, 0, 0.5);
    font-family: 'Noto Sans TC', sans-serif;
    animation: paid-badge-pulse 2.5s ease-in-out infinite;
}

.paid-badge-sub {
    color: #e49314;
    font-size: 0.95rem;
    font-weight: bold;
    text-shadow: 0 0 6px rgba(228, 147, 20, 0.5);
    font-family: 'Noto Sans TC', sans-serif;
}

@keyframes paid-badge-pulse {
    0%, 100% {
        border-color: #ff9c00;
        box-shadow: 0 0 8px rgba(255, 156, 0, 0.3);
    }
    50% {
        border-color: #e49314;
        box-shadow: 0 0 16px rgba(228, 147, 20, 0.5);
    }
}

.dir-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 8px;
    background: transparent;
}

.dir-progress-fill {
    height: 100%;
    width: 0%;
    background: #ff00de;
    transition: width 0.1s linear;
    box-shadow: 0 0 10px #ff00de;
}

/* --- Direction Close Gesture Hint --- */
.direction-close-hint {
    margin-top: 40px;
    text-align: center;
    opacity: 0.5;
    transition: opacity 0.3s;
}

.direction-close-hint p {
    color: #888;
    font-size: 0.85rem;
    margin: 0 0 8px 0;
    font-family: 'Noto Sans TC', sans-serif;
    letter-spacing: 0.5px;
    transition: color 0.3s;
}

.direction-close-hint:has(.close-progress-fill[style*="width"]:not([style*="width: 0"])) {
    opacity: 1;
}

.direction-close-hint:hover,
.direction-close-hint.active {
    opacity: 1;
}

.close-progress-bar {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin: 0 auto;
    overflow: hidden;
}

.close-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #d4af37, #f0d060);
    transition: width 0.1s linear;
    border-radius: 2px;
}

/* ====================================
   ʵet (Ritual Animation System)
   ==================================== */

/* 3D Rx */
#ritual-stage {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Restored perspective to match app.js #game-container */
    perspective: 1000px;
    transform-style: preserve-3d;
    z-index: 2000;
    overflow: hidden;
    background: transparent;
}

#ritual-stage.hidden {
    display: none;
}

#ritual-instruction {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.5s ease;
    text-align: center;
    width: 80%;
}

#ritual-main-text {
    font-family: 'Cinzel', serif;
    font-size: 2.4rem;
    font-weight: bold;
    color: #fff;
    text-shadow:
        0 0 20px var(--gold-glow),
        0 0 40px var(--gold-glow),
        0 2px 8px rgba(0, 0, 0, 1),
        0 4px 16px rgba(0, 0, 0, 0.95),
        0 8px 32px rgba(0, 0, 0, 0.9),
        0 16px 48px rgba(0, 0, 0, 0.8),
        0 0 80px rgba(0, 0, 0, 1);
    line-height: 1.3;
    margin-bottom: 0.25rem;
    white-space: nowrap;
}

#ritual-sub-text {
    font-family: 'Cinzel', serif;
    font-size: 1.6rem;
    font-weight: bold;
    color: #5dc0d5;
    text-shadow:
        0 0 20px rgba(93, 192, 213, 0.6),
        0 0 40px rgba(93, 192, 213, 0.4),
        0 2px 8px rgba(0, 0, 0, 1),
        0 4px 16px rgba(0, 0, 0, 0.95),
        0 8px 32px rgba(0, 0, 0, 0.9),
        0 16px 48px rgba(0, 0, 0, 0.8),
        0 0 80px rgba(0, 0, 0, 1);
    line-height: 1.4;
}

.ritual-card {
    position: absolute;
    width: 300px;
    height: 515px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 4px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    transform-style: preserve-3d;
    will-change: transform, opacity;
    box-shadow: none;
    transition: box-shadow 0.3s ease;
}

.ritual-card.stacked {
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.2);
}

.ritual-card.shuffling {
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.4), 0 0 50px rgba(0, 255, 255, 0.2);
}

.ritual-card.fan-active {
    border: 2px solid var(--gold);
    box-shadow: 0 0 30px var(--gold-glow), 0 0 60px rgba(212, 175, 55, 0.3);
}

#ritual-stage::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300px;
    height: 300px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(212, 175, 55, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

#ritual-stage.center-glow::before {
    opacity: 1;
}

#shuffle-progress {
    position: absolute;
    bottom: 15%;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#shuffle-progress.visible {
    opacity: 1;
}

#shuffle-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #00ffff, #ff00de);
    border-radius: 3px;
    transition: width 0.1s linear;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
}

/* ====================================
   AI Analysis Result Panel
   ==================================== */
#ai-result-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 5000;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

#ai-result-panel.visible {
    opacity: 1;
    pointer-events: auto;
}

.ai-result-scroll-area {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow-y: auto;
    padding: 30px 0;
    /* 底部留出空間給懸浮手勢面板 */
    padding-bottom: 160px;
    box-sizing: border-box;
}

.ai-result-container {
    width: 90%;
    max-width: 700px;
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    border: 2px solid #d4af37;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 0 50px rgba(212, 175, 55, 0.3), 0 0 100px rgba(212, 175, 55, 0.1);
}

.ai-result-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #333;
}

.ai-result-header .ai-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.ai-result-header h2 {
    color: #d4af37;
    font-size: 2rem;
    margin: 0;
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
}

.ai-result-header .ai-subtitle {
    color: #888;
    font-size: 0.9rem;
    margin-top: 5px;
}

.ai-question-section {
    background: rgba(212, 175, 55, 0.1);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
}

.ai-question-section h3 {
    color: #d4af37;
    font-size: 1rem;
    margin: 0 0 10px 0;
}

.ai-question-section p {
    color: #fff;
    font-size: 1.1rem;
    margin: 0;
    font-style: italic;
}

.ai-result-content {
    margin-bottom: 20px;
}

.ai-result-content h3 {
    color: #d4af37;
    font-size: 1.2rem;
    margin-bottom: 15px;
}

#ai-result-text {
    color: #ccc;
    line-height: 1.8;
    font-size: 1rem;
}

#ai-result-text p {
    margin-bottom: 15px;
}

#ai-result-text .loading-text {
    text-align: center;
    color: #888;
    font-style: italic;
    animation: pulse 1.5s ease-in-out infinite;
}

#ai-result-text .loading-subtext {
    text-align: center;
    color: #666;
    font-size: 0.85rem;
    margin-top: 5px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #333;
    border-top-color: #d4af37;
    border-radius: 50%;
    margin: 20px auto;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* === 懸浮底部手勢操作面板 === */
.ai-gesture-dock {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 5100;
    pointer-events: none;
}

/* 羽化漸層遮罩：10px 從透明到背景色，避免切割線 */
.ai-gesture-dock-fade {
    width: 100%;
    height: 10px;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(10,10,10,1) 100%);
    pointer-events: none;
}

.ai-gesture-dock-inner {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 0;
    background: linear-gradient(135deg, #0e0e0e 0%, #0a0a0a 100%);
    padding: 18px 20px 24px 20px;
    pointer-events: auto;
}

/* 每個手勢動作區塊 */
.ai-gesture-action {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    max-width: 280px;
    transition: opacity 0.3s;
}

.ai-gesture-action.active .ai-gesture-emoji {
    transform: scale(1.15);
    filter: drop-shadow(0 0 18px rgba(212, 175, 55, 0.8));
}

/* 大型手勢圖示 */
.ai-gesture-emoji {
    font-size: 3rem;
    line-height: 1;
    transition: transform 0.3s, filter 0.3s;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.6));
}

/* 手勢說明文字 */
.ai-gesture-label {
    color: #bbb;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    transition: color 0.3s;
}

.ai-gesture-action.active .ai-gesture-label {
    color: #d4af37;
}

/* 完成狀態 */
.ai-gesture-action.done .ai-gesture-label {
    color: #4caf50;
}

/* 中間分隔線 */
.ai-gesture-divider {
    width: 1px;
    background: linear-gradient(to bottom, transparent 10%, #444 50%, transparent 90%);
    margin: 0 10px;
    align-self: stretch;
}

/* 各自獨立的進度條 */
.ai-gesture-progress-bar {
    width: 100%;
    max-width: 200px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.ai-gesture-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #d4af37, #f0d060);
    transition: width 0.1s linear;
    border-radius: 3px;
}

/* 複製成功時進度條變綠 */
.ai-gesture-action.done .ai-gesture-progress-fill {
    background: linear-gradient(90deg, #4caf50, #66bb6a);
}

/* 關閉進度條保持金色 */
#ai-gesture-close .ai-gesture-progress-fill {
    background: linear-gradient(90deg, #d4af37, #f0d060);
}

/* 閱讀倒數提示（蓋在底部面板上方） */
.ai-gesture-dock-inner .ai-reading-countdown {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(10, 10, 10, 0.92);
    color: #888;
    font-size: 1rem;
    pointer-events: none;
    transition: opacity 0.3s;
}

/* AI Reading Content Styles */
.ai-reading {
    color: #ddd;
    line-height: 1.8;
}

.ai-reading h3 {
    color: #d4af37;
    font-size: 1.3rem;
    margin: 20px 0 10px 0;
    border-bottom: 1px solid #333;
    padding-bottom: 8px;
}

.ai-reading h4 {
    color: #c9a227;
    font-size: 1.1rem;
    margin: 15px 0 8px 0;
}

.ai-reading p {
    margin-bottom: 10px;
}

.ai-reading ul,
.ai-reading ol {
    margin-left: 20px;
    margin-bottom: 15px;
}

.ai-reading li {
    margin-bottom: 8px;
}

.ai-reading strong {
    color: #fff;
}

.energy-desc {
    color: #999;
    font-style: italic;
    font-size: 0.9rem;
}

/* ============================================================
   追問系統 (Follow-up) 樣式
   ============================================================ */

/* 追問對話區 */
.ai-followup-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #333;
}

.ai-followup-section.hidden {
    display: none;
}

/* 追問問題 */
.followup-entry {
    margin-bottom: 24px;
}

.followup-question {
    background: rgba(124, 77, 255, 0.10);
    border-left: 3px solid #7c4dff;
    padding: 12px 16px;
    margin-bottom: 12px;
    border-radius: 0 8px 8px 0;
}

.followup-label {
    display: block;
    color: #b388ff;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.followup-question p {
    color: #eee;
    margin: 0;
    line-height: 1.6;
}

/* 追問回覆 */
.followup-answer {
    margin-bottom: 20px;
    padding-left: 8px;
}

.followup-reading {
    color: #ddd;
    line-height: 1.8;
}

/* 追問載入中 */
#ai-followup-loading {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #999;
    font-size: 0.95rem;
    padding: 16px 0;
}

#ai-followup-loading.hidden {
    display: none;
}

.loading-spinner.small {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

/* 追問用盡提示 */
.followup-exhausted {
    text-align: center;
    color: #888;
    font-size: 0.9rem;
    padding: 16px 0;
    border-top: 1px dashed #333;
    margin-top: 16px;
}

/* 追問錯誤提示 */
.followup-error {
    color: #e57373;
    font-size: 0.9rem;
    padding: 12px 0;
}

/* 追問按鈕（gesture dock 中） */
#ai-gesture-followup {
    position: relative;
}

#ai-gesture-followup .ai-gesture-progress-fill {
    background: linear-gradient(90deg, #7c4dff, #b388ff);
}

.ai-followup-remaining {
    font-size: 0.7rem;
    color: #b388ff;
    margin-top: 2px;
    text-align: center;
}

/* --- Guidance Overlay --- */
#guidance-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2500;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

#guidance-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.guidance-content {
    display: flex;
    max-width: 1400px;
    width: 90%;
    height: 85%;
    gap: 50px;
    background: radial-gradient(circle at center, rgba(30, 30, 30, 0.4), rgba(0, 0, 0, 0.8));
    border-radius: 20px;
    padding: 40px;
    box-sizing: border-box;
    border: 1px solid rgba(212, 175, 55, 0.2);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
}

.guidance-left {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    /* Fix image overflow */
}

/* Ensure picture tag fills the container to allow img to scale properly */
.guidance-left picture {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

.guidance-left img {
    width: auto;
    /* changed from max-width to allow shrinking */
    height: auto;
    /* changed from max-height */
    max-width: 100%;
    /* Constrain within parent */
    max-height: 100%;
    /* Constrain within parent */
    object-fit: contain;
    border-radius: 10px;
}

.guidance-right {
    flex: 1.2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #e0e0e0;
    font-family: 'Noto Sans TC', 'Microsoft JhengHei', sans-serif;
    font-size: 1.1rem;
    line-height: 1.6;
}

.guidance-top-hint {
    color: #afafaf;
    font-size: 1.8rem;
    margin: 0 0 20px 0;
    font-weight: normal;
    line-height: 1.4;
}

.guidance-right h2 {
    color: #d4af37;
    font-size: 2.5rem;
    margin: 0 0 30px 0;
    font-weight: normal;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.4);
}

.guidance-section {
    margin-bottom: 30px;
}

.guidance-section h3 {
    color: #d4af37;
    font-size: 1.2rem;
    margin-bottom: 10px;
    font-weight: normal;
}

.example-bad {
    color: #ff6685;
    margin: 5px 0;
}

.example-good {
    color: #4dcfff;
    margin: 5px 0;
    font-weight: bold;
}



.focus-point {
    color: #888;
    font-size: 1rem;
    margin-top: 8px;
}

.guidance-footer {
    margin-top: auto;
    text-align: left;
    /* Aligned with text block */
    color: #a075bf;
    font-size: 1.1rem;
    padding-top: 20px;
    white-space: nowrap;
}

/* --- 驗證過程畫面 --- */
.guidance-verify {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 24px;
    z-index: 2;
    background: rgba(10, 5, 20, 0.95);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.guidance-verify.visible {
    opacity: 1;
    pointer-events: auto;
}

.guidance-verify.hidden {
    display: none;
}

.verify-icon {
    font-size: 4rem;
    animation: verifyPulse 2s ease-in-out infinite;
}

@keyframes verifyPulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.15); opacity: 1; }
}

.verify-text {
    color: #d4af37;
    font-size: 1.6rem;
    font-weight: 400;
    text-align: center;
    text-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
    transition: all 0.4s ease;
}

.verify-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(212, 175, 55, 0.2);
    border-top-color: #d4af37;
    border-radius: 50%;
    animation: verifySpinnerRotate 1s linear infinite;
}

@keyframes verifySpinnerRotate {
    100% { transform: rotate(360deg); }
}

.verify-question {
    color: #aaa;
    font-size: 1.1rem;
    font-style: italic;
    max-width: 500px;
    text-align: center;
    line-height: 1.5;
    opacity: 0;
    transition: opacity 0.5s ease 0.3s;
}

.guidance-verify.visible .verify-question {
    opacity: 1;
}

/* 驗證成功狀態 */
.guidance-verify.success .verify-icon {
    animation: none;
    transform: scale(1.2);
}

.guidance-verify.success .verify-spinner {
    animation: none;
    border-color: #64c864;
}

.guidance-verify.success .verify-text {
    color: #64c864;
    text-shadow: 0 0 15px rgba(100, 200, 100, 0.4);
}

/* ============================================================
   手機直式旋轉提示遮罩
   ============================================================ */
#rotate-overlay {
    display: none; /* 預設隱藏，由 JS 控制顯示 */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 99999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

#rotate-overlay.visible {
    display: flex;
}

.rotate-content {
    text-align: center;
    animation: rotateFloat 2.5s ease-in-out infinite;
}

.rotate-icon {
    margin-bottom: 20px;
    animation: rotatePulse 2s ease-in-out infinite;
}

.rotate-text {
    font-family: 'Noto Sans TC', sans-serif;
    font-size: 1.5rem;
    color: #d4af37;
    margin: 10px 0 5px;
    letter-spacing: 3px;
}

.rotate-subtext {
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    color: #888;
    letter-spacing: 2px;
}

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

@keyframes rotatePulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* ============================================================
   Google 登入區域（QR 頁面內）
   ============================================================ */
#google-signin-area {
    text-align: center;
}

.google-signin-hint {
    color: #666;
    font-size: 0.8rem;
    margin-top: 8px;
    letter-spacing: 0.5px;
}

#user-info-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 8px 16px;
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 8px;
}

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

#user-display-name {
    color: var(--gold);
    font-size: 0.9rem;
}

/* ============================================================
   QR 頁面底部法律連結
   ============================================================ */
.qr-legal-links {
    margin-top: 20px;
    font-size: 0.8rem;
    color: #666;
    pointer-events: auto;
    letter-spacing: 1px;
}

.qr-legal-links a {
    color: #888;
    text-decoration: none;
    transition: color 0.3s ease;
    cursor: pointer;
}

.qr-legal-links a:hover {
    color: var(--gold);
    text-decoration: underline;
}

.legal-divider {
    color: #555;
    margin: 0 6px;
}

/* ============================================================
   法律文件覆疊彈窗 (LegalOverlay)
   ============================================================ */
.legal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100000;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.legal-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.legal-overlay.hiding {
    opacity: 0;
    pointer-events: none;
}

.legal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
}

.legal-container {
    position: relative;
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    background: linear-gradient(
        180deg,
        rgba(20, 15, 30, 0.98) 0%,
        rgba(10, 8, 20, 0.98) 100%
    );
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8),
                0 0 40px rgba(212, 175, 55, 0.1);
}

/* 關閉按鈕 */
.legal-close-btn {
    position: absolute;
    top: 12px;
    right: 16px;
    z-index: 10;
    background: none;
    border: none;
    color: #888;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
    transition: color 0.3s ease;
}

.legal-close-btn:hover {
    color: #fff;
}

.legal-close-btn:focus,
.legal-close-btn:focus-visible {
    outline: none;
}

/* 可滾動內容 */
.legal-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 40px 35px;
    z-index: 2;
}

.legal-scroll::-webkit-scrollbar {
    width: 6px;
}

.legal-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.legal-scroll::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.3);
    border-radius: 3px;
}

.legal-content {
    position: relative;
}

/* 標題 */
.legal-main-title {
    text-align: center;
    font-family: 'Cinzel', 'Noto Sans TC', serif;
    font-size: 2rem;
    color: var(--gold);
    margin-bottom: 8px;
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
}

.legal-update-date {
    text-align: center;
    font-size: 0.8rem;
    color: #777;
    margin-bottom: 30px;
}

/* 各段落 */
.legal-section {
    margin-bottom: 25px;
}

.legal-section h3 {
    color: #d4af37;
    font-family: 'Noto Sans TC', sans-serif;
    font-size: 1.1rem;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.legal-section p {
    color: #ccc;
    font-family: 'Noto Sans TC', sans-serif;
    font-size: 0.95rem;
    line-height: 1.8;
    margin: 0 0 10px 0;
}

.legal-section strong {
    color: #fff;
}

.legal-section em {
    color: #aaa;
    font-style: italic;
}

.legal-section ul {
    list-style: none;
    padding-left: 20px;
    margin: 10px 0;
}

.legal-section ul li {
    color: #ccc;
    font-size: 0.95rem;
    line-height: 1.8;
    position: relative;
    padding-left: 15px;
    margin-bottom: 6px;
}

.legal-section ul li::before {
    content: '◆';
    position: absolute;
    left: 0;
    color: rgba(212, 175, 55, 0.5);
    font-size: 0.6rem;
    top: 4px;
}

.legal-note {
    border-top: 1px solid rgba(212, 175, 55, 0.15);
    padding-top: 15px;
    margin-top: 10px;
}

.legal-note p {
    color: #999;
    font-size: 0.85rem;
    font-style: italic;
}

/* 響應式 */
@media (max-width: 768px) {
    .legal-container {
        max-height: 90vh;
        width: 95%;
    }

    .legal-scroll {
        padding: 30px 20px;
    }

    .legal-main-title {
        font-size: 1.5rem;
    }
}