@font-face {
  font-family: 'Pretendard-Regular';
  src: url('https://fastly.jsdelivr.net/gh/Project-Noonnu/noonfonts_2107@1.1/Pretendard-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
}

:root {
  --main-font: 'Pretendard-Regular', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  
  /* Light mode colors */
  --bg-primary: #f5f5f5;
  --bg-secondary: #fff;
  --text-color: #333;
  --text-secondary: #666;
  --border-color: #dee2e6;
  --header-bg: #fff;
  --footer-bg: #f8f9fa;
  --card-bg: #fff;
  --input-bg: #fff;
  --hover-bg: #f8f9fa;
}

body.dark-mode {
  /* Dark mode colors */
  --bg-primary: #1a1a1a;
  --bg-secondary: #2d2d2d;
  --text-color: #e0e0e0;
  --text-secondary: #999;
  --border-color: #404040;
  --header-bg: #2d2d2d;
  --footer-bg: #2d2d2d;
  --card-bg: #2d2d2d;
  --input-bg: #3a3a3a;
  --hover-bg: #3a3a3a;
}

/* 기본 스타일 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--main-font);
}

body {
  background-color: var(--bg-primary);
  color: var(--text-color);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.theme-transition {
  transition: background-color 0.3s, color 0.3s;
}

body.theme-transition * {
  transition: background-color 0.3s, color 0.3s, border-color 0.3s !important;
}

footer {
  margin-top: auto;
}

/* 헤더 스타일 */
header {
  background: var(--header-bg);
  padding: 20px 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

h1 {
  text-align: center;
  font-size: 24px;
  margin: 0;
  color: var(--text-color);
}

/* 메인 레이아웃 */
.main-wrapper {
  display: flex;
  gap: 24px;
  max-width: 1200px;
  margin: 30px auto;
  padding: 0 20px;
}

/* 컨테이너 스타일 */
.container {
  flex: 1 0 auto;
  width: 80%;
  max-width: 1800px;
  margin: 30px auto;
  padding: 20px;
  background: var(--card-bg);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  font-size: 18px;
}

.content-wrapper {
  display: flex;
  gap: 24px;
}

.test-block {
  width: 350px;
  flex-shrink: 0;
  min-width: 300px;
}

.container h2 {
  margin: 0 0 20px 0;
  color: var(--text-color);
  font-size: 20px;
}

.container p {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

/* 직업 선택 영역 */
.job-selection {
  position: relative;
  margin-bottom: 24px;
}

.job-selection label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #2c3e50;
}

.search-dropdown {
  position: relative;
}

#jobSearch {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

#jobSearch:focus {
  outline: none;
  border-color: #4a90e2;
  box-shadow: 0 0 0 3px rgba(74,144,226,0.1);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  max-height: 250px;
  overflow-y: auto;
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  margin-top: 5px;
  z-index: 1000;
  display: none;
}

.dropdown-menu.show {
  display: block;
}

.dropdown-item {
  padding: 8px 12px;
  cursor: pointer;
}

.dropdown-item:hover {
  background-color: #f5f5f5;
}

/* API URL 영역 */
/* (첫 번째 관련 규칙들은 아래에서 최종 통합된 규칙으로 대체됨) */

/* 텍스트영역 */
#postData {
  width: 100%;
  height: 100px;
  margin-bottom: 16px;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  resize: vertical;
}

/* 버튼 그룹 */
.button-group {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

button {
  padding: 8px 16px;
  background: #4a90e2;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

button:hover {
  background: #357abd;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
}

button:active {
  transform: translateY(0);
}

#startCapture {
  background: #28a745;
  font-weight: 500;
}

#startCapture:hover {
  background: #218838;
  box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

/* 응답 출력 영역 */
#responseOutput {
  max-height: 300px;
  overflow-y: auto;
  overflow-x: auto;
  background: #f8f9fa;
  padding: 16px;
  border-radius: 4px;
  white-space: pre-wrap;
}

/* 직업 정보 패널 */
.job-info-panel {
  flex: 1;
  background: var(--card-bg);
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* API 리스트 (하위 호환성) */
.api-list {
  width: 400px;
  flex-shrink: 0;
  background: var(--card-bg);
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.api-list h2 {
  margin: 0 0 16px 0;
  color: var(--text-color);
  font-size: 18px;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 10px;
}

.api-list-hint {
  font-size: 12px;
  color: #666;
  font-weight: normal;
  background: #f8f9fa;
  padding: 4px 8px;
  border-radius: 4px;
  margin-left: 8px;
}

#apiListItems {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.api-item {
  padding: 12px;
  background: #f8f9fa;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid #e9ecef;
}

.api-item:hover {
  background: #e9ecef;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.api-item:active {
  transform: translateY(0);
}

.api-method {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
  margin-bottom: 8px;
}

.api-method.get {
  background: #e3f2fd;
  color: #1976d2;
}

.api-method.post {
  background: #e8f5e9;
  color: #388e3c;
}

.api-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.api-uri {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  color: #2c3e50;
  padding: 4px 0;
}

.api-description {
  font-size: 12px;
  color: #666;
  border-top: 1px solid #e9ecef;
  padding-top: 4px;
  margin-top: 4px;
}

/* 반응형 디자인 */
@media (max-width: 1100px) {
  .content-wrapper {
    flex-direction: column;
  }
  
  .api-list {
    width: 100%;
    margin-top: 20px;
  }
}

/* 스크롤바 스타일 */
.dropdown-menu::-webkit-scrollbar {
  width: 6px;
}

.dropdown-menu::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.dropdown-menu::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 3px;
}

/* 인라인 스타일 중 동적 API 관련이 아닌 부분 */

/* 검색 영역 및 결과 */
.search-container {
  position: relative;
  margin: 20px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-container label {
  white-space: nowrap;
  color: #333;
  font-weight: 500;
  font-size: 14px;
}

.search-input {
  width: 200px;
  padding: 8px 12px;
  font-size: 14px;
  border: 2px solid #ddd;
  border-radius: 4px;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.search-input:focus {
  outline: none;
  border-color: #007bff;
}

.search-results {
  position: absolute;
  top: calc(100% + 2px);
  left: 80px; /* "직업 검색 : " 텍스트 너비만큼 */
  width: 200px;
  background: white;
  border: 2px solid #007bff;
  border-radius: 4px;
  max-height: 300px;
  overflow-y: auto;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  z-index: 1000;
  display: none;
}

.search-results.active {
  display: block !important;
}

.search-item {
  padding: 10px 15px;
  cursor: pointer;
  color: #333;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.search-item:hover, .search-item.selected {
  background-color: #e3f2fd;
  border-left-color: #007bff;
}

.search-item.selected {
  background-color: #bbdefb;
}

.search-item .job-category {
  font-size: 11px;
  color: #666;
  margin-left: 5px;
}

.search-results::-webkit-scrollbar {
  width: 8px;
}

.search-results::-webkit-scrollbar-track {
  background: #f5f5f5;
}

.search-results::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 4px;
}

/* Category Quick Navigation */
.category-quick-nav {
  display: flex;
  gap: 8px;
  margin: 20px 0;
  flex-wrap: wrap;
}

.category-nav-btn {
  padding: 8px 16px;
  background: white;
  color: #333;
  border: 2px solid #e9ecef;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.category-nav-btn:hover {
  background: #007bff;
  color: white;
  border-color: #007bff;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,123,255,0.2);
}

.category-nav-btn.active {
  background: #0056b3;
  color: white;
  border-color: #0056b3;
}

/* Job Categories Expanded */
.job-categories-expanded {
  max-height: 500px;
  overflow-y: auto;
  padding: 10px 0;
}

.job-categories-expanded::-webkit-scrollbar {
  width: 8px;
}

.job-categories-expanded::-webkit-scrollbar-track {
  background: #f5f5f5;
  border-radius: 4px;
}

.job-categories-expanded::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 4px;
}

.job-categories-expanded::-webkit-scrollbar-thumb:hover {
  background: #bbb;
}

/* Job Category Section */
.job-category-section {
  margin-bottom: 25px;
  padding: 15px;
  background: white;
  border-radius: 8px;
  border: 2px solid #e9ecef;
  transition: all 0.3s ease;
}

.job-category-section.highlighted {
  border-color: #007bff;
  box-shadow: 0 4px 12px rgba(0,123,255,0.15);
}

.category-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin: 0 0 15px 0;
  padding-bottom: 10px;
  border-bottom: 2px solid #e9ecef;
}

.jobs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
}

/* Job Button */
.job-btn {
  padding: 8px 12px;
  background: white;
  color: #333 !important; /* Force black text */
  border: 2px solid #e9ecef;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.3s ease;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.job-btn:hover {
  background: #007bff;
  color: white !important;
  border-color: #007bff;
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 8px rgba(0,123,255,0.2);
}

.job-btn.selected {
  background: #0056b3;
  color: white !important;
  border-color: #0056b3;
  box-shadow: 0 4px 8px rgba(0,86,179,0.3);
  transform: scale(1.02);
}

/* Text Core Result Container Scrollbar */
#textCoreResultContainer::-webkit-scrollbar {
  width: 10px;
}

#textCoreResultContainer::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 5px;
}

#textCoreResultContainer::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 5px;
}

#textCoreResultContainer::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Common Core Result Container Scrollbar */
#commonCoreResultContainer::-webkit-scrollbar {
  width: 10px;
}

#commonCoreResultContainer::-webkit-scrollbar-track {
  background: #e9ecef;
  border-radius: 5px;
}

#commonCoreResultContainer::-webkit-scrollbar-thumb {
  background: #667eea;
  border-radius: 5px;
}

#commonCoreResultContainer::-webkit-scrollbar-thumb:hover {
  background: #764ba2;
}

/* Firefox용 스크롤바 */
#commonCoreResultContainer {
  scrollbar-width: thin;
  scrollbar-color: #667eea #e9ecef;
}

/* 동적 API 리스트 및 모달 관련 인라인 스타일 */
.api-url {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 20px 0;
  background: #f8f9fa;
  padding: 12px;
  border-radius: 4px;
}

.api-url-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

#httpMethod {
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  min-width: 80px;
}

#apiEndpoint {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

@media (max-width: 480px) {
  .api-url-row:last-child {
    flex-direction: column;
    width: 100%;
  }
  #httpMethod {
    width: 100%;
  }
  #apiEndpoint {
    width: 100%;
  }
}

.modal {
  display: none;
  position: fixed;
  z-index: 1001;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.4);
}

.modal-content {
  background-color: var(--card-bg);
  margin: 5% auto;
  padding: 20px;
  border: 1px solid var(--border-color);
  width: 80%;
  max-width: 500px;
  border-radius: 8px;
  position: relative;
}

.close {
  position: absolute;
  right: 10px;
  top: 10px;
  font-size: 24px;
  cursor: pointer;
}

.generate-num {
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 2px 5px;
  margin: 0 2px;
}

.generate-num:focus {
  outline: none;
  border-color: #007bff;
}

.api-uri {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  color: #2c3e50;
  padding: 4px 0;
}

.skill-row {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  gap: 15px;
}

.skill-name {
  width: 150px;
  font-weight: bold;
}

.skill-input {
  width: 80px;
  padding: 5px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.skill-radio {
  margin-right: 10px;
}

.skill-section {
  margin-bottom: 20px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
}

.loading-spinner {
  display: inline-block;
  width: 30px;
  height: 30px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

@keyframes slideDown {
  0% {
    transform: translate(-50%, -20px);
    opacity: 0;
  }
  100% {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}

/* Ensure spinner animation works globally */
.loading-spinner {
  animation: spin 1s linear infinite !important;
}

.loading-text {
  color: #666;
  margin-left: 10px;
}

.loading-container {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

#approvedJoblist {
  background-color: #ffffff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 20px;
  margin-top: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
#approvedJoblist h2 {
  margin-bottom: 15px;
  font-size: 20px;
  color: #2c3e50;
}
#approvedJoblist ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
}
#approvedJoblist li {
  padding: 8px 0;
  border-bottom: 1px solid #eee;
}
#approvedJoblist li:last-child {
  border-bottom: none;
}

/* 화면 캡처 모달 스타일 */
#screenCaptureModal .modal-content {
  width: 75%;
  max-width: 1400px;
  max-height: 90vh;
  padding: 20px;
  margin: 1% auto;
  display: flex;
  flex-direction: column;
  overflow: auto;
}

.close-capture-modal {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  cursor: pointer;
  z-index: 10;
  color: #333;
}

.close-capture-modal:hover {
  color: #f44336;
}

.capture-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  flex: 1;
  overflow-y: auto;
  padding: 0 10px;
}

.canvas-container {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-bottom: 20px;
}

#modalCanvas {
  max-width: 100%;
  max-height: 600px;
  height: auto;
  border: 2px solid #000;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

#modalCaptureBtn {
  padding: 10px 20px;
  background-color: #4CAF50;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin-bottom: 30px;
  width: 200px;
  font-size: 16px;
}

#analyzeImagesBtn {
  padding: 10px 20px;
  background-color: #2196F3;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin-bottom: 30px;
  width: 200px;
  font-size: 16px;
}

#captureListContainer {
  width: 100%;
  display: flex;
  flex-direction: row;
  gap: 15px;
  overflow-x: scroll;
  padding: 10px 10px 20px 10px;
  white-space: nowrap;
  min-height: 140px;
  max-height: 140px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background-color: #f5f5f5;
  scroll-behavior: smooth;
  position: relative;
  margin-bottom: 10px;
}

.empty-message {
  padding: 10px;
  text-align: center;
  color: #666;
  margin: 0 auto;
}

/* 캡처된 이미지 아이템 스타일 */
.capture-item {
  flex: 0 0 150px;
  min-width: 150px;
  margin-right: 10px;
  margin-bottom: 5px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.capture-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.capture-thumbnail {
  width: 100%;
  height: 90px;
  object-fit: cover;
  cursor: pointer;
  border-radius: 4px;
  margin-bottom: 5px;
}

.capture-time {
  font-size: 12px;
  margin-bottom: 8px;
  white-space: normal;
}

.capture-buttons {
  display: flex;
  gap: 5px;
  justify-content: space-between;
}

.capture-download-btn, .capture-delete-btn {
  padding: 5px;
  flex: 1;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}

.capture-download-btn {
  background-color: #2196F3;
}

.capture-delete-btn {
  background-color: #f44336;
}

/* 삭제 아이콘 스타일 */
.delete-icon {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 28px;
  height: 28px;
  background-color: white;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  z-index: 5;
}

.delete-icon:before {
  content: "🗑️";
  color: #f44336;
  font-size: 16px;
}

.capture-item:hover .delete-icon {
  opacity: 1;
}

.delete-icon:hover {
  background-color: #ffebee;
  transform: scale(1.1);
}

/* 스크롤바 스타일 개선 */
#captureListContainer::-webkit-scrollbar {
  height: 12px;
  width: 12px;
}

#captureListContainer::-webkit-scrollbar-track {
  background: #e0e0e0;
  border-radius: 6px;
  border: 1px solid #ccc;
  margin: 0 15px;
}

#captureListContainer::-webkit-scrollbar-thumb {
  background: #2196F3;
  border-radius: 6px;
  border: 2px solid #e0e0e0;
  box-shadow: 0 0 2px rgba(0,0,0,0.3);
}

#captureListContainer::-webkit-scrollbar-thumb:hover {
  background: #1976D2;
}

/* Firefox용 스크롤바 스타일 */
#captureListContainer {
  scrollbar-width: auto;
  scrollbar-color: #2196F3 #e0e0e0;
}

/* 스크롤 안내 텍스트 추가 */
#captureListContainer::after {
  content: "← 좌우 스크롤 →";
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #fff;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  color: #666;
  white-space: nowrap;
  border: 1px solid #ddd;
}

/* 모달 콘텐츠 위치 조정 */
#screenCaptureModal .modal-content {
  margin: 2vh auto;
}

.button-container {
  display: flex;
  gap: 10px;
  margin: 10px 0;
}

.template-match-result {
  margin: 15px 0;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  background-color: #f9f9f9;
}

.result-canvas-container {
  max-width: 100%;
  overflow: auto;
  margin: 10px 0;
}

.result-canvas-container canvas {
  max-width: 100%;
  height: auto;
}

.match-info {
  margin-top: 10px;
  font-size: 14px;
}

.loading {
  margin: 15px 0;
  font-style: italic;
  color: #666;
}

/* Job Categories Styles */
.job-categories {
  margin: 20px 0;
}

.category-section {
  margin-bottom: 30px;
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.category-title {
  margin: 0 0 15px 0;
  color: #2c3e50;
  font-size: 18px;
  font-weight: bold;
  padding-bottom: 10px;
  border-bottom: 2px solid #dee2e6;
  cursor: pointer;
  transition: color 0.2s;
}

.category-title:hover {
  color: #4a90e2;
}

.jobs-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.job-badge {
  padding: 8px 16px;
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
  color: #495057;
}

.job-badge:hover {
  background: #4a90e2;
  color: white;
  border-color: #4a90e2;
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
}

.job-badge.selected {
  background: #4a90e2;
  color: white;
  border-color: #4a90e2;
  font-weight: bold;
}

#selectedJobInfo {
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
  min-height: 200px;
}

.skill-info-container {
  margin-top: 15px;
}

.skill-category {
  margin-bottom: 20px;
}

.skill-category h4 {
  margin: 0 0 10px 0;
  color: #2c3e50;
  font-size: 16px;
  padding: 8px 12px;
  background: #e9ecef;
  border-radius: 4px;
}

.skill-list {
  list-style: none;
  padding: 0;
  margin: 0;
  background: transparent;
}

.skill-item {
  padding: 8px 12px;
  margin-bottom: 5px;
  background: white;
  border-radius: 4px;
  border-left: 3px solid #4a90e2;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.skill-info-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.skill-icon {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  border: 1px solid #dee2e6;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.skill-name-display {
  color: #495057;
  font-size: 14px;
  margin-left: 10px;
}

.skill-level-editor {
  display: flex;
  align-items: center;
  gap: 5px;
}

.skill-btn {
  width: 28px;
  height: 28px;
  border: 1px solid #dee2e6;
  background: white;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  color: #495057;
  transition: all 0.2s;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.skill-btn:hover {
  background: #4a90e2;
  color: white;
  border-color: #4a90e2;
}

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

.skill-btn-minus {
  color: #dc3545;
}

.skill-btn-minus:hover {
  background: #dc3545;
  border-color: #dc3545;
  color: white;
}

.skill-btn-plus {
  color: #28a745;
}

.skill-btn-plus:hover {
  background: #28a745;
  border-color: #28a745;
  color: white;
}

.skill-level-input {
  width: 50px;
  height: 28px;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  text-align: center;
  font-size: 14px;
  font-weight: bold;
  color: #495057;
  background: #f8f9fa;
  cursor: default;
}

.skill-level-input:focus {
  outline: none;
  border-color: #4a90e2;
}

.skill-level-text {
  color: #6c757d;
  font-size: 13px;
  margin-left: 2px;
}

.skill-level {
  color: #6c757d;
  font-size: 13px;
  background: #e9ecef;
  padding: 2px 8px;
  border-radius: 10px;
}

/* Target skill styles */
.skill-clickable {
  cursor: pointer;
  transition: all 0.2s ease;
  flex: 1;
  padding: 4px 8px;
  border-radius: 4px;
}

.skill-clickable:hover {
  background: rgba(102, 126, 234, 0.08);
  transform: translateX(2px);
}

.skill-item.skill-target {
  background: linear-gradient(90deg, rgba(102, 126, 234, 0.12) 0%, rgba(118, 75, 162, 0.08) 100%);
  border-left: 3px solid #667eea;
  padding-left: 8px;
}

.target-badge {
  display: inline-block;
  font-size: 11px;
  padding: 2px 6px;
  background: rgba(102, 126, 234, 0.9);
  color: white;
  border-radius: 3px;
  margin-left: 6px;
  font-weight: 600;
}

/* Dark mode additional styles */
body.dark-mode input,
body.dark-mode textarea,
body.dark-mode select {
  background: var(--input-bg);
  color: var(--text-color);
  border-color: var(--border-color);
}

body.dark-mode .job-btn {
  background: var(--hover-bg);
  color: var(--text-color) !important;
  border-color: var(--border-color);
}

body.dark-mode .job-btn:hover {
  color: white !important;
}

body.dark-mode .job-btn.selected {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white !important;
  border-color: #667eea;
}

body.dark-mode .category-nav-btn {
  background: var(--hover-bg);
  color: var(--text-color);
}

body.dark-mode .modal {
  background-color: rgba(0,0,0,0.7);
}

body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4 {
  color: var(--text-color);
}

body.dark-mode .approved-joblist {
  background: var(--card-bg) !important;
  border-color: var(--border-color) !important;
  color: var(--text-color) !important;
}

body.dark-mode .approved-joblist * {
  color: var(--text-color) !important;
}

/* Info notice box in dark mode */
body.dark-mode .info-notice {
  background: #3d3416 !important;
  border-left-color: #d39e00 !important;
  color: #ffc107 !important;
}

body.dark-mode .info-notice strong {
  color: #ffdb4d !important;
}

body.dark-mode .search-results {
  background: var(--card-bg);
  border-color: var(--border-color);
}

body.dark-mode .search-item {
  color: var(--text-color);
}

body.dark-mode .search-item:hover,
body.dark-mode .search-item.selected {
  background-color: var(--hover-bg);
}

body.dark-mode .search-container label {
  color: var(--text-color);
}

body.dark-mode .job-category-section {
  background: var(--card-bg);
  border-color: var(--border-color);
}

body.dark-mode .category-title {
  color: var(--text-color);
}

body.dark-mode .skill-item {
  background: var(--hover-bg);
  color: var(--text-color);
  border-left-color: #4a90e2;
}

body.dark-mode .skill-category {
  background: transparent;
  border-color: var(--border-color);
}

body.dark-mode .skill-name {
  color: var(--text-color);
}

body.dark-mode .skill-level {
  color: var(--text-secondary);
}

body.dark-mode .close,
body.dark-mode .close-capture-modal {
  color: var(--text-color);
}

body.dark-mode .search-results::-webkit-scrollbar-track {
  background: var(--hover-bg);
}

body.dark-mode .search-results::-webkit-scrollbar-thumb {
  background: var(--border-color);
}

body.dark-mode #textCoreResultContainer::-webkit-scrollbar-track {
  background: var(--hover-bg);
}

body.dark-mode #textCoreResultContainer::-webkit-scrollbar-thumb {
  background: var(--border-color);
}

body.dark-mode #commonCoreResultContainer {
  background: var(--bg-secondary) !important;
  border-color: var(--border-color) !important;
  scrollbar-color: #667eea var(--hover-bg);
}

body.dark-mode #commonCoreResultContainer::-webkit-scrollbar-track {
  background: var(--hover-bg);
}

body.dark-mode #commonCoreResultContainer::-webkit-scrollbar-thumb {
  background: #667eea;
}

body.dark-mode #commonCoreResultContainer::-webkit-scrollbar-thumb:hover {
  background: #764ba2;
}

body.dark-mode .loading-spinner {
  border-color: #444;
  border-top-color: #667eea;
}

body.dark-mode #coreLoadingContainer p {
  color: var(--text-secondary) !important;
}

/* Core highlighting animation */
.created-core-item {
  transition: transform 0.3s ease, outline 0.3s ease, box-shadow 0.3s ease !important;
}

.combination-core-item {
  transition: all 0.3s ease !important;
}

/* Global core tooltip */
#globalCoreTooltip {
  z-index: 10000 !important;
  transition: opacity 0.2s ease;
}

body.dark-mode #globalCoreTooltip {
  background: rgba(30,30,30,0.98) !important;
  border: 1px solid rgba(102, 126, 234, 0.3);
}

/* Dark mode core highlighting */
body.dark-mode .created-core-item {
  box-shadow: 0 2px 8px rgba(0,0,0,0.3) !important;
}

body.dark-mode .combination-core-item {
  background: linear-gradient(135deg, #2d2d2d 0%, #3a3a3a 100%) !important;
  color: var(--text-color) !important;
}

body.dark-mode .combination-core-item:hover {
  background: linear-gradient(135deg, #3a3a3a 0%, #4a4a4a 100%) !important;
}

body.dark-mode .jobs-grid {
  color: var(--text-color);
}

/* Screen capture modal dark mode */
body.dark-mode #screenCaptureModal .modal-content {
  background: var(--card-bg);
}

body.dark-mode .capture-container {
  background: var(--card-bg);
}

body.dark-mode .canvas-container {
  background: var(--hover-bg);
}

body.dark-mode #captureListContainer {
  background: var(--hover-bg);
  border-color: var(--border-color);
}

body.dark-mode .empty-message {
  color: var(--text-secondary);
}

body.dark-mode .capture-item {
  background: var(--card-bg);
  border-color: var(--border-color);
}

body.dark-mode .capture-thumbnail {
  border-color: var(--border-color);
}

body.dark-mode #templateMatchingResults {
  background: var(--card-bg);
}

body.dark-mode #templateMatchingResults h3,
body.dark-mode #templateMatchingResults h4,
body.dark-mode #templateMatchingResults p,
body.dark-mode #templateMatchingResults div,
body.dark-mode #templateMatchingResults span,
body.dark-mode #templateMatchingResults strong {
  color: var(--text-color) !important;
}

body.dark-mode #resultsContainer {
  color: var(--text-color);
}

body.dark-mode #resultsContainer div,
body.dark-mode #resultsContainer span,
body.dark-mode #resultsContainer p {
  color: var(--text-color) !important;
}

body.dark-mode .result-canvas-container {
  background: var(--hover-bg);
  border-color: var(--border-color);
}

body.dark-mode .match-info {
  color: var(--text-color) !important;
}

body.dark-mode .match-info * {
  color: var(--text-color) !important;
}

/* Template matching result items dark mode */
body.dark-mode .template-match-result {
  background: var(--card-bg) !important;
  border-color: var(--border-color) !important;
}

body.dark-mode .template-match-result * {
  color: var(--text-color) !important;
}

/* Combination finder section in capture modal */
body.dark-mode #combinationFinderSection {
  border-color: var(--border-color) !important;
  background: var(--card-bg);
}

body.dark-mode #combinationFinderSection h3,
body.dark-mode #combinationFinderSection label,
body.dark-mode #combinationFinderSection div {
  color: var(--text-color) !important;
}

body.dark-mode #combinationResults div {
  color: var(--text-color) !important;
}

body.dark-mode .button-container button {
  color: var(--text-color);
}

/* All Skills Preview Container Dark Mode */
body.dark-mode #allSkillsPreviewContainer {
  background: var(--bg-primary) !important;
}

body.dark-mode #allSkillsPreviewContainer > div {
  background: var(--card-bg) !important;
  border-color: var(--border-color) !important;
}

body.dark-mode #allSkillsPreviewContainer > div[style*="background: #f8f9fa"] {
  background: var(--card-bg) !important;
}

body.dark-mode #allSkillsPreviewContainer > div[style*="border: 2px solid #e9ecef"] {
  border-color: var(--border-color) !important;
}

body.dark-mode #allSkillsPreviewContainer h4 {
  color: var(--text-color) !important;
}

body.dark-mode #allSkillsPreviewContainer h4[style*="color: #333"] {
  color: var(--text-color) !important;
}

body.dark-mode #allSkillsPreviewContainer div {
  color: var(--text-color) !important;
}

body.dark-mode #allSkillsPreviewContainer div[style*="font-weight: 600"] {
  color: var(--text-color) !important;
}

body.dark-mode #allSkillsPreviewContainer div[style*="text-align: center"] {
  color: var(--text-color) !important;
  background: transparent !important;
}

body.dark-mode #allSkillsPreviewContainer div[style*="display: flex"] {
  background: transparent !important;
}

body.dark-mode #allSkillsPreviewContainer canvas {
  border: 1px solid var(--border-color);
  opacity: 0.9;
  background: var(--hover-bg);
}

/* Preview modal container dark mode */
body.dark-mode div[style*="position: fixed"][style*="z-index: 10000"] > div {
  background: var(--card-bg) !important;
  color: var(--text-color) !important;
}

body.dark-mode div[style*="position: fixed"][style*="z-index: 10000"] h3 {
  color: var(--text-color) !important;
}

body.dark-mode div[style*="position: fixed"][style*="z-index: 10000"] p {
  color: var(--text-secondary) !important;
}

body.dark-mode div[style*="position: fixed"][style*="z-index: 10000"] p[style*="color: #666"] {
  color: var(--text-secondary) !important;
}

body.dark-mode #captureListContainer::-webkit-scrollbar-track {
  background: var(--hover-bg);
  border-color: var(--border-color);
}

body.dark-mode #captureListContainer::-webkit-scrollbar-thumb {
  background: var(--border-color);
}

body.dark-mode #captureListContainer::-webkit-scrollbar-thumb:hover {
  background: #666;
}

body.dark-mode #captureListContainer::after {
  color: var(--text-secondary);
}

body.dark-mode .btn {
  background: var(--hover-bg);
  color: var(--text-color);
  border-color: var(--border-color);
}

body.dark-mode .btn:hover {
  background: #4a4a4a;
}

/* Additional containers dark mode */
body.dark-mode #textCoreInputSection {
  background: var(--card-bg);
  border-color: var(--border-color);
}

body.dark-mode #registeredCoresInfo {
  background: var(--hover-bg);
  color: var(--text-color);
  border-color: var(--border-color);
}

body.dark-mode #testCoresPreview {
  background: var(--card-bg);
}

body.dark-mode #textCoreResultContainer {
  background: var(--card-bg);
  border-color: var(--border-color);
}

body.dark-mode .approved-joblist ul {
  color: var(--text-color);
}

body.dark-mode .skill-category h4 {
  background: var(--hover-bg);
  color: var(--text-color);
}

body.dark-mode .skill-section {
  background: var(--card-bg);
  border-color: var(--border-color);
}

body.dark-mode #selectedJobInfo {
  color: var(--text-color);
}

body.dark-mode .target-skill-banner {
  background: var(--hover-bg);
  border-color: var(--border-color);
  color: var(--text-color);
}

body.dark-mode .skill-hint {
  color: var(--text-secondary);
}

body.dark-mode .core-requirement {
  background: var(--hover-bg);
  border-color: var(--border-color);
  color: var(--text-color);
}

/* Override inline styles for dark mode */
body.dark-mode div[style*="background: #f8f9fa"],
body.dark-mode div[style*="background: #fff"],
body.dark-mode div[style*="background: white"],
body.dark-mode div[style*="background-color: #fff"],
body.dark-mode div[style*="background-color: white"] {
  background: var(--card-bg) !important;
}

body.dark-mode div[style*="background: #e9ecef"],
body.dark-mode div[style*="background: #f5f7fa"] {
  background: var(--hover-bg) !important;
}

body.dark-mode div[style*="color: #333"],
body.dark-mode div[style*="color: #666"],
body.dark-mode span[style*="color: #333"],
body.dark-mode span[style*="color: #666"] {
  color: var(--text-color) !important;
}

body.dark-mode div[style*="border: 1px solid #dee2e6"],
body.dark-mode div[style*="border: 2px solid #dee2e6"],
body.dark-mode div[style*="border: 2px solid #e9ecef"] {
  border-color: var(--border-color) !important;
}

body.dark-mode strong {
  color: var(--text-color);
}

/* Screen capture usage guide dark mode */
body.dark-mode #screenCaptureModal div[style*="background: #e3f2fd"] {
  background: var(--hover-bg) !important;
  color: var(--text-color) !important;
}

body.dark-mode #screenCaptureModal div[style*="background: #e3f2fd"] strong,
body.dark-mode #screenCaptureModal div[style*="background: #e3f2fd"] span,
body.dark-mode #screenCaptureModal div[style*="background: #e3f2fd"] br + strong {
  color: var(--text-color) !important;
}

body.dark-mode #screenCaptureModal div[style*="background: #fff3cd"] {
  background: #3a3520 !important;
  color: var(--text-color) !important;
}

body.dark-mode #screenCaptureModal canvas,
body.dark-mode #screenCaptureModal img {
  opacity: 0.9;
  border: 1px solid var(--border-color);
}

body.dark-mode #modalCanvas {
  background: var(--hover-bg);
}

body.dark-mode #screenCaptureModal h2,
body.dark-mode #screenCaptureModal h3,
body.dark-mode #screenCaptureModal h4 {
  color: var(--text-color) !important;
}

/* Screen capture modal - Enhanced readability for dark mode */
body.dark-mode #screenCaptureModal * {
  color: var(--text-color);
}

body.dark-mode #screenCaptureModal div[style*="color: #d32f2f"],
body.dark-mode #screenCaptureModal span[style*="color: #d32f2f"],
body.dark-mode #screenCaptureModal strong[style*="color: #d32f2f"] {
  color: #ff6b6b !important;
}

body.dark-mode #screenCaptureModal div[style*="color: #666"],
body.dark-mode #screenCaptureModal span[style*="color: #666"] {
  color: var(--text-secondary) !important;
}

body.dark-mode #screenCaptureModal div[style*="background: white"],
body.dark-mode #screenCaptureModal div[style*="background: #fff"] {
  background: var(--card-bg) !important;
  color: var(--text-color) !important;
  border-color: var(--border-color) !important;
}

body.dark-mode #screenCaptureModal div[style*="background: #f8f9fa"],
body.dark-mode #screenCaptureModal div[style*="background: #f5f5f5"] {
  background: var(--hover-bg) !important;
  color: var(--text-color) !important;
}

/* More dynamic content dark mode */
body.dark-mode div[style*="background: linear-gradient(135deg, #f5f7fa"],
body.dark-mode div[style*="background: linear-gradient(90deg, #f5f7fa"] {
  background: linear-gradient(135deg, var(--hover-bg) 0%, var(--card-bg) 100%) !important;
}

body.dark-mode div[style*="background: #e8f5e9"] {
  background: #2d3e2f !important;
}

body.dark-mode div[style*="background: #fff3cd"],
body.dark-mode div[style*="background:#fff3cd"] {
  background: #3a3520 !important;
  color: #e8d4a0 !important;
  border: 1px solid #5a5020 !important;
}

body.dark-mode div[style*="background: #fff3cd"] strong,
body.dark-mode div[style*="background:#fff3cd"] strong {
  color: #ffd97d !important;
}

body.dark-mode div[style*="background: #e3f2fd"] {
  background: #2d3540 !important;
}

body.dark-mode .approved-joblist h2 {
  color: var(--text-color);
}

body.dark-mode #registeredCoresCount {
  color: var(--text-color);
}

body.dark-mode span[style*="color: #495057"],
body.dark-mode span[style*="color: #856404"] {
  color: var(--text-secondary) !important;
}

/* Badge colors are kept as-is for good contrast */

body.dark-mode table {
  color: var(--text-color);
}

body.dark-mode th,
body.dark-mode td {
  border-color: var(--border-color) !important;
}

body.dark-mode tr[style*="background: #f5f5f5"] {
  background: var(--hover-bg) !important;
}

/* Force dark mode for remaining elements */
body.dark-mode #selectedJobInfo > div,
body.dark-mode #selectedJobInfo > p {
  color: var(--text-color) !important;
  background: transparent !important;
}

body.dark-mode #selectedJobInfo div[style] {
  background: var(--card-bg) !important;
  color: var(--text-color) !important;
}

body.dark-mode #textCoreInputSection h3,
body.dark-mode #textCoreInputSection strong {
  color: var(--text-color) !important;
}

body.dark-mode #registeredCoresInfo {
  background: #2d3540 !important;
}

body.dark-mode #testButtonsSection div[style*="background"] {
  background: var(--hover-bg) !important;
  color: var(--text-color) !important;
}

body.dark-mode label {
  color: var(--text-color);
}

body.dark-mode #textCoreInputSection {
  background: var(--card-bg) !important;
  border-color: var(--border-color) !important;
}

body.dark-mode #calculateCombinationSection {
  border-color: var(--border-color) !important;
}

body.dark-mode #combinationResultsContainer div {
  color: var(--text-color);
}

/* Specific fixes for inline styles */
body.dark-mode #selectedJobInfo h3[style*="color: #2c3e50"],
body.dark-mode h3[style*="color: #2c3e50"] {
  color: var(--text-color) !important;
}

body.dark-mode #selectedJobInfo div[style*="background: white"],
body.dark-mode div[style*="background: white; margin-bottom: 15px"] {
  background: var(--card-bg) !important;
  color: var(--text-color) !important;
}

body.dark-mode .skill-category .skill-name,
body.dark-mode .skill-item span,
body.dark-mode .skill-item div {
  color: var(--text-color) !important;
}

/* Skill abbreviation in dark mode */
body.dark-mode .skill-name-display span[style*="color: #999"] {
  color: #888 !important;
}

body.dark-mode #selectedJobInfo * {
  color: var(--text-color) !important;
}

body.dark-mode #selectedJobInfo {
  background: transparent !important;
}

body.dark-mode #selectedJobInfo h3,
body.dark-mode #selectedJobInfo h4,
body.dark-mode #selectedJobInfo span,
body.dark-mode #selectedJobInfo div,
body.dark-mode #selectedJobInfo p,
body.dark-mode #selectedJobInfo strong {
  color: var(--text-color) !important;
}

body.dark-mode div[style*="border: 2px solid #dee2e6"][style*="background: white"] * {
  color: var(--text-color) !important;
}

body.dark-mode .skill-category span,
body.dark-mode .skill-item button {
  color: var(--text-color);
}

/* Test cores preview dark mode */
body.dark-mode #testCoresPreview h4[style*="color: #333"] {
  color: var(--text-color) !important;
}

body.dark-mode #testCoresPreview div[style*="color: #495057"],
body.dark-mode #testCoresPreview div[style*="font-weight: 600; color: #495057"] {
  color: var(--text-color) !important;
}

body.dark-mode #testCoresPreview div[style*="color: #666"],
body.dark-mode #testCoresPreview div[style*="font-size: 13px; color: #666"] {
  color: var(--text-color) !important;
}

body.dark-mode #testCoresPreview div[style*="color: #856404"] {
  color: var(--text-color) !important;
}

body.dark-mode #testCoresPreview div[style*="background: #f8f9fa"] {
  background: var(--hover-bg) !important;
}

body.dark-mode #testCoresPreview div[style*="background: #6c757d"] {
  background: var(--card-bg) !important;
  border-color: var(--border-color) !important;
}

/* Better contrast for notices and hints */
body.dark-mode div[style*="background: #e3f2fd"] {
  background: #1e3a5f !important;
  border: 1px solid #3a5f8f !important;
}

body.dark-mode span[style*="color: #888"] {
  color: #aaa !important;
}

body.dark-mode .skill-category h4 span[style*="color: #888"] {
  color: #aaa !important;
}

body.dark-mode h4 {
  color: var(--text-color) !important;
}

/* Better distinction between h4 and skill list */
body.dark-mode .skill-category h4 {
  background: #3a3a3a !important;
  padding: 10px 12px !important;
  border-radius: 6px !important;
  margin-bottom: 12px !important;
  border-left: 4px solid #667eea !important;
}

body.dark-mode .skill-list {
  background: transparent;
  padding: 0;
}

/* Skill buttons dark mode */
body.dark-mode .skill-btn,
body.dark-mode .skill-btn-plus,
body.dark-mode .skill-btn-minus {
  background: #4a4a4a !important;
  color: var(--text-color) !important;
  border-color: var(--border-color) !important;
  opacity: 0.8;
}

body.dark-mode .skill-btn:hover,
body.dark-mode .skill-btn-plus:hover,
body.dark-mode .skill-btn-minus:hover {
  background: #5a5a5a !important;
  opacity: 1;
}

/* Template match result dark mode */
body.dark-mode .template-match-result {
  background: var(--card-bg) !important;
  border-color: var(--border-color) !important;
  color: var(--text-color) !important;
}

body.dark-mode .template-match-result * {
  color: var(--text-color) !important;
}

/* ==================================
   📱 MOBILE RESPONSIVE DESIGN
   ================================== */

/* Tablet (768px and below) */
@media (max-width: 768px) {
  /* Header */
  header {
    padding: 15px 0;
  }
  
  header h1 {
    font-size: 18px !important;
    padding: 0 10px;
  }
  
  header button {
    padding: 6px 12px !important;
    font-size: 12px !important;
  }
  
  /* Container */
  .container {
    width: 95%;
    margin: 15px auto;
    padding: 15px;
    font-size: 16px;
  }
  
  /* Content wrapper - make vertical on mobile */
  .content-wrapper {
    flex-direction: column;
    gap: 15px;
  }
  
  .test-block {
    width: 100%;
    min-width: unset;
  }
  
  .job-info-panel {
    width: 100%;
  }
  
  /* Search container */
  .search-container {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  
  .search-container label {
    font-size: 13px;
  }
  
  .search-input {
    width: 100% !important;
  }
  
  .search-results {
    left: 0 !important;
    width: 100% !important;
  }
  
  /* Category buttons */
  .category-quick-nav {
    gap: 6px;
  }
  
  .category-nav-btn {
    padding: 6px 12px;
    font-size: 12px;
    flex: 1;
    min-width: calc(50% - 3px);
  }
  
  /* Jobs grid */
  .jobs-grid {
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 6px;
  }
  
  .job-btn {
    padding: 6px 8px;
    font-size: 12px;
  }
  
  /* Buttons */
  button {
    padding: 8px 12px;
    font-size: 14px;
  }
  
  .button-group {
    flex-direction: column;
    gap: 8px;
  }
  
  .button-group button {
    width: 100%;
  }
  
  /* Modal */
  .modal-content {
    width: 95%;
    padding: 15px;
    margin: 10% auto;
  }
  
  /* Screen capture modal */
  #screenCaptureModal .modal-content {
    width: 95%;
    max-width: 95%;
    padding: 15px;
    margin: 5% auto;
  }
  
  #modalCanvas {
    max-height: 400px;
  }
  
  #modalCaptureBtn,
  #analyzeImagesBtn {
    width: 100%;
    max-width: 100%;
  }
  
  /* Capture list */
  #captureListContainer {
    min-height: 120px;
    max-height: 120px;
  }
  
  .capture-item {
    flex: 0 0 120px;
    min-width: 120px;
  }
  
  .capture-thumbnail {
    height: 70px;
  }
}

/* Mobile (480px and below) */
@media (max-width: 480px) {
  /* Header */
  header {
    padding: 10px 0;
  }
  
  header > div {
    flex-direction: column;
    gap: 10px;
    padding: 0 15px !important;
  }
  
  header h1 {
    font-size: 16px !important;
    text-align: center;
  }
  
  header button {
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
  }
  
  /* Container */
  .container {
    width: 100%;
    margin: 10px auto;
    padding: 10px;
    border-radius: 0;
    font-size: 14px;
  }
  
  .container h2 {
    font-size: 18px;
    margin-bottom: 15px;
  }
  
  /* Search */
  .search-container {
    margin: 15px 0;
  }
  
  .search-container label {
    font-size: 12px;
  }
  
  .search-input {
    font-size: 14px;
    padding: 8px 10px;
  }
  
  /* Category buttons */
  .category-quick-nav {
    gap: 5px;
  }
  
  .category-nav-btn {
    padding: 6px 10px;
    font-size: 11px;
    border-radius: 15px;
  }
  
  /* Job section */
  .job-category-section {
    padding: 12px;
    margin-bottom: 15px;
  }
  
  .category-title {
    font-size: 14px;
    margin-bottom: 12px;
  }
  
  .jobs-grid {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 5px;
  }
  
  .job-btn {
    padding: 6px 4px;
    font-size: 11px;
  }
  
  /* Job info panel */
  .job-info-panel {
    padding: 12px;
  }
  
  .job-info-panel h2 {
    font-size: 16px;
  }
  
  /* Skill items */
  .skill-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 10px;
  }
  
  .skill-info-left {
    width: 100%;
    justify-content: flex-start;
  }
  
  .skill-icon {
    width: 28px;
    height: 28px;
  }
  
  .skill-name-display {
    font-size: 13px;
    margin-left: 8px;
  }
  
  .skill-level-editor {
    width: 100%;
    justify-content: flex-end;
  }
  
  .skill-btn {
    width: 32px;
    height: 32px;
  }
  
  .skill-level-input {
    width: 45px;
    height: 32px;
  }
  
  /* Buttons */
  button {
    padding: 8px 12px;
    font-size: 13px;
  }
  
  #startCaptureForJob {
    width: 100%;
    margin-top: 10px;
  }
  
  /* Modal */
  .modal-content {
    width: 100%;
    margin: 5% auto;
    padding: 12px;
    border-radius: 6px;
  }
  
  .close {
    font-size: 20px;
    right: 8px;
    top: 8px;
  }
  
  /* Screen capture modal */
  #screenCaptureModal .modal-content {
    width: 100%;
    height: 95vh;
    margin: 0 auto;
    border-radius: 0;
    max-height: 95vh;
  }
  
  .close-capture-modal {
    font-size: 28px;
    right: 10px;
    top: 5px;
    background: rgba(255, 255, 255, 0.9);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  #modalCanvas {
    max-height: 300px;
    border-width: 1px;
  }
  
  #modalCaptureBtn,
  #analyzeImagesBtn {
    font-size: 14px;
    padding: 10px 15px;
  }
  
  /* Capture list */
  #captureListContainer {
    min-height: 100px;
    max-height: 100px;
    padding: 8px;
  }
  
  .capture-item {
    flex: 0 0 100px;
    min-width: 100px;
  }
  
  .capture-thumbnail {
    height: 60px;
  }
  
  .capture-time {
    font-size: 10px;
  }
  
  .capture-download-btn,
  .capture-delete-btn {
    font-size: 10px;
    padding: 4px;
  }
  
  /* Scrollbar */
  #captureListContainer::-webkit-scrollbar {
    height: 8px;
  }
  
  #captureListContainer::after {
    font-size: 10px;
    padding: 1px 6px;
  }
  
  /* Job categories expanded */
  .job-categories-expanded {
    max-height: 400px;
  }
  
  /* Skill section */
  .skill-section {
    padding: 10px;
    margin-bottom: 15px;
  }
  
  .skill-category h4 {
    font-size: 14px;
    padding: 8px 10px;
  }
  
  /* API list (if visible) */
  .api-list {
    width: 100%;
    padding: 12px;
  }
  
  .api-item {
    padding: 10px;
  }
  
  /* Footer adjustments */
  footer {
    font-size: 12px;
    padding: 10px;
  }
}

/* Very small devices (360px and below) */
@media (max-width: 360px) {
  header h1 {
    font-size: 14px !important;
  }
  
  .container {
    padding: 8px;
  }
  
  .container h2 {
    font-size: 16px;
  }
  
  .jobs-grid {
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  }
  
  .job-btn {
    font-size: 10px;
    padding: 5px 3px;
  }
  
  .category-nav-btn {
    font-size: 10px;
    padding: 5px 8px;
  }
  
  button {
    font-size: 12px;
    padding: 6px 10px;
  }
}

/* Landscape mode optimizations */
@media (max-height: 500px) and (orientation: landscape) {
  .container {
    margin: 10px auto;
  }
  
  .job-categories-expanded {
    max-height: 300px;
  }
  
  #screenCaptureModal .modal-content {
    height: 98vh;
    margin: 1vh auto;
  }
  
  #modalCanvas {
    max-height: 250px;
  }
}

/* Core Creation Modal Responsive Design */
#coreCreationModal .modal-content {
  max-width: 1200px;
  max-height: 90vh;
  overflow-y: auto;
}

.core-creation-container {
  display: flex;
  gap: 20px;
  margin-top: 20px;
}

.core-creation-left {
  flex: 0 0 300px;
}

.core-creation-middle {
  flex: 1;
  max-height: 600px;
  overflow-y: auto;
}

.core-creation-right {
  flex: 0 0 300px;
  border-left: 2px solid var(--border-color);
  padding-left: 20px;
}

/* Core Creation Modal - Dark Mode */
body.dark-mode #coreCreationModal .modal-content {
  background: var(--card-bg);
  color: var(--text-color);
}

body.dark-mode #coreCreationModal h2,
body.dark-mode #coreCreationModal h4 {
  color: var(--text-color);
}

body.dark-mode #corePreviewCanvas {
  background: #2d2d2d;
}

body.dark-mode .core-creation-left > div {
  background: #2d2d2d !important;
  border-color: var(--border-color) !important;
}

body.dark-mode .core-creation-right {
  border-left-color: var(--border-color);
}

body.dark-mode #coreSkillsSelected {
  color: var(--text-secondary);
}

/* Skill Selection Grid Styles */
.skill-selection-item {
  padding: 10px;
  border: 2px solid #dee2e6;
  border-radius: 8px;
  cursor: pointer;
  background: white;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

.skill-selection-item.selected {
  border-color: var(--primary-color, #667eea);
  background: rgba(102, 126, 234, 0.15);
}

.skill-selection-icon {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  border: 1px solid #ddd;
  flex-shrink: 0;
}

.skill-selection-info {
  flex: 1;
  min-width: 0;
}

.skill-selection-name {
  font-weight: 600;
  font-size: 13px;
  color: #333;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.skill-selection-category {
  font-size: 11px;
  margin-top: 2px;
}

.skill-selection-badge {
  position: absolute;
  top: 5px;
  right: 5px;
  color: white;
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
}

/* Skill Selection Grid - Dark Mode */
body.dark-mode .skill-selection-item {
  background: var(--hover-bg);
  border-color: #666;
}

body.dark-mode .skill-selection-item.selected {
  background: rgba(102, 126, 234, 0.25);
  border-color: #667eea;
}

body.dark-mode .skill-selection-icon {
  border-color: var(--border-color);
}

body.dark-mode .skill-selection-name {
  color: var(--text-color);
}

/* Registered Cores Display Container */
#registeredCoresDisplay {
  margin-top: 20px;
  padding: 15px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  background: #f8f9fa;
}

#registeredCoresDisplay h4 {
  margin: 0 0 15px 0;
  color: #333;
}

/* Registered Cores - Dark Mode */
body.dark-mode #registeredCoresDisplay {
  background: var(--card-bg);
  border-color: var(--border-color);
}

body.dark-mode #registeredCoresDisplay h4 {
  color: var(--text-color);
}

body.dark-mode .created-core-item {
  background: var(--card-bg);
}

body.dark-mode .created-core-item:hover {
  background: var(--card-bg);
  filter: brightness(1.1);
}

body.dark-mode .core-tooltip {
  background: rgba(40, 40, 40, 0.98) !important;
  border: 1px solid var(--border-color);
}

body.dark-mode .created-core-item img {
  border: 1px solid var(--border-color);
}

/* Core Creation Modal - Tablet */
@media (max-width: 1024px) {
  #coreCreationModal .modal-content {
    max-width: 95%;
    padding: 15px;
  }
  
  .core-creation-container {
    gap: 15px;
  }
  
  .core-creation-left {
    flex: 0 0 250px;
  }
  
  .core-creation-left canvas {
    width: 250px !important;
    height: 250px !important;
  }
  
  .core-creation-right {
    flex: 0 0 250px;
  }
}

/* Core Creation Modal - Mobile */
@media (max-width: 768px) {
  #coreCreationModal .modal-content {
    max-width: 100%;
    width: 100%;
    height: 100vh;
    max-height: 100vh;
    margin: 0;
    padding: 15px;
    border-radius: 0;
    overflow-y: auto;
  }
  
  .core-creation-container {
    flex-direction: column;
    gap: 20px;
  }
  
  .core-creation-left,
  .core-creation-middle,
  .core-creation-right {
    flex: none;
    width: 100%;
    max-height: none;
  }
  
  .core-creation-left {
    order: 1;
  }
  
  .core-creation-middle {
    order: 2;
  }
  
  .core-creation-right {
    order: 3;
    border-left: none;
    border-top: 2px solid var(--border-color);
    padding-left: 0;
    padding-top: 20px;
  }
  
  .core-creation-left > div {
    width: 100% !important;
    max-width: 300px !important;
    height: auto !important;
    aspect-ratio: 1 !important;
    margin: 0 auto !important;
  }
  
  .core-creation-left canvas {
    width: 100% !important;
    height: 100% !important;
    max-width: 300px !important;
    max-height: 300px !important;
  }
  
  #corePreviewList {
    max-height: 300px !important;
  }
  
  .core-creation-middle > div {
    font-size: 11px !important;
  }
}

/* Registered Cores - Mobile */
@media (max-width: 768px) {
  #commonCoreResultContainer {
    gap: 10px !important;
  }
  
  .created-core-item {
    width: 100px !important;
  }
  
  .core-tooltip {
    font-size: 11px !important;
    padding: 8px !important;
    min-width: 150px !important;
  }
  
  /* Always show delete button on mobile (English: No hover required on mobile devices) */
  .delete-core-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
}

@media (max-width: 480px) {
  .created-core-item {
    width: 80px !important;
  }
  
  .core-tooltip {
    font-size: 10px !important;
    padding: 6px !important;
    min-width: 120px !important;
  }
  
  .delete-core-btn {
    width: 24px !important;
    height: 24px !important;
    font-size: 14px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
}