/* 통증 설명 입력 스타일 */
.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;
}

/* 헤더 스타일 */
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;
}
