/* ==================== */
/* グローバルスタイル */
/* ==================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'Yu Gothic', 'Meiryo', sans-serif;
    line-height: 1.7;
    color: #2E7D32;
    background-color: #FDFAF5;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

/* ==================== */
/* セクション管理 */
/* ==================== */

.section {
    display: none;
    min-height: 100vh;
    padding: 40px 0;
    animation: fadeIn 0.5s ease-in;
}

.section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ==================== */
/* ヒーローセクション */
/* ==================== */

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

.blocky-hero {
    max-width: 200px;
    width: 100%;
    height: auto;
    animation: fadeInScale 1.2s ease-out;
    filter: drop-shadow(0 4px 8px rgba(46, 125, 50, 0.2));
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.hero-title {
    font-size: 28px;
    font-weight: bold;
    color: #2E7D32;
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.4;
}

.hero-subtitle {
    font-size: 16px;
    color: #43A047;
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.8;
}

.hero-description {
    font-size: 14px;
    color: #66BB6A;
    text-align: center;
    margin-bottom: 30px;
    padding: 15px;
    background-color: #F5F5DC;
    border-radius: 8px;
    border-left: 4px solid #43A047;
}

.nickname-input {
    margin-bottom: 30px;
}

.nickname-input label {
    display: block;
    font-size: 14px;
    color: #2E7D32;
    margin-bottom: 10px;
    font-weight: 500;
}

.nickname-input input {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    border: 2px solid #A5D6A7;
    border-radius: 8px;
    transition: all 0.3s;
    background-color: #fff;
}

.nickname-input input:focus {
    outline: none;
    border-color: #43A047;
    box-shadow: 0 0 0 3px rgba(67, 160, 71, 0.1);
}

.error-message {
    color: #D32F2F;
    font-size: 13px;
    margin-top: 8px;
    min-height: 20px;
}

/* ==================== */
/* ボタン */
/* ==================== */

.btn {
    display: block;
    width: 100%;
    padding: 16px 24px;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-height: 48px;
}

.btn-primary {
    background: linear-gradient(135deg, #43A047 0%, #66BB6A 100%);
    color: #fff;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #388E3C 0%, #43A047 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(67, 160, 71, 0.3);
}

.btn-secondary {
    background-color: #fff;
    color: #43A047;
    border: 2px solid #43A047;
}

.btn-secondary:hover {
    background-color: #43A047;
    color: #fff;
}

.btn-line {
    background: linear-gradient(135deg, #FFA726 0%, #FFB74D 100%);
    color: #fff;
}

.btn-line:hover {
    background: linear-gradient(135deg, #FB8C00 0%, #FFA726 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 167, 38, 0.3);
}

/* ==================== */
/* 時代背景セクション */
/* ==================== */

.section-title {
    font-size: 24px;
    font-weight: bold;
    color: #2E7D32;
    text-align: center;
    margin-bottom: 20px;
}

.section-intro {
    font-size: 16px;
    color: #43A047;
    text-align: center;
    margin-bottom: 30px;
}

.reason-list {
    margin-bottom: 30px;
}

.reason-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #fff;
    border-radius: 8px;
    border-left: 4px solid #43A047;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.reason-icon {
    font-size: 20px;
    margin-right: 12px;
    flex-shrink: 0;
}

.reason-content h3 {
    font-size: 16px;
    font-weight: bold;
    color: #2E7D32;
    margin-bottom: 5px;
}

.reason-content p {
    font-size: 14px;
    color: #43A047;
    line-height: 1.6;
}

.section-summary {
    font-size: 16px;
    color: #2E7D32;
    text-align: center;
    margin-bottom: 30px;
    padding: 15px;
    background-color: #F5F5DC;
    border-radius: 8px;
    font-weight: 500;
}

/* ==================== */
/* 診断セクション */
/* ==================== */

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #E8F5E9;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #43A047 0%, #66BB6A 100%);
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    text-align: center;
    font-size: 14px;
    color: #43A047;
    margin-bottom: 20px;
}

.category-badge {
    display: inline-block;
    padding: 8px 16px;
    background: linear-gradient(135deg, #43A047 0%, #66BB6A 100%);
    color: #fff;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
    margin-bottom: 20px;
}

.question-container {
    animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.question-text {
    font-size: 18px;
    font-weight: bold;
    color: #2E7D32;
    margin-bottom: 20px;
    line-height: 1.6;
}

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

.option-btn {
    width: 100%;
    padding: 16px;
    font-size: 15px;
    text-align: left;
    background-color: #fff;
    color: #2E7D32;
    border: 2px solid #A5D6A7;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    line-height: 1.5;
}

.option-btn:hover {
    background-color: #E8F5E9;
    border-color: #43A047;
    transform: translateX(5px);
}

.option-btn.selected {
    background: linear-gradient(135deg, #43A047 0%, #66BB6A 100%);
    color: #fff;
    border-color: #43A047;
}

.quiz-navigation {
    margin-top: 30px;
    display: flex;
    justify-content: center;
}

#prev-btn {
    max-width: 250px;
}

/* ==================== */
/* 結果セクション */
/* ==================== */

.result-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 30px 20px;
    background: linear-gradient(135deg, #E8F5E9 0%, #F5F5DC 100%);
    border-radius: 12px;
}

.result-title {
    font-size: 18px;
    color: #43A047;
    margin-bottom: 15px;
}

.result-type {
    font-size: 28px;
    font-weight: bold;
    color: #2E7D32;
    margin-bottom: 0;
}

.result-summary {
    font-size: 16px;
    color: #43A047;
    line-height: 1.8;
    margin-bottom: 30px;
    text-align: center;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    border-left: 4px solid #43A047;
}

.result-block {
    margin-bottom: 30px;
    padding: 25px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.result-block-title {
    font-size: 20px;
    font-weight: bold;
    color: #2E7D32;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.result-list {
    list-style: none;
    padding: 0;
}

.result-list li {
    font-size: 15px;
    color: #43A047;
    line-height: 1.8;
    margin-bottom: 12px;
    padding-left: 25px;
    position: relative;
}

.result-list li:before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #66BB6A;
    font-weight: bold;
}

.result-note {
    font-size: 14px;
    color: #43A047;
    margin-top: 15px;
    padding: 12px;
    background-color: #E8F5E9;
    border-radius: 6px;
    font-weight: 500;
}

/* ==================== */
/* ブロッキーメッセージ */
/* ==================== */

.blocky-message {
    background: linear-gradient(135deg, #E8F5E9 0%, #F5F5DC 100%);
    border: 3px solid #66BB6A;
}

.blocky-message-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.blocky-result {
    width: 100px;
    height: auto;
    flex-shrink: 0;
    animation: bounceIn 0.8s ease-out;
    filter: drop-shadow(0 2px 6px rgba(46, 125, 50, 0.2));
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3) translateY(20px);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.95);
    }
    100% {
        transform: scale(1);
    }
}

.blocky-advice {
    flex: 1;
    font-size: 16px;
    color: #2E7D32;
    line-height: 1.8;
    font-weight: 500;
    padding: 10px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* スマホで縦並びにする */
@media (max-width: 480px) {
    .blocky-message-content {
        flex-direction: column;
        text-align: center;
    }

    .blocky-result {
        width: 80px;
    }

    .blocky-advice {
        width: 100%;
    }
}

/* ==================== */
/* CTAブロック */
/* ==================== */

.cta-block {
    text-align: center;
    padding: 30px 20px;
    background: linear-gradient(135deg, #FFF3E0 0%, #FFE0B2 100%);
    border-radius: 12px;
    margin-bottom: 30px;
    border: 3px solid #FFB74D;
}

.cta-title {
    font-size: 18px;
    color: #F57C00;
    margin-bottom: 15px;
    font-weight: bold;
    line-height: 1.6;
}

.cta-description {
    font-size: 14px;
    color: #FB8C00;
    margin-bottom: 20px;
    line-height: 1.7;
}

/* ==================== */
/* 外部リンクブロック */
/* ==================== */

.external-link {
    text-align: center;
    padding: 25px 20px;
    background-color: #F5F5DC;
    border-radius: 12px;
    margin-bottom: 30px;
    border: 2px dashed #A5D6A7;
}

.external-title {
    font-size: 18px;
    color: #2E7D32;
    margin-bottom: 15px;
    font-weight: bold;
}

.external-description {
    font-size: 14px;
    color: #43A047;
    margin-bottom: 20px;
    line-height: 1.8;
}

/* ==================== */
/* レスポンシブ対応 */
/* ==================== */

@media (max-width: 480px) {
    .container {
        padding: 15px;
    }

    .hero-title {
        font-size: 24px;
    }

    .hero-subtitle {
        font-size: 15px;
    }

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

    .section-title {
        font-size: 22px;
    }

    .question-text {
        font-size: 16px;
    }

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