@charset "UTF-8";

/* 基本設定 */
:root {
    --primary-color: #d74a49;
    /* 朱色 */
    --secondary-color: #5d8d68;
    /* 抹茶色 */
    --accent-color: #2b3a55;
    /* 藍色 */
    --bg-color: #fcfaf2;
    /* 生成り色 */
    --text-color: #333;
    --card-bg: #fff;
    --font-main: "Zen Maru Gothic", sans-serif;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    line-height: 1.8;
    background-image: radial-gradient(#e6e6e6 1px, transparent 1px);
    background-size: 20px 20px;
}

/* ヘッダー */
header {
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    padding: 2rem 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.1) 0px, rgba(255, 255, 255, 0.1) 10px, transparent 10px, transparent 20px);
}

header h1 {
    margin: 0;
    font-size: 2rem;
    position: relative;
    z-index: 1;
}

header p {
    margin-top: 0.5rem;
    font-size: 1.1rem;
    position: relative;
    z-index: 1;
}

/* メインコンテンツ */
main {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* カードスタイル */
.card {
    background-color: var(--card-bg);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 2px solid #eee;
}

h2 {
    color: var(--primary-color);
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 0.5rem;
    margin-top: 0;
    display: inline-block;
}

/* 有名な歌セクション */
.song-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.song-item {
    background-color: #fafafa;
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 5px solid var(--secondary-color);
}

.song-item h3 {
    margin-top: 0;
    color: var(--accent-color);
}

.poem-container {
    background-color: #fff;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.waka {
    font-size: 1.2rem;
    font-weight: bold;
    color: #444;
    margin-bottom: 0.5rem;
}

.poet {
    font-size: 0.9rem;
    color: #666;
    text-align: right;
}

.meaning {
    font-size: 0.95rem;
    background-color: #fffbec;
    padding: 1rem;
    border-radius: 8px;
}

/* 遊び方セクション */
.play-guide-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.play-item {
    flex: 1;
    min-width: 280px;
}

.play-item h3 {
    background-color: var(--accent-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    display: inline-block;
}

/* 今日の運勢セクション */
.special-card {
    background: linear-gradient(135deg, #fff 0%, #ffeeff 100%);
    border: 3px solid var(--primary-color);
    text-align: center;
}

.button-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-top: 1rem;
}

.quiz-link-btn {
    background-color: var(--secondary-color);
    color: white;
    font-size: 1.3rem;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-family: var(--font-main);
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 0 #3d5e45;
}

.quiz-link-btn:hover {
    transform: scale(1.05);
    background-color: #6da27a;
}

.draw-button {
    background-color: var(--primary-color);
    color: white;
    font-size: 1.5rem;
    padding: 1rem 3rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-family: var(--font-main);
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 1rem;
    box-shadow: 0 4px 0 #a32f2e;
}

.draw-button:active {
    transform: translateY(4px);
    box-shadow: none;
}

.hidden {
    display: none;
}

.result-area {
    margin-top: 2rem;
    animation: fadeIn 1s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fortune-content {
    background-color: white;
    padding: 2rem;
    border-radius: 15px;
    border: 2px dashed var(--primary-color);
    margin-top: 1rem;
}

.fortune-message {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.lucky-card {
    border: 1px solid #ddd;
    padding: 1.5rem;
    border-radius: 8px;
    background-color: #fafafa;
    position: relative;
    max-width: 400px;
    margin: 0 auto;
}

.lucky-card::before {
    content: "今日の一首";
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--secondary-color);
    color: white;
    padding: 0.2rem 1rem;
    border-radius: 10px;
    font-size: 0.8rem;
}

.waka-display {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 1rem;
    line-height: 2;
}

.poet-display {
    text-align: right;
    color: #666;
}

/* フッター */
footer {
    text-align: center;
    padding: 2rem;
    background-color: var(--accent-color);
    color: white;
    margin-top: 2rem;
}

/* レスポンシブ対応 */
@media (max-width: 600px) {
    header h1 {
        font-size: 1.5rem;
    }

    .card {
        padding: 1.5rem 1rem;
    }

    .waka {
        font-size: 1.1rem;
    }
}

/* クイズページ専用スタイル */
.quiz-page {
    background-color: #fcf8e8;
    /* 和紙のような淡い色 */
}

.quiz-info {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.info-badge {
    background-color: #d4e157;
    color: #33691e;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.question-card {
    border-top: 8px solid #8e24aa;
    /* 高貴な紫 */
    margin-bottom: 25px;
}

.question-text {
    font-size: 1.5rem;
    line-height: 1.8;
    margin-bottom: 25px;
    text-align: center;
    color: #4a148c;
    font-weight: bold;
}

.choices-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.choice-btn {
    padding: 15px;
    font-size: 1.1rem;
    background-color: white;
    border: 3px solid #e1bee7;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-main);
    color: #4a148c;
    text-align: left;
}

.choice-btn:hover:not(:disabled) {
    background-color: #f3e5f5;
    border-color: #8e24aa;
    transform: translateY(-2px);
}

.choice-btn.correct {
    background-color: #c8e6c9;
    border-color: #4caf50;
    color: #1b5e20;
}

.choice-btn.incorrect {
    background-color: #ffcdd2;
    border-color: #f44336;
    color: #b71c1c;
}

.feedback-card {
    border-top: 8px solid #ffd54f;
}

.explanation-container {
    background-color: #fff9c4;
    padding: 15px;
    border-radius: 10px;
    margin: 15px 0;
    text-align: center;
}

.full-poem {
    font-size: 1.3rem;
    color: #4a148c;
    margin: 10px 0;
    line-height: 1.8;
    font-weight: bold;
}

.poet-name {
    color: #7b1fa2;
    font-style: italic;
}

.result-card {
    text-align: center;
    border-top: 8px solid #ffd54f;
}

.final-score {
    font-size: 2rem;
    color: #ff6f00;
    margin: 20px 0;
    font-weight: bold;
}

.result-message {
    font-size: 1.2rem;
    line-height: 1.6;
    color: #5d4037;
    margin-bottom: 30px;
}

.main-btn {
    background-color: #ffb74d;
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.2rem;
    border-radius: 30px;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, background-color 0.2s;
    font-family: var(--font-main);
}

.main-btn:hover {
    background-color: #ffa726;
    transform: scale(1.05);
}

.navigation {
    margin-top: 20px;
}

.back-link {
    color: #7b1fa2;
    text-decoration: none;
    font-weight: bold;
}

.back-link:hover {
    text-decoration: underline;
}