/* ========================================
   グローバルスタイル
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    background: linear-gradient(135deg, #1a2332 0%, #0d1520 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

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

/* ========================================
   ページ表示制御
   ======================================== */
.page {
    display: none;
    animation: fadeIn 0.4s ease-in;
}

.page.active {
    display: block;
}

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

/* ========================================
   トップページ
   ======================================== */
.hero {
    background: white;
    border-radius: 20px;
    padding: 50px 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    text-align: center;
    margin-top: 30px;
}

.hero-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.hero-title {
    font-size: 36px;
    font-weight: 700;
    color: #1a2332;
    margin-bottom: 15px;
}

.hero-subtitle {
    font-size: 18px;
    color: #333;
    margin-bottom: 40px;
    line-height: 1.8;
}

.features {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-bottom: 40px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    color: #555;
}

.feature-icon {
    font-size: 24px;
}

.info-section {
    background: #f8f9ff;
    border-radius: 15px;
    padding: 30px;
    margin-top: 40px;
    text-align: left;
}

.info-section h3 {
    font-size: 22px;
    color: #1a2332;
    margin-bottom: 20px;
    text-align: center;
}

.info-list {
    list-style: none;
    font-size: 16px;
    color: #555;
}

.info-list li {
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
    color: #333;
}

.info-list li:last-child {
    border-bottom: none;
}

/* ========================================
   ボタン
   ======================================== */
.btn {
    border: none;
    border-radius: 12px;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Noto Sans JP', sans-serif;
}

.btn-primary {
    background: linear-gradient(135deg, #f4c430 0%, #d4af37 100%);
    color: #1a2332;
    box-shadow: 0 4px 15px rgba(244, 196, 48, 0.4);
    font-weight: 600;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(244, 196, 48, 0.6);
    background: linear-gradient(135deg, #f5d04a 0%, #ddb847 100%);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    background: white;
    color: #1a2332;
    border: 2px solid #1a2332;
}

.btn-secondary:hover {
    background: #1a2332;
    color: white;
    transform: translateY(-2px);
}

.btn-large {
    font-size: 20px;
    padding: 18px 60px;
    margin-top: 10px;
    width: 100%;
    max-width: 600px;
}

.btn-copy {
    width: 100%;
    background: #4CAF50;
    color: white;
    font-size: 18px;
    padding: 18px;
    margin-top: 15px;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

.btn-copy:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.6);
}

.btn-copy.copied {
    background: #2196F3;
}

.copy-success-message {
    display: none;
    opacity: 0;
    background: #4CAF50;
    color: white;
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    margin-top: 15px;
    transition: opacity 0.3s ease;
}

/* ========================================
   診断ページ（トグル形式）
   ======================================== */
.diagnosis-header {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin: 30px 0 20px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.diagnosis-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a2332;
    margin-bottom: 10px;
}

.diagnosis-subtitle {
    font-size: 16px;
    color: #333;
    margin-bottom: 25px;
}

.progress-container-toggle {
    background: #f8f9ff;
    border-radius: 15px;
    padding: 20px;
}

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

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #1a2332 0%, #2c3e50 100%);
    border-radius: 10px;
    transition: width 0.4s ease;
    width: 0%;
}

.progress-text {
    text-align: center;
    font-size: 16px;
    font-weight: 500;
    color: #1a2332;
}

/* アコーディオン */
.questions-accordion {
    margin-bottom: 30px;
}

.accordion-item {
    background: white;
    border-radius: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}

.accordion-item.answered {
    border-left: 5px solid #4CAF50;
}

.accordion-item.active {
    box-shadow: 0 4px 20px rgba(26, 35, 50, 0.3);
}

.accordion-header {
    padding: 20px 25px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
    user-select: none;
}

.accordion-header:hover {
    background: #f8f9ff;
}

.accordion-header-left {
    flex: 1;
}

.accordion-question-number {
    font-size: 12px;
    color: #1a2332;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.accordion-question-text {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    line-height: 1.5;
}

.accordion-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.accordion-status {
    font-size: 12px;
    padding: 5px 12px;
    border-radius: 12px;
    font-weight: 500;
}

.accordion-status.answered {
    background: #4CAF50;
    color: white;
}

.accordion-status.unanswered {
    background: #e0e0e0;
    color: #666;
}

.accordion-icon {
    font-size: 20px;
    color: #1a2332;
    transition: transform 0.3s ease;
}

.accordion-item.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    background: #fafafa;
}

.accordion-item.active .accordion-content {
    max-height: 2000px;
    padding: 25px;
}

.question-category {
    font-size: 14px;
    color: #1a2332;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.question-hint {
    font-size: 14px;
    color: #555;
    margin-bottom: 20px;
    padding: 12px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #1a2332;
}

.question-input {
    margin-bottom: 0;
}

/* 選択肢のスタイル */
.option {
    display: block;
    padding: 16px 18px;
    margin-bottom: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    font-size: 15px;
    color: #333;
}

.option:hover {
    border-color: #1a2332;
    background: #f8f9ff;
    transform: translateX(3px);
}

.option input[type="radio"],
.option input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.option.selected {
    border-color: #1a2332;
    background: linear-gradient(135deg, #1a233210 0%, #2c3e5010 100%);
    font-weight: 500;
}

/* テキスト入力 */
.text-input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 16px;
    font-family: 'Noto Sans JP', sans-serif;
    transition: border-color 0.3s ease;
    background: white;
}

.text-input:focus {
    outline: none;
    border-color: #1a2332;
    box-shadow: 0 0 0 3px rgba(26, 35, 50, 0.1);
}

.char-counter {
    text-align: right;
    font-size: 13px;
    color: #888;
    margin-top: 5px;
}

/* 診断結果ボタン */
.submit-section {
    text-align: center;
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.submit-note {
    margin-top: 15px;
    font-size: 14px;
    color: #888;
}

#submit-btn:disabled + .submit-note {
    color: #f44336;
}

#submit-btn:not(:disabled) + .submit-note {
    color: #4CAF50;
}

/* ========================================
   結果ページ
   ======================================== */
.result-header {
    background: white;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    margin: 30px 0;
}

.result-header-simple {
    background: white;
    border-radius: 20px;
    padding: 30px 40px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    margin: 30px 0 20px 0;
}

.result-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.result-title {
    font-size: 32px;
    font-weight: 700;
    color: #1a2332;
    margin-bottom: 15px;
}

.result-subtitle {
    font-size: 16px;
    color: #333;
    line-height: 1.6;
}

.prompt-container {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    margin-bottom: 30px;
    position: relative;
}

.prompt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.prompt-label {
    font-size: 16px;
    font-weight: 600;
    color: #1a2332;
}

.prompt-length {
    font-size: 13px;
    color: #888;
}

.prompt-textarea {
    width: 100%;
    height: 300px;
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 14px;
    font-family: 'Noto Sans JP', sans-serif;
    line-height: 1.8;
    resize: vertical;
    background: #fafafa;
}

.prompt-textarea:focus {
    outline: none;
    border-color: #1a2332;
}

/* AIツールセクション */
.ai-tools-section {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    margin-bottom: 30px;
}

.section-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    text-align: center;
    margin-bottom: 30px;
}

.ai-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.ai-tool-card {
    text-decoration: none;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 15px;
    padding: 25px 15px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.ai-tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #1a2332;
}

.ai-tool-icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.ai-tool-name {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.ai-tool-desc {
    font-size: 13px;
    color: #666;
}

/* ヒントセクション */
.tips-section {
    background: #f8f9ff;
    border-radius: 20px;
    padding: 35px;
    margin-bottom: 30px;
}

.tips-title {
    font-size: 20px;
    font-weight: 600;
    color: #1a2332;
    margin-bottom: 20px;
}

.tips-list {
    font-size: 16px;
    color: #555;
    margin-bottom: 20px;
    padding-left: 25px;
}

.tips-list li {
    margin-bottom: 12px;
    line-height: 1.6;
}

.tips-note {
    background: white;
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid #1a2332;
    font-size: 15px;
    color: #555;
}

/* 再診断セクション */
.restart-section {
    text-align: center;
    margin-bottom: 50px;
}

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

    .hero {
        padding: 35px 25px;
        margin-top: 20px;
    }

    .hero-icon {
        font-size: 60px;
    }

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

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

    .features {
        gap: 12px;
    }

    .feature {
        font-size: 14px;
    }

    .diagnosis-header {
        padding: 25px 20px;
    }

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

    .accordion-header {
        padding: 15px 18px;
    }

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

    .accordion-item.active .accordion-content {
        padding: 20px 18px;
    }

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

    .result-header {
        padding: 30px 20px;
    }

    .result-icon {
        font-size: 60px;
    }

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

    .prompt-container {
        padding: 20px;
    }

    .prompt-textarea {
        height: 250px;
        font-size: 13px;
    }

    .ai-tools-section {
        padding: 25px 20px;
    }

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

    .tips-section {
        padding: 25px 20px;
    }

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

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

    .submit-section {
        padding: 30px 20px;
    }
}

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

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

    .ai-tools-grid {
        grid-template-columns: 1fr;
    }

    .accordion-question-text {
        font-size: 15px;
    }

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

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

    .accordion-header {
        padding: 12px 15px;
    }

    .accordion-item.active .accordion-content {
        padding: 18px 15px;
    }
}