/* 통증 가이드 도우미 - CSS 스타일 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 통증 설명 입력 스타일 */
.pain-description-input {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.pain-description-input label {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.pain-description-input textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1e8ed;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    min-height: 120px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.pain-description-input textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.char-counter {
    text-align: right;
    margin-top: 8px;
    font-size: 0.9rem;
    color: #666;
}

.char-counter.warning {
    color: #e74c3c;
    font-weight: 600;
}

/* AI 상태 표시 */
.ai-status {
    text-align: center;
    margin-top: 15px;
    padding: 10px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 10px;
    font-size: 0.9rem;
}

.ai-status #ai-indicator {
    margin-right: 8px;
    font-size: 1.2rem;
}

/* 마크다운 스타일 */
.markdown-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.markdown-table td {
    padding: 12px 15px;
    border: 1px solid #e1e8ed;
    text-align: left;
    vertical-align: top;
}

.markdown-table tr:first-child td {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.markdown-table tr:hover {
    background: #f8f9fa;
}

.markdown-list {
    margin: 10px 0;
    padding-left: 20px;
}

.markdown-list li {
    margin: 5px 0;
    line-height: 1.6;
}

blockquote {
    margin: 15px 0;
    padding: 15px 20px;
    background: #f0f7ff;
    border-left: 4px solid #667eea;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #2c3e50;
}

.analysis-content h1,
.analysis-content h2,
.analysis-content h3 {
    margin: 20px 0 10px 0;
    color: #2c3e50;
}

.analysis-content h1 {
    font-size: 1.8rem;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.analysis-content h2 {
    font-size: 1.5rem;
    color: #667eea;
}

.analysis-content h3 {
    font-size: 1.3rem;
    color: #5a6c7d;
}

.analysis-content code {
    background: #f1f3f4;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #e74c3c;
}

body {
    font-family: 'Segoe UI', 'Malgun Gothic', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

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

/* 헤더 스타일 */
header {
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 10px;
    font-weight: 700;
}

header p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 20px;
}

/* 진행률 표시 */
.progress-bar {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.progress-step {
    background: #e0e0e0;
    color: #999;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.progress-step.active {
    background: #4CAF50;
    color: white;
}

.progress-step.completed {
    background: #2196F3;
    color: white;
}

/* 단계 섹션 */
.step-section {
    display: none;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.step-section.active {
    display: block;
    animation: fadeIn 0.5s ease-in;
}

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

.step-section h2 {
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 2rem;
    text-align: center;
}

/* 1단계: 문진 폼 */
.question-group {
    margin-bottom: 30px;
}

.question-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: #2c3e50;
    font-size: 1.1rem;
}

textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    resize: vertical;
    min-height: 100px;
    transition: border-color 0.3s ease;
}

textarea:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.2);
}

select {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    background: white;
    transition: border-color 0.3s ease;
}

select:focus {
    outline: none;
    border-color: #4CAF50;
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: normal;
}

.checkbox-group label:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.checkbox-group input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    accent-color: #4CAF50;
}

/* 강도 슬라이더 */
input[type="range"] {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: #e0e0e0;
    outline: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: #4CAF50;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

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

#intensity-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #4CAF50;
}

/* 레드 플래그 섹션 */
.red-flag-section {
    background: #fff3cd;
    padding: 20px;
    border-radius: 10px;
    border-left: 5px solid #ffc107;
}

.red-flags label {
    background: #fff3cd !important;
    border: 1px solid #ffc107;
}

.red-flags label:hover {
    background: #ffeaa7 !important;
}

/* 2단계: 개선된 인체 지도 */
.body-map-guide {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    flex-wrap: wrap;
}

.guide-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: white;
    border-radius: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
}

.guide-icon {
    font-size: 1.2rem;
}

.guide-text {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

/* 2단계: 인체 지도 */
.body-map-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.body-view-tabs {
    display: flex;
    gap: 10px;
}

.view-tab {
    padding: 12px 25px;
    background: #e0e0e0;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.view-tab {
    padding: 15px 25px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    color: #666;
}

.view-tab:hover {
    background: #e3f2fd;
    border-color: #2196F3;
    color: #1976d2;
    transform: translateY(-2px);
}

.view-tab.active {
    background: #4CAF50;
    color: white;
    border-color: #4CAF50;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.body-map {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    max-width: 500px;
}

#body-svg {
    width: 100%;
    height: auto;
    max-width: 400px;
}

.body-view {
    display: none;
}

.body-view.active {
    display: block;
}

.clickable-area {
    cursor: pointer;
    transition: all 0.3s ease;
    stroke-width: 1.5;
    opacity: 0.8;
}

.clickable-area:hover {
    stroke: #2196F3;
    stroke-width: 2.5;
    fill: rgba(33, 150, 243, 0.3) !important;
    opacity: 1;
    transform-origin: center;
    transform: scale(1.05);
}

.clickable-area.selected {
    fill: rgba(255, 87, 34, 0.8) !important;
    stroke: #ff5722;
    stroke-width: 3;
    opacity: 1;
}

.clickable-area.selected:hover {
    fill: rgba(255, 87, 34, 0.9) !important;
    stroke: #e64a19;
    transform: scale(1.08);
}

/* 툴팁 스타일 */
.body-area-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    pointer-events: none;
    z-index: 1000;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.body-area-tooltip.show {
    opacity: 1;
}

/* 개선된 선택 영역 패널 */
.selected-areas-panel {
    background: white;
    border-radius: 20px;
    padding: 25px;
    min-width: 350px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.panel-header h4 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.3rem;
    font-weight: 600;
}

.selection-count {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.selected-areas-content {
    max-height: 300px;
    overflow-y: auto;
}

.selected-areas-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.selected-areas-list li {
    padding: 12px 15px;
    background: #f8f9fa;
    margin-bottom: 8px;
    border-radius: 12px;
    border-left: 4px solid #4CAF50;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.selected-areas-list li:hover {
    background: #e8f5e9;
    transform: translateX(3px);
}

.area-name {
    font-weight: 500;
    color: #333;
}

.remove-area {
    background: #ffebee;
    color: #f44336;
    border: none;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.remove-area:hover {
    background: #f44336;
    color: white;
    transform: scale(1.1);
}

.panel-actions {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
    text-align: center;
}

.clear-btn {
    background: #ff5722;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.clear-btn:hover {
    background: #e64a19;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 87, 34, 0.3);
}

.empty-selection {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 40px 20px;
}

.empty-selection-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* 3단계: 결과 */
.warning-section {
    background: #f8d7da;
    border: 2px solid #f5c6cb;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    text-align: center;
}

.warning-section h2 {
    color: #721c24;
    margin-bottom: 20px;
}

.emergency-notice {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
}

.emergency-notice p {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #721c24;
}

.emergency-contacts {
    background: #d4edda;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
}

.emergency-contacts p {
    font-weight: bold;
    color: #155724;
    font-size: 1.3rem;
}

/* 가이드 카드 */
.trigger-point-card,
.fascial-line-card {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    border-left: 5px solid #4CAF50;
    position: relative;
}

.trigger-point-card h4,
.fascial-line-card h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.massage-method {
    background: white;
    padding: 15px;
    border-radius: 10px;
    margin-top: 15px;
}

.precaution {
    color: #e67e22;
    font-weight: 600;
    margin-top: 10px;
}

.confidence-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.confidence-badge.high {
    background: #d4edda;
    color: #155724;
}

.confidence-badge.medium {
    background: #fff3cd;
    color: #856404;
}

.massage-instruction {
    background: #e3f2fd;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.massage-timing {
    background: #f3e5f5;
    padding: 20px;
    border-radius: 10px;
}

.precautions {
    background: #fff3cd;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
}

.precautions ul {
    list-style-type: none;
    padding-left: 0;
}

.precautions li {
    padding: 8px 0;
    border-bottom: 1px solid #ffeaa7;
}

.precautions li:before {
    content: "⚠️ ";
    margin-right: 8px;
}

/* 버튼 스타일 */
.next-btn,
.back-btn {
    padding: 15px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 10px;
}

.next-btn {
    background: #4CAF50;
    color: white;
}

.next-btn:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
}

.back-btn {
    background: #6c757d;
    color: white;
}

.back-btn:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 117, 125, 0.3);
}

/* Clear selection button moved to panel styles above */

.step-navigation {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

/* 일반 정보 섹션 */
#general-info {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.info-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    border-top: 4px solid #4CAF50;
}

.info-card h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

/* 숨김 클래스 */
.hidden {
    display: none !important;
}

/* OpenAI API 관련 스타일 */
.ai-status-bar {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.ai-status {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1rem;
    color: #2c3e50;
}

.setup-ai-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.setup-ai-btn:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

.setup-ai-btn.active {
    background: #27ae60;
}

.setup-ai-btn.active:hover {
    background: #219a52;
}

/* API 키 설정 다이얼로그 */
.api-key-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.api-key-dialog {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.api-key-dialog h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    text-align: center;
}

.api-key-info {
    background: #e8f4f8;
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
    font-size: 0.9rem;
}

.api-key-info p {
    margin-bottom: 8px;
}

#api-key-input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    margin-bottom: 20px;
    font-family: monospace;
}

#api-key-input:focus {
    outline: none;
    border-color: #3498db;
}

.api-key-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.primary-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.primary-btn:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

.secondary-btn {
    background: #95a5a6;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.secondary-btn:hover {
    background: #7f8c8d;
    transform: translateY(-1px);
}

#api-key-status {
    text-align: center;
    min-height: 30px;
}

.status-loading {
    color: #f39c12;
    font-weight: 600;
}

.status-success {
    color: #27ae60;
    font-weight: 600;
}

.status-error {
    color: #e74c3c;
    font-weight: 600;
}

/* 로딩 오버레이 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.loading-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    max-width: 400px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #e0e0e0;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.loading-subtext {
    color: #666;
    font-size: 0.9rem;
    margin-top: 10px;
}

/* 메시지 스타일 */
.error-message,
.success-message {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1500;
    min-width: 300px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s ease-out;
}

.error-message {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
}

.success-message {
    background: #d4edda;
    border: 1px solid #c3e6cb;
}

.error-content,
.success-content {
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.error-content button,
.success-content button {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 1.2rem;
    margin-left: auto;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* AI 분석 결과 스타일 */
.ai-analysis-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 25px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.ai-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 15px;
}

.ai-analysis-content h4 {
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.ai-response {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    line-height: 1.6;
}

.ai-response p {
    margin-bottom: 15px;
}

.ai-response strong {
    color: #ffd700;
}

/* AI 질문 도우미 스타일 (제거됨) */

.ai-analysis {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
}

.ai-analysis h4 {
    color: #ffd700;
    margin-bottom: 10px;
}

/* 시작 오류 오버레이 */
.startup-error-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
}

.startup-error {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.startup-error h2 {
    color: #e74c3c;
    margin-bottom: 20px;
}

.startup-error p {
    color: #666;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.startup-error-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* 필수 API 키 다이얼로그 */
.api-key-dialog-overlay.mandatory {
    background: rgba(0, 0, 0, 0.95);
    z-index: 3500;
}

.api-key-dialog-overlay.mandatory .api-key-dialog {
    border: 3px solid #e74c3c;
}

.api-key-info.mandatory {
    background: #ffeaa7;
    border-left: 5px solid #fdcb6e;
}

.api-key-info.mandatory ul {
    margin: 10px 0;
    padding-left: 20px;
}

.api-key-info.mandatory li {
    margin-bottom: 5px;
}

.api-key-help {
    margin-top: 20px;
    text-align: center;
    color: #666;
}

.api-key-help a {
    color: #3498db;
    text-decoration: none;
}

.api-key-help a:hover {
    text-decoration: underline;
}

/* .env.local 파일 예시 스타일 */
.env-file-example {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
}

.env-file-example h4 {
    color: #3498db;
    margin-bottom: 10px;
}

.env-file-example pre {
    background: #34495e;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin: 0;
}

.env-file-example code {
    color: #e74c3c;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* 보안 강조 스타일 */
.api-key-info.mandatory ol {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
}

.api-key-info.mandatory li {
    margin-bottom: 8px;
    padding-left: 5px;
}

.api-key-info.mandatory code {
    background: #2c3e50;
    color: #3498db;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
}

/* 오류 상세 정보 */
.error-details {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    color: #721c24;
    font-weight: 600;
}

/* 문제 해결 섹션 */
.troubleshooting {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.troubleshooting h4 {
    color: #856404;
    margin-bottom: 15px;
}

.troubleshooting ul {
    margin: 0;
    padding-left: 20px;
}

.troubleshooting li {
    margin-bottom: 10px;
    color: #856404;
}

.troubleshooting strong {
    color: #533f03;
}

/* 사용량 표시 */
.usage-display {
    background: rgba(255, 255, 255, 0.1);
    padding: 5px 10px;
    border-radius: 10px;
    margin-left: 10px;
}

.usage-display small {
    color: #666;
    font-size: 0.8rem;
}

/* AI 상태 업데이트 */
.ai-status {
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

@media (min-width: 768px) {
    .ai-status {
        flex-direction: row;
        gap: 15px;
    }
}

/* 1단계 개선된 폼 스타일 */
.step-description {
    text-align: center;
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 30px;
    line-height: 1.6;
}

.questionnaire-form {
    max-width: 800px;
    margin: 0 auto;
}

.question-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    border-left: 5px solid #4CAF50;
    transition: all 0.3s ease;
}

.question-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
}

.question-card.sub-question {
    margin-left: 20px;
    border-left-color: #2196F3;
    background: #f8f9ff;
}

.question-card.emergency-section {
    border-left-color: #f44336;
    background: linear-gradient(135deg, #fff8f8 0%, #fff0f0 100%);
    border: 2px solid #ffebee;
}

.question-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    gap: 15px;
}

.question-header.emergency {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.question-number {
    background: #4CAF50;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.question-number.emergency {
    background: #f44336;
    font-size: 1.5rem;
    width: auto;
    height: auto;
    border-radius: 10px;
    padding: 8px 12px;
}

.question-header h3 {
    color: #2c3e50;
    font-size: 1.4rem;
    margin: 0;
    font-weight: 600;
}

.multiple-choice {
    color: #666;
    font-size: 0.9rem;
    background: #e8f5e9;
    padding: 4px 12px;
    border-radius: 12px;
    margin-left: auto;
}

.emergency-note {
    color: #d32f2f;
    font-weight: 600;
    background: #ffebee;
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid #ffcdd2;
}

.question-content {
    margin-top: 15px;
}

.text-input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fafafa;
}

.text-input:focus {
    outline: none;
    border-color: #4CAF50;
    background: white;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.input-hint {
    display: block;
    color: #666;
    font-size: 0.9rem;
    margin-top: 8px;
    line-height: 1.4;
}

/* 개선된 라디오 버튼 스타일 */
.radio-group-enhanced {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.radio-option {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.radio-option:hover {
    background: #e3f2fd;
    border-color: #2196F3;
    transform: translateX(5px);
}

.radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.radio-button {
    width: 20px;
    height: 20px;
    border: 2px solid #ccc;
    border-radius: 50%;
    margin-right: 15px;
    position: relative;
    transition: all 0.3s ease;
}

.radio-option input[type="radio"]:checked + .radio-button {
    border-color: #4CAF50;
    background: #4CAF50;
}

.radio-option input[type="radio"]:checked + .radio-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
}

.option-text {
    font-weight: 500;
    color: #333;
    font-size: 1.1rem;
}

/* 외상 종류 그리드 */
.injury-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.injury-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.injury-card {
    padding: 20px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.injury-option:hover .injury-card {
    background: #e3f2fd;
    border-color: #2196F3;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(33, 150, 243, 0.2);
}

.injury-option input[type="radio"]:checked + .injury-card {
    background: #e8f5e9;
    border-color: #4CAF50;
    color: #2e7d32;
}

.injury-icon {
    font-size: 2rem;
    margin-bottom: 5px;
}

.injury-text {
    font-weight: 600;
    font-size: 1rem;
}

/* 지속 기간 타임라인 */
.duration-timeline {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding: 10px 0;
}

.timeline-option {
    flex-shrink: 0;
}

.timeline-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.timeline-card {
    padding: 20px 15px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.timeline-option:hover .timeline-card {
    background: #e3f2fd;
    border-color: #2196F3;
    transform: translateY(-3px);
}

.timeline-option input[type="radio"]:checked + .timeline-card {
    background: #e8f5e9;
    border-color: #4CAF50;
    color: #2e7d32;
}

.timeline-icon {
    font-size: 1.8rem;
}

.timeline-text {
    font-weight: 600;
    font-size: 1rem;
}

.timeline-desc {
    font-size: 0.8rem;
    color: #666;
}

/* 통증 강도 스케일 */
.pain-scale-container {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    border: 1px solid #e0e0e0;
}

.pain-scale-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.scale-label {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.nrs-scale-enhanced {
    display: flex;
    gap: 8px;
    margin: 20px 0;
    justify-content: space-between;
}

.nrs-option {
    flex: 1;
    position: relative;
}

.nrs-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.nrs-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    background: white;
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nrs-option:hover .nrs-number {
    border-color: #2196F3;
    background: #e3f2fd;
    transform: scale(1.1);
}

.nrs-option[data-level="mild"] input[type="radio"]:checked + .nrs-number {
    background: #4CAF50;
    border-color: #4CAF50;
    color: white;
}

.nrs-option[data-level="moderate"] input[type="radio"]:checked + .nrs-number {
    background: #ff9800;
    border-color: #ff9800;
    color: white;
}

.nrs-option[data-level="severe"] input[type="radio"]:checked + .nrs-number {
    background: #f44336;
    border-color: #f44336;
    color: white;
}

.pain-descriptions {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    gap: 10px;
}

.pain-desc {
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    text-align: center;
    flex: 1;
}

.pain-desc.mild {
    background: #e8f5e9;
    color: #2e7d32;
}

.pain-desc.moderate {
    background: #fff3e0;
    color: #ef6c00;
}

.pain-desc.severe {
    background: #ffebee;
    color: #c62828;
}

/* 통증 성질 그리드 */
.pain-quality-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.quality-option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
}

.quality-card {
    padding: 15px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-height: 85px;
    justify-content: center;
}

.quality-option:hover .quality-card {
    background: #e3f2fd;
    border-color: #2196F3;
    transform: translateY(-2px);
}

.quality-option input[type="checkbox"]:checked + .quality-card {
    background: #e8f5e9;
    border-color: #4CAF50;
    color: #2e7d32;
}

.quality-icon {
    font-size: 1.5rem;
}

.quality-text {
    font-weight: 600;
    font-size: 0.95rem;
}

/* 통증 패턴 옵션 */
.pattern-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.pattern-option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
}

.pattern-card {
    padding: 15px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-height: 85px;
    justify-content: center;
}

.pattern-option:hover .pattern-card {
    background: #e3f2fd;
    border-color: #2196F3;
    transform: translateY(-2px);
}

.pattern-option input[type="checkbox"]:checked + .pattern-card {
    background: #e8f5e9;
    border-color: #4CAF50;
    color: #2e7d32;
}

.pattern-icon {
    font-size: 1.5rem;
}

.pattern-text {
    font-weight: 600;
    font-size: 0.95rem;
}

/* 수면 옵션 */
.sleep-options {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.sleep-option {
    flex: 1;
    min-width: 150px;
}

.sleep-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.sleep-card {
    padding: 20px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    min-height: 100px;
    justify-content: center;
}

.sleep-option:hover .sleep-card {
    background: #e3f2fd;
    border-color: #2196F3;
    transform: translateY(-2px);
}

.sleep-option input[type="radio"]:checked + .sleep-card {
    background: #e8f5e9;
    border-color: #4CAF50;
    color: #2e7d32;
}

.sleep-icon {
    font-size: 2rem;
}

.sleep-text {
    font-weight: 600;
    font-size: 1rem;
}

/* 응급 증상 */
.emergency-symptoms {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 15px;
}

.emergency-option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
}

.emergency-card {
    padding: 18px;
    background: #fff8f8;
    border: 2px solid #ffcdd2;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-height: 100px;
    justify-content: center;
}

.emergency-option:hover .emergency-card {
    background: #ffebee;
    border-color: #f44336;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.2);
}

.emergency-option input[type="checkbox"]:checked + .emergency-card {
    background: #ffcdd2;
    border-color: #f44336;
    color: #c62828;
}

.emergency-icon {
    font-size: 1.8rem;
}

.emergency-text {
    font-weight: 600;
    font-size: 1rem;
}

.emergency-desc {
    font-size: 0.8rem;
    color: #666;
    margin-top: 4px;
}

/* 폼 액션 버튼 */
.form-actions {
    text-align: center;
    margin-top: 40px;
}

.next-btn.enhanced {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border: none;
    padding: 18px 35px;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.next-btn.enhanced:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.4);
}

.btn-text {
    font-size: 1.1rem;
}

.btn-icon {
    font-size: 1.3rem;
    transition: transform 0.3s ease;
}

.next-btn.enhanced:hover .btn-icon {
    transform: translateX(3px);
}

/* AI 결과 표시 스타일 */
.ai-result-content {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    line-height: 1.8;
    font-size: 1.1rem;
}

.ai-result-content h1,
.ai-result-content h2,
.ai-result-content h3,
.ai-result-content h4 {
    color: #2c3e50;
    margin-top: 25px;
    margin-bottom: 15px;
}

.ai-result-content h1:first-child,
.ai-result-content h2:first-child,
.ai-result-content h3:first-child,
.ai-result-content h4:first-child {
    margin-top: 0;
}

.ai-result-content ul,
.ai-result-content ol {
    margin: 15px 0;
    padding-left: 25px;
}

.ai-result-content li {
    margin-bottom: 8px;
}

.ai-result-content strong {
    color: #2c3e50;
    font-weight: 600;
}

/* 안전 안내 스타일 */
.safety-notice {
    background: #fff3cd;
    border: 2px solid #ffeaa7;
    border-radius: 15px;
    padding: 25px;
    margin-top: 30px;
}

.safety-notice h3 {
    color: #856404;
    margin-bottom: 15px;
}

.safety-notice ul {
    list-style: none;
    padding: 0;
}

.safety-notice li {
    padding: 8px 0;
    border-bottom: 1px solid #f8dc9b;
    display: flex;
    align-items: center;
}

.safety-notice li:last-child {
    border-bottom: none;
}

.safety-notice strong {
    color: #533f03;
    margin-right: 8px;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header {
        padding: 20px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .step-section {
        padding: 20px;
    }
    
    .checkbox-group {
        grid-template-columns: 1fr;
    }
    
    .body-map-container {
        flex-direction: column;
    }
    
    .selected-areas-list {
        min-width: auto;
        width: 100%;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .step-navigation {
        flex-direction: column;
        align-items: center;
    }
    
    .progress-bar {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5rem;
    }
    
    header p {
        font-size: 1rem;
    }
    
    .step-section h2 {
        font-size: 1.5rem;
    }
    
    #body-svg {
        max-width: 300px;
    }
}

/* 접근성 개선 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 고대비 모드 지원 */
@media (prefers-contrast: high) {
    .clickable-area {
        stroke-width: 3;
    }
    
    .trigger-point-card,
    .fascial-line-card {
        border-width: 3px;
    }
}

/* 실시간 선택 상태 표시 개선 */
.selection-status-bar {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    position: sticky;
    top: 20px;
    z-index: 100;
    transition: all 0.3s ease;
}

.status-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.status-icon {
    font-size: 1.2rem;
}

#live-selection-text {
    font-weight: 600;
    font-size: 1rem;
}

.selection-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-left: 10px;
}

.selection-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    cursor: pointer;
    animation: badgeAppear 0.3s ease;
}

@keyframes badgeAppear {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.selection-badge:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.selection-badge .remove-btn {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: bold;
}

.selection-badge .remove-btn:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: scale(1.2);
}

.quick-clear-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.quick-clear-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 클릭 영역 개선 */
.clickable-area {
    cursor: pointer;
    transition: all 0.3s ease;
    stroke-width: 2;
    opacity: 0.8;
    filter: brightness(1);
}

.clickable-area:hover {
    stroke: #2196F3;
    stroke-width: 3;
    fill: rgba(33, 150, 243, 0.4) !important;
    opacity: 1;
    transform-origin: center;
    transform: scale(1.1);
    filter: brightness(1.1) drop-shadow(0 2px 4px rgba(33, 150, 243, 0.3));
}

.clickable-area.selected {
    fill: rgba(255, 87, 34, 0.8) !important;
    stroke: #ff5722;
    stroke-width: 3.5;
    opacity: 1;
    animation: selectedPulse 0.5s ease;
}

@keyframes selectedPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1.08); }
}

.clickable-area.selected:hover {
    fill: rgba(255, 87, 34, 0.9) !important;
    stroke: #e64a19;
    transform: scale(1.12);
    filter: brightness(1.1) drop-shadow(0 3px 6px rgba(255, 87, 34, 0.4));
}

/* 바디맵 컨테이너 개선 */
.body-map {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    max-width: 550px;
    width: 100%;
    position: relative;
}

#body-svg {
    width: 100%;
    height: auto;
    max-width: 450px;
}

/* 모바일 최적화 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
        max-width: 100%;
    }
    
    header {
        padding: 20px 15px;
        margin-bottom: 15px;
        border-radius: 15px;
    }
    
    header h1 {
        font-size: 1.8rem;
        margin-bottom: 8px;
    }
    
    header p {
        font-size: 1rem;
        margin-bottom: 15px;
    }
    
    .step-section {
        padding: 20px 15px;
        margin-bottom: 15px;
    }
    
    .step-section h2 {
        font-size: 1.5rem;
        margin-bottom: 15px;
    }
    
    .step-description {
        font-size: 0.95rem;
        margin-bottom: 20px;
    }
    
    .selection-status-bar {
        padding: 12px 15px;
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
        margin-bottom: 15px;
        position: relative;
        top: 0;
    }
    
    .status-content {
        justify-content: center;
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    #live-selection-text {
        font-size: 0.95rem;
    }
    
    .selection-badges {
        justify-content: center;
        margin-left: 0;
        gap: 6px;
    }
    
    .selection-badge {
        font-size: 0.8rem;
        padding: 6px 10px;
        border-radius: 15px;
    }
    
    .quick-clear-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
        border-radius: 20px;
        width: 100%;
        margin-top: 5px;
    }
    
    .body-map-guide {
        display: none; /* 모바일에서는 가이드 숨김 */
    }
    
    .body-map-container {
        gap: 15px;
    }
    
    .body-view-tabs {
        gap: 8px;
        width: 100%;
    }
    
    .view-tab {
        flex: 1;
        padding: 12px 15px;
        font-size: 0.9rem;
        border-radius: 20px;
    }
    
    .body-map {
        padding: 15px;
        border-radius: 12px;
        max-width: 100%;
        width: 100%;
    }
    
    #body-svg {
        max-width: 100%;
        height: auto;
    }
    
    .clickable-area {
        stroke-width: 2.5;
    }
    
    .clickable-area:hover,
    .clickable-area:active {
        transform: scale(1.2);
        stroke-width: 4;
    }
    
    .clickable-area.selected {
        stroke-width: 4;
        transform: scale(1.15);
    }
    
    .selected-areas-panel {
        padding: 15px;
        margin-top: 15px;
    }
    
    .question-card {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .question-header h3 {
        font-size: 1.1rem;
    }
    
    .text-input {
        font-size: 16px; /* 모바일 줌 방지 */
        padding: 12px 15px;
    }
    
    .radio-group-enhanced,
    .nrs-scale {
        gap: 8px;
    }
    
    .radio-option {
        padding: 10px 12px;
    }
    
    .nrs-option {
        min-width: 35px;
        min-height: 35px;
    }
    
    .next-btn,
    .analyze-btn,
    .back-btn {
        padding: 15px 25px;
        font-size: 1rem;
        margin: 15px 0;
        width: 100%;
        border-radius: 12px;
    }
    
    .navigation-buttons {
        flex-direction: column;
        gap: 10px;
        margin-top: 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 8px;
    }
    
    header {
        padding: 15px 12px;
        margin-bottom: 12px;
    }
    
    header h1 {
        font-size: 1.6rem;
    }
    
    .step-section {
        padding: 15px 12px;
    }
    
    .selection-status-bar {
        padding: 10px 12px;
        border-radius: 10px;
    }
    
    .body-map {
        padding: 12px;
    }
    
    .selection-badge {
        font-size: 0.75rem;
        padding: 4px 8px;
    }
    
    .clickable-area:hover,
    .clickable-area:active {
        transform: scale(1.25);
    }
    
    #body-svg {
        max-width: 320px;
    }
    
    .footer-status {
        margin-top: 30px;
        padding: 10px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 10px;
    }
    
    .progress-bar {
        justify-content: center;
        gap: 10px;
    }
    
    .progress-step {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
    
    .ai-status-bar {
        padding: 8px 12px;
    }
    
    .ai-status {
        font-size: 0.8rem;
    }
}

/* Footer 스타일 */
.footer-status {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    margin-top: 40px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.footer-status .progress-bar {
    margin: 0;
}

.footer-status .ai-status-bar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px 15px;
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

/* 트리거 포인트 찾기 가이드 스타일 */
.find-trigger-guide {
    background: linear-gradient(135deg, #e3f2fd 0%, #f1f8e9 100%);
    border-radius: 12px;
    padding: 20px;
    margin: 15px 0;
    border-left: 4px solid #4CAF50;
}

.find-trigger-guide h5 {
    color: #2e7d32;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.guide-steps {
    margin-bottom: 20px;
}

.guide-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
}

.step-number {
    background: #4CAF50;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: bold;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
    font-size: 0.9rem;
    line-height: 1.4;
}

.interactive-guide-btn {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.interactive-guide-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

/* 인터랙티브 가이드 모달 */
.interactive-guide-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.guide-modal-content {
    background: white;
    border-radius: 20px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: modalAppear 0.3s ease;
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.guide-header {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    padding: 20px;
    border-radius: 20px 20px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.guide-header h3 {
    margin: 0;
    font-size: 1.3rem;
}

.close-guide {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.close-guide:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.guide-progress {
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.progress-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.progress-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
    transition: all 0.3s ease;
}

.progress-dot.active {
    background: #4CAF50;
    transform: scale(1.3);
}

.progress-dot.completed {
    background: #81C784;
}

.guide-content {
    padding: 20px;
    min-height: 200px;
}

.guide-step-content {
    text-align: center;
}

.step-header {
    margin-bottom: 20px;
}

.step-emoji {
    font-size: 3rem;
    margin-bottom: 10px;
}

.step-header h4 {
    color: #2e7d32;
    margin: 0;
    font-size: 1.2rem;
}

.step-description {
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
    margin-bottom: 20px;
}

.step-tip {
    background: #fff3e0;
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid #ff9800;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.tip-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.tip-text {
    font-size: 0.9rem;
    color: #e65100;
    line-height: 1.4;
}

.guide-navigation {
    padding: 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.guide-nav-btn,
.guide-finish-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.guide-nav-btn {
    background: #f5f5f5;
    color: #666;
}

.guide-nav-btn:not(:disabled):hover {
    background: #e0e0e0;
    transform: translateY(-1px);
}

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

.guide-finish-btn {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.guide-finish-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

/* 모바일 가이드 최적화 */
@media (max-width: 768px) {
    .interactive-guide-modal {
        padding: 10px;
    }
    
    .guide-modal-content {
        max-height: 95vh;
        border-radius: 15px;
    }
    
    .guide-header {
        padding: 15px;
        border-radius: 15px 15px 0 0;
    }
    
    .guide-header h3 {
        font-size: 1.1rem;
    }
    
    .step-emoji {
        font-size: 2.5rem;
    }
    
    .guide-navigation {
        flex-direction: column;
    }
    
    .guide-nav-btn,
    .guide-finish-btn {
        width: 100%;
    }
    
    .find-trigger-guide {
        padding: 15px;
    }
    
    .guide-step {
        padding: 8px;
    }
    
    .interactive-guide-btn {
        padding: 10px 16px;
        font-size: 0.85rem;
    }
}

/* 마사지 단계 카드 스타일 */
.massage-steps {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
}

.step-card {
    background: white;
    border: 1px solid #e1e8ed;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.step-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.step-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    padding: 8px 16px;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-block;
    margin-bottom: 15px;
}

.step-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.step-method,
.step-time,
.step-note {
    padding: 8px 12px;
    border-radius: 6px;
    line-height: 1.5;
}

.step-method {
    background-color: #f8f9ff;
    border-left: 3px solid #667eea;
}

.step-time {
    background-color: #fff8f0;
    border-left: 3px solid #ff9500;
}

.step-note {
    background-color: #fff5f5;
    border-left: 3px solid #e53e3e;
}

.step-method strong,
.step-time strong,
.step-note strong {
    color: #2d3748;
    margin-right: 8px;
}

/* 모바일 대응 */
@media (max-width: 768px) {
    .step-card {
        padding: 15px;
        margin: 0 10px;
    }
    
    .step-number {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
    
    .step-content {
        gap: 8px;
    }
    
    .step-method,
    .step-time,
    .step-note {
        padding: 6px 10px;
        font-size: 0.9rem;
    }
}