/* 고급 디자인 시스템 - 가독성 개선 */
:root {
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --warning-gradient: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
  --danger-gradient: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
  
  --surface-glass: rgba(255, 255, 255, 0.95);
  --surface-glass-dark: rgba(255, 255, 255, 0.85);
  --surface-content: rgba(255, 255, 255, 0.98);
  
  --text-primary: #2c3e50;
  --text-secondary: #34495e;
  --text-light: #7f8c8d;
  --text-on-dark: #ffffff;
  --text-on-glass: #2c3e50;
  
  --shadow-soft: 0 8px 32px rgba(31, 38, 135, 0.15);
  --shadow-medium: 0 15px 35px rgba(31, 38, 135, 0.2);
  --shadow-strong: 0 25px 50px rgba(31, 38, 135, 0.25);
  
  --border-glass: 1px solid rgba(255, 255, 255, 0.25);
  --backdrop-blur: blur(20px);
}

/* 기본 스타일 */
* {
  margin: 0; 
  padding: 0; 
  box-sizing: border-box;
  font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", sans-serif;
}

body, html {
  width: 100%; 
  height: 100%;
  overflow: hidden;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  color: var(--text-primary);
  font-feature-settings: "liga" 1, "kern" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.hidden { 
  display: none !important; 
}

/* 고급 스크롤바 */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-thumb {
  background: var(--primary-gradient);
  border-radius: 10px;
  transition: all 0.3s ease;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--secondary-gradient);
}
::-webkit-scrollbar-track {
  background: transparent;
}

/* 고급 애니메이션 */
@keyframes fadeInUp {
  from { 
    opacity: 0; 
    transform: translateY(30px) scale(0.95); 
  }
  to   { 
    opacity: 1; 
    transform: translateY(0) scale(1); 
  }
}

@keyframes slideInRight {
  from { 
    transform: translateX(100%) rotateY(-15deg); 
    opacity: 0; 
  }
  to { 
    transform: translateX(0) rotateY(0deg); 
    opacity: 1; 
  }
}

@keyframes glowPulse {
  0%, 100% { 
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.4); 
  }
  50% { 
    box-shadow: 0 0 40px rgba(102, 126, 234, 0.8); 
  }
}

/* 고급 토스트 메시지 */
.toast {
  position: fixed;
  top: 30px;
  right: 30px;
  padding: 16px 24px;
  border-radius: 16px;
  color: white;
  font-weight: 600;
  z-index: 3000;
  animation: slideInRight 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  backdrop-filter: var(--backdrop-blur);
  border: var(--border-glass);
  font-size: 14px;
  max-width: 400px;
  box-shadow: var(--shadow-medium);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.toast.success { 
  background: var(--success-gradient);
}
.toast.error { 
  background: var(--danger-gradient);
}
.toast.info { 
  background: var(--primary-gradient);
}
.toast.warning { 
  background: var(--warning-gradient);
}

/* 고급 로그인 화면 */
.login-container {
  display: flex; 
  align-items: center; 
  justify-content: center;
  width: 100%; 
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  animation: fadeInUp 0.8s ease;
  position: relative;
  overflow: hidden;
}

.login-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%23ffffff" fill-opacity="0.05"><circle cx="30" cy="30" r="4"/></g></svg>');
  animation: float 20s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotateZ(0deg); }
  50% { transform: translateY(-10px) rotateZ(180deg); }
}

.login-box {
  width: 420px;
  background: var(--surface-glass);
  backdrop-filter: var(--backdrop-blur);
  border: var(--border-glass);
  border-radius: 24px;
  padding: 40px;
  box-shadow: var(--shadow-strong);
  position: relative;
  z-index: 1;
}

.login-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
  border-radius: 24px;
  z-index: -1;
}

.login-box h2 {
  font-size: 28px;
  text-align: center;
  margin-bottom: 32px;
  font-weight: 700;
  color: var(--text-primary);
  text-shadow: 0 2px 10px rgba(0,0,0,0.1);
  letter-spacing: -0.5px;
}
.input-group {
  margin-bottom: 20px;
}

.input-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  text-shadow: none;
}

.input-group input {
  width: 100%;
  padding: 16px 20px;
  border: 2px solid rgba(44, 62, 80, 0.2);
  border-radius: 12px;
  font-size: 16px;
  outline: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  color: var(--text-primary);
  font-weight: 500;
}

.input-group input::placeholder {
  color: var(--text-light);
}

.input-group input:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
  background: rgba(255, 255, 255, 0.95);
  transform: translateY(-2px);
}

.login-btn {
  width: 100%;
  padding: 18px;
  background: var(--primary-gradient);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-medium);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.login-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.6s;
}

.login-btn:hover::before {
  left: 100%;
}

.login-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: var(--shadow-strong);
}

/* 고급 앱 컨테이너 */
.app-container {
  display: none;
  flex-direction: column;
  width: 100%; 
  height: 100%;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  position: relative;
}

/* 고급 헤더 */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  background: var(--surface-glass-dark);
  backdrop-filter: var(--backdrop-blur);
  border: var(--border-glass);
  color: white;
  box-shadow: var(--shadow-soft);
  animation: fadeInUp 0.6s ease;
  position: relative;
  z-index: 100;
}

.app-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--primary-gradient);
  z-index: -1;
}

.app-header h1 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  gap: 12px;
  color: white;
}

/* 언어 선택 버튼 */
.language-selector {
  display: flex;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  overflow: hidden;
  margin-right: 16px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.lang-btn {
  padding: 8px 16px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.lang-btn.active {
  background: rgba(255, 255, 255, 0.3);
  color: white;
  transform: scale(1.05);
}

.lang-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.nav-tabs {
  display: flex; 
  gap: 12px;
  background: rgba(255, 255, 255, 0.1);
  padding: 6px;
  border-radius: 16px;
  backdrop-filter: blur(10px);
}

.nav-tabs button {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.nav-tabs button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.2);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

.nav-tabs button:hover::before {
  transform: translateX(0);
}

.nav-tabs button:hover {
  color: white;
  transform: translateY(-2px);
}

.nav-tabs button.active {
  background: rgba(255, 255, 255, 0.25);
  color: white;
  box-shadow: var(--shadow-soft);
}

.logout-btn {
  background: var(--danger-gradient);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-soft);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.logout-btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: var(--shadow-medium);
}

/* 탭 개선 */
.tab-content {
  display: none;
  flex: 1;
  animation: fadeInUp 0.6s ease;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  padding-top: 20px;  /* 상단 여백 추가 */
}

.tab-content.active {
  display: flex;
  flex-direction: column;
}

/* hidden 클래스와 active 클래스 충돌 방지 */
.tab-content.hidden {
  display: none !important;
}

/* 검색 탭 개선 */
.search-container {
  width: 100%;
  height: 100%;
  display: flex;
}

.search-sidebar {
  flex: 2;
  border-right: 1px solid rgba(44, 62, 80, 0.1);
  padding: 24px;
  overflow-y: auto;
  background: var(--surface-content);
  backdrop-filter: var(--backdrop-blur);
  animation: slideInUp 0.7s ease;
}

.search-sidebar h2 {
  font-size: 18px;
  margin-bottom: 20px;
  font-weight: 700;
  color: var(--text-primary);
  text-shadow: none;
  letter-spacing: -0.3px;
}

/* 고급 버튼 스타일 */
.btn-primary, .btn-deepsearch, .btn-prognosis {
  display: inline-block;
  padding: 12px 20px;
  background: var(--primary-gradient);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-top: 12px;
  box-shadow: var(--shadow-soft);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.btn-primary::before, .btn-deepsearch::before, .btn-prognosis::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.6s;
}

.btn-primary:hover::before, .btn-deepsearch:hover::before, .btn-prognosis:hover::before {
  left: 100%;
}

.btn-primary:hover, .btn-deepsearch:hover, .btn-prognosis:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: var(--shadow-medium);
}

.btn-deepsearch {
  background: linear-gradient(135deg, #8e44ad 0%, #9b59b6 100%);
  margin-left: 0;
  margin-top: 0;
}

.btn-prognosis {
  background: var(--warning-gradient);
  margin-left: 12px;
}

/* OCR 섹션 개선 */
.ocr-section {
  margin-top: 20px;
  background: var(--surface-content);
  backdrop-filter: var(--backdrop-blur);
  border: 2px dashed rgba(102, 126, 234, 0.3);
  border-radius: 16px;
  padding: 20px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-soft);
}

.ocr-section:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
  border-color: rgba(102, 126, 234, 0.5);
  background: rgba(255, 255, 255, 0.98);
}

.ocr-section h3 {
  font-size: 16px;
  margin-bottom: 12px;
  font-weight: 700;
  color: var(--text-primary);
  text-shadow: none;
}

/* 업로드 요약 개선 */
.upload-summary {
  background: var(--surface-content);
  backdrop-filter: var(--backdrop-blur);
  border: 1px solid rgba(102, 126, 234, 0.2);
  border-radius: 16px;
  padding: 20px;
  margin-top: 20px;
  box-shadow: var(--shadow-soft);
  animation: fadeInUp 0.5s ease;
}

.upload-summary h3, .upload-summary h4 {
  color: var(--text-primary);
  font-weight: 700;
  margin-bottom: 12px;
  text-shadow: none;
}

.upload-summary p {
  margin-bottom: 6px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* 메인 영역 개선 */
.search-main {
  flex: 8;
  position: relative;
  overflow-y: auto;
  padding: 24px;
  animation: slideInUp 0.7s ease;
  background: rgba(255, 255, 255, 0.98);
}

/* 결과 섹션 개선 */
.results-section {
  margin-top: 16px;
  background: var(--surface-content);
  backdrop-filter: var(--backdrop-blur);
  border: 1px solid rgba(102, 126, 234, 0.2);
  border-radius: 16px;
  padding: 24px;
  display: none;
  animation: fadeInUp 0.6s ease;
  box-shadow: var(--shadow-medium);
}

.results-section h3 {
  font-size: 20px;
  margin-bottom: 16px;
  font-weight: 700;
  color: var(--text-primary);
  text-shadow: none;
}

/* 테이블 개선 */
.cohort-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  font-size: 13px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  background: white;
}

.cohort-table th, .cohort-table td {
  border: 1px solid rgba(44, 62, 80, 0.1);
  padding: 12px 8px;
  text-align: center;
}

.cohort-table thead {
  background: var(--primary-gradient);
  color: white;
}

.cohort-table th {
  font-weight: 600;
  font-size: 12px;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.cohort-table td {
  white-space: nowrap;
  max-width: 120px;
  color: var(--text-secondary);
  font-weight: 500;
}

.cohort-table tr {
  cursor: pointer;
  transition: all 0.3s ease;
}

.cohort-table tbody tr:hover {
  background-color: rgba(102, 126, 234, 0.1);
  transform: scale(1.01);
}

/* 새로 추가된 케이스 스타일 */
.cohort-table .new-case {
  animation: newCaseGlow 2s ease-in-out;
}

@keyframes newCaseGlow {
  0%, 100% { box-shadow: 0 0 5px rgba(39, 174, 96, 0.5); }
  50% { box-shadow: 0 0 20px rgba(39, 174, 96, 0.8); }
}

/* 카드 개선 */
.result-card {
  background: white;
  border: 1px solid rgba(102, 126, 234, 0.2);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-soft);
}

.result-card h4 {
  font-size: 16px;
  margin-bottom: 8px;
  font-weight: bold;
  color: var(--text-primary);
}

.result-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-medium);
}

/* 라이브러리 개선 */
.library-container {
  width: 100%;
  height: 100%;
  display: flex;
  gap: 12px;
  padding: 20px;
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.98);
  animation: fadeInUp 0.6s ease;
}

.library-panel {
  background: white;
  border: 1px solid rgba(102, 126, 234, 0.2);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow-soft);
}

.library-panel h2 {
  font-size: 18px;
  margin-bottom: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

/* 라이브러리 그룹 개선 */
.library-group {
  background: rgba(248, 249, 250, 0.8);
  border: 1px solid rgba(44, 62, 80, 0.1);
  border-radius: 8px;
  margin-bottom: 12px;
  transition: all 0.3s ease;
}

.library-group:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.library-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  font-weight: bold;
  font-size: 14px;
  color: var(--text-primary);
  background: linear-gradient(135deg, #e7f3ff 0%, #d0e9ff 100%);
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  transition: all 0.3s ease;
}

.library-group-header:hover {
  background: linear-gradient(135deg, #d0e9ff 0%, #b8e0ff 100%);
}

/* 추가 컴포넌트 스타일 */
.uploaded-patients-list {
  max-height: 200px;
  overflow-y: auto;
}

.patient-item, .literature-item {
  background: white;
  border: 1px solid rgba(44, 62, 80, 0.1);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.patient-item:hover, .literature-item:hover {
  background: #f0f8ff;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 개선된 버튼들 */
.btn-save, .btn-favorite, .btn-delete, .btn-research {
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.btn-save {
  background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
  color: white;
}

.btn-save:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

.btn-favorite {
  background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
  color: white;
}

.btn-favorite:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(243, 156, 18, 0.3);
}

.btn-favorite.already-added {
  background: #bdc3c7;
  color: #7f8c8d;
  cursor: not-allowed;
}

.btn-favorite.already-added:hover {
  transform: none;
  box-shadow: none;
}

.btn-delete {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  color: white;
}

.btn-delete:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.btn-research {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
  color: white;
}

.btn-research:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

/* GPT 대화 영역 개선 - 크기 조정 및 최소화 가능 */
.gpt-chat-area {
  position: fixed;
  bottom: 0; 
  left: 22%;
  width: 78%;
  background: var(--surface-content);
  border-top: 1px solid rgba(102, 126, 234, 0.2);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  transition: all 0.3s ease;
  resize: vertical;
  min-height: 150px;
  max-height: 600px;
}

/* 채팅 복원 버튼 */
.chat-restore-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--primary-gradient);
  color: white;
  border: none;
  border-radius: 50px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-medium);
  transition: all 0.3s ease;
  z-index: 1001;
  display: none;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.chat-restore-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-strong);
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: linear-gradient(135deg, #f8f9ff 0%, #e7f3ff 100%);
  border-bottom: 1px solid rgba(102, 126, 234, 0.2);
  cursor: move;
}

.chat-header h3 {
  font-size: 16px;
  margin: 0;
  font-weight: 600;
  color: var(--text-primary);
}

.chat-controls {
  display: flex;
  gap: 8px;
}

.chat-control-btn {
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.2s ease;
  color: var(--text-primary);
}

.chat-control-btn:hover {
  background: rgba(102, 126, 234, 0.1);
}

.chat-content {
  padding: 20px;
  height: calc(100% - 50px);
  display: flex;
  flex-direction: column;
}

.chat-log {
  border: 2px solid rgba(102, 126, 234, 0.2);
  border-radius: 12px;
  height: 200px;
  overflow-y: auto;
  background: #f8f9ff;
  padding: 16px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  resize: vertical;
  min-height: 100px;
}

.chat-input {
  display: flex;
  gap: 8px;
}

.chat-input input {
  flex: 1; 
  border: 2px solid rgba(44, 62, 80, 0.2); 
  border-radius: 8px; 
  padding: 10px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.3s ease;
  color: var(--text-primary);
  background: white;
}

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

.chat-send-btn, .btn-deepsearch {
  background: var(--primary-gradient);
  color: #fff; 
  border: none; 
  border-radius: 8px; 
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.chat-send-btn:hover, .btn-deepsearch:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.btn-deepsearch {
  background: linear-gradient(135deg, #8e44ad 0%, #9b59b6 100%);
  margin-left: 0;
}

.btn-deepsearch:hover {
  box-shadow: 0 6px 20px rgba(142, 68, 173, 0.3);
}

/* 최소화된 상태 스타일 */
.gpt-chat-area.minimized {
  height: 50px !important;
}

.gpt-chat-area.minimized .chat-content {
  display: none;
}

/* 고급 모달 시스템 */
.modal, .post-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.7);
  backdrop-filter: blur(10px);
  animation: fadeInUp 0.4s ease;
}

.modal-content, .post-modal-content {
  background: var(--surface-content);
  backdrop-filter: var(--backdrop-blur);
  margin: 3% auto;
  padding: 40px;
  border: 1px solid rgba(102, 126, 234, 0.2);
  border-radius: 24px;
  width: 90%;
  max-width: 1000px;
  max-height: 90%;
  overflow-y: auto;
  animation: slideInUp 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  box-shadow: var(--shadow-strong);
  position: relative;
}

@keyframes slideInUp {
  from {
    transform: translateY(100px) scale(0.9);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.modal-content::before, .post-modal-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);
  border-radius: 24px;
  z-index: -1;
}

.close {
  position: absolute;
  right: 20px;
  top: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(44, 62, 80, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(44, 62, 80, 0.2);
  color: var(--text-primary);
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  line-height: 0;
  text-align: center;
  padding: 0;
  margin: 0;
  transform-origin: center center;
}

/* 파일 입력 커스터마이징 */
.file-input-wrapper {
  position: relative;
  overflow: hidden;
  display: inline-block;
  width: 100%;
  margin-bottom: 8px;
}

.file-input-wrapper input[type=file] {
  position: absolute;
  left: -9999px;
}

.file-input-label {
  display: block;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.9);
  border: 2px dashed rgba(102, 126, 234, 0.3);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  font-size: 14px;
  color: var(--text-secondary);
}

.file-input-label:hover {
  border-color: rgba(102, 126, 234, 0.5);
  background: rgba(255, 255, 255, 0.95);
}

.file-input-label.has-file {
  border-color: #27ae60;
  background: rgba(39, 174, 96, 0.1);
  color: #27ae60;
}

.close:hover {
  background: rgba(231, 76, 60, 0.2);
  color: #e74c3c;
  transform: scale(1.1) rotate(90deg);
  box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

.modal h3, .post-modal-content h3 {
  margin-bottom: 24px;
  color: var(--text-primary);
  font-size: 24px;
  font-weight: 700;
  text-shadow: none;
  letter-spacing: -0.5px;
}

/* 상세 정보 섹션 */
.detail-section {
  background: rgba(248, 249, 255, 0.8);
  padding: 16px;
  border-radius: 12px;
  border: 1px solid rgba(102, 126, 234, 0.2);
  margin-bottom: 16px;
}

.detail-section h4 {
  font-size: 15px;
  margin-bottom: 12px;
  color: var(--text-primary);
  font-weight: 600;
}

.detail-section p {
  margin-bottom: 4px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-secondary);
}

/* 예후 예측 관련 스타일 */
.prognosis-section {
  background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
  border: 1px solid #ffd93d;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}

.prognosis-section h4 {
  color: #856404;
  font-size: 16px;
  margin-bottom: 16px;
  font-weight: 600;
}

.prognosis-card {
  background: white;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
  border-left: 4px solid #f39c12;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.prognosis-score {
  font-size: 24px;
  font-weight: bold;
  color: #e67e22;
  margin-bottom: 8px;
}

.prognosis-details {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* 포럼 관련 스타일 */
.forum-container {
  width: 100%;
  height: 100%;
  display: flex;
  background: rgba(255, 255, 255, 0.98);
  animation: fadeInUp 0.6s ease;
}

.forum-sidebar {
  width: 280px;
  background: var(--surface-content);
  border-right: 1px solid rgba(44, 62, 80, 0.1);
  padding: 20px;
  overflow-y: auto;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
}

.forum-main {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  position: relative;
  background: rgba(255, 255, 255, 0.98);
}

.forum-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  background: white;
  padding: 16px 20px;
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(102, 126, 234, 0.1);
}

.forum-search {
  flex: 1;
  max-width: 400px;
  margin-right: 16px;
}

.forum-search input {
  width: 100%;
  padding: 10px 16px;
  border: 2px solid rgba(44, 62, 80, 0.2);
  border-radius: 25px;
  font-size: 14px;
  outline: none;
  transition: all 0.3s ease;
  color: var(--text-primary);
}

.forum-search input:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-new-post {
  background: var(--primary-gradient);
  color: white;
  border: none;
  border-radius: 25px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.btn-new-post:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.forum-back-btn:hover {
  border-color: #667eea;
  background: #f0f8ff;
  transform: translateY(-1px);
}

/* 포럼 카테고리 */
.forum-category {
  background: white;
  border: 1px solid rgba(44, 62, 80, 0.1);
  border-radius: 8px;
  margin-bottom: 8px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.forum-category:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border-color: #667eea;
}

.forum-category.active {
  border-color: #667eea;
  background: linear-gradient(135deg, #f0f8ff 0%, #e7f3ff 100%);
}

.category-header {
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.category-title {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 14px;
}

.category-count {
  background: #667eea;
  color: white;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 500;
}

/* 폼 개선 */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form-group label {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 12px;
  border: 2px solid rgba(44, 62, 80, 0.2);
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.3s ease;
  resize: vertical;
  background: white;
  color: var(--text-primary);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
  min-height: 150px;
  font-family: inherit;
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 20px;
}

.btn-cancel {
  padding: 10px 20px;
  border: 2px solid rgba(44, 62, 80, 0.2);
  background: white;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--text-primary);
  font-weight: 500;
}

.btn-cancel:hover {
  border-color: rgba(44, 62, 80, 0.4);
  background: #f5f5f5;
}

.btn-submit {
  padding: 10px 20px;
  background: var(--primary-gradient);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

/* 게시글 목록 스타일 */
.post-list {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.post-item {
  padding: 16px 20px;
  border-bottom: 1px solid #f0f0f0;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

.post-item:hover {
  background: #f8f9ff;
  transform: translateX(4px);
}

.post-item:last-child {
  border-bottom: none;
}

.post-header {
  display: flex;
  justify-content: between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.post-title {
  font-size: 16px;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 4px;
  line-height: 1.4;
  flex: 1;
}

.post-badge {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 500;
  margin-left: 8px;
}

.badge-hot {
  background: #ff6b6b;
  color: white;
}

.badge-new {
  background: #4ecdc4;
  color: white;
}

.badge-solved {
  background: #51cf66;
  color: white;
}

.post-content {
  color: #666;
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #999;
}

.post-author {
  display: flex;
  align-items: center;
  gap: 8px;
}

.author-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 10px;
  font-weight: bold;
}

.post-stats {
  display: flex;
  gap: 12px;
  align-items: center;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #666;
}

.forum-sort {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.sort-btn {
  padding: 6px 12px;
  border: 1px solid #e0e0e0;
  background: white;
  border-radius: 20px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.sort-btn:hover {
  border-color: #667eea;
  background: #f0f8ff;
}

.sort-btn.active {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

/* 게시글 상세보기 */
.post-detail {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
}

.post-detail-header {
  padding-bottom: 16px;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 20px;
}

.post-detail-title {
  font-size: 24px;
  font-weight: bold;
  color: #2c3e50;
  margin-bottom: 12px;
  line-height: 1.3;
}

.post-detail-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: #666;
}

.post-detail-content {
  font-size: 16px;
  line-height: 1.6;
  color: #333;
  margin-bottom: 24px;
}

.post-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid #f0f0f0;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid #e0e0e0;
  background: white;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
}

.action-btn:hover {
  border-color: #667eea;
  background: #f0f8ff;
}

.action-btn.liked {
  background: #ff6b6b;
  color: white;
  border-color: #ff6b6b;
}

.action-btn.bookmarked {
  background: #ffd93d;
  color: #856404;
  border-color: #ffd93d;
}

/* 댓글 시스템 */
.comments-section {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.comments-header {
  font-size: 18px;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f0f0f0;
}

.comment-item {
  padding: 16px 0;
  border-bottom: 1px solid #f8f8f8;
}

.comment-item:last-child {
  border-bottom: none;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.comment-author {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #2c3e50;
}

.comment-time {
  font-size: 12px;
  color: #999;
}

.comment-content {
  color: #555;
  line-height: 1.5;
  margin-bottom: 8px;
}

.comment-actions {
  display: flex;
  gap: 12px;
}

.comment-btn {
  font-size: 12px;
  color: #999;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.comment-btn:hover {
  background: #f0f0f0;
  color: #667eea;
}

.comment-form {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #f0f0f0;
}

.comment-input {
  width: 100%;
  padding: 12px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.3s ease;
  min-height: 80px;
  resize: vertical;
  margin-bottom: 12px;
}

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

/* 반응형 개선 */
@media (max-width: 768px) {
  .forum-container {
    flex-direction: column;
  }
  .forum-sidebar {
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid #e0e0e0;
  }
  .forum-header {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }
  .forum-search {
    max-width: none;
    margin-right: 0;
  }
}

@media (max-width: 768px) {
  body, html {
    overflow: auto;
  }
  .login-box {
    width: 90%;
    margin: 0 20px;
  }
  .app-header {
    padding: 12px 16px;
  }
  .app-header h1 {
    font-size: 16px;
  }
  .tab-content {
    flex-direction: column;
  }
  .search-container {
    flex-direction: column;
  }
  .search-sidebar {
    flex: none; 
    width: 100%;
    border-right: none; 
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 12px;
  }
  .search-main {
    flex: none; 
    width: 100%;
    padding-bottom: 280px;
  }
  .gpt-chat-area {
    position: static; 
    width: 100%;
    left: 0;
    margin-top: 8px;
    box-shadow: none;
    border-top: none;
  }
  .library-container {
    flex-direction: column;
  }
  .modal-content {
    width: 95%;
    margin: 5% auto;
    padding: 20px;
  }
}

/* 로딩 애니메이션 */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* 홈 화면 스타일 */
.home-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.98);
  animation: fadeInUp 0.6s ease;
  overflow-y: auto;
  padding: 20px;
}

.home-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 20px;
  padding: 40px 32px;  /* 세로 패딩 증가 */
  margin: 20px 0 40px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
  z-index: 10;
  clear: both;
  min-height: 160px;  /* 최소 높이 설정 */
  display: flex;
  flex-direction: column;
  justify-content: center;  /* 수직 중앙 정렬 */
  align-items: center;  /* 수평 중앙 정렬 */
}

.home-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%23ffffff" fill-opacity="0.1"><circle cx="30" cy="30" r="4"/></g></svg>');
  animation: float 20s ease-in-out infinite;
  z-index: 0;
}

.home-header h1 {
  font-size: 28px;
  font-weight: 800;
  margin: 0 0 16px 0;  /* 마진 조정 */
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
  position: relative;
  z-index: 1;
  line-height: 1.3;
  word-break: keep-all;
  max-width: 100%;  /* 최대 너비 제한 */
}

.home-header p {
  font-size: 16px;
  opacity: 0.95;
  line-height: 1.6;
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: 800px;  /* 최대 너비 제한으로 가독성 향상 */
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.stat-card {
  background: white;
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(102, 126, 234, 0.1);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary-gradient);
  border-radius: 20px 20px 0 0;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.stat-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.chart-container {
  position: relative;
  height: 300px;
  width: 100%;
}

.survival-chart {
  position: relative;
  height: 400px;
  width: 100%;
}

.overview-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));  /* 가로 정렬 */
  gap: 24px;
  margin-top: 40px;
  margin-bottom: 32px;
  position: relative;
  z-index: 1;
}

.overview-stat {
  background: white;
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(102, 126, 234, 0.1);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.overview-stat::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--primary-gradient);
}

.overview-stat:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-medium);
}

.overview-stat .number {
  font-size: 32px;
  font-weight: 800;
  color: #2c3e50;
  margin-bottom: 8px;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.overview-stat .label {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.header-clickable {
  cursor: pointer;
  transition: all 0.3s ease;
}

.header-clickable:hover {
  transform: scale(1.02);
}

/* 필터 버튼 크기 통일 */
.filter-btn {
  padding: 14px 24px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  min-width: 120px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-sizing: border-box;
  margin: 0;  /* 모든 마진 제거 */
  vertical-align: top;  /* 수직 정렬 통일 */
}

.filter-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: stretch;  /* stretch로 변경하여 높이 통일 */
  margin-top: 24px;
}

.filter-btn.btn-primary {
  background: var(--primary-gradient);
  color: white;
  box-shadow: var(--shadow-soft);
}

.filter-btn.btn-secondary {
  background: white;
  color: var(--text-primary);
  border: 2px solid rgba(44, 62, 80, 0.2);
}

.filter-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

/* 현대적인 모달 닫기 버튼 */
.modal-close-btn {
  position: absolute;
  right: 20px;
  top: 20px;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(248, 250, 252, 0.95);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: #64748b;
  cursor: pointer;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.modal-close-btn:hover {
  background: #fee2e2;
  color: #dc2626;
  border-color: rgba(220, 38, 38, 0.3);
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.15);
}

.modal-close-btn:active {
  transform: scale(0.95);
}

.modal-close-btn svg {
  transition: transform 0.2s ease;
}

.modal-close-btn:hover svg {
  transform: rotate(90deg);
}

/* 4. 기존 .close 클래스 제거를 위한 override */
.close {
  display: none !important;
}

/* 필터 패널 고도화 */
.filter-panel {
  background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
  border-radius: 20px;
  padding: 28px;
  margin-top: 32px;  /* 상단 마진 추가 */
  margin-bottom: 24px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(102, 126, 234, 0.1);
  position: relative;
  z-index: 1;
  clear: both;  /* float 정리 */
}

.filter-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--secondary-gradient);
  border-radius: 20px 20px 0 0;
}

/* 4. 컨테이너 전체 여백 조정 */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
  position: relative;
}