/* 기본 설정 및 초기화 */
* {
    box-sizing: border-box;
}

/* 숫자 전용 폰트 정의 */
.number-font {
    font-family: 'Inter', 'SF Pro Display', 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    font-variant-numeric: tabular-nums lining-nums;
    font-feature-settings: "tnum" 1, "lnum" 1;
    letter-spacing: -0.01em;
}

/* 메인 컨테이너 */
.disease-main {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans KR', sans-serif;
    position: relative;
}

.disease-container {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    border: 1px solid #e5e7eb;
    padding: 24px;
    transition: all 0.2s ease;
}

/* 헤더 섹션 - PC에서 가로 정렬 보장 */
.disease-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 24px;
    position: relative;
    width: 100%;
    flex-wrap: nowrap; /* PC에서 줄바꿈 방지 */
}

.disease-title {
    font-size: clamp(20px, 4vw, 28px);
    color: #1f2937;
    margin: 0;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: center;
    white-space: nowrap; /* 제목 줄바꿈 방지 */
    flex-shrink: 0; /* 크기 축소 방지 */
}

.disease-title i {
    color: #ef4444;
    font-size: 0.9em;
    flex-shrink: 0; /* 아이콘 크기 고정 */
}

.search-tips {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    flex-shrink: 0; /* 버튼 크기 고정 */
}

.tip-button {
    padding: 8px 16px;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    color: #374151;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tip-button:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
    transform: translateY(-1px);
}

.tip-button i {
    color: #f59e0b;
    font-size: 14px;
}

/* 검색 섹션 */
.search-section {
    margin-bottom: 20px;
}

.disease-form {
    width: 100%;
}

.search-box {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.disease-input {
    flex: 1;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 16px;
    background: #fff;
    transition: all 0.2s ease;
    height: 52px;
}

.disease-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
    outline: none;
}

.disease-input::placeholder {
    color: #9ca3af;
}

.disease-button {
    padding: 14px 24px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    height: 52px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    min-width: 100px;
}

.disease-button:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.disease-button:active {
    transform: translateY(0);
}

.disease-button i {
    font-size: 14px;
}

/* 데이터 출처 - 우측 하단으로 이동 */
.data-source {
    position: absolute;
    bottom: 20px;
    right: 20px;
    padding: 8px 12px;
    background: rgba(248, 250, 252, 0.9);
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    backdrop-filter: blur(4px);
    z-index: 1;
}

.data-source a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #6b7280;
    font-size: 12px;
    transition: color 0.2s ease;
}

.data-source a:hover {
    color: #374151;
}

.cc-license {
    height: 18px;
    margin-right: 4px;
}

/* 로딩 */
.loading-container {
    text-align: center;
    padding: 40px 20px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f4f6;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 검색 결과 */
.disease-results {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 16px 20px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.results-count {
    font-size: 16px;
    color: #1f2937;
    font-weight: 500;
}

.results-count strong {
    color: #3b82f6;
    font-weight: 700;
}

.search-info {
    text-align: right;
}

.search-info small {
    color: #6b7280;
    font-size: 13px;
}

.search-info strong {
    color: #374151;
    font-weight: 600;
}

.results-list {
    max-height: none;
    overflow: visible;
}

.result-items {
    max-height: 600px;
    overflow-y: auto;
}

.result-item {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    margin-bottom: 16px;
    transition: all 0.2s ease;
    overflow: hidden;
}

.result-item:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
    transform: translateY(-1px);
}

.result-item:last-child {
    border-bottom: none;
}

/* 질병 코드 */
.disease-code {
    display: inline-block;
    background: #3b82f6;
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    font-family: 'Inter', 'SF Pro Display', 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', monospace;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

/* 질병 정보 */
.disease-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.disease-name {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.disease-eng-name {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 12px 0;
    font-style: italic;
    line-height: 1.4;
}

/* 질병 메타 정보 */
.disease-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    max-width: 100%;
}

.meta-item i {
    font-size: 11px;
    flex-shrink: 0;
}

.meta-item.category {
    background: #f0f9ff;
    color: #0c4a6e;
    border: 1px solid #bae6fd;
}

.meta-item.category i {
    color: #0284c7;
}

.meta-item.chapter {
    background: #f0fdf4;
    color: #14532d;
    border: 1px solid #bbf7d0;
}

.meta-item.chapter i {
    color: #16a34a;
}

/* 액션 버튼들 */
.disease-actions {
    display: flex;
    gap: 4px;
    flex-wrap: nowrap;
}

.btn-stats {
    flex: 1;
    min-width: 0;
    padding: 8px 4px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-stats.primary {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
}

.btn-stats.secondary {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.btn-stats.tertiary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.btn-stats:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.btn-stats:active {
    transform: translateY(0);
}

.btn-stats i {
    font-size: 14px;
    flex-shrink: 0;
}

.btn-text {
    white-space: nowrap;
}

/* 페이지네이션 */
.pagination-container {
    padding: 20px;
    background: #f8fafc;
    border-top: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.pagination-info {
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.page-button {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    color: #374151;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    min-width: 40px;
    text-align: center;
    cursor: pointer;
    user-select: none;
}

.page-button:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
    transform: translateY(-1px);
}

.page-button:active {
    transform: translateY(0);
}

.page-button.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
    font-weight: 600;
}

.page-button.active:hover {
    background: #2563eb;
    border-color: #2563eb;
}

.page-dots {
    padding: 8px 4px;
    color: #9ca3af;
    font-size: 14px;
    user-select: none;
}

/* 통계 모달 */
.stats-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.stats-modal-content {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 1200px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    animation: modalSlideIn 0.3s ease-out;
    display: flex;
    flex-direction: column;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.stats-header {
    padding: 20px 24px;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.stats-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 8px;
}

.close-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    font-size: 24px;
    color: #6b7280;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: #e5e7eb;
    color: #374151;
}

/* 모달 바디 */
.modal-body {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* 금액 단위 표시 */
.currency-notice {
    padding: 12px 24px;
    background: #fef3c7;
    border-bottom: 1px solid #f59e0b;
    font-size: 14px;
    color: #92400e;
    font-weight: 600;
    text-align: center;
    flex-shrink: 0;
}

/* 통계 테이블 컨테이너 */
.stats-table-container {
    flex: 1;
    overflow: auto;
    padding: 0;
    min-height: 0;
}

/* PC용 통계 테이블 */
.stats-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    font-size: 13px;
    min-width: 800px;
}

.stats-table th,
.stats-table td {
    padding: 10px 8px;
    text-align: center;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
    white-space: nowrap;
}

.stats-table th {
    background: #f8fafc;
    font-weight: 600;
    color: #374151;
    position: sticky;
    top: 0;
    z-index: 5;
    font-size: 12px;
    line-height: 1.3;
}

.stats-table td {
    font-weight: 500;
}

/* 숫자 셀에 특별한 폰트 적용 */
.stats-table td:nth-child(4),
.stats-table td:nth-child(5),
.stats-table td:nth-child(6),
.stats-table td:nth-child(7),
.stats-table td:nth-child(8),
.stats-table td:nth-child(9),
.stats-table td:nth-child(10) {
    font-family: 'Inter', 'SF Pro Display', 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-variant-numeric: tabular-nums lining-nums;
    font-feature-settings: "tnum" 1, "lnum" 1;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.stats-table tr:last-child td {
    border-bottom: none;
}

.stats-table .total-row {
    background: #f1f5f9;
    font-weight: 600;
}

.stats-table .total-row td {
    background: #f1f5f9;
    font-weight: 700;
    color: #1f2937;
}

.stats-table .total-row td:last-child {
    color: #3b82f6;
    font-weight: 700;
}

.stats-table .subtotal-row {
    background: #f8fafc;
    font-weight: 600;
}

/* 모바일용 카드 레이아웃 */
.stats-cards {
    display: none;
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    gap: 16px;
    flex-direction: column;
    min-height: 0;
}

.stats-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.stats-card.total-card {
    background: #f1f5f9;
    border-color: #3b82f6;
    border-width: 2px;
}

.stats-card.subtotal-card {
    background: #f8fafc;
    border-color: #6b7280;
    }

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
        margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
}

.card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid #f1f5f9;
}

.card-row:last-child {
    border-bottom: none;
}

.card-label {
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
    flex: 1;
    text-align: left;
}

.card-value {
    font-size: 15px;
    color: #1f2937;
    font-weight: 600;
    text-align: right;
    font-family: 'Inter', 'SF Pro Display', 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-variant-numeric: tabular-nums lining-nums;
    font-feature-settings: "tnum" 1, "lnum" 1;
    letter-spacing: -0.01em;
}

/* 통계 필터 */
.stats-filters {
    padding: 16px 24px;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.stats-filters select {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-right: 12px;
}

.stats-filters select:hover {
    border-color: #9ca3af;
}

.stats-filters select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
    outline: none;
}

/* 통계 주석 */
.stats-notes {
    padding: 20px 24px;
    background: #f8fafc;
    border-top: 1px solid #e5e7eb;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
    flex-shrink: 0;
}

.stats-notes p {
    margin: 4px 0;
}

.stats-notes p:first-child {
    margin-top: 0;
}

.stats-notes p:last-child {
    margin-bottom: 0;
}

/* 액션 버튼 컨테이너 */
.action-buttons {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.action-buttons button {
    flex: 1;
}

/* 스크롤바 스타일링 */
.result-items::-webkit-scrollbar,
.stats-table-container::-webkit-scrollbar,
.stats-cards::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.result-items::-webkit-scrollbar-track,
.stats-table-container::-webkit-scrollbar-track,
.stats-cards::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.result-items::-webkit-scrollbar-thumb,
.stats-table-container::-webkit-scrollbar-thumb,
.stats-cards::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.result-items::-webkit-scrollbar-thumb:hover,
.stats-table-container::-webkit-scrollbar-thumb:hover,
.stats-cards::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* 팁 모달 */
.tips-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 101;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.tips-modal-content {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    animation: modalSlideIn 0.3s ease-out;
}

.tips-header {
    padding: 20px 24px;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tips-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tips-header h2 i {
    color: #f59e0b;
}

.tips-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    font-size: 24px;
    color: #6b7280;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.tips-close:hover {
    background: #e5e7eb;
    color: #374151;
}

.tips-content {
    padding: 24px;
}

.tips-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tips-content li {
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    line-height: 1.5;
}

.tips-content li:last-child {
    border-bottom: none;
}

.tips-content li i {
    color: #3b82f6;
    font-size: 16px;
    margin-top: 2px;
    flex-shrink: 0;
}

/* 에러 메시지 */
.error-container {
    text-align: center;
    padding: 40px 20px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 12px;
    color: #dc2626;
}

.error-container i {
    font-size: 32px;
    margin-bottom: 12px;
    display: block;
}

.error-text {
    font-size: 16px;
    margin: 0;
}

/* 스피너 로딩 */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    gap: 16px;
}

.loading-spinner .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f4f6;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* 반응형 디자인 */
@media (max-width: 1400px) {
    .stats-modal-content {
        margin: 20px;
        max-width: calc(100% - 40px);
    }
}

@media (max-width: 768px) {
    .disease-main {
        padding: 12px;
    }

    .disease-container {
        padding: 16px;
        border-radius: 12px;
    }

    .disease-header {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .search-tips {
        position: static;
        transform: none;
    }

    .data-source {
        position: static;
        margin: 20px auto 0;
        width: fit-content;
    }

    .search-box {
        flex-direction: column;
        gap: 8px;
        max-width: none;
    }

    .disease-input {
        font-size: 16px; /* iOS 줌 방지 */
        height: 48px;
    }

    .disease-button {
        height: 48px;
        width: 100%;
    }

    /* 모바일에서 결과 헤더 조정 */
    .results-header {
        flex-direction: column;
        gap: 8px;
        text-align: center;
        padding: 12px 16px;
    }

    .search-info {
        text-align: center;
    }

    /* 모바일에서 결과 아이템 조정 */
    .result-item {
        border-radius: 12px;
        margin-bottom: 12px;
    }

    .disease-header-info {
        padding: 12px 16px 0;
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .disease-code-section {
        width: 100%;
        justify-content: space-between;
    }

    .disease-quick-actions {
        justify-content: flex-end;
    }

    .disease-content {
        padding: 8px 16px 16px;
    }

    .disease-name {
        font-size: 16px;
        margin: 0 0 6px 0;
    }

    .disease-meta {
        margin: 8px 0;
    }

    .meta-item {
        font-size: 11px;
        padding: 4px 8px;
    }

    .meta-item i {
        font-size: 10px;
    }

    /* 모바일에서 통계 모달 조정 */
    .stats-modal {
        padding: 10px;
    }

    .stats-modal-content {
        width: 95%;
        max-height: 90vh;
        border-radius: 12px;
    }

    .stats-header {
        padding: 16px 20px;
    }

    .stats-header h2 {
        font-size: 18px;
    }

    .stats-table-container {
        overflow-x: auto;
        margin: 0;
    }

    .stats-cards {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .card-value {
        font-size: 13px;
    }

    /* 도움말 모달 모바일 조정 */
    .tips-modal {
        padding: 10px;
    }

    .tips-modal-content {
        width: 95%;
        border-radius: 12px;
    }

    .tips-header {
        padding: 16px 20px;
    }

    .tips-header h2 {
        font-size: 18px;
    }

    .tips-content {
        padding: 0 20px 20px;
    }

    /* 페이지네이션 모바일 조정 */
    .pagination {
        justify-content: center;
        gap: 6px;
    }

    .page-button {
        padding: 8px 12px;
        font-size: 13px;
        min-width: 36px;
    }

    .page-dots {
        margin: 0 4px;
    }

    /* 질병코드 모바일에서 작게 */
    .disease-code {
        font-size: 13px;
        padding: 6px 12px;
        min-width: 60px;
    }

    /* 배지 크기 조정 */
    .sick-type-badge {
        font-size: 10px;
        padding: 3px 6px;
    }

    /* 퀵 액션 버튼 크기 조정 */
    .quick-btn {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }

    /* 로딩, 에러 메시지 조정 */
    .loading-container {
        padding: 30px 15px;
    }

    .error-container {
        padding: 20px 15px;
    }
}

@media (max-width: 480px) {
    .disease-main {
        padding: 12px 8px;
        padding-bottom: 60px;
    }
    
    .disease-container {
        padding: 16px 12px;
    }
    
    .result-item {
        padding: 12px;
    }
    
    .disease-name {
        font-size: 15px;
    }
    
    .btn-stats {
        padding: 6px 4px;
        font-size: 10px;
        min-height: 32px;
    }
    
    .disease-code {
        font-size: 12px;
        padding: 4px 8px;
    }
    
    .tips-content {
        padding: 16px;
    }
    
    .tips-content li {
        padding: 8px 0;
        font-size: 14px;
    }
    
    .stats-cards {
        padding: 12px;
        gap: 12px;
    }
    
    .stats-card {
        padding: 12px;
    }
    
    .card-title {
        font-size: 15px;
    }
    
    .card-label {
        font-size: 12px;
    }
    
    .card-value {
        font-size: 13px;
        font-weight: 700;
    }
    
    .pagination {
        flex-wrap: wrap;
        gap: 2px;
    }
    
    .page-button {
        padding: 5px 8px;
        font-size: 12px;
        min-width: 32px;
    }
    
    .category-info, .chapter-info {
        font-size: 10px;
        padding: 2px 5px;
    }
    
    .no-results {
        padding: 30px 12px;
    }
    
    .no-results i {
        font-size: 32px;
        margin-bottom: 10px;
    }
    
    .no-results p {
        font-size: 15px;
    }
    
    .no-results small {
        font-size: 13px;
    }
}

/* 매우 작은 화면 */
@media (max-width: 360px) {
    .disease-actions {
        grid-template-columns: 1fr;
    }
    
    .btn-stats {
        font-size: 12px;
        padding: 8px;
        min-height: 40px;
    }
    
    .card-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .card-value {
        align-self: flex-end;
    }
}

/* 반응형 표시/숨김 클래스 */
.pc-only {
    display: block;
}

.mobile-only {
    display: none;
}

@media (max-width: 768px) {
    .pc-only {
        display: none;
    }
    
    .mobile-only {
        display: flex;
    }
}

/* 질병 헤더 정보 */
.disease-header-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px 0;
}

.disease-code-section {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.disease-code {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-family: 'SF Mono', 'Monaco', 'Cascadia Code', 'Roboto Mono', monospace;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    min-width: 70px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

/* 배지 그룹 */
.badge-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
    align-items: center;
}

/* 상병타입 배지 */
.sick-type-badge {
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.sick-type-badge.three-digit {
    background: #e0f2fe;
    color: #0277bd;
    border: 1px solid #81d4fa;
}

.sick-type-badge.four-digit {
    background: #f3e5f5;
    color: #7b1fa2;
    border: 1px solid #ce93d8;
}

/* 양한방구분 배지 */
.medicine-badge {
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    background: #e8f5e8;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

/* 법정감염병 배지 */
.infectious-disease-badge {
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    color: white;
}

.infectious-disease-badge.grade-1 {
    background: #d32f2f;
    border: 1px solid #b71c1c;
}

.infectious-disease-badge.grade-2 {
    background: #f57c00;
    border: 1px solid #e65100;
}

.infectious-disease-badge.grade-3 {
    background: #fbc02d;
    color: #333;
    border: 1px solid #f57f17;
}

.infectious-disease-badge.grade-4 {
    background: #388e3c;
    border: 1px solid #2e7d32;
}

/* 성별구분 배지 */
.gender-badge {
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    background: #fce4ec;
    color: #c2185b;
    border: 1px solid #f8bbd9;
}

/* 연령제한 배지 */
.age-badge {
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    background: #fff3e0;
    color: #ef6c00;
    border: 1px solid #ffcc02;
}

/* 완전코드구분 배지 */
.code-badge {
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    background: #e1f5fe;
    color: #0277bd;
    border: 1px solid #81d4fa;
}

/* 주상병사용구분 배지 */
.usage-badge {
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    background: #f3e5f5;
    color: #7b1fa2;
    border: 1px solid #ce93d8;
}

/* 퀵 액션 버튼 */
.disease-quick-actions {
    display: flex;
    gap: 4px;
}

.quick-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 14px;
}

.quick-btn:nth-child(1) {
    background: #3b82f6;
    color: white;
}

.quick-btn:nth-child(2) {
    background: #10b981;
    color: white;
}

.quick-btn:nth-child(3) {
    background: #f59e0b;
    color: white;
}

.quick-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* 질병 컨텐츠 영역 */
.disease-content {
    padding: 12px 20px 20px;
}

.disease-main-info {
    margin-bottom: 16px;
}

.disease-name {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.disease-eng-name {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 12px 0;
    font-style: italic;
    line-height: 1.4;
}

/* 메타 정보 개선 */
.disease-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    max-width: 100%;
}

.meta-item i {
    font-size: 11px;
    flex-shrink: 0;
}

.meta-item.category {
    background: #f0f9ff;
    color: #0c4a6e;
    border: 1px solid #bae6fd;
}

.meta-item.category i {
    color: #0284c7;
}

.meta-item.chapter {
    background: #f0fdf4;
    color: #14532d;
    border: 1px solid #bbf7d0;
}

.meta-item.chapter i {
    color: #16a34a;
}

/* PC 액션 버튼 개선 */
.disease-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-stats {
    flex: 1;
    min-width: 140px;
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-stats.primary {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
}

.btn-stats.secondary {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.btn-stats.tertiary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.btn-stats:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.btn-stats:active {
    transform: translateY(0);
}

.btn-stats i {
    font-size: 14px;
    flex-shrink: 0;
}

.btn-text {
    white-space: nowrap;
}

/* PC에서 2컬럼 레이아웃 */
@media (min-width: 1024px) {
    .result-items {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        max-height: none;
        overflow: visible;
    }
    
    .result-item {
        margin-bottom: 0;
    }
} 