/* 3-Card Tarot Spread Generator 樣式 */

/* 牌陣顯示 */
.card-spread {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.card-item {
    flex: 1;
    min-width: 200px;
    text-align: center;
}

.card-image {
    width: 100%;
    height: 300px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 8px;
    margin-bottom: 10px;
}

.card-meaning {
    font-size: 14px;
    line-height: 1.4;
    color: #666;
    padding: 0 10px;
}

/* GPT Prompt 區 */
.gpt-section {
    margin-top: 20px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.gpt-prompt {
    width: 100%;
    min-height: 100px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    font-family: monospace;
}

.copy-button {
    margin-top: 10px;
    padding: 8px 15px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.copy-button:hover {
    background-color: #45a049;
    justify-content: space-around;
    margin: 20px 0;
}

/* 卡牌展示區 */
.card-spread {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
    row-gap: 65px;
}

.card {
    width: 180px;
    height: 300px;
    perspective: 1000px;
    cursor: pointer;
    margin: 0 10px;
    text-align: center;
}

.card h3 {
    margin-bottom: 10px;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transform-style: preserve-3d;
}

.card:hover .card-inner {
    transform: rotateY(180deg);
    transition: transform 0.8s;
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.card-front {
    background-image: url('../../images/card_back.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-color: #fff;
}

.card-back {
    background-color: #f8f9fa;
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 15px;
    overflow: hidden;
}

.card-image {
    width: 120px;
    height: 180px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    margin: 0 auto 10px auto;
}

.card-title {
    font-weight: bold;
    margin: 5px 0;
    color: #333;
    font-size: 16px;
}

.card-meaning {
    font-size: 14px;
    line-height: 1.4;
    color: #555;
    text-align: center;
    overflow-y: auto;
    max-height: 80px;
}

/* AI 解釋區 */
.ai-explanation {
    margin-top: 20px;
}

#gptPrompt {
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
}

#copyPrompt {
    background-color: #2196F3;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
}

#copyPrompt:hover {
    background-color: #1976D2;
}

/* 底部 */
footer {
    text-align: center;
    padding: 10px;
    background-color: #333;
    color: #fff;
    position: fixed;
    bottom: 0;
    width: 100%;
}