/* Basic styles for Random Tarot Card Generator by randomoutputs */
body {
    font-family: sans-serif;
    margin: 0;
    background-color: #f4f4f4;
    color: #333;
}

header {
    background-color: #333;
    color: #fff;
    padding: 1em 0;
    text-align: center;
}

header h1 {
    margin: 0;
}

.back-button {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 15px;
    background-color: #555;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
}

.back-button:hover {
    background-color: #777;
}

main {
    padding: 20px;
    text-align: center;
}

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

/* 塔羅牌翻轉效果 */
.tarot-card {
    width: 180px;
    height: 300px;
    perspective: 1000px;
    cursor: pointer;
    margin: 0 auto;
    text-align: center;
}

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

.tarot-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-text {
    margin-top: 20px;
    padding: 10px;
    background-color: #f0f0f0;
    border-radius: 8px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}