/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
:root {
  /* GitHub-inspired Colors */
  --primary-color: #0969da;
  --primary-hover: #0550ae;
  --secondary-color: #656d76;
  --accent-color: #1f883d;
  --danger-color: #d1242f;
  --danger-color-hover: #a21a24;
  --warning-color: #fb8500;
  --bg-canvas: #ffffff;
  --bg-default: #f6f8fa;
  --bg-subtle: #f6f8fa;
  --bg-muted: #f6f8fa;
  --bg-emphasis: #0969da;
  --bg-overlay: rgba(255, 255, 255, 0.95);
  --border-default: #d0d7de;
  --border-muted: #d8dee4;
  --border-subtle: #f6f8fa;
  --fg-default: #1f2328;
  --fg-muted: #656d76;
  --fg-subtle: #6e7781;
  --fg-on-emphasis: #ffffff;
  --shadow-small: 0 1px 3px rgba(16, 22, 26, 0.1);
  --shadow-medium: 0 3px 6px rgba(16, 22, 26, 0.15);
  --shadow-large: 0 8px 24px rgba(16, 22, 26, 0.2);
  --radius-small: 6px;
  --radius-medium: 8px;
  --radius-large: 12px;
  --sidebar-width: 280px;
  --header-height: 60px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}
/* Dark Theme */
@media (prefers-color-scheme: dark) {
  :root {
    --primary-color: #4493f8;
    --primary-hover: #318df8;
    --secondary-color: #7c8591;
    --accent-color: #3fb950;
    --danger-color: #f85149;
    --danger-color-hover: #ff6b6b;
    --warning-color: #d29922;
    --bg-canvas: #0d1117;
    --bg-default: #010409;
    --bg-subtle: #161b22;
    --bg-muted: #21262d;
    --bg-emphasis: #1f6feb;
    --bg-overlay: rgba(13, 17, 23, 0.95);
    --border-default: #30363d;
    --border-muted: #21262d;
    --border-subtle: #161b22;
    --fg-default: #f0f6fc;
    --fg-muted: #7c8591;
    --fg-subtle: #656d76;
    --fg-on-emphasis: #ffffff;
    --shadow-small: 0 1px 3px rgba(1, 4, 9, 0.4);
    --shadow-medium: 0 3px 6px rgba(1, 4, 9, 0.5);
    --shadow-large: 0 8px 24px rgba(1, 4, 9, 0.6);
  }
}
/* Manual Dark Theme */
[data-theme="dark"] {
  --primary-color: #4493f8;
  --primary-hover: #318df8;
  --secondary-color: #7c8591;
  --accent-color: #3fb950;
  --danger-color: #f85149;
  --danger-color-hover: #ff6b6b;
  --warning-color: #d29922;
  --bg-canvas: #0d1117;
  --bg-default: #010409;
  --bg-subtle: #161b22;
  --bg-muted: #21262d;
  --bg-emphasis: #1f6feb;
  --bg-overlay: rgba(13, 17, 23, 0.95);
  --border-default: #30363d;
  --border-muted: #21262d;
  --border-subtle: #161b22;
  --fg-default: #f0f6fc;
  --fg-muted: #7c8591;
  --fg-subtle: #656d76;
  --fg-on-emphasis: #ffffff;
  --shadow-small: 0 1px 3px rgba(1, 4, 9, 0.4);
  --shadow-medium: 0 3px 6px rgba(1, 4, 9, 0.5);
  --shadow-large: 0 8px 24px rgba(1, 4, 9, 0.6);
}
/* Manual Light Theme */
[data-theme="light"] {
  --primary-color: #0969da;
  --primary-hover: #0550ae;
  --secondary-color: #656d76;
  --accent-color: #1f883d;
  --danger-color: #d1242f;
  --danger-color-hover: #a21a24;
  --warning-color: #fb8500;
  --bg-canvas: #ffffff;
  --bg-default: #f6f8fa;
  --bg-subtle: #f6f8fa;
  --bg-muted: #f6f8fa;
  --bg-emphasis: #0969da;
  --bg-overlay: rgba(255, 255, 255, 0.95);
  --border-default: #d0d7de;
  --border-muted: #d8dee4;
  --border-subtle: #f6f8fa;
  --fg-default: #1f2328;
  --fg-muted: #656d76;
  --fg-subtle: #6e7781;
  --fg-on-emphasis: #ffffff;
  --shadow-small: 0 1px 3px rgba(16, 22, 26, 0.1);
  --shadow-medium: 0 3px 6px rgba(16, 22, 26, 0.15);
  --shadow-large: 0 8px 24px rgba(16, 22, 26, 0.2);
}
html {
  scroll-behavior: smooth;
}
/* เพิ่ม scroll margin เพื่อให้เว้นพื้นที่เมื่อเลื่อนไปยัง hash fragment */
pre[class*="language-"] {
  scroll-margin-top: 20px;
}
body {
  font-family: var(--font-sans);
  background: var(--bg-default);
  color: var(--fg-default);
  line-height: 1.5;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a {
  text-decoration: none;
}
/* Layout Structure */
.app-layout {
  min-height: 100vh;
}
/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-canvas);
  border-right: 1px solid var(--border-default);
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
  display: flex;
  flex-direction: column;
}
.sidebar-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-default);
  background: var(--bg-canvas);
  position: sticky;
  top: 0;
  z-index: 10;
}
.sidebar-header h1 {
  font-size: 16px;
  font-weight: 600;
  color: var(--fg-default);
  margin-bottom: 4px;
}
.sidebar-header .subtitle {
  font-size: 12px;
  color: var(--fg-muted);
}
.sidebar-nav {
  flex: 1;
  padding: 16px 0;
}
.nav-section {
  margin-bottom: 24px;
}
.nav-section-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0 20px 8px;
}
.nav-item {
  display: flex;
  align-items: center;
  padding: 8px 20px;
  color: var(--fg-default);
  text-decoration: none;
  transition: all 0.15s ease;
  border-left: 3px solid transparent;
}
.nav-item:hover {
  background: var(--bg-subtle);
  color: var(--primary-color);
}
.nav-item.active {
  background: var(--bg-subtle);
  color: var(--primary-color);
  border-left-color: var(--primary-color);
  font-weight: 500;
}
.nav-item i {
  width: 16px;
  margin-right: 12px;
  font-size: 14px;
}
.nav-item .badge {
  margin-left: auto;
  background: var(--bg-muted);
  color: var(--fg-muted);
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: 500;
}
/* Folder Tree */
.folder-item {
  cursor: pointer;
  user-select: none;
  position: relative;
}
.folder-item:hover {
  background: var(--bg-subtle);
}
.folder-item .folder-name {
  pointer-events: none;
  user-select: none;
}
.folder-toggle {
  cursor: pointer;
  transition: all 0.2s ease;
  margin-right: 8px !important;
  color: var(--fg-muted);
}
.folder-toggle:hover {
  color: var(--primary-color);
  transform: scale(1.1);
}
.folder-children {
  border-left: 2px solid var(--border-subtle);
  margin-left: 8px !important;
  padding-left: 8px;
  position: relative;
}
.folder-children::before {
  content: '';
  position: absolute;
  left: -1px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--border-subtle);
}
/* File tree hierarchy lines */
.nav-item[data-file] {
  position: relative;
}
.nav-item[data-file]::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 50%;
  width: 8px;
  height: 1px;
  background: var(--border-subtle);
}
/* Current file highlight */
.nav-item.active .file-name {
  font-weight: 600;
}
/* Folder states */
.folder-children.expanded {
  display: block !important;
}
.folder-children.collapsed {
  display: none !important;
}
/* Main Content */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
}
/* Header */
.main-header {
  background: var(--bg-canvas);
  border-bottom: 1px solid var(--border-default);
  padding: 17px 24px;
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}
.site-logo {
  display: none;
}
.site-logo a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--fg-default);
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  transition: color 0.2s ease;
}
.site-logo a:hover {
  color: var(--primary-color);
}
.site-logo i {
  font-size: 18px;
  color: var(--primary-color);
}
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--fg-default);
  font-size: 18px;
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
  position: relative;
  z-index: 1001;
}
.mobile-menu-toggle:hover {
  background: var(--bg-subtle);
  color: var(--primary-color);
}
.mobile-menu-toggle i {
  transition: transform 0.2s ease;
}
.mobile-menu-toggle.active i {
  transform: rotate(90deg);
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--fg-muted);
}
.breadcrumb a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}
.breadcrumb a:hover {
  text-decoration: underline;
}
.breadcrumb-separator {
  color: var(--fg-muted);
}
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.header-actions {
  display: flex;
  gap: 8px;
}
/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-small);
  background: var(--bg-canvas);
  color: var(--fg-default);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.btn:hover {
  background: var(--bg-subtle);
  border-color: var(--border-muted);
}
.btn-primary {
  background: var(--primary-color);
  color: var(--fg-on-emphasis);
  border-color: var(--primary-color);
}
.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}
.btn-success {
  background: var(--accent-color);
  color: var(--fg-on-emphasis);
  border-color: var(--accent-color);
}
.btn-success:hover {
  background: #1a7f37;
  border-color: #1a7f37;
}
.btn-danger {
  background: var(--danger-color);
  color: var(--fg-on-emphasis);
  border-color: var(--danger-color);
}
.btn-danger:hover {
  background: #bf1f2a;
  border-color: #bf1f2a;
}
.btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  pointer-events: none;
}
/* Spinner animation สำหรับ loading state */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
.fa-spin {
  animation: spin 1s linear infinite;
}
/* Button transitions */
.btn {
  transition: all 0.2s ease, background-color 0.3s ease, border-color 0.3s ease;
}
.btn i {
  transition: transform 0.2s ease;
}
.btn:active i {
  transform: scale(0.95);
}
.btn-sm {
  padding: 4px 12px;
  font-size: 12px;
}
/* Content Area */
.content-area {
  flex: 1;
  padding: 24px;
  max-width: 100%;
}
.content-area > section {
  margin-bottom: 40px;
}
.content-area > section:last-child {
  margin-bottom: 0;
}
/* Project Header */
.project-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.project-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--fg-default);
  margin: 0;
}
.project-header i {
  color: var(--fg-muted);
  font-size: 18px;
}
.project-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.project-title h1 {
  font-size: 20px;
  font-weight: 600;
  color: var(--fg-default);
}
.project-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  color: var(--fg-muted);
}
.project-meta .meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}
.project-meta i {
  font-size: 12px;
}
/* File Browser */
.file-browser {
  background: var(--bg-canvas);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-medium);
  margin-bottom: 24px;
  overflow: hidden;
}
.file-browser-header {
  background: var(--bg-subtle);
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.file-browser-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-default);
  display: flex;
  align-items: center;
  gap: 8px;
}
.file-browser-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.file-actions-help {
  color: var(--fg-muted);
  font-size: 14px;
  cursor: help;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}
.file-actions-help:hover {
  opacity: 1;
  color: var(--primary-color);
}
.file-list {
  list-style: none;
}
.file-item {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.15s ease;
}
.file-item:hover {
  background: var(--bg-subtle);
}
.file-item:last-child {
  border-bottom: none;
}
.file-icon {
  width: 16px;
  margin-right: 12px;
  color: var(--fg-muted);
  font-size: 14px;
}
.file-name {
  flex: 1;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}
.file-name:hover {
  text-decoration: underline;
}
.file-name.directory {
  color: var(--fg-default);
}
.file-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: var(--fg-muted);
}
/* File browser folder system */
.folder-item-browser {
  cursor: pointer;
  position: relative;
}
.folder-item-browser:hover {
  background: var(--bg-subtle);
}
.folder-item-browser .file-name.directory {
  pointer-events: none;
  user-select: none;
}
.folder-toggle-browser {
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--fg-muted);
}
.folder-toggle-browser:hover {
  color: var(--primary-color);
  transform: scale(1.1);
}
.folder-children-browser {
  border-left: 2px solid var(--border-subtle);
  margin-left: 16px;
  padding-left: 0;
  list-style: none;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-subtle);
}
.folder-children-browser.expanded {
  display: block !important;
}
.folder-children-browser.collapsed {
  display: none !important;
}
.file-list.nested {
  margin: 0;
  padding: 0;
  background: transparent;
}
.file-list.nested .file-item {
  padding: 6px 16px;
  border-bottom: 1px solid var(--border-subtle);
}
.file-list.nested .file-item:last-child {
  border-bottom: none;
}
/* File browser hierarchy indicator */
.file-list.nested .file-item[data-file] {
  position: relative;
}
.file-list.nested .file-item[data-file]:before {
  content: '';
  position: absolute;
  left: -16px;
  top: 50%;
  width: 12px;
  height: 1px;
  background: var(--border-subtle);
}
/* README Section */
.readme-section {
  background: var(--bg-canvas);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-medium);
  overflow: hidden;
}
.readme-header {
  background: var(--bg-subtle);
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  gap: 8px;
}
.content-area .readme-header h2 {
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-default);
  margin-bottom: 0;
  padding-bottom: 0;
}
.readme-content {
  padding: 24px;
  line-height: 1.6;
}
.readme-content h1,
.readme-content h2,
.readme-content h3,
.readme-content h4,
.readme-content h5,
.readme-content h6 {
  margin-top: 24px;
  margin-bottom: 16px;
  font-weight: 600;
  color: var(--fg-default);
}
.readme-content h1 {
  font-size: 24px;
  border-bottom: 1px solid var(--border-muted);
  padding-bottom: 8px;
}
.readme-content h2 {
  font-size: 20px;
  border-bottom: 1px solid var(--border-muted);
  padding-bottom: 8px;
}
.readme-content h3 {
  font-size: 16px;
}
.readme-content p {
  margin-bottom: 16px;
  color: var(--fg-default);
}
.readme-content ol,
.readme-content ul {
  margin-bottom: 16px;
  color: var(--fg-default);
  padding-left: 20px;
}
.readme-content code {
  background: var(--bg-subtle);
  padding: 2px 4px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 85%;
  color: var(--fg-default);
}
.readme-content pre {
  background: var(--bg-subtle);
  padding: 16px;
  border-radius: var(--radius-small);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.4;
  color: var(--fg-default);
  margin-bottom: 16px;
}
.readme-content code[class*=language-],
.readme-content pre[class*=language-] {
  color: var(--fg-default);
  padding: 0;
}
/* Blockquote styles for README content */
.readme-content blockquote {
  padding: 0 16px;
  margin: 16px 0;
  color: var(--fg-muted);
  border-left: 4px solid var(--border-default);
  background: var(--bg-subtle);
  border-radius: 0 var(--radius-small) var(--radius-small) 0;
}
.readme-content blockquote p {
  margin: 8px 0;
}
.readme-content blockquote p:first-child {
  margin-top: 0;
}
.readme-content blockquote p:last-child {
  margin-bottom: 0;
}
/* Horizontal rule styles */
.readme-content hr {
  height: 1px;
  border: none;
  background: var(--border-default);
  margin: 24px 0;
}
/* Links in README */
.readme-content a {
  color: var(--primary-color);
  text-decoration: none;
}
.readme-content a:hover {
  text-decoration: underline;
}
/* Task list styles */
.readme-content ul.task-list {
  list-style: none;
  padding-left: 0;
}
.readme-content li.task-list-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 4px;
}
.readme-content li.task-list-item input[type="checkbox"] {
  margin: 4px 8px 0 0;
  accent-color: var(--primary-color);
}
/* Table styles for README content */
.readme-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  border: 1px solid var(--border-default);
}
.readme-content table th,
.readme-content table td {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-default);
  border-right: 1px solid var(--border-default);
}
.readme-content table th:last-child,
.readme-content table td:last-child {
  border-right: none;
}
.readme-content table th {
  background: var(--bg-subtle);
  font-weight: 600;
  color: var(--fg-default);
  border-bottom: 2px solid var(--border-default);
}
.readme-content table tr:hover {
  background: var(--bg-canvas);
}
.readme-content table tr:last-child th,
.readme-content table tr:last-child td {
  border-bottom: none;
}
/* Rounded corners for table */
.readme-content table th:first-child {
  border-top-left-radius: var(--radius-small);
}
.readme-content table th:last-child {
  border-top-right-radius: var(--radius-small);
}
.readme-content table tr:last-child td:first-child {
  border-bottom-left-radius: var(--radius-small);
}
.readme-content table tr:last-child td:last-child {
  border-bottom-right-radius: var(--radius-small);
}
.readme-content table tbody tr:nth-child(even) {
  background: var(--bg-subtle);
}
.readme-content table tbody tr:hover {
  background: var(--bg-default);
}
/* Responsive table */
@media (max-width: 768px) {
  .readme-content table {
    font-size: 12px;
  }
  .readme-content table th,
  .readme-content table td {
    padding: 6px 8px;
  }
}
/* Profile Section */
.profile-card {
  background: var(--bg-canvas);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-medium);
  padding: 24px;
  text-align: center;
  margin-bottom: 40px;
}
.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 32px;
  font-weight: 600;
}
.profile-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--fg-default);
  margin-bottom: 4px;
}
.profile-username {
  font-size: 14px;
  color: var(--fg-muted);
  margin-bottom: 16px;
}
.profile-bio {
  font-size: 14px;
  color: var(--fg-default);
  line-height: 1.5;
  margin-bottom: 16px;
}
.profile-stats {
  display: flex;
  justify-content: space-around;
  padding-top: 16px;
  border-top: 1px solid var(--border-default);
}
.profile-stat {
  text-align: center;
}
.profile-stat-number {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: var(--fg-default);
}
.profile-stat-label {
  font-size: 12px;
  color: var(--fg-muted);
}
/* Portfolio Grid */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 24px;
}
.portfolio-card {
  background: var(--bg-canvas);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-medium);
  padding: 20px;
  transition: all 0.15s ease;
}
.portfolio-card:hover {
  border-color: var(--border-muted);
  box-shadow: var(--shadow-small);
}
.portfolio-card h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--fg-default);
  margin-bottom: 8px;
}
.portfolio-card p {
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.5;
  margin-bottom: 16px;
}
.portfolio-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.tech-tag {
  background: var(--bg-subtle);
  color: var(--fg-muted);
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 500;
}
.portfolio-actions {
  display: flex;
  gap: 8px;
}
/* Search */
.search-input {
  width: 100%;
  padding: 12px 12px 12px 36px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-small);
  background: var(--bg-canvas);
  font-size: 14px;
  color: var(--fg-default);
}
.search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.1);
}
.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--fg-muted);
  font-size: 14px;
}
/* Responsive */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 1000;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-content {
    margin-left: 0;
  }
  .portfolio-grid {
    grid-template-columns: 1fr;
  }
  .header-actions .btn span {
    display: none;
  }
  .mobile-menu-toggle {
    display: block;
  }
  .site-logo {
    display: flex;
  }
  /* Overlay เมื่อเปิด sidebar บนมือถือ */
  .sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
  }
  .sidebar-overlay.show {
    display: block;
    opacity: 1;
  }
}
@media (max-width: 768px) {
  .content-area {
    padding: 16px;
  }
  .main-header {
    padding: 12px 16px;
  }
  .file-browser-header,
  .readme-header {
    padding: 8px 12px;
  }
  .file-item {
    padding: 6px 12px;
  }
  .readme-content {
    padding: 16px;
  }
  .theme-toggle {
    width: 32px;
    height: 32px;
    font-size: 14px;
    margin-left: 4px;
  }
  .file-browser-actions {
    flex-wrap: wrap;
    gap: 4px;
  }
  .file-actions-help {
    font-size: 12px;
  }
  .line-numbers pre[class*="language-"] {
    padding-left: 2.5em;
  }
  .line-numbers-rows {
    width: 2.5em;
  }
  .breadcrumb {
    font-size: 12px;
    overflow: hidden;
  }
  .breadcrumb span:last-child {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
  }
  .mobile-menu-toggle {
    font-size: 16px;
    padding: 6px;
  }
  .site-logo span {
    font-size: 14px;
  }
  .site-logo i {
    font-size: 16px;
  }
  .copy-success-notification {
    max-width: 320px;
    padding: 20px;
    border-radius: 8px;
  }
  .copy-success-notification i {
    font-size: 28px;
  }
  .copy-success-notification strong {
    font-size: 16px;
  }
  .copy-success-notification span {
    font-size: 13px;
  }
  .copy-success-notification .notification-stats {
    gap: 12px;
    margin-top: 6px;
    padding-top: 6px;
  }
  .copy-success-notification .notification-stats small {
    font-size: 11px;
    gap: 3px;
  }
}
/* Utilities */
.text-center {
  text-align: center;
}
.text-right {
  text-align: right;
}
.mb-1 {
  margin-bottom: 8px;
}
.mb-2 {
  margin-bottom: 16px;
}
.mb-3 {
  margin-bottom: 24px;
}
.mt-1 {
  margin-top: 8px;
}
.mt-2 {
  margin-top: 16px;
}
.mt-3 {
  margin-top: 24px;
}
/* Project Cards */
.project-card {
  background: var(--bg-canvas);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-medium);
  padding: 20px;
  transition: all 0.2s ease;
  text-decoration: none;
  color: inherit;
  display: block;
  position: relative;
  overflow: hidden;
}
.project-card:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-medium);
  transform: translateY(-2px);
}
.project-card.featured {
  border-color: var(--warning-color);
  background: linear-gradient(135deg, var(--bg-canvas) 0%, #fffbf0 100%);
}
.project-card.featured::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--warning-color);
}
.featured-icon {
  color: var(--warning-color) !important;
}
.project-card p {
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.5;
  margin-bottom: 16px;
}
.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tech-tag {
  background: var(--bg-subtle);
  color: var(--fg-muted);
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 12px;
  font-weight: 500;
}
.tech-tag.primary {
  background: var(--primary-color);
  color: var(--fg-on-emphasis);
}
.project-stats {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--fg-muted);
}
.project-stats span {
  display: flex;
  align-items: center;
  gap: 4px;
}
/* Skills Section */
.skill-card {
  background: var(--bg-canvas);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-medium);
  padding: 24px;
}
.skill-card h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--fg-default);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.skill-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.skill-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.skill-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-default);
}
.skill-bar {
  height: 6px;
  background: var(--bg-subtle);
  border-radius: 3px;
  overflow: hidden;
}
.skill-progress {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  border-radius: 3px;
  transition: width 0.3s ease;
}
/* Timeline */
.experience-section,
.education-section {
  margin-top: 32px;
}
.experience-section h3,
.education-section h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--fg-default);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.timeline {
  position: relative;
  padding-left: 24px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-default);
}
.timeline-item {
  position: relative;
  margin-bottom: 32px;
}
.timeline-marker {
  position: absolute;
  left: -20px;
  top: 4px;
  width: 12px;
  height: 12px;
  background: var(--primary-color);
  border-radius: 50%;
  border: 3px solid var(--bg-canvas);
}
.timeline-content h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--fg-default);
  margin-bottom: 4px;
}
.timeline-content .company,
.timeline-content .school {
  font-size: 14px;
  color: var(--primary-color);
  font-weight: 500;
  margin-bottom: 2px;
}
.timeline-content .period {
  font-size: 12px;
  color: var(--fg-muted);
  margin-bottom: 8px;
}
.timeline-content p {
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.5;
  margin: 0;
}
/* Education */
.education-item {
  background: var(--bg-canvas);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-medium);
  padding: 20px;
}
.education-item h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--fg-default);
  margin-bottom: 8px;
}
.education-item .school {
  font-size: 14px;
  color: var(--primary-color);
  font-weight: 500;
  margin-bottom: 4px;
}
.education-item .period {
  font-size: 12px;
  color: var(--fg-muted);
  margin-bottom: 4px;
}
.education-item .grade {
  font-size: 12px;
  color: var(--accent-color);
  font-weight: 500;
}
/* Contact Section */
.contact-section {
  margin-top: 32px;
}
.contact-section h2 {
  font-size: 18px;
  font-weight: 600;
  color: var(--fg-default);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}
.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--bg-canvas);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-medium);
  transition: all 0.15s ease;
}
.contact-item:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-small);
}
.contact-item i {
  width: 20px;
  color: var(--primary-color);
  font-size: 16px;
}
.contact-item span {
  font-size: 14px;
  color: var(--fg-default);
  font-weight: 500;
}
/* Portfolio Section */
.portfolio-section {
  margin-bottom: 40px;
}
.portfolio-section h2 {
  font-size: 20px;
  font-weight: 600;
  color: var(--fg-default);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
}
/* Skills Grid */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}
/* Projects Section */
.projects-section {
  margin-bottom: 40px;
}
.projects-section h2 {
  font-size: 20px;
  font-weight: 600;
  color: var(--fg-default);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
}
/* Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}
/* Section Titles */
.content-area h2 {
  font-size: 20px;
  font-weight: 600;
  color: var(--fg-default);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
}
/* Consistent Spacing for All Sections */
.profile-card:last-child,
.portfolio-section:last-child,
.projects-section:last-child,
.contact-section:last-child {
  margin-bottom: 0;
}
/* Highlight Projects Section */
.projects-highlight {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border-default);
}
.projects-highlight h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--fg-default);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.highlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}
.highlight-item {
  background: var(--bg-canvas);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-medium);
  padding: 20px;
  transition: all 0.2s ease;
}
.highlight-item:hover {
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}
.highlight-item h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--fg-default);
  margin: 0 0 12px 0;
}
.highlight-item p {
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.5;
  margin-bottom: 16px;
}
.highlight-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s ease;
}
.highlight-link:hover {
  color: var(--primary-color-hover);
}
/* Education Section */
.education-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border-default);
}
.education-section h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--fg-default);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.education-item {
  background: var(--bg-canvas);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-medium);
  padding: 20px;
  margin-bottom: 16px;
  transition: all 0.2s ease;
}
.education-item:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-small);
}
.education-item h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--fg-default);
  margin: 0 0 8px 0;
}
.education-item .school {
  font-size: 14px;
  color: var(--fg-muted);
  font-weight: 500;
  margin-bottom: 4px;
}
.education-item .period {
  font-size: 13px;
  color: var(--fg-muted);
  margin-bottom: 4px;
}
.education-item .grade {
  font-size: 13px;
  color: var(--success-color);
  font-weight: 500;
}
pre[class*=language-] {
  margin: 0 !important;
}
/* Theme Toggle Button */
.theme-toggle {
  background: var(--bg-canvas);
  border: 1px solid var(--border-default);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-small);
  color: var(--fg-default);
  font-size: 16px;
  margin-left: 8px;
}
.theme-toggle:hover {
  background: var(--bg-subtle);
  border-color: var(--primary-color);
  transform: scale(1.05);
  box-shadow: var(--shadow-medium);
}
.theme-toggle .theme-icon {
  transition: transform 0.2s ease;
}
.theme-toggle:hover .theme-icon {
  transform: rotate(180deg);
}
/* เพิ่ม CSS สำหรับ line numbers และ highlight */
.line-numbers .line-numbers-rows > span:before {
  color: var(--fg-muted);
  border-right: 1px solid var(--border-default);
  padding-right: 0.8em;
  margin-right: 0.8em;
}
.line-highlight {
  background: rgba(255, 255, 0, 0.1);
  background: linear-gradient(to right, rgba(255, 255, 0, 0.1) 70%, transparent);
  border-left: 3px solid #ffeb3b;
  margin-left: -3px;
}
/* Custom line highlight for JavaScript generated highlights */
.line-highlight-custom {
  position: absolute;
  left: 0;
  right: 0;
  background: rgba(255, 240, 0, 0.1);
  border-left: 3px solid #ffeb3b;
  pointer-events: none;
  z-index: 1;
  transition: all 0.2s ease;
  opacity: 1;
  transform: scale(1);
}
@media (prefers-color-scheme: dark) {
  .line-highlight {
    background: rgba(255, 255, 0, 0.15);
    background: linear-gradient(to right, rgba(255, 255, 0, 0.15) 70%, transparent);
    border-left-color: #ffeb3b;
  }
  .line-highlight-custom {
    background: rgba(255, 240, 0, 0.12);
    border-left-color: #ffeb3b;
  }
}
.line-numbers-rows {
  user-select: none;
}
.line-numbers-rows > span:hover {
  background: rgba(128, 128, 128, 0.1);
  cursor: pointer;
}
@media (prefers-color-scheme: dark) {
  .line-numbers-rows > span:hover {
    background: rgba(255, 255, 255, 0.1);
  }
}
/* ปรับปรุง styling สำหรับ code block */
code[class*=language-],
pre[class*=language-] {
  color: var(--fg-default) !important;
}
pre[class*="language-"] {
  position: relative;
  overflow-x: auto;
  padding: 1em;
  margin: 0;
  background: var(--bg-canvas);
}
.line-numbers pre[class*="language-"] {
  padding-left: 3.8em;
  counter-reset: linenumber;
}
.line-numbers-rows {
  position: absolute;
  pointer-events: none;
  top: 0;
  left: 0;
  width: 3em;
  letter-spacing: -1px;
  border-right: 1px solid var(--border-default);
  user-select: none;
  counter-reset: linenumber;
}
.line-numbers-rows > span {
  pointer-events: all;
  display: block;
  counter-increment: linenumber;
}
.line-numbers-rows > span:before {
  content: counter(linenumber);
  color: var(--fg-muted);
  display: block;
  padding-right: 0.8em;
  text-align: right;
  line-height: 1.5;
}
.line-numbers-rows > span:hover:before {
  background: rgba(128, 128, 128, 0.1);
}
@media (prefers-color-scheme: dark) {
  .line-numbers-rows > span:hover:before {
    background: rgba(255, 255, 255, 0.1);
  }
}
/* Styling สำหรับ URL parameter info */
.line-link-info {
  position: fixed;
  top: 10px;
  right: 10px;
  background: var(--bg-canvas);
  border: 1px solid var(--border-default);
  border-radius: 8px;
  padding: 10px;
  font-size: 12px;
  color: var(--fg-muted);
  z-index: 1000;
  display: none;
  box-shadow: var(--shadow-medium);
}
.line-link-info.show {
  display: block;
}
/* Copy Success Notification */
.copy-success-notification {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  background: var(--bg-canvas);
  border: 2px solid var(--accent-color);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  z-index: 9999;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-width: 400px;
  width: 90%;
}
.copy-success-notification.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.copy-success-notification .notification-content {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.copy-success-notification i {
  font-size: 32px;
  color: var(--accent-color);
  margin-top: 4px;
  animation: checkPulse 0.6s ease-out;
}
.copy-success-notification .notification-text {
  flex: 1;
}
.copy-success-notification strong {
  display: block;
  font-size: 18px;
  font-weight: 600;
  color: var(--fg-default);
  margin-bottom: 4px;
}
.copy-success-notification span {
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.4;
  display: block;
}
.copy-success-notification .notification-stats {
  display: flex;
  gap: 16px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
}
.copy-success-notification .notification-stats small {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--fg-muted);
  font-weight: 500;
}
.copy-success-notification .notification-stats i {
  font-size: 10px;
  opacity: 0.7;
  animation: none;
}
@keyframes checkPulse {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
/* Global Notification System */
.notification {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  background: var(--bg-canvas);
  border: 2px solid var(--accent-color);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  z-index: 9999;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-width: 400px;
  width: 90%;
  min-width: 300px;
}
.notification.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.notification-content {
  display: flex;
  align-items: center;
  gap: 12px;
}
.notification i {
  font-size: 24px;
  color: var(--accent-color);
  animation: checkPulse 0.6s ease-out;
}
.notification-text {
  flex: 1;
}
.notification-text span {
  font-size: 16px;
  color: var(--fg-default);
  line-height: 1.4;
}
/* Notification Types */
.notification-success {
  border-color: #28a745;
}
.notification-success i {
  color: #28a745;
}
.notification-error {
  border-color: #dc3545;
}
.notification-error i {
  color: #dc3545;
}
.notification-warning {
  border-color: #ffc107;
}
.notification-warning i {
  color: #ffc107;
}
.notification-info {
  border-color: #17a2b8;
}
.notification-info i {
  color: #17a2b8;
}
/* Toast Notification (มุมขวาบน) */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--bg-canvas);
  border: 2px solid var(--accent-color);
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  z-index: 9999;
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.3s ease-out;
  max-width: 300px;
  min-width: 250px;
}
.toast.show {
  opacity: 1;
  transform: translateX(0);
}
.toast-content {
  display: flex;
  align-items: center;
  gap: 12px;
}
.toast i {
  font-size: 18px;
  color: var(--accent-color);
}
.toast span {
  font-size: 14px;
  color: var(--fg-default);
  line-height: 1.4;
}
/* Toast Types */
.toast-success {
  border-color: #28a745;
}
.toast-success i {
  color: #28a745;
}
.toast-error {
  border-color: #dc3545;
}
.toast-error i {
  color: #dc3545;
}
.toast-warning {
  border-color: #ffc107;
}
.toast-warning i {
  color: #ffc107;
}
.toast-info {
  border-color: #17a2b8;
}
.toast-info i {
  color: #17a2b8;
}
/* Mobile Responsive */
@media (max-width: 768px) {
  .notification {
    max-width: 90%;
    min-width: 280px;
    padding: 16px;
  }
  .toast {
    top: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
    min-width: auto;
  }
}
/* Dark theme support for notification */
@media (prefers-color-scheme: dark) {
  .copy-success-notification {
    background: var(--bg-canvas);
    border-color: var(--accent-color);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  }
}
[data-theme="dark"] .copy-success-notification {
  background: var(--bg-canvas);
  border-color: var(--accent-color);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}
/* Override Prism.js สำหรับ dark theme ให้เหมาะกับ CSS variables */
@media (prefers-color-scheme: dark) {
  pre[class*="language-"] {
    background: var(--bg-canvas) !important;
    color: var(--fg-default) !important;
  }
  .token.comment,
  .token.prolog,
  .token.doctype,
  .token.cdata {
    color: var(--fg-muted) !important;
  }
  .token.punctuation {
    color: var(--fg-default) !important;
  }
  .token.property,
  .token.tag,
  .token.boolean,
  .token.number,
  .token.constant,
  .token.symbol,
  .token.deleted {
    color: #ff6b6b !important;
  }
  .token.selector,
  .token.attr-name,
  .token.string,
  .token.char,
  .token.builtin,
  .token.inserted {
    color: #51cf66 !important;
  }
  .token.operator,
  .token.entity,
  .token.url,
  .language-css .token.string,
  .style .token.string {
    color: #ffd43b !important;
  }
  .token.atrule,
  .token.attr-value,
  .token.keyword {
    color: #74c0fc !important;
  }
  .token.function,
  .token.class-name {
    color: #ff9500 !important;
  }
  .token.regex,
  .token.important,
  .token.variable {
    color: #e599f7 !important;
  }
  .line-highlight {
    background: rgba(255, 255, 0, 0.15) !important;
    background: linear-gradient(to right, rgba(255, 255, 0, 0.15) 70%, transparent) !important;
  }
  .line-numbers-rows > span:hover {
    background: rgba(255, 255, 255, 0.1) !important;
  }
  .line-numbers-rows > span:hover:before {
    background: rgba(255, 255, 255, 0.1) !important;
  }
}
/* Manual dark theme */
[data-theme="dark"] pre[class*="language-"] {
  background: var(--bg-canvas) !important;
  color: var(--fg-default) !important;
}
[data-theme="dark"] .token.comment,
[data-theme="dark"] .token.prolog,
[data-theme="dark"] .token.doctype,
[data-theme="dark"] .token.cdata {
  color: var(--fg-muted) !important;
}
[data-theme="dark"] .token.punctuation {
  color: var(--fg-default) !important;
}
[data-theme="dark"] .token.property,
[data-theme="dark"] .token.tag,
[data-theme="dark"] .token.boolean,
[data-theme="dark"] .token.number,
[data-theme="dark"] .token.constant,
[data-theme="dark"] .token.symbol,
[data-theme="dark"] .token.deleted {
  color: #ff6b6b !important;
}
[data-theme="dark"] .token.selector,
[data-theme="dark"] .token.attr-name,
[data-theme="dark"] .token.string,
[data-theme="dark"] .token.char,
[data-theme="dark"] .token.builtin,
[data-theme="dark"] .token.inserted {
  color: #51cf66 !important;
}
[data-theme="dark"] .token.operator,
[data-theme="dark"] .token.entity,
[data-theme="dark"] .token.url,
[data-theme="dark"] .language-css .token.string,
[data-theme="dark"] .style .token.string {
  color: #ffd43b !important;
}
[data-theme="dark"] .token.atrule,
[data-theme="dark"] .token.attr-value,
[data-theme="dark"] .token.keyword {
  color: #74c0fc !important;
}
[data-theme="dark"] .token.function,
[data-theme="dark"] .token.class-name {
  color: #ff9500 !important;
}
[data-theme="dark"] .token.regex,
[data-theme="dark"] .token.important,
[data-theme="dark"] .token.variable {
  color: #e599f7 !important;
}
[data-theme="dark"] .line-highlight {
  background: rgba(255, 255, 0, 0.15) !important;
  background: linear-gradient(to right, rgba(255, 255, 0, 0.15) 70%, transparent) !important;
  border-left-color: #ffeb3b !important;
}
[data-theme="dark"] .line-highlight-custom {
  background: rgba(255, 240, 0, 0.12) !important;
  border-left-color: #ffeb3b !important;
}
[data-theme="dark"] .line-numbers-rows > span:hover {
  background: rgba(255, 255, 255, 0.1) !important;
}
[data-theme="dark"] .line-numbers-rows > span:hover:before {
  background: rgba(255, 255, 255, 0.1) !important;
}
/* Light theme overrides */
@media (prefers-color-scheme: light) {
  pre[class*="language-"] {
    background: var(--bg-canvas) !important;
    color: #24292e !important;
  }
  .line-highlight {
    background: rgba(255, 255, 0, 0.1) !important;
    background: linear-gradient(to right, rgba(255, 255, 0, 0.1) 70%, transparent) !important;
  }
  .line-numbers-rows > span:hover {
    background: rgba(128, 128, 128, 0.1) !important;
  }
  .line-numbers-rows > span:hover:before {
    background: rgba(128, 128, 128, 0.1) !important;
  }
}
/* Manual light theme */
[data-theme="light"] pre[class*="language-"] {
  background: var(--bg-canvas) !important;
  color: #24292e !important;
}
[data-theme="light"] .line-highlight {
  background: rgba(255, 255, 0, 0.1) !important;
  background: linear-gradient(to right, rgba(255, 255, 0, 0.1) 70%, transparent) !important;
  border-left-color: #ffeb3b !important;
}
[data-theme="light"] .line-highlight-custom {
  background: rgba(255, 240, 0, 0.1) !important;
  border-left-color: #ffeb3b !important;
}
[data-theme="light"] .line-numbers-rows > span:hover {
  background: rgba(128, 128, 128, 0.1) !important;
}
[data-theme="light"] .line-numbers-rows > span:hover:before {
  background: rgba(128, 128, 128, 0.1) !important;
}
/* GitHub Light Theme (Default) */
@media (prefers-color-scheme: light) {
  .token.comment,
  .token.prolog,
  .token.doctype,
  .token.cdata {
    color: #6a737d !important;
    font-style: italic;
  }
  .token.punctuation {
    color: #24292e !important;
  }
  .token.property,
  .token.tag,
  .token.boolean,
  .token.number,
  .token.constant,
  .token.symbol,
  .token.deleted {
    color: #d73a49 !important;
  }
  .token.selector,
  .token.attr-name,
  .token.string,
  .token.char,
  .token.builtin,
  .token.inserted {
    color: #032f62 !important;
  }
  .token.operator,
  .token.entity,
  .token.url,
  .language-css .token.string,
  .style .token.string {
    color: #e36209 !important;
  }
  .token.atrule,
  .token.attr-value,
  .token.keyword {
    color: #d73a49 !important;
  }
  .token.function,
  .token.class-name {
    color: #6f42c1 !important;
  }
  .token.regex,
  .token.important,
  .token.variable {
    color: #e36209 !important;
  }
}
[data-theme="light"] .token.comment,
[data-theme="light"] .token.prolog,
[data-theme="light"] .token.doctype,
[data-theme="light"] .token.cdata {
  color: #6a737d !important;
  font-style: italic;
}
[data-theme="light"] .token.punctuation {
  color: #24292e !important;
}
[data-theme="light"] .token.property,
[data-theme="light"] .token.tag,
[data-theme="light"] .token.boolean,
[data-theme="light"] .token.number,
[data-theme="light"] .token.constant,
[data-theme="light"] .token.symbol,
[data-theme="light"] .token.deleted {
  color: #d73a49 !important;
}
[data-theme="light"] .token.selector,
[data-theme="light"] .token.attr-name,
[data-theme="light"] .token.string,
[data-theme="light"] .token.char,
[data-theme="light"] .token.builtin,
[data-theme="light"] .token.inserted {
  color: #032f62 !important;
}
[data-theme="light"] .token.operator,
[data-theme="light"] .token.entity,
[data-theme="light"] .token.url,
[data-theme="light"] .language-css .token.string,
[data-theme="light"] .style .token.string {
  color: #e36209 !important;
}
[data-theme="light"] .token.atrule,
[data-theme="light"] .token.attr-value,
[data-theme="light"] .token.keyword {
  color: #d73a49 !important;
}
[data-theme="light"] .token.function,
[data-theme="light"] .token.class-name {
  color: #6f42c1 !important;
}
[data-theme="light"] .token.regex,
[data-theme="light"] .token.important,
[data-theme="light"] .token.variable {
  color: #e36209 !important;
}
[data-syntax-theme="github-light"] {
  color: #24292e !important;
}
[data-syntax-theme="github-light"] .token.comment,
[data-syntax-theme="github-light"] .token.prolog,
[data-syntax-theme="github-light"] .token.doctype,
[data-syntax-theme="github-light"] .token.cdata {
  color: #6a737d !important;
  font-style: italic;
}
[data-syntax-theme="github-light"] .token.punctuation {
  color: #24292e !important;
}
[data-syntax-theme="github-light"] .token.property,
[data-syntax-theme="github-light"] .token.tag,
[data-syntax-theme="github-light"] .token.boolean,
[data-syntax-theme="github-light"] .token.number,
[data-syntax-theme="github-light"] .token.constant,
[data-syntax-theme="github-light"] .token.symbol,
[data-syntax-theme="github-light"] .token.deleted {
  color: #d73a49 !important;
}
[data-syntax-theme="github-light"] .token.selector,
[data-syntax-theme="github-light"] .token.attr-name,
[data-syntax-theme="github-light"] .token.string,
[data-syntax-theme="github-light"] .token.char,
[data-syntax-theme="github-light"] .token.builtin,
[data-syntax-theme="github-light"] .token.inserted {
  color: #032f62 !important;
}
[data-syntax-theme="github-light"] .token.operator,
[data-syntax-theme="github-light"] .token.entity,
[data-syntax-theme="github-light"] .token.url,
[data-syntax-theme="github-light"] .language-css .token.string,
[data-syntax-theme="github-light"] .style .token.string {
  color: #e36209 !important;
}
[data-syntax-theme="github-light"] .token.atrule,
[data-syntax-theme="github-light"] .token.attr-value,
[data-syntax-theme="github-light"] .token.keyword {
  color: #d73a49 !important;
}
[data-syntax-theme="github-light"] .token.function,
[data-syntax-theme="github-light"] .token.class-name {
  color: #6f42c1 !important;
}
[data-syntax-theme="github-light"] .token.regex,
[data-syntax-theme="github-light"] .token.important,
[data-syntax-theme="github-light"] .token.variable {
  color: #e36209 !important;
}
/* VS Code Light Theme */
[data-syntax-theme="vscode-light"] {
  color: #000000 !important;
}
[data-syntax-theme="vscode-light"] .token.comment,
[data-syntax-theme="vscode-light"] .token.prolog,
[data-syntax-theme="vscode-light"] .token.doctype,
[data-syntax-theme="vscode-light"] .token.cdata {
  color: #008000 !important;
  font-style: italic;
}
[data-syntax-theme="vscode-light"] .token.punctuation {
  color: #000000 !important;
}
[data-syntax-theme="vscode-light"] .token.property,
[data-syntax-theme="vscode-light"] .token.tag,
[data-syntax-theme="vscode-light"] .token.boolean,
[data-syntax-theme="vscode-light"] .token.number,
[data-syntax-theme="vscode-light"] .token.constant,
[data-syntax-theme="vscode-light"] .token.symbol,
[data-syntax-theme="vscode-light"] .token.deleted {
  color: #09885a !important;
}
[data-syntax-theme="vscode-light"] .token.selector,
[data-syntax-theme="vscode-light"] .token.attr-name,
[data-syntax-theme="vscode-light"] .token.string,
[data-syntax-theme="vscode-light"] .token.char,
[data-syntax-theme="vscode-light"] .token.builtin,
[data-syntax-theme="vscode-light"] .token.inserted {
  color: #a31515 !important;
}
[data-syntax-theme="vscode-light"] .token.operator,
[data-syntax-theme="vscode-light"] .token.entity,
[data-syntax-theme="vscode-light"] .token.url,
[data-syntax-theme="vscode-light"] .language-css .token.string,
[data-syntax-theme="vscode-light"] .style .token.string {
  color: #000000 !important;
}
[data-syntax-theme="vscode-light"] .token.atrule,
[data-syntax-theme="vscode-light"] .token.attr-value,
[data-syntax-theme="vscode-light"] .token.keyword {
  color: #0000ff !important;
}
[data-syntax-theme="vscode-light"] .token.function,
[data-syntax-theme="vscode-light"] .token.class-name {
  color: #795e26 !important;
}
[data-syntax-theme="vscode-light"] .token.regex,
[data-syntax-theme="vscode-light"] .token.important,
[data-syntax-theme="vscode-light"] .token.variable {
  color: #af00db !important;
}
/* Solarized Light Theme */
[data-syntax-theme="solarized-light"] {
  color: #586e75 !important;
}
[data-syntax-theme="solarized-light"] .token.comment,
[data-syntax-theme="solarized-light"] .token.prolog,
[data-syntax-theme="solarized-light"] .token.doctype,
[data-syntax-theme="solarized-light"] .token.cdata {
  color: #93a1a1 !important;
  font-style: italic;
}
[data-syntax-theme="solarized-light"] .token.punctuation {
  color: #586e75 !important;
}
[data-syntax-theme="solarized-light"] .token.property,
[data-syntax-theme="solarized-light"] .token.tag,
[data-syntax-theme="solarized-light"] .token.boolean,
[data-syntax-theme="solarized-light"] .token.number,
[data-syntax-theme="solarized-light"] .token.constant,
[data-syntax-theme="solarized-light"] .token.symbol,
[data-syntax-theme="solarized-light"] .token.deleted {
  color: #2aa198 !important;
}
[data-syntax-theme="solarized-light"] .token.selector,
[data-syntax-theme="solarized-light"] .token.attr-name,
[data-syntax-theme="solarized-light"] .token.string,
[data-syntax-theme="solarized-light"] .token.char,
[data-syntax-theme="solarized-light"] .token.builtin,
[data-syntax-theme="solarized-light"] .token.inserted {
  color: #859900 !important;
}
[data-syntax-theme="solarized-light"] .token.operator,
[data-syntax-theme="solarized-light"] .token.entity,
[data-syntax-theme="solarized-light"] .token.url,
[data-syntax-theme="solarized-light"] .language-css .token.string,
[data-syntax-theme="solarized-light"] .style .token.string {
  color: #cb4b16 !important;
}
[data-syntax-theme="solarized-light"] .token.atrule,
[data-syntax-theme="solarized-light"] .token.attr-value,
[data-syntax-theme="solarized-light"] .token.keyword {
  color: #268bd2 !important;
}
[data-syntax-theme="solarized-light"] .token.function,
[data-syntax-theme="solarized-light"] .token.class-name {
  color: #b58900 !important;
}
[data-syntax-theme="solarized-light"] .token.regex,
[data-syntax-theme="solarized-light"] .token.important,
[data-syntax-theme="solarized-light"] .token.variable {
  color: #d33682 !important;
}
/* Material Light Theme */
[data-syntax-theme="material-light"] {
  color: #37474f !important;
}
[data-syntax-theme="material-light"] .token.comment,
[data-syntax-theme="material-light"] .token.prolog,
[data-syntax-theme="material-light"] .token.doctype,
[data-syntax-theme="material-light"] .token.cdata {
  color: #90a4ae !important;
  font-style: italic;
}
[data-syntax-theme="material-light"] .token.punctuation {
  color: #37474f !important;
}
[data-syntax-theme="material-light"] .token.property,
[data-syntax-theme="material-light"] .token.tag,
[data-syntax-theme="material-light"] .token.boolean,
[data-syntax-theme="material-light"] .token.number,
[data-syntax-theme="material-light"] .token.constant,
[data-syntax-theme="material-light"] .token.symbol,
[data-syntax-theme="material-light"] .token.deleted {
  color: #e91e63 !important;
}
[data-syntax-theme="material-light"] .token.selector,
[data-syntax-theme="material-light"] .token.attr-name,
[data-syntax-theme="material-light"] .token.string,
[data-syntax-theme="material-light"] .token.char,
[data-syntax-theme="material-light"] .token.builtin,
[data-syntax-theme="material-light"] .token.inserted {
  color: #4caf50 !important;
}
[data-syntax-theme="material-light"] .token.operator,
[data-syntax-theme="material-light"] .token.entity,
[data-syntax-theme="material-light"] .token.url,
[data-syntax-theme="material-light"] .language-css .token.string,
[data-syntax-theme="material-light"] .style .token.string {
  color: #ff9800 !important;
}
[data-syntax-theme="material-light"] .token.atrule,
[data-syntax-theme="material-light"] .token.attr-value,
[data-syntax-theme="material-light"] .token.keyword {
  color: #2196f3 !important;
}
[data-syntax-theme="material-light"] .token.function,
[data-syntax-theme="material-light"] .token.class-name {
  color: #9c27b0 !important;
}
[data-syntax-theme="material-light"] .token.regex,
[data-syntax-theme="material-light"] .token.important,
[data-syntax-theme="material-light"] .token.variable {
  color: #795548 !important;
}
/* Atom Light Theme */
[data-syntax-theme="atom-light"] {
  color: #383a42 !important;
}
[data-syntax-theme="atom-light"] .token.comment,
[data-syntax-theme="atom-light"] .token.prolog,
[data-syntax-theme="atom-light"] .token.doctype,
[data-syntax-theme="atom-light"] .token.cdata {
  color: #a0a1a7 !important;
  font-style: italic;
}
[data-syntax-theme="atom-light"] .token.punctuation {
  color: #383a42 !important;
}
[data-syntax-theme="atom-light"] .token.property,
[data-syntax-theme="atom-light"] .token.tag,
[data-syntax-theme="atom-light"] .token.boolean,
[data-syntax-theme="atom-light"] .token.number,
[data-syntax-theme="atom-light"] .token.constant,
[data-syntax-theme="atom-light"] .token.symbol,
[data-syntax-theme="atom-light"] .token.deleted {
  color: #ca1243 !important;
}
[data-syntax-theme="atom-light"] .token.selector,
[data-syntax-theme="atom-light"] .token.attr-name,
[data-syntax-theme="atom-light"] .token.string,
[data-syntax-theme="atom-light"] .token.char,
[data-syntax-theme="atom-light"] .token.builtin,
[data-syntax-theme="atom-light"] .token.inserted {
  color: #50a14f !important;
}
[data-syntax-theme="atom-light"] .token.operator,
[data-syntax-theme="atom-light"] .token.entity,
[data-syntax-theme="atom-light"] .token.url,
[data-syntax-theme="atom-light"] .language-css .token.string,
[data-syntax-theme="atom-light"] .style .token.string {
  color: #986801 !important;
}
[data-syntax-theme="atom-light"] .token.atrule,
[data-syntax-theme="atom-light"] .token.attr-value,
[data-syntax-theme="atom-light"] .token.keyword {
  color: #a626a4 !important;
}
[data-syntax-theme="atom-light"] .token.function,
[data-syntax-theme="atom-light"] .token.class-name {
  color: #4078f2 !important;
}
[data-syntax-theme="atom-light"] .token.regex,
[data-syntax-theme="atom-light"] .token.important,
[data-syntax-theme="atom-light"] .token.variable {
  color: #e45649 !important;
}
/* Rating System */
.project-rating {
  display: flex;
  align-items: center;
  gap: 8px;
}
.rating-stars {
  display: flex;
  gap: 2px;
}
.rating-stars .fa-star {
  color: var(--fg-muted);
  font-size: 14px;
  transition: color 0.2s;
}
.rating-stars .fa-star.active {
  color: #ffd700;
}
.rating-text {
  font-size: 12px;
  color: var(--fg-muted);
}
.project-rating-section {
  margin-bottom: 24px;
  padding: 16px 20px;
  background: var(--bg-canvas);
  border: 1px solid var(--border-default);
  border-radius: 8px;
}
.rating-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rating-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.rating-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-default);
  white-space: nowrap;
}
.rating-label .fa-star {
  color: #ffd700;
}
.rating-stars-interactive {
  display: flex;
  gap: 3px;
  cursor: pointer;
}
.rating-stars-interactive .fa-star {
  font-size: 18px;
  color: var(--fg-muted);
  transition: color 0.2s, transform 0.2s;
}
.rating-stars-interactive .fa-star.fas {
  color: #ffd700;
}
.rating-stars-interactive .fa-star:hover {
  color: #ffd700;
  transform: scale(1.1);
}
.rating-text {
  font-size: 14px;
  color: var(--fg-muted);
  flex: 1;
}
.rating-message {
  font-size: 13px;
  min-height: 18px;
}
/* Featured project rating */
.project-card.featured .project-rating {
  justify-content: flex-end;
}
.project-card.featured .project-rating .rating-stars .fa-star {
  color: #ffd700;
}
.project-card.featured .featured-icon {
  color: #ffd700;
}
/* Rating in project cards */
.project-card .project-rating .rating-stars .fa-star {
  font-size: 12px;
}
.project-card .project-rating .rating-text {
  font-size: 11px;
}
/* Rating hover effects */
.rating-stars-interactive .fa-star:hover ~ .fa-star {
  color: var(--fg-muted);
}
.rating-stars-interactive:hover .fa-star {
  color: #ffd700;
}
/* Responsive rating */
@media (max-width: 768px) {
  .rating-label {
    font-size: 13px;
  }
  .rating-stars-interactive .fa-star {
    font-size: 16px;
  }
  .rating-text {
    font-size: 13px;
  }
  /* Responsive search form */
  .search-form {
    flex-direction: column;
    align-items: stretch;
  }
  .search-container {
    min-width: unset;
  }
  .filter-container {
    flex: 1;
  }
  .filter-select {
    width: 100%;
  }
  .search-btn, .clear-btn {
    width: 100%;
    justify-content: center;
  }
  .search-results-info {
    flex-direction: column;
    gap: 4px;
  }
  .sort-info {
    margin-left: 0;
  }
}
/* Search and Filter */
.search-filter-container {
  margin-bottom: 32px;
}
.search-form {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.sort-info {
  font-size: 13px;
  color: var(--fg-muted);
  margin-left: 8px;
  font-style: italic;
}
.search-container {
  position: relative;
  flex: 1;
  min-width: 250px;
}
.filter-container {
  position: relative;
}
.filter-select {
  padding: 12px 16px;
  border: 1px solid var(--border-default);
  border-radius: 8px;
  background: var(--bg-default);
  color: var(--fg-default);
  font-size: 14px;
  min-width: 150px;
  transition: border-color 0.2s;
}
.filter-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.1);
}
.search-btn {
  padding: 12px 20px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background-color 0.2s;
}
.search-btn:hover {
  background: var(--primary-hover);
}
.clear-btn {
  padding: 12px 16px;
  background: var(--danger-color);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background-color 0.2s;
}
.clear-btn:hover {
  background: var(--danger-color-hover);
}
.search-results-info {
  color: var(--fg-muted);
  font-size: 14px;
  text-align: center;
}
/* Pagination */
.pagination-container {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.pagination {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.pagination-btn {
  padding: 8px 16px;
  background: var(--bg-canvas);
  border: 1px solid var(--border-default);
  border-radius: 6px;
  color: var(--fg-default);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  font-size: 14px;
}
.pagination-btn:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}
.pagination-numbers {
  display: flex;
  align-items: center;
  gap: 4px;
}
.pagination-number {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-canvas);
  border: 1px solid var(--border-default);
  border-radius: 6px;
  color: var(--fg-default);
  text-decoration: none;
  transition: all 0.2s;
  font-size: 14px;
}
.pagination-number:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}
.pagination-number.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  font-weight: 600;
}
.pagination-ellipsis {
  padding: 0 8px;
  color: var(--fg-muted);
}
.pagination-info {
  color: var(--fg-muted);
  font-size: 14px;
  text-align: center;
}
/* Responsive */
@media (max-width: 768px) {
  .search-form {
    flex-direction: column;
    align-items: stretch;
  }
  .search-container {
    min-width: auto;
  }
  .filter-select,
  .search-btn,
  .clear-btn {
    width: 100%;
    justify-content: center;
  }
  .pagination {
    gap: 8px;
  }
  .pagination-btn {
    padding: 6px 12px;
    font-size: 13px;
  }
  .pagination-number {
    width: 36px;
    height: 36px;
    font-size: 13px;
  }
}