/* リセットCSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 全体のスタイル */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'Yu Gothic', sans-serif;
    background: linear-gradient(135deg, #fbeee4 0%, #f9e8d8 50%, #fbeee4 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: #7e3b28;
}

.container {
    max-width: 600px;
    width: 100%;
    background: rgba(251, 238, 228, 0.95);
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(126, 59, 40, 0.15);
    overflow: hidden;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(218, 212, 138, 0.3);
}

/* ヘッダー */
header {
    background: linear-gradient(135deg, #dad48a 0%, #c4b86e 100%);
    padding: 15px 10px 10px 10px;
    text-align: center;
}

/* TOP画像 */
.top-image {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 0;
    border-radius: 12px;
}

header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #7e3b28;
    margin-bottom: 8px;
}

header .subtitle {
    font-size: 14px;
    color: #7e3b28;
    font-weight: 400;
    opacity: 0.85;
}

/* メインコンテンツ */
main {
    flex: 1;
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* スタート画面 */
.intro-box {
    background: #ffffff;
    padding: 30px;
    border-radius: 16px;
    margin-bottom: 30px;
    border: 2px solid #dad48a;
    text-align: center;
}

.intro-text {
    font-size: 16px;
    line-height: 1.8;
    color: #7e3b28;
    margin-bottom: 15px;
}

.intro-text:last-child {
    margin-bottom: 0;
}

.start-btn {
    background: linear-gradient(135deg, #e56910 0%, #d55a08 100%);
    color: #ffffff;
    font-size: 20px;
    font-weight: 700;
    padding: 18px 60px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(229, 105, 16, 0.3);
}

.start-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(229, 105, 16, 0.4);
}

/* プログレスバー */
.progress-container {
    padding: 20px 30px;
    background: #ffffff;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: #fbeee4;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #e56910 0%, #d55a08 100%);
    transition: width 0.3s ease;
    border-radius: 10px;
}

.progress-text {
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    color: #7e3b28;
}

/* 質問画面 */
.question-box {
    width: 100%;
}

.question-title {
    font-size: 20px;
    font-weight: 700;
    color: #7e3b28;
    margin-bottom: 30px;
    text-align: center;
    line-height: 1.6;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.option-btn {
    background: #ffffff;
    color: #7e3b28;
    font-size: 16px;
    font-weight: 500;
    padding: 20px 25px;
    border: 2px solid #dad48a;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    width: 100%;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.option-btn:hover {
    background: linear-gradient(135deg, #e56910 0%, #d55a08 100%);
    border-color: #e56910;
    color: #ffffff;
    transform: translateX(5px);
}

.option-btn:active {
    background: linear-gradient(135deg, #e56910 0%, #d55a08 100%);
    border-color: #e56910;
    color: #ffffff;
    transform: translateX(5px);
}

/* スマホのタッチ時のスタイル */
@media (hover: none) {
    .option-btn:hover {
        background: #ffffff;
        color: #7e3b28;
        border-color: #dad48a;
        transform: none;
    }
    
    .option-btn:active {
        background: linear-gradient(135deg, #e56910 0%, #d55a08 100%);
        border-color: #e56910;
        color: #ffffff;
        transform: scale(0.98);
    }
}

/* 結果画面 */
.result-box {
    width: 100%;
}

.result-type {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #e56910 0%, #d55a08 100%);
    border-radius: 16px;
}

.result-image {
    text-align: center;
    margin-bottom: 30px;
}

.result-image img {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 5px 15px rgba(126, 59, 40, 0.2);
}

.result-content h3 {
    font-size: 18px;
    font-weight: 700;
    color: #7e3b28;
    margin-top: 25px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #dad48a;
}

.result-content p {
    font-size: 16px;
    line-height: 1.8;
    color: #7e3b28;
    margin-bottom: 20px;
}

.result-content ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 20px;
}

.result-content ul li {
    font-size: 16px;
    line-height: 1.8;
    color: #7e3b28;
    padding-left: 25px;
    position: relative;
    margin-bottom: 10px;
}

.result-content ul li::before {
    content: "✔️";
    position: absolute;
    left: 0;
    color: #e56910;
}

.book-title {
    font-size: 18px;
    font-weight: 700;
    color: #e56910;
    text-align: center;
    margin-bottom: 20px;
}

/* 購入リンク */
.purchase-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 30px 0;
}

.purchase-link {
    display: block;
    background: linear-gradient(135deg, #e56910 0%, #d55a08 100%);
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(229, 105, 16, 0.3);
}

.purchase-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(229, 105, 16, 0.4);
}

.retry-btn {
    background: #ffffff;
    color: #7e3b28;
    font-size: 16px;
    font-weight: 700;
    padding: 15px 40px;
    border: 2px solid #dad48a;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 30px auto 0;
    display: block;
}

.retry-btn:hover {
    background: linear-gradient(135deg, #e56910 0%, #d55a08 100%);
    color: #ffffff;
    border-color: #e56910;
    transform: translateY(-3px);
}

/* 戻るボタン */
.back-btn {
    background: #ffffff;
    color: #7e3b28;
    font-size: 14px;
    font-weight: 500;
    padding: 12px 30px;
    border: 2px solid #dad48a;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
    display: block;
    width: 100%;
}

.back-btn:hover {
    background: #fbeee4;
    border-color: #e56910;
    transform: translateY(-2px);
}

/* フッター */
footer {
    background: #ffffff;
    padding: 20px;
    text-align: center;
    font-size: 14px;
    color: #7e3b28;
    border-top: 1px solid #dad48a;
}

footer p {
    margin-bottom: 5px;
}

footer a {
    color: #e56910;
    text-decoration: none;
    font-weight: 500;
}

footer a:hover {
    text-decoration: underline;
}

/* レスポンシブ対応 */
@media (max-width: 480px) {
    header h1 {
        font-size: 24px;
    }

    .intro-text {
        font-size: 14px;
    }

    .start-btn {
        font-size: 18px;
        padding: 15px 40px;
    }

    .question-title {
        font-size: 18px;
    }

    .option-btn {
        font-size: 14px;
        padding: 15px 20px;
    }

    .result-type {
        font-size: 20px;
    }

    .result-content h3 {
        font-size: 16px;
    }

    .result-content p,
    .result-content ul li {
        font-size: 14px;
    }
}
