/* 脳疲労セルフチェックサイト - カスタムCSS */

/* フォント設定 */
body {
    font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background-color: #f5f6fa;
}

/* ヘッダー */
header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

.info-notice {
    background: rgba(52, 73, 94, 0.1);
    padding: 0.75rem;
    text-align: center;
    border-radius: 8px;
    border: 1px solid rgba(52, 73, 94, 0.2);
    color: #34495e;
}

/* アラートセクション */
.alert-section {
    background: linear-gradient(135deg, #ecf0f1 0%, #bdc3c7 100%);
}

.alert-warning {
    background: rgba(255,255,255,0.95) !important;
    border-left: 4px solid #e67e22 !important;
    color: #d35400;
}

/* カード */
.card {
    border-radius: 12px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(149, 165, 166, 0.2);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(44, 62, 80, 0.15) !important;
}

/* チェック項目スタイル */
.question-item {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(149, 165, 166, 0.3);
    border-radius: 10px;
    margin-bottom: 1rem;
    padding: 1.5rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.question-item:hover {
    border-color: #7f8c8d;
    box-shadow: 0 4px 12px rgba(127, 140, 141, 0.2);
}

.question-text {
    font-weight: 500;
    margin-bottom: 1rem;
    color: #2c3e50;
}

/* ラジオボタンカスタマイズ */
.form-check {
    margin: 0.5rem 0;
    padding-left: 2rem;
}

.form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.125rem;
    border: 2px solid #dee2e6;
    transition: all 0.2s ease;
}

.form-check-input:checked {
    background-color: #34495e;
    border-color: #34495e;
    box-shadow: 0 0 0 0.25rem rgba(52, 73, 94, 0.25);
}

.form-check-label {
    font-weight: 400;
    color: #5d6d7e;
    cursor: pointer;
    transition: color 0.2s ease;
}

.form-check-input:checked + .form-check-label {
    color: #34495e;
    font-weight: 500;
}

/* ボタンスタイル */
.btn-primary {
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
    border: none;
    border-radius: 8px;
    padding: 0.75rem 2rem;
    font-weight: 500;
    text-transform: none;
    box-shadow: 0 3px 12px rgba(44, 62, 80, 0.3);
    transition: all 0.2s ease;
    color: #ffffff;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 18px rgba(44, 62, 80, 0.4);
    background: linear-gradient(135deg, #2c3e50 0%, #1a252f 100%);
    color: #ffffff;
}

/* 結果表示スタイル */
.result-section .card {
    border: 2px solid #95a5a6;
    background: rgba(255, 255, 255, 0.95);
}

.score-display {
    background: linear-gradient(135deg, #ecf0f1 0%, #d5dbdb 100%);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 2rem;
    border: 1px solid rgba(149, 165, 166, 0.3);
}

.score-number {
    font-size: 3rem;
    font-weight: 700;
    color: #34495e;
    margin-bottom: 0.5rem;
}

.score-conversion {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 0.8rem;
    margin: 1rem 0;
}

.score-100 {
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
}

.score-explanation {
    font-size: 0.9rem;
}

.score-label {
    font-size: 1.2rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

.risk-level {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.risk-low {
    background-color: #d5dbdb;
    color: #2c3e50;
    border: 1px solid #95a5a6;
}

.risk-moderate {
    background-color: #fdeaa7;
    color: #d68910;
    border: 1px solid #f4d03f;
}

.risk-high {
    background-color: #fadbd8;
    color: #c0392b;
    border: 1px solid #ec7063;
}

/* チャートコンテナ */
.chart-container {
    position: relative;
    height: 300px;
    margin: 2rem 0;
}

/* プログレスバー */
.progress {
    height: 8px;
    border-radius: 4px;
    background-color: #e9ecef;
    margin: 0.5rem 0;
}

.progress-bar {
    border-radius: 4px;
    transition: width 0.6s ease;
}

/* 医療機関情報 */
.department-card {
    background: rgba(255,255,255,0.9);
    border: 1px solid rgba(0,0,0,0.1) !important;
    transition: all 0.2s ease;
    cursor: default;
}

.department-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1) !important;
    background: rgba(255,255,255,1);
}

/* アイコン関連のスタイルを削除し、シンプルに */

.emergency-info {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%) !important;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(231, 76, 60, 0.3);
    border: 2px solid rgba(255,255,255,0.2);
}

.emergency-symptoms {
    background: rgba(255,255,255,0.1);
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
}

/* 診療科カードのシンプルスタイル */
.department-card h6 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.department-card small {
    color: #6c757d;
    font-size: 0.875rem;
}

/* メール送信セクション */
.email-section {
    margin-top: 2rem;
}

.email-section .card {
    border: 2px solid #7f8c8d;
    box-shadow: 0 4px 15px rgba(127, 140, 141, 0.15);
    background: rgba(255, 255, 255, 0.95);
}

.email-section .form-control {
    border: 1px solid #bdc3c7;
    border-radius: 6px;
    padding: 0.75rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.email-section .form-control:focus {
    border-color: #34495e;
    box-shadow: 0 0 0 0.25rem rgba(52, 73, 94, 0.25);
}

.email-section .form-check-input:checked {
    background-color: #34495e;
    border-color: #34495e;
}

.email-section .btn-primary {
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
    border: none;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    box-shadow: 0 3px 12px rgba(52, 73, 94, 0.3);
}

.email-section .btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 5px 18px rgba(52, 73, 94, 0.4);
}

.email-section .btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.email-section .alert-sm {
    padding: 0.75rem;
    font-size: 0.875rem;
    border-radius: 6px;
}

.email-section .alert-info {
    background-color: rgba(127, 140, 141, 0.1);
    border: 1px solid rgba(127, 140, 141, 0.3);
    color: #34495e;
}

/* 詳細フォームのスタイル */
.email-form-section .form-label {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.email-form-section .form-control {
    border: 2px solid #bdc3c7;
    border-radius: 8px;
    padding: 0.75rem;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.9);
}

.email-form-section .form-control:focus {
    border-color: #34495e;
    box-shadow: 0 0 0 0.25rem rgba(52, 73, 94, 0.25);
}

.email-form-section .form-control.is-invalid {
    border-color: #e74c3c;
}

.email-form-section .text-danger {
    font-weight: bold;
    color: #c0392b;
}

.email-form-section textarea {
    resize: vertical;
    min-height: 80px;
}

.email-form-section .form-check-input {
    width: 1.5rem;
    height: 1.5rem;
    margin-top: 0.125rem;
}

.email-form-section .form-check-label {
    padding-left: 0.5rem;
    line-height: 1.4;
    color: #34495e;
}

.email-form-section .btn-primary {
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
    border: none;
    padding: 0.875rem 2rem;
    font-weight: 600;
    text-transform: none;
    box-shadow: 0 4px 15px rgba(52, 73, 94, 0.3);
    transition: all 0.3s ease;
    color: #ffffff;
}

.email-form-section .btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 73, 94, 0.4);
}

.email-form-section .btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* エビデンス情報 */
.evidence-info {
    border-left: 4px solid #7f8c8d;
    background-color: #f8f9fa !important;
}

.purpose-card {
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%) !important;
    border-radius: 8px;
    box-shadow: 0 3px 12px rgba(52, 73, 94, 0.3);
}

/* フッター */
footer {
    background: linear-gradient(135deg, #212529 0%, #1a1e21 100%) !important;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.disclaimer {
    background: rgba(255,255,255,0.05);
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #ffc107;
}

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

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

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .question-item {
        padding: 1rem;
    }
    
    .score-number {
        font-size: 2.5rem;
    }
    
    .medical-supervision {
        margin-top: 1rem;
        text-align: center;
    }
    
    .chart-container {
        height: 250px;
    }
    
    .btn-primary {
        width: 100%;
        padding: 1rem;
        font-size: 1.1rem;
    }
}

@media (max-width: 576px) {
    .score-display {
        padding: 1.5rem;
    }
    
    .score-number {
        font-size: 2rem;
    }
    
    .question-text {
        font-size: 0.9rem;
    }
    
    .form-check-label {
        font-size: 0.85rem;
    }
    
    .department-card {
        margin-bottom: 0.75rem !important;
        padding: 0.75rem !important;
    }
    
    .emergency-info {
        padding: 1rem !important;
        margin-top: 1rem;
    }
    
    .email-section .card-body {
        padding: 1rem;
    }
    
    .email-section .row {
        margin: 0;
    }
    
    .email-section .col-md-4 {
        margin-top: 1rem;
    }
}

/* アクセシビリティ向上 */
.form-check-input:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    outline: 0;
}

.btn:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    outline: 0;
}

/* プリント用スタイル */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .card {
        border: 1px solid #ccc !important;
        box-shadow: none !important;
    }
    
    .btn {
        display: none !important;
    }
}

/* 読み込み中のスタイル */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

/* 成功・警告・エラーメッセージ */
.alert-custom {
    border-radius: 8px;
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.alert-success-custom {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-warning-custom {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
    border-left: 4px solid #ffc107;
}

.alert-danger-custom {
    background: linear-gradient(135deg, #f8d7da 0%, #f1aeb5 100%);
    color: #721c24;
    border-left: 4px solid #dc3545;
}