/* ========================================
   リセット & ベーススタイル
======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 16px;
    line-height: 1.8;
    color: #333;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
}

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

/* ========================================
   スクロールボタン
======================================== */
.scroll-button {
    position: fixed;
    right: 30px;
    bottom: 40px;
    z-index: 1000;
    cursor: pointer;
    text-align: center;
    transition: opacity 0.5s ease;
    opacity: 1;
}

.scroll-button.hidden {
    opacity: 0;
    pointer-events: none;
}

.scroll-arrow {
    width: 50px;
    height: 50px;
    border: 2px solid #ffd700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 215, 0, 0.1);
    margin: 0 auto 8px;
    animation: bounce 2s infinite;
    transition: all 0.3s ease;
}

.scroll-arrow:hover {
    background: rgba(255, 215, 0, 0.3);
    transform: scale(1.1);
}

.scroll-arrow span {
    font-size: 24px;
    color: #ffd700;
    line-height: 1;
}

.scroll-text {
    font-size: 0.85rem;
    color: #ffd700;
    font-weight: 500;
    letter-spacing: 0.1em;
    margin: 0;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* ========================================
   セクション管理
======================================== */
.section {
    display: none;
    min-height: 100vh;
    padding: 40px 0;
}

.section.active {
    display: block;
}

/* ========================================
   イントロ画面
======================================== */
#intro-section {
    display: flex;
    align-items: center;
    justify-content: center;
}

.intro-header {
    text-align: center;
    margin-bottom: 50px;
}

.main-title {
    font-family: 'Noto Serif JP', serif;
    font-size: 2.5rem;
    font-weight: 900;
    color: #fff;
    line-height: 1.7;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
    margin-bottom: 10px;
    letter-spacing: 0.08em;
}

.title-decoration {
    display: inline;
    color: #ffd700;
    font-size: 1em;
    margin: 0 5px;
}

.intro-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 50px 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border: 3px solid #c9a961;
}

.intro-text {
    margin-bottom: 40px;
}

.intro-lead {
    font-size: 1.2rem;
    font-weight: 500;
    color: #d32f2f;
    margin-bottom: 30px;
    line-height: 2;
}

.intro-description {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.9;
}

.intro-description strong {
    color: #c62828;
    font-weight: 700;
    background: linear-gradient(transparent 60%, #fff9c4 60%);
}

.intro-info {
    text-align: center;
    margin: 40px 0 30px;
}

.question-count {
    display: inline-block;
    background: #1565c0;
    color: #fff;
    padding: 12px 30px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.05em;
}

/* ========================================
   ボタンスタイル
======================================== */
.btn-primary {
    display: block;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    padding: 20px 40px;
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #d32f2f 0%, #c62828 100%);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(211, 47, 47, 0.4);
    letter-spacing: 0.1em;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(211, 47, 47, 0.6);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-secondary {
    padding: 15px 35px;
    font-size: 1rem;
    font-weight: 500;
    color: #333;
    background: #fff;
    border: 2px solid #c9a961;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #f5f5f5;
    border-color: #b8954a;
}

.btn-back {
    margin-top: 30px;
}

/* ========================================
   診断画面
======================================== */
.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    margin-bottom: 15px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffd700 0%, #ffed4e 100%);
    border-radius: 10px;
    transition: width 0.4s ease;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.progress-text {
    text-align: center;
    color: #ffd700;
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 40px;
    letter-spacing: 0.1em;
}

.question-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 50px 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border: 3px solid #c9a961;
}

.question-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a237e;
    margin-bottom: 40px;
    line-height: 1.8;
    text-align: center;
}

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

.answer-button {
    width: 100%;
    padding: 20px 25px;
    font-size: 1.1rem;
    font-weight: 500;
    color: #333;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.answer-button::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 5px;
    height: 100%;
    background: #c9a961;
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.answer-button:hover {
    border-color: #c9a961;
    background: #fffef7;
    transform: translateX(5px);
}

.answer-button:hover::before {
    transform: scaleY(1);
}

.answer-button:active {
    transform: translateX(3px);
}

.navigation-buttons {
    text-align: center;
    margin-top: 30px;
}

/* ========================================
   診断中アニメーション画面
======================================== */
.analyzing-content {
    text-align: center;
    padding: 60px 20px;
}

.analyzing-animation {
    margin: 40px 0;
}

.spinner {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    border: 6px solid rgba(255, 215, 0, 0.3);
    border-top: 6px solid #ffd700;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.analyzing-title {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 15px;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.analyzing-subtitle {
    font-size: 1.1rem;
    color: #ffd700;
    margin-bottom: 40px;
}

.analyzing-progress {
    width: 100%;
    max-width: 400px;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    margin: 0 auto 40px;
    overflow: hidden;
}

.analyzing-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ffd700 0%, #ffed4e 100%);
    border-radius: 10px;
    animation: fillProgress 3s ease-out forwards;
}

@keyframes fillProgress {
    0% { width: 0%; }
    100% { width: 100%; }
}

.btn-show-result {
    animation: fadeInUp 0.5s ease 3s forwards;
    opacity: 0;
}

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

/* ========================================
   結果画面
======================================== */
.result-header {
    text-align: center;
    margin-bottom: 40px;
}

.result-subtitle {
    font-size: 1.2rem;
    color: #ffd700;
    margin-bottom: 15px;
    font-weight: 500;
    letter-spacing: 0.1em;
}

.result-title {
    font-family: 'Noto Serif JP', serif;
    font-size: 2.5rem;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    margin-bottom: 10px;
    letter-spacing: 0.05em;
}

/* 画像スペース */
.result-image-space {
    width: 100%;
    max-width: 600px;
    margin: 0 auto 40px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border: 3px solid #c9a961;
}

.result-image-space img {
    width: 100%;
    height: auto;
    display: block;
}

.image-placeholder {
    aspect-ratio: 16 / 9;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    color: #999;
    font-size: 1.2rem;
    font-weight: 500;
    padding: 40px;
    text-align: center;
}

.image-placeholder span {
    display: block;
    font-size: 0.9rem;
    margin-top: 10px;
    color: #666;
}

/* 結果コンテンツ */
.result-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 50px 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border: 3px solid #c9a961;
}

.result-catchphrase {
    font-size: 1.3rem;
    font-weight: 700;
    color: #d32f2f;
    text-align: center;
    margin-bottom: 40px;
    line-height: 1.8;
    padding: 20px;
    background: #fff9c4;
    border-radius: 12px;
    border-left: 5px solid #c9a961;
}

.result-section-box {
    margin-bottom: 35px;
    padding: 30px;
    background: #fafafa;
    border-radius: 15px;
    border: 2px solid #e0e0e0;
}

.result-section-box.highlight {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border: 2px solid #1976d2;
}

.result-section-box.action {
    background: linear-gradient(135deg, #fff9c4 0%, #fff59d 100%);
    border: 2px solid #f9a825;
}

.result-section-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a237e;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.result-section-title .icon {
    font-size: 1.5rem;
}

.result-section-content {
    font-size: 1.05rem;
    color: #333;
    line-height: 1.9;
}

.result-section-content p {
    margin-bottom: 15px;
}

.result-section-content ul {
    list-style: none;
    padding-left: 0;
}

.result-section-content li {
    padding: 10px 0 10px 30px;
    position: relative;
    border-bottom: 1px solid #e0e0e0;
}

.result-section-content li:last-child {
    border-bottom: none;
}

.result-section-content li::before {
    content: '▶';
    position: absolute;
    left: 0;
    color: #c9a961;
    font-size: 0.8em;
}

.result-section-content strong {
    color: #d32f2f;
    font-weight: 700;
}

/* CTA */
.cta-box {
    margin: 50px 0;
    padding: 40px;
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(25, 118, 210, 0.4);
}

.cta-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 25px;
    line-height: 1.8;
}

.btn-cta {
    display: inline-block;
    padding: 18px 50px;
    font-size: 1.2rem;
    font-weight: 700;
    color: #1976d2;
    background: #fff;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    text-decoration: none;
}

.btn-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    color: #1976d2;
}

.result-footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 40px;
    border-top: 2px solid #e0e0e0;
}

/* ========================================
   レスポンシブデザイン
======================================== */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .main-title {
        font-size: 1.8rem;
    }

    .analyzing-title {
        font-size: 1.5rem;
    }

    .analyzing-subtitle {
        font-size: 1rem;
    }

    .spinner {
        width: 60px;
        height: 60px;
    }

    .scroll-button {
        right: 20px;
        bottom: 30px;
    }

    .scroll-arrow {
        width: 45px;
        height: 45px;
    }

    .scroll-arrow span {
        font-size: 20px;
    }

    .scroll-text {
        font-size: 0.75rem;
    }

    .intro-content,
    .question-container,
    .result-content {
        padding: 30px 25px;
    }

    .intro-lead {
        font-size: 1.05rem;
    }

    .intro-description {
        font-size: 1rem;
    }

    .question-title {
        font-size: 1.2rem;
    }

    .answer-button {
        padding: 18px 20px;
        font-size: 1rem;
    }

    .result-title {
        font-size: 1.8rem;
    }

    .result-catchphrase {
        font-size: 1.1rem;
        padding: 15px;
    }

    .result-section-box {
        padding: 20px;
    }

    .result-section-title {
        font-size: 1.1rem;
    }

    .result-section-content {
        font-size: 0.95rem;
    }

    .cta-box {
        padding: 30px 20px;
    }

    .cta-title {
        font-size: 1.1rem;
    }

    .btn-cta {
        padding: 15px 35px;
        font-size: 1.05rem;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 1.6rem;
        line-height: 1.6;
    }

    .title-decoration {
        font-size: 0.9em;
        margin: 0 3px;
    }

    .intro-content,
    .question-container,
    .result-content {
        padding: 25px 20px;
        border-radius: 15px;
    }

    .btn-primary {
        font-size: 1.1rem;
        padding: 18px 30px;
    }

    .result-title {
        font-size: 1.5rem;
    }

    .result-section-title {
        font-size: 1rem;
        flex-wrap: wrap;
    }
}

/* ========================================
   アニメーション
======================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section.active {
    animation: fadeIn 0.5s ease;
}
