/* 夢中になれる人生サポート 診断ツール CSS */

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

body {
    font-family: 'Noto Sans JP', sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 30%, #6c5ce7 70%, #fd79a8 100%);
    min-height: 100vh;
}

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

/* ヘッダー */
.header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    color: white;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
}

/* セクションナビゲーション */
.section-nav {
    background: rgba(255,255,255,0.1);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
    text-align: center;
}

.section-nav h3 {
    color: white;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.section-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.section-list a {
    display: inline-block;
    padding: 8px 15px;
    background: rgba(255,255,255,0.2);
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.section-list a:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

/* 開始画面 */
.start-screen {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.welcome-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    text-align: center;
    max-width: 600px;
}

.welcome-card h2 {
    color: #0984e3;
    font-size: 2rem;
    margin-bottom: 20px;
}

.welcome-card p {
    margin-bottom: 30px;
    color: #666;
    line-height: 1.7;
}

.instructions {
    text-align: left;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.instructions h3 {
    color: #333;
    margin-bottom: 15px;
}

.instructions ul {
    color: #666;
    padding-left: 20px;
}

.instructions li {
    margin-bottom: 8px;
}

.start-btn {
    background: linear-gradient(45deg, #74b9ff, #0984e3);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(116, 185, 255, 0.3);
}

.start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(116, 185, 255, 0.4);
    background: linear-gradient(45deg, #0984e3, #74b9ff);
}

/* 診断フォーム */
.diagnosis-form {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
}

.section {
    margin-bottom: 60px;
    scroll-margin-top: 100px; /* アンカーリンク用のオフセット */
}

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

.section-header h2 {
    color: #0984e3;
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.section-header h3 {
    color: #333;
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.section-header p {
    color: #666;
    font-size: 1.1rem;
}

/* 質問グループ */
.question-group {
    space-y: 30px;
}

.question {
    margin-bottom: 35px;
    padding: 25px;
    background: #fafafa;
    border-radius: 15px;
    border-left: 4px solid #74b9ff;
}

.question label {
    display: block;
    font-weight: 500;
    color: #333;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

/* スライダー */
.slider-container {
    margin: 20px 0;
}

.slider {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: #e0e0e0;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: linear-gradient(45deg, #74b9ff, #0984e3);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.slider::-moz-range-thumb {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: linear-gradient(45deg, #74b9ff, #0984e3);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 0.9rem;
    color: #666;
}

.slider-labels-ext {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #666;
    text-align: center;
}

.slider-labels-ext span {
    flex: 1;
    padding: 0 10px;
}

.slider-value {
    font-weight: 600;
    color: #0984e3 !important;
}

/* テキストエリア */
.reason-text, textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.5;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.reason-text:focus, textarea:focus {
    outline: none;
    border-color: #74b9ff;
    box-shadow: 0 0 15px rgba(116, 185, 255, 0.2);
}

/* チェックボックス */
.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
    margin: 15px 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    padding: 12px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 400;
}

.checkbox-label:hover {
    border-color: #74b9ff;
    background: linear-gradient(45deg, #f8f9ff, #e3f2fd);
}

.checkbox-label input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
    accent-color: #74b9ff;
}

.checkbox-label input[type="checkbox"]:checked + span,
.checkbox-label:has(input[type="checkbox"]:checked) {
    background: linear-gradient(45deg, #74b9ff, #0984e3);
    color: white;
    border-color: #74b9ff;
    box-shadow: 0 2px 8px rgba(116, 185, 255, 0.3);
}

/* ラジオボタン */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 15px 0;
}

.radio-label {
    display: flex;
    align-items: center;
    padding: 15px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.radio-label:hover {
    border-color: #74b9ff;
    background: linear-gradient(45deg, #f8f9ff, #e3f2fd);
}

.radio-label input[type="radio"] {
    margin-right: 12px;
    transform: scale(1.2);
    accent-color: #74b9ff;
}

.radio-label:has(input[type="radio"]:checked) {
    background: linear-gradient(45deg, #74b9ff, #0984e3);
    color: white;
    border-color: #74b9ff;
    box-shadow: 0 2px 8px rgba(116, 185, 255, 0.3);
}

/* 価値観選択 */
.value-ranking {
    margin: 20px 0;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}

.value-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-size: 0.95rem;
    min-height: 50px;
}

.value-item:hover {
    border-color: #74b9ff;
    background: linear-gradient(45deg, #f8f9ff, #e3f2fd);
}

.value-item input[type="checkbox"] {
    margin-right: 6px;
}

.value-item:has(input[type="checkbox"]:checked) {
    background: linear-gradient(45deg, #74b9ff, #0984e3);
    color: white;
    border-color: #74b9ff;
    box-shadow: 0 2px 8px rgba(116, 185, 255, 0.3);
}

.selection-count {
    text-align: center;
    color: #666;
    font-size: 0.9rem;
}

/* ナビゲーション */
.navigation {
    display: flex;
    justify-content: center;
    margin-top: 60px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
}

.nav-btn {
    padding: 12px 30px;
    border: 2px solid #74b9ff;
    background: white;
    color: #0984e3;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 300px;
}

.nav-btn:hover {
    background: linear-gradient(45deg, #74b9ff, #0984e3);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(116, 185, 255, 0.3);
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.submit-btn {
    background: linear-gradient(45deg, #00b894, #00cec9);
    border-color: #00b894;
    color: white;
    font-size: 1.1rem;
    padding: 15px 40px;
    box-shadow: 0 4px 15px rgba(0, 184, 148, 0.3);
}

/* 完了画面 */
.completion-section {
    text-align: center;
    padding: 60px 30px;
    background: #f8f9fa;
    border-radius: 15px;
    margin-top: 40px;
}

.completion-content h2 {
    color: #0984e3;
    font-size: 2.5rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.completion-content p {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 15px;
    line-height: 1.7;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.completion-actions {
    margin-top: 40px;
}

.result-btn {
    background: linear-gradient(45deg, #00b894, #00cec9);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(0, 184, 148, 0.3);
}

.result-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 184, 148, 0.4);
    background: linear-gradient(45deg, #00cec9, #00b894);
}

/* 結果表示 */
.result-container {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
}

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

.result-header h2 {
    color: #0984e3;
    font-size: 2rem;
    margin-bottom: 10px;
}

.result-actions {
    margin-top: 20px;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.print-btn, .restart-btn, .share-btn, .export-btn {
    padding: 10px 25px;
    border: 2px solid #74b9ff;
    background: white;
    color: #0984e3;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.print-btn:hover, .restart-btn:hover {
    background: linear-gradient(45deg, #74b9ff, #0984e3);
    color: white;
    box-shadow: 0 2px 8px rgba(116, 185, 255, 0.3);
}

.share-btn {
    border-color: #00b894;
    color: #00b894;
}

.share-btn:hover {
    background: #00b894;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 184, 148, 0.3);
}

.export-btn {
    border-color: #fdcb6e;
    color: #e17055;
}

.export-btn:hover {
    background: #fdcb6e;
    color: white;
    box-shadow: 0 2px 8px rgba(253, 203, 110, 0.3);
}

/* レポートコンテンツ */
.report-page {
    margin-bottom: 40px;
    page-break-after: always;
}

.detailed-responses {
    background: #f8f9ff;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
}

.detailed-responses h3 {
    color: #74b9ff;
    margin-bottom: 20px;
    border-bottom: 2px solid #74b9ff;
    padding-bottom: 10px;
}

.response-item {
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 10px;
    border-left: 4px solid #74b9ff;
}

.response-question {
    font-weight: 600;
    color: #0984e3;
    margin-bottom: 8px;
    font-size: 1rem;
}

.response-answer {
    color: #2d3436;
    line-height: 1.6;
    padding: 8px 0;
}

.response-score {
    display: inline-block;
    background: linear-gradient(45deg, #74b9ff, #0984e3);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-weight: 600;
    font-size: 0.9rem;
}

.share-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.share-content {
    background-color: white;
    margin: 10% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    text-align: center;
}

.share-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.share-option {
    padding: 15px 10px;
    border: 2px solid #ddd;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #333;
}

.share-option:hover {
    border-color: #74b9ff;
    background: #f8f9ff;
}

.report-section {
    margin-bottom: 30px;
}

.report-section h3 {
    color: #0984e3;
    border-bottom: 2px solid #74b9ff;
    padding-bottom: 8px;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.priority-item {
    margin-bottom: 15px;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid transparent;
}

.priority-high {
    background: #ffebee;
    border-left-color: #f44336;
}

.priority-medium {
    background: #fff3e0;
    border-left-color: #ff9800;
}

.priority-low {
    background: #e8f5e8;
    border-left-color: #4caf50;
}

.priority-label {
    font-weight: 600;
    margin-bottom: 5px;
    display: block;
}

.priority-high .priority-label {
    color: #f44336;
}

.priority-medium .priority-label {
    color: #ff9800;
}

.priority-low .priority-label {
    color: #4caf50;
}

.satisfaction-chart {
    display: grid;
    grid-template-columns: 1fr 80px 200px;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
    padding: 8px;
    background: #fafafa;
    border-radius: 5px;
}

.satisfaction-bar {
    height: 20px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.satisfaction-fill {
    height: 100%;
    background: linear-gradient(90deg, #f44336, #ff9800, #4caf50);
    border-radius: 10px;
    transition: width 0.5s ease;
}

.question-list {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-top: 15px;
}

.question-list h4 {
    color: #0984e3;
    margin-bottom: 15px;
}

.question-list ul {
    padding-left: 20px;
}

.question-list li {
    margin-bottom: 8px;
    color: #555;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .welcome-card {
        padding: 30px 20px;
    }
    
    .diagnosis-form {
        padding: 20px;
    }
    
    .question {
        padding: 20px 15px;
    }
    
    .checkbox-group {
        grid-template-columns: 1fr;
    }
    
    .values-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }
    
    .value-item {
        font-size: 0.85rem;
        padding: 10px 5px;
    }
    
    .navigation {
        flex-direction: column;
        gap: 15px;
    }
    
    .section-list {
        flex-direction: column;
        align-items: center;
    }
    
    .section-list a {
        width: 200px;
        text-align: center;
    }
    
    .nav-btn {
        width: 100%;
    }
    
    .result-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .print-btn, .restart-btn, .share-btn, .export-btn {
        width: 200px;
        margin-bottom: 10px;
    }
    
    .detailed-responses {
        padding: 15px;
    }
    
    .response-item {
        padding: 10px;
    }
    
    .share-content {
        margin: 20% auto;
        padding: 20px;
        width: 95%;
    }
    
    .share-options {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .header h1 {
        font-size: 1.7rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .welcome-card {
        padding: 25px 15px;
    }
    
    .section-header h3 {
        font-size: 1.5rem;
    }
    
    .question {
        margin-bottom: 25px;
        padding: 15px;
    }
    
    .slider-labels-ext span {
        font-size: 0.8rem;
        padding: 0 5px;
    }
    
    .values-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .satisfaction-chart {
        grid-template-columns: 1fr 60px;
        gap: 8px;
    }
    
    .satisfaction-chart .satisfaction-reason {
        grid-column: 1 / -1;
        margin-top: 8px;
        font-size: 0.9rem;
        color: #666;
    }
}

/* 印刷用スタイル */
@media print {
    body {
        background: white;
        color: black;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
    
    .header, .progress-container, .result-actions {
        display: none;
    }
    
    .result-container {
        box-shadow: none;
        padding: 20px;
    }
    
    .report-page {
        page-break-after: always;
    }
    
    .priority-item {
        break-inside: avoid;
    }
}

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

.section {
    animation: fadeIn 0.5s ease-out;
}

/* スクロール動作の改善 */
html {
    scroll-behavior: smooth;
}

body {
    scroll-padding-top: 20px;
}

/* フォーカス状態の改善 */
button:focus, input:focus, textarea:focus {
    outline: 2px solid #74b9ff;
    outline-offset: 2px;
}

/* エラー状態 */
.error {
    border-color: #f44336 !important;
    background-color: #ffebee !important;
}

.error-message {
    color: #f44336;
    font-size: 0.9rem;
    margin-top: 5px;
    display: block;
}

/* 成功状態 */
.success {
    border-color: #4caf50 !important;
    background-color: #e8f5e8 !important;
}

/* ローディング状態 */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #74b9ff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}