/* 基本リセットとフォント設定 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Noto Serif JP', serif;
}

body {
    /* 女性向けの柔らかく神秘的なグラデーション背景 */
    background: linear-gradient(135deg, #fbc2eb 0%, #a6c1ee 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #4a4a4a;
    padding: 20px;
}

/* グラスモーフィズム調のメインコンテナ */
.glass-container {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.4);
    text-align: center;
}

header {
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.5rem;
    color: #5d4a66;
    letter-spacing: 2px;
    margin-bottom: 5px;
}

header p {
    font-size: 0.9rem;
    color: #6c5b7b;
}

/* フォームセクション */
.input-group {
    margin-bottom: 20px;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #555;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.7);
    color: #333;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: 'Noto Serif JP', serif;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: #a6c1ee;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 10px rgba(166, 193, 238, 0.5);
}

button {
    background: linear-gradient(to right, #6a11cb 0%, #2575fc 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1.1rem;
    cursor: pointer;
    width: 100%;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 10px;
    font-family: 'Noto Serif JP', serif;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 117, 252, 0.4);
}

/* 占い結果セクション */
.hidden {
    display: none !important;
}

.result-header h2 {
    color: #5d4a66;
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.card-display {
    margin: 30px 0;
    display: flex;
    justify-content: center;
}

/* タロットカードの簡易的なデザイン（3Dアニメーション用） */
.tarot-card {
    width: 200px;
    height: 320px;
    position: relative;
    perspective: 1000px;
    /* 奥行きの設定 */
}

/* カードの表・裏共通 */
.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    /* 裏返った時に非表示にする */
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* 少し跳ねるような動き */
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

/* カードの表面（結果） */
.card-front {
    background: linear-gradient(135deg, #fff 0%, #f6f0fa 100%);
    border: 2px solid #d4c4e9;
    display: flex;
    justify-content: center;
    align-items: center;
    transform: rotateY(180deg);
    /* 初期状態は裏返っている */
}

/* カードの裏面（引く前のデザイン） */
.card-back {
    background: linear-gradient(135deg, #a684b8 0%, #5d4a66 100%);
    border: 2px solid #d4c4e9;
    display: flex;
    justify-content: center;
    align-items: center;
    transform: rotateY(0deg);
    /* 初期状態はこちらが見える */
}

.card-back-inner {
    border: 1px dashed rgba(255, 255, 255, 0.4);
    width: 180px;
    height: 300px;
    border-radius: 10px;
    background: repeating-linear-gradient(45deg,
            rgba(255, 255, 255, 0.05),
            rgba(255, 255, 255, 0.05) 10px,
            transparent 10px,
            transparent 20px);
}

/* フリップ（めくる）アニメーションのクラス */
.tarot-card.flipped .card-front {
    transform: rotateY(0deg);
}

.tarot-card.flipped .card-back {
    transform: rotateY(-180deg);
}

/* 結果要素のフェードインアニメーション用 */
.fade-in-delayed {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-delayed.show {
    opacity: 1;
    transform: translateY(0);
}

.card-inner {
    border: 1px dashed #b598d1;
    width: 180px;
    height: 300px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.card-number {
    font-size: 1.5rem;
    color: #8c7aa1;
    margin-bottom: 20px;
    font-weight: bold;
}

.card-inner h3 {
    font-size: 1.6rem;
    color: #5d4a66;
    line-height: 1.4;
}

/* サウンド切り替えボタン */
.sound-toggle-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.8);
    color: #555;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    width: auto;
    margin-top: 0;
    z-index: 10;
    transition: background 0.3s;
}

.sound-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: none;
    box-shadow: none;
}

/* メッセージボックス（共通） */
.message-box,
.extra-advice-box {
    background: rgba(255, 255, 255, 0.8);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    text-align: left;
    line-height: 1.8;
}

.extra-advice-box {
    background: rgba(250, 240, 255, 0.9);
    border-left: 4px solid #b598d1;
}

.extra-advice-box .quote {
    margin-top: 10px;
    font-style: italic;
    color: #5d4a66;
}

.lucky-items {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin-bottom: 30px;
}

.lucky-badge {
    background: white;
    padding: 10px 20px;
    border-radius: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 120px;
}

.lucky-badge .label {
    font-size: 0.75rem;
    color: #888;
    margin-bottom: 5px;
}

.lucky-badge .value {
    font-size: 1.1rem;
    font-weight: bold;
    color: #5d4a66;
}

/* アクションボタン群 */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.share-btn {
    background: #000;
    color: white;
    font-weight: bold;
}

.share-btn:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

.retry-btn {
    background: linear-gradient(to right, #e2e2e2 0%, #ffffff 100%);
    color: #555;
    border: 1px solid #ccc;
}