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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif, 'Hiragino Sans', 'ヒラギノ角ゴ Pro';
    background: white !important;
    min-height: 100vh;
    color: #333;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ページ管理 */
.page {
    display: none;
    animation: fadeIn 0.5s ease-in;
    min-height: 100vh;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== トップページ（LP） ========== */
#topPage {
    background: white !important;
    padding: 0;
}

/* ファーストビュー */
.hero-section {
    background: white !important;
    color: white;
    padding: 0;
    text-align: center;
    min-height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0;
    position: relative;
    margin: 0;
    border: none;
}

.hero-carousel {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: auto;
    position: relative;
    top: 0;
    left: 0;
    margin: 0;
    padding: 0;
}

.hero-characters {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0;
    padding: 0;
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 30px 20px;
    background: white !important;
    width: 100%;
}

.hero-title {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: none;
}

.hero-subtitle {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 15px;
    opacity: 0.95;
    display: none;
}

.hero-description {
    font-size: 16px;
    margin-bottom: 40px;
    opacity: 0.9;
    line-height: 1.8;
    display: none;
}

/* 価値セクション */
.value-section {
    padding: 60px 20px;
    background: white;
}

.section-title {
    font-size: 36px;
    font-weight: 700;
    color: #333;
    text-align: center;
    margin-bottom: 50px;
}

.section-subtitle {
    font-size: 18px;
    color: #666;
    text-align: center;
    margin-bottom: 40px;
}

.value-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.value-card {
    padding: 30px;
    background: #f9f9f9;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

.value-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    background: white;
}

.value-card-image {
    width: 100%;
    height: 150px;
    object-fit: contain;
    margin-bottom: 15px;
}

.value-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
}

.value-card p {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
}

/* 16タイプセクション */
.types-section {
    padding: 60px 20px;
    background: #f9f9f9;
}

.types-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 100%;
    margin: 0 auto;
}

.type-card {
    padding: 20px;
    background: white;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
    cursor: pointer;
}

.type-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.2);
    border-color: #2563eb;
}

.type-card-image {
    width: 100%;
    height: 150px;
    object-fit: contain;
    margin-bottom: 12px;
}

.type-card h3 {
    font-size: 14px;
    font-weight: 700;
    color: #333;
    margin-bottom: 0;
}

/* CTA セクション */
.cta-section {
    padding: 60px 20px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    text-align: center;
}

.cta-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 15px;
}

.cta-subtitle {
    font-size: 16px;
    margin-bottom: 40px;
    opacity: 0.9;
}

/* ========== 診断ページ ========== */
#diagnosisPage {
    background: white;
    padding-top: 140px;
}

.diagnosis-container {
    max-width: 600px;
    padding: 40px 20px 20px;
}

/* 固定ヘッダー */
.diagnosis-header-fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 10px 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-image {
    max-width: 100%;
    height: auto;
    max-height: 120px;
    object-fit: contain;
}

.diagnosis-header {
    margin-bottom: 30px;
}

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

.progress-fill {
    height: 100%;
    background: #2563eb;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    text-align: right;
    font-size: 12px;
    color: #999;
    font-weight: 600;
}

.question-container {
    margin-bottom: 30px;
}

.question-text {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 25px;
    line-height: 1.6;
}

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

.option-group {
    display: flex;
    align-items: center;
}

input[type="radio"] {
    display: none;
}

.option-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 12px;
    border-radius: 10px;
    transition: all 0.3s ease;
    flex: 1;
}

.option-label:hover {
    background: #f5f5f5;
}

.option-circle {
    width: 24px;
    height: 24px;
    border: 2px solid #ddd;
    border-radius: 50%;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.option-text {
    font-size: 14px;
    color: #666;
}

input[type="radio"]:checked + .option-label {
    background: #f0f0f0;
}

input[type="radio"]:checked + .option-label .option-circle {
    border-color: #2563eb;
    background: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

input[type="radio"]:checked + .option-label .option-text {
    color: #333;
    font-weight: 600;
}

.button-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 20px;
    margin-bottom: 40px;
}

#prevBtn {
    background: #e5e7eb;
    color: #666;
}

#prevBtn:hover:not(:disabled) {
    background: #d1d5db;
}

#prevBtn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#nextBtn {
    background: #cbd5e1;
    color: #666;
    transition: all 0.3s ease;
}

#nextBtn:not(:disabled) {
    background: #2563eb;
    color: white;
}

#nextBtn:hover:not(:disabled) {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

#nextBtn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========== 結果ページ ========== */
#resultPage {
    background: white;
    padding-top: 140px;
}

.result-container {
    max-width: 600px;
    padding: 40px 20px 20px;
}

.result-content {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.result-header {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.result-title {
    font-size: 32px;
    font-weight: 700;
    color: #2563eb;
    margin-bottom: 10px;
}

.result-catchcopy {
    font-size: 16px;
    color: #666;
    font-style: italic;
}

.result-illustration {
    text-align: center;
    padding: 20px 0;
}

.illustration-img {
    max-width: 400px;
    height: auto;
    border-radius: 15px;
}

.result-description h3,
.result-keywords h3,
.result-strengths-weaknesses h3,
.result-chemistry h3,
.result-recommendation h3,
.share-section h3,
.line-cta-section h3 {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
}

.result-description p {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
}

.keywords-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.keyword-tag {
    background: #f0f0f0;
    color: #2563eb;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.result-strengths-weaknesses {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.strength,
.weakness {
    padding: 15px;
    background: #f9f9f9;
    border-radius: 10px;
}

.strength h4,
.weakness h4 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #333;
}

.strength ul,
.weakness ul {
    list-style: none;
    font-size: 13px;
    color: #666;
    line-height: 1.8;
}

.strength li::before {
    content: "✓ ";
    color: #4CAF50;
    font-weight: 700;
    margin-right: 5px;
}

.weakness li::before {
    content: "⚠ ";
    color: #FF9800;
    margin-right: 5px;
}

.result-chemistry {
    padding: 15px;
    background: #f9f9f9;
    border-radius: 10px;
}

.chemistry-item {
    margin-bottom: 15px;
}

.chemistry-item:last-child {
    margin-bottom: 0;
}

.chemistry-item h4 {
    font-size: 13px;
    font-weight: 700;
    color: #2563eb;
    margin-bottom: 5px;
}

.chemistry-item p {
    font-size: 13px;
    color: #666;
}

.result-recommendation {
    padding: 15px;
    background: #f9f9f9;
    border-radius: 10px;
}

.recommendation-item {
    margin-bottom: 15px;
}

.recommendation-item:last-child {
    margin-bottom: 0;
}

.recommendation-item h4 {
    font-size: 13px;
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
}

.recommendation-item p {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
}

.share-section {
    padding: 20px;
    background: #f9f9f9;
    border-radius: 10px;
}

.share-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.line-cta-section {
    padding: 20px;
    background: #f0fdf4;
    border-radius: 10px;
    border: 2px solid #00B900;
    text-align: center;
}

.line-cta-section p {
    font-size: 13px;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
}

/* ========== ボタン ========== */
.btn {
    padding: 14px 30px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-large {
    padding: 16px 40px;
    font-size: 18px;
}

.btn-primary {
    background: #2563eb;
    color: white;
    width: 100%;
    font-size: 18px;
    padding: 16px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
    background: #1d4ed8;
}

.btn-primary:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
    width: 100%;
    margin-top: 20px;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-share {
    width: 100%;
    margin: 10px 0;
    padding: 12px;
    font-size: 14px;
    color: white;
}

.btn-share.twitter {
    background: #1DA1F2;
}

.btn-share.twitter:hover {
    background: #1a8cd8;
}

.btn-share.instagram {
    background: #E4405F;
}

.btn-share.instagram:hover {
    background: #d03860;
}

.btn-share.line {
    background: #00B900;
}

.btn-share.line:hover {
    background: #009900;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 185, 0, 0.3);
}

.btn-detail-cta {
    background: #2563eb;
    color: white;
    width: 100%;
    padding: 14px;
    font-size: 16px;
    margin-top: 15px;
}

.btn-detail-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
    background: #1d4ed8;
}

.line-cta-description {
    font-size: 12px;
    color: #666;
    margin-top: 12px;
    line-height: 1.8;
}

/* ========== レスポンシブ ========== */
@media (max-width: 768px) {
    .hero-section {
        grid-template-columns: 1fr;
        gap: 20px;
        background: white !important;
    }

    .hero-content {
        background: white !important;
    }

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

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

    .hero-content {
        text-align: center;
    }

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

    .value-grid {
        grid-template-columns: 1fr;
    }

    .types-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .result-strengths-weaknesses {
        grid-template-columns: 1fr;
    }

    .illustration-img {
        max-width: 300px;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 10px;
    }

    .hero-section {
        padding: 40px 15px;
        grid-template-columns: 1fr;
        background: white !important;
    }

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

    .hero-characters {
        max-height: 250px;
    }

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

    .hero-description {
        font-size: 14px;
    }

    .section-title {
        font-size: 24px;
        margin-bottom: 30px;
    }

    .value-grid {
        gap: 15px;
    }

    .value-card {
        padding: 20px;
    }

    .types-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .type-card {
        padding: 15px;
    }

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

    .cta-subtitle {
        font-size: 14px;
    }

    .diagnosis-container {
        padding: 20px 15px 20px;
    }

    .result-container {
        padding: 20px 15px 20px;
    }

    .title {
        font-size: 28px;
    }

    .subtitle {
        font-size: 16px;
    }

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

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

    .result-strengths-weaknesses {
        grid-template-columns: 1fr;
    }

    .illustration-img {
        max-width: 240px;
    }

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

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

@media (max-width: 400px) {
    .hero-title {
        font-size: 24px;
    }

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

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

    .result-catchcopy {
        font-size: 14px;
    }

    .types-grid {
        grid-template-columns: 1fr;
    }

    .button-group {
        grid-template-columns: 1fr;
    }
}
