/**
 * タロット占い CSS
 * 
 * モダンで美しいデザインのスタイルシート
 * 
 * @package WoodinTarotDivination
 * @version 1.0.0
 */

/* メインコンテナ */
.tarot-divination-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Hiragino Kaku Gothic ProN', 'Yu Gothic', 'Meiryo', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    color: #333;
}

/* ヘッダー */
.tarot-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.tarot-title {
    font-size: 2.5em;
    margin: 0 0 10px 0;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    /* -webkit-text-fill-color: transparent; */
    background-clip: text;
    font-weight: bold;
}

.tarot-description {
    font-size: 1.1em;
    color: #666;
    margin: 0;
}

/* フォーム */
.tarot-form-wrapper {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.tarot-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-weight: bold;
    color: #333;
    font-size: 1.1em;
}

.form-select,
.form-textarea {
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.3s ease;
    background: #fff;
}

.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

/* ボタン */
.tarot-submit-btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tarot-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.tarot-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-loading {
    display: none;
}

/* 結果表示 */
.tarot-result {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    overflow: hidden;
}

.result-header {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.result-title {
    margin: 0;
    font-size: 1.5em;
}

.close-result {
    background: none;
    border: none;
    color: white;
    font-size: 1.5em;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.close-result:hover {
    background: rgba(255, 255, 255, 0.2);
}

.result-content {
    padding: 30px;
}

.question-display {
    margin-bottom: 30px;
    /* padding: 20px; */
    background: #f8f9fa;
    border-radius: 8px;
}

.question-display h4 {
    margin: 0 0 10px 0;
    color: #333;
    /* background: linear-gradient(45deg, #667eea, #764ba2); */
    background: #667eea;
    color: white;
    padding: 10px 15px;
    border-radius: 6px;
    /* display: inline-block; */
}

.question-display p {
    margin: 0;
    color: #666;
    font-style: italic;
}

/* カード表示 */
.cards-display {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.tarot-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
    border: 2px solid #e1e5e9;
}

.tarot-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.tarot-card.reversed {
    border-color: #ff6b6b;
}

.tarot-card.upright {
    border-color: #51cf66;
}

.card-image {
    height: 200px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.card-front {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 5px;
}

.card-front {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 5px;
}

.card-back {
    font-size: 3em;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    display: block;
}

/* カードが表示された時のスタイル */
.tarot-card.show-card .card-front {
    display: block;
    animation: cardReveal 0.8s ease-out;
}

.tarot-card.show-card .card-back {
    display: none;
}

/* カード表示アニメーション */
@keyframes cardReveal {
    0% {
        opacity: 0;
        transform: scale(0.8) rotateY(180deg);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.1) rotateY(90deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotateY(0deg);
    }
}

/* カード全体のアニメーション */
.tarot-card {
    transition: all 0.3s ease;
    transform: translateY(20px);
    opacity: 0;
}

.tarot-card.show-card {
    transform: translateY(0);
    opacity: 1;
}

.card-info {
    padding: 15px;
}

.card-name {
    margin: 0 0 8px 0;
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
}

.card-position {
    margin: 0 0 8px 0;
    font-size: 0.9em;
    font-weight: bold;
}

.tarot-card.upright .card-position {
    color: #51cf66;
}

.tarot-card.reversed .card-position {
    color: #ff6b6b;
}

.card-keyword {
    margin: 0;
    font-size: 0.9em;
    color: #666;
    font-style: italic;
}

/* 解釈表示 */
.interpretation-display {
    /* background: #f8f9fa; */
    /* padding: 20px; */
    /* border-radius: 8px;
    border-left: 4px solid #667eea; */
}

.interpretation-display > h4 {
    margin: 0 0 15px 0;
    /* color: #333; */
    background: #667eea;
    color: white;
    padding: 10px 15px;
    border-radius: 6px;
}

.interpretation-display h4 {
    /* color: #667eea; */
    /* margin-bottom: 10px; */
}

.interpretation-display p {
    margin: 0 0 10px 0;
    line-height: 1.6;
}
#result-interpretation h4 {
    font-weight: bold;
}
#result-interpretation p {
    border-bottom: 1px solid #c5c9ce;
    padding: 10px 0 20px 0;
}

/* 結果フッター */
.result-footer {
    padding: 20px;
    background: #f8f9fa;
    text-align: center;
    border-top: 1px solid #e1e5e9;
}

.new-reading-btn {
    background: linear-gradient(45deg, #51cf66, #40c057);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 6px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.new-reading-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(81, 207, 102, 0.4);
}

/* 情報セクション */
.tarot-info {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

.info-section {
    margin-bottom: 25px;
}

.info-section:last-child {
    margin-bottom: 0;
}

.info-section h4 {
    color: #667eea;
    margin: 0 0 15px 0;
    font-size: 1.2em;
}

.info-list {
    margin: 0;
    padding-left: 20px;
}

.info-list li {
    margin-bottom: 8px;
    line-height: 1.5;
    color: #666;
}

/* エラーメッセージ */
.tarot-error {
    background: #ff6b6b;
    color: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: bold;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .tarot-divination-container {
        padding: 15px;
        margin: 10px;
    }
    
    .tarot-title {
        font-size: 2em;
    }
    
    .tarot-form-wrapper,
    .result-content {
        padding: 20px;
    }
    
    .cards-display {
        grid-template-columns: 1fr;
    }
    
    .result-header {
        padding: 15px;
    }
    
    .result-title {
        font-size: 1.3em;
    }
}

@media (max-width: 480px) {
    .tarot-title {
        font-size: 1.8em;
    }
    
    .tarot-form-wrapper,
    .result-content {
        padding: 15px;
    }
    
    .tarot-submit-btn {
        padding: 12px 20px;
        font-size: 1em;
    }
}

/* アニメーション */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tarot-result {
    animation: fadeIn 0.5s ease-out;
}

/* カードのアニメーション */
.tarot-card {
    animation: fadeIn 0.5s ease-out;
}

.tarot-card:nth-child(1) { animation-delay: 0.1s; }
.tarot-card:nth-child(2) { animation-delay: 0.2s; }
.tarot-card:nth-child(3) { animation-delay: 0.3s; }
.tarot-card:nth-child(4) { animation-delay: 0.4s; }
.tarot-card:nth-child(5) { animation-delay: 0.5s; }
.tarot-card:nth-child(6) { animation-delay: 0.6s; }

/* ローディングアニメーション */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.btn-loading {
    animation: pulse 1.5s infinite;
}
