/* 塔羅牌前台樣式 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@300;700&display=swap');

.card-title-box {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 2px solid transparent;
    color: white;
    text-align: center;
    font-weight: 700;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 4.5rem;
}

.tarot-cards-container {
    font-family: 'Noto Sans TC', sans-serif;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: #1a1a1a;
    background-image: linear-gradient(0deg, transparent 24%, rgba(255, 255, 255, .05) 25%, rgba(255, 255, 255, .05) 26%, transparent 27%, transparent 74%, rgba(255, 255, 255, .05) 75%, rgba(255, 255, 255, .05) 76%, transparent 77%, transparent), linear-gradient(90deg, transparent 24%, rgba(255, 255, 255, .05) 25%, rgba(255, 255, 255, .05) 26%, transparent 27%, transparent 74%, rgba(255, 255, 255, .05) 75%, rgba(255, 255, 255, .05) 76%, transparent 77%, transparent);
    background-size: 50px 50px;
    border-radius: 15px;
    color: white;
    min-height: 100vh;
}

.tarot-result-title {
    text-align: center;
    color: white;
    margin-bottom: 25px;
    font-size: 24px;
    font-weight: 700;
}

.tarot-title {
    text-align: center;
    color: white;
    margin-bottom: 15px;
    font-size: 28px;
    font-weight: 700;
}

.tarot-instruction {
    text-align: center;
    color: #d1d5db;
    margin-bottom: 48px;
    font-size: 18px;
    line-height: 1.5;
}

/* 卡片容器：三欄佈局 */
.tarot-card-container {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 1rem;
    flex-wrap: wrap;
}

/* 卡片欄容器 */
.card-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    width: 140px;
}



/* 卡片本身 */
.tarot-card {
    width: 100%;
    height: 250px;
    perspective: 1000px;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.tarot-card:hover {
    transform: translateY(-5px);
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.tarot-card.is-flipped .card-inner {
    transform: rotateY(180deg);
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    border: 2px solid transparent;
}

.card-back {
    background-color: #2c2c2c;
    color: #ccc;
    font-size: 1.25rem;
}

.card-front {
    background-color: #111;
    color: #aaa;
    transform: rotateY(180deg);
    font-size: 1.5rem;
}

/* 卡片資訊框 */
.card-info-box {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 2px solid transparent;
    color: white;
    text-align: center;
    font-weight: 700;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 4.5rem;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.card-info-box.upright, .card-info-box.reversed {
    border-color: transparent;
}

.card-info-box.upright {
    color: #059669;
}

.card-info-box.reversed {
    border-color: transparent;
}

/* 逆位效果 */
.tarot-card.is-reversed .card-front {
    transform: rotateY(180deg) rotateZ(180deg);
}

.tarot-card.is-reversed .card-front .card-image {
    transform: rotateZ(180deg);
}

/* 結果展示區 */
#result-area {
    margin-top: 4rem;
    padding: 1.5rem;
    border-top: 2px dashed transparent;
}



.tarot-readings-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.reading-item {
    padding: 16px;
    border-radius: 12px;
    background: #282828;
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.2);
    margin-bottom: 24px;
}

.reading-item h4 {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 700;
    color: white;
}

.reading-item .position-past h4 {
    color: white;
}

.reading-item .position-present h4 {
    color: white;
}

.reading-item .position-future h4 {
    color: white;
}

.reading-item .card-status-text {
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

.reading-item .card-status-text.upright {
    color: #34d399;
}

.reading-item .card-status-text.reversed {
    color: #f87171;
}

.reading-item .card-meaning {
    color: #d1d5db;
    line-height: 1.6;
    font-size: 15px;
}

/* 重設按鈕與LINE按鈕 */
.tarot-reset-wrapper {
    text-align: center;
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.tarot-reset-button {
    background: white;
    color: black;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tarot-reset-button:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.4);
}

.line-button {
    background: #00B900;
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.line-button:hover {
    background: #009A00;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 185, 0, 0.4);
}

/* 響應式佈局：當螢幕較寬時 */
@media (min-width: 768px) {
    .card-column {
        width: 160px;
    }
    
    .tarot-card {
        height: 280px;
    }
    
    .card-title-box, .card-info-box {
        min-height: 5rem;
        padding: 0.75rem;
    }
}

@media (max-width: 480px) {
    .tarot-cards-container {
        padding: 15px;
    }
    
    .tarot-card-container {
        gap: 1rem;
    }
    
    .card-column {
        width: 110px;
    }
    
    .tarot-card {
        height: 200px;
    }
    
    .card-title-box, .card-info-box {
        min-height: 3.5rem;
        padding: 0.375rem;
        font-size: 0.875rem;
    }
    
    .tarot-title {
        font-size: 24px;
    }
    
    .tarot-instruction {
        font-size: 14px;
    }
}

/* 主題變化 */
.tarot-cards-container[data-theme="blue"] .tarot-title {
    color: #2563eb;
}

.tarot-cards-container[data-theme="blue"] .card-position-label {
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    box-shadow: 0 2px 8px rgba(96, 165, 250, 0.3);
}

.tarot-cards-container[data-theme="blue"] .tarot-result-area {
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.1);
}

.tarot-cards-container[data-theme="blue"] .tarot-result-title {
    color: #2563eb;
}

.tarot-cards-container[data-theme="blue"] .tarot-reset-button {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.tarot-cards-container[data-theme="blue"] .tarot-reset-button:hover {
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
}

/* 緊湊佈局 */
.tarot-cards-container[data-layout="compact"] {
    max-width: 600px;
    padding: 15px;
}

.tarot-cards-container[data-layout="compact"] .tarot-card {
    width: 80px;
    height: 140px;
}

.tarot-cards-container[data-layout="compact"] .tarot-title {
    font-size: 22px;
}

.tarot-cards-container[data-layout="compact"] .tarot-result-area {
    padding: 20px;
}

/* Widget 樣式 */
.tarot-line-widget {
    text-align: center;
    padding: 15px;
}

.tarot-line-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #00c300, #00a000);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 195, 0, 0.3);
}

.tarot-line-button:hover {
    background: linear-gradient(135deg, #00a000, #008000);
    box-shadow: 0 6px 20px rgba(0, 195, 0, 0.4);
    transform: translateY(-2px);
    color: white;
    text-decoration: none;
}

.tarot-line-button svg {
    flex-shrink: 0;
}

/* 手機版按鈕響應式設計 */
@media (max-width: 480px) {
    .tarot-reset-wrapper {
        flex-direction: column;
        gap: 10px;
    }
    
    .tarot-reset-button, .line-button {
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
        font-size: 14px;
        padding: 12px 20px;
    }

    .tarot-line-button {
        font-size: 14px;
        padding: 10px 16px;
    }
}