/* 神祕學塔羅牌系統樣式檔 (260621) */
/* 核心設計概念：深邃紫黑星空底色、玻璃擬物化面板、金色微光發光字體與滑順的微動畫 */

:root {
    --primary-color: #3b1154;
    --secondary-color: #ffd700;
    --secondary-glow: rgba(255, 215, 0, 0.4);
    --bg-color: #0c0817;
    --card-bg: rgba(30, 24, 47, 0.65);
    --card-border: rgba(255, 215, 0, 0.15);
    --text-color: #e6e3f0;
    --text-muted: #a69fb5;
    --accent-upright: #2e7d32;
    --accent-reversed: #c62828;
    --shadow-color: rgba(0, 0, 0, 0.6);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'PingFang TC', 'Heiti TC', 'Microsoft JhengHei', sans-serif;
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(at 20% 20%, rgba(59, 17, 84, 0.3) 0px, transparent 50%),
        radial-gradient(at 80% 80%, rgba(13, 8, 48, 0.6) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-color);
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
}

header {
    text-align: center;
    padding: 3rem 0 2rem 0;
    width: 100%;
}

h1 {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin: 0;
    letter-spacing: 6px;
    text-shadow: 0 0 12px var(--secondary-glow);
    font-weight: 700;
}

.menu {
    margin-bottom: 2.5rem;
    display: flex;
    gap: 1.2rem;
    flex-wrap: wrap;
    justify-content: center;
    width: 90%;
    max-width: 800px;
}

button {
    padding: 0.8rem 1.8rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    background: rgba(59, 17, 84, 0.2);
    color: var(--secondary-color);
    border: 1.5px solid var(--secondary-color);
    border-radius: 30px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

button:hover {
    background-color: var(--secondary-color);
    color: var(--bg-color);
    box-shadow: 0 0 20px var(--secondary-glow);
    transform: translateY(-2px);
}

button:active {
    transform: translateY(0);
}

#stage {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2.5rem;
    width: 90%;
    max-width: 1200px;
    margin-bottom: 4rem;
}

.tarot-card {
    width: 340px;
    background: var(--card-bg);
    border: 1.5px solid var(--card-border);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 35px var(--shadow-color);
    backdrop-filter: blur(10px);
    animation: cardReveal 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.tarot-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.7), 0 0 15px rgba(255, 215, 0, 0.15);
    border-color: rgba(255, 215, 0, 0.35);
}

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

.card-header {
    background: rgba(0, 0, 0, 0.4);
    padding: 1.2rem;
    text-align: center;
    border-bottom: 1.5px solid rgba(255, 215, 0, 0.1);
}

.pos-label {
    font-size: 0.8rem;
    color: var(--secondary-color);
    margin-bottom: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: rgba(255, 215, 0, 0.08);
    padding: 5px 12px;
    border-radius: 20px;
    display: inline-block;
    border: 1px solid rgba(255, 215, 0, 0.15);
}

.pos-insight {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 1.2rem;
    line-height: 1.6;
    padding: 12px;
    background: rgba(0, 0, 0, 0.25);
    border-left: 3px solid var(--secondary-color);
    border-radius: 4px;
    text-align: justify;
}

.card-name {
    font-size: 1.5rem;
    color: #fff;
    font-weight: 700;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.card-orientation {
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 0.6rem;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    display: inline-block;
    letter-spacing: 1px;
}

.upright { 
    background-color: rgba(46, 125, 50, 0.25); 
    color: #a5d6a7; 
    border: 1px solid rgba(76, 175, 80, 0.4);
}
.reversed { 
    background-color: rgba(198, 40, 40, 0.25); 
    color: #ef9a9a; 
    border: 1px solid rgba(244, 67, 54, 0.4);
}

.card-body {
    padding: 1.5rem;
    flex-grow: 1;
}

.keywords {
    font-style: italic;
    color: var(--text-muted);
    margin-bottom: 1.2rem;
    border-bottom: 1px solid rgba(255, 215, 0, 0.1);
    padding-bottom: 0.8rem;
    font-size: 0.95rem;
    text-align: center;
}

.meanings {
    margin: 0;
    padding-left: 1rem;
    line-height: 1.7;
    color: var(--text-color);
}

.meanings li {
    margin-bottom: 0.6rem;
    font-size: 0.92rem;
}

#instructions {
    border: 1.5px solid var(--card-border);
    box-shadow: 0 15px 35px var(--shadow-color);
    backdrop-filter: blur(10px);
    animation: cardReveal 0.6s ease-out;
}

#instructions h2 {
    margin-top: 0;
    font-size: 1.6rem;
    letter-spacing: 2px;
}

#instructions h3 {
    color: var(--secondary-color);
    border-left: 3px solid var(--secondary-color);
    padding-left: 10px;
    margin-top: 1.8rem;
}

#library {
    width: 90%;
    max-width: 1000px;
    display: none;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1.2rem;
    margin-bottom: 4rem;
    animation: cardReveal 0.6s ease-out;
}

.lib-item {
    background: rgba(30, 24, 47, 0.4);
    border: 1px solid rgba(255, 215, 0, 0.08);
    padding: 1.2rem 0.8rem;
    text-align: center;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    font-weight: 500;
    color: var(--text-muted);
}

.lib-item:hover {
    transform: scale(1.06);
    background: rgba(59, 17, 84, 0.3);
    border-color: rgba(255, 215, 0, 0.3);
    color: var(--secondary-color);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

footer {
    margin-top: auto;
    padding: 3rem 2rem 2rem 2rem;
    color: #555066;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

@media (max-width: 600px) {
    .tarot-card { 
        width: 100%; 
    }
    
    h1 {
        font-size: 2rem;
    }
    
    button {
        padding: 0.7rem 1.4rem;
        font-size: 0.9rem;
    }
    
    #stage {
        gap: 1.5rem;
    }
}
