@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=JetBrains Mono:wght@400;500&display=swap');

[data-theme="dark"] {
  --bg:          #0e0f14;
  --bg-solid:    #0e0f14;
  --bg-grad:     linear-gradient(135deg, #0e0f14 0%, #151620 50%, #0e0f14 100%);
  --surface:     rgba(30,32,48,0.65);
  --surface2:    rgba(38,40,60,0.5);
  --surface-solid: #1e2030;
  --surface2-solid: #26283c;
  --border:      rgba(255,255,255,0.06);
  --border-hover: rgba(255,255,255,0.12);
  --text:        #e8eaf0;
  --text-muted:  #6e7191;
  --surface-hover: rgba(45,47,70,0.5);
  --primary:     #5865f2;
  --accent:      #5865f2;
  --accent2:     #7b93f7;
  --accent-grad: linear-gradient(135deg, #5865f2, #7b93f7);
  --accent-a06:  rgba(88,101,242,0.06);
  --accent-a10:  rgba(88,101,242,0.10);
  --accent-a12:  rgba(88,101,242,0.12);
  --accent-a25:  rgba(88,101,242,0.25);
  --accent-a31:  rgba(88,101,242,0.31);
  --glow-accent: 0 0 20px rgba(88,101,242,0.15);
  --glow-accent-hover: 0 0 30px rgba(88,101,242,0.25);
  --green:       #57f287;
  --green-grad:  linear-gradient(135deg, #57f287, #4ae0a0);
  --green-a08:   rgba(87,242,135,0.08);
  --green-a25:   rgba(87,242,135,0.25);
  --green-a50:   rgba(87,242,135,0.5);
  --glow-green:  0 0 15px rgba(87,242,135,0.1);
  --red:         #ed4245;
  --red-hover:   #ff6f6f;
  --red-border:  #5c2d2d;
  --red-bg:      #2d1a1a;
  --red-a06:     rgba(237,66,69,0.06);
  --red-a08:     rgba(237,66,69,0.08);
  --red-a25:     rgba(237,66,69,0.25);
  --red-a50:     rgba(237,66,69,0.5);
  --yellow:      #fee75c;
  --yellow-a50:  rgba(254,231,92,0.5);
  --overlay:     rgba(0,0,0,0.6);
  --shadow-sm:   0 2px 8px rgba(0,0,0,0.2);
  --shadow-md:   0 4px 16px rgba(0,0,0,0.25), 0 2px 4px rgba(0,0,0,0.15);
  --shadow-lg:   0 8px 32px rgba(0,0,0,0.35), 0 2px 8px rgba(0,0,0,0.2);
  --shadow-xl:   0 16px 48px rgba(0,0,0,0.4), 0 4px 16px rgba(0,0,0,0.25);
  --glass-blur:  16px;
}

[data-theme="light"] {
  --bg:          #f5f6fa;
  --bg-solid:    #f5f6fa;
  --bg-grad:     linear-gradient(135deg, #f5f6fa 0%, #eef0f6 50%, #f5f6fa 100%);
  --surface:     rgba(255,255,255,0.75);
  --surface2:    rgba(238,240,246,0.6);
  --surface-solid: #ffffff;
  --surface2-solid: #eef0f6;
  --border:      rgba(0,0,0,0.08);
  --border-hover: rgba(0,0,0,0.15);
  --text:        #1a1c2e;
  --text-muted:  #6e7191;
  --surface-hover: rgba(240,242,250,0.6);
  --primary:     #5865f2;
  --accent:      #5865f2;
  --accent2:     #7b93f7;
  --accent-grad: linear-gradient(135deg, #5865f2, #7b93f7);
  --accent-a06:  rgba(88,101,242,0.06);
  --accent-a10:  rgba(88,101,242,0.10);
  --accent-a12:  rgba(88,101,242,0.12);
  --accent-a25:  rgba(88,101,242,0.25);
  --accent-a31:  rgba(88,101,242,0.31);
  --glow-accent: 0 0 20px rgba(88,101,242,0.08);
  --glow-accent-hover: 0 0 30px rgba(88,101,242,0.15);
  --green:       #2d7d46;
  --green-grad:  linear-gradient(135deg, #2d7d46, #3a9960);
  --green-a08:   rgba(45,125,70,0.08);
  --green-a25:   rgba(45,125,70,0.25);
  --green-a50:   rgba(45,125,70,0.3);
  --glow-green:  0 0 15px rgba(45,125,70,0.06);
  --red:         #d83c3e;
  --red-hover:   #e86060;
  --red-border:  #d4a8a8;
  --red-bg:      #f5e0e0;
  --red-a06:     rgba(216,60,62,0.06);
  --red-a08:     rgba(216,60,62,0.08);
  --red-a25:     rgba(216,60,62,0.25);
  --red-a50:     rgba(216,60,62,0.3);
  --yellow:      #da9c20;
  --yellow-a50:  rgba(218,156,32,0.3);
  --overlay:     rgba(0,0,0,0.3);
  --shadow-sm:   0 2px 8px rgba(0,0,0,0.06);
  --shadow-md:   0 4px 16px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg:   0 8px 32px rgba(0,0,0,0.1), 0 2px 8px rgba(0,0,0,0.05);
  --shadow-xl:   0 16px 48px rgba(0,0,0,0.12), 0 4px 16px rgba(0,0,0,0.06);
  --glass-blur:  20px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html.page-entering main {
  opacity: 0;
  animation: pageFadeIn 0.3s ease forwards;
}
html.page-leaving main {
  animation: pageFadeOut 0.3s ease forwards;
}
html.page-leaving .nav-tab:hover {
  background: transparent;
  color: var(--text-muted);
}

@keyframes pageFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes pageFadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(0.75rem); }
  to { opacity: 1; transform: translateY(0); }
}

html {
  touch-action: pan-x pan-y;
  -ms-touch-action: pan-x pan-y;
}

::view-transition-old(root) {
  animation: none;
}
::view-transition-new(root) {
  animation: none;
}

.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  flex-shrink: 0;
}

html {
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
  font-size: 16px;
  overscroll-behavior: none;
}

body {
  background: var(--bg-grad);
  background-attachment: fixed;
  color: var(--text);
  font-family: "Inter", sans-serif;
  min-height: 100dvh;
  line-height: 1.5;
  font-size: 1rem;
  position: relative;
  overscroll-behavior: none;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 120% 60% at 65% 0%, color-mix(in srgb, var(--accent) 14%, transparent) 0%, transparent 60%),
    radial-gradient(ellipse 80% 50% at 20% 40%, color-mix(in srgb, var(--accent2) 6%, transparent) 0%, transparent 50%);
}

#star-canvas {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 0;
}

[data-theme="light"] #star-canvas {
  opacity: 0.3;
}

nav, main, .modal-overlay {
  position: relative;
  z-index: 1;
}

a {
  text-decoration: none;
}

nav {
  background: rgba(30,32,48,0.85);
  border-bottom: 1px solid var(--border);
  padding: 0 1.75rem;
  height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(var(--glass-blur)) saturate(1.2);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.2);
  width: 100%;
  box-shadow: var(--shadow-sm);
}

[data-theme="light"] nav {
  background: rgba(255,255,255,0.85);
}

.brand {
  font-size: 1.375rem;
  color: var(--green);
  letter-spacing: -0.02rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: "JetBrains Mono", monospace;
  -webkit-tap-highlight-color: transparent;
  opacity: 1;
  transition: transform 0.2s ease;
}

.brand:link, .brand:visited, .brand:hover, .brand:active {
  opacity: 1;
  color: var(--green);
  text-decoration: none;
}

.brand:hover {
  transform: scale(1.04);
}

.brand-svg {
  height: 48px;
  width: auto;
  display: block;
  opacity: 1;
}

.brand:hover {
  background-size: 100% 0.09rem;
}

.nav-center {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-family: "JetBrains Mono", monospace;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.4rem 0.75rem;
  border-radius: 0.5rem;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}

.nav-tab svg {
  flex-shrink: 0;
}

.nav-tab:hover {
  color: var(--text);
  background: var(--surface);
}

.nav-tab-admin {
  color: var(--accent);
}
.nav-tab-admin:hover {
  color: var(--accent);
  background: rgba(88, 101, 242, 0.1);
}

.nav-login {
  color: var(--green);
}
.nav-login:hover {
  color: var(--green);
  background: rgba(87, 242, 135, 0.1);
}

.feed-search {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.feed-search-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.875rem;
  color: var(--text);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.875rem;
  padding: 0.625rem 0.875rem;
  outline: none;
  backdrop-filter: blur(8px);
  transition: border-color 0.25s, box-shadow 0.25s;
}

.feed-search-input:focus {
  border-color: var(--accent);
  box-shadow: var(--glow-accent);
}

.feed-search-input::placeholder {
  color: var(--text-muted);
}



.right-nav, .left-nav {
  display: flex;
  min-width: 18.75rem;
  max-width: 18.75rem;
  gap: 1rem;
}

.right-nav {
  justify-content: right;
}

.left-nav  {
  justify-content: left;
}

.nav-btn, .theme-toggle {
  width: 36px;
  height: 36px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.nav-btn:hover, .theme-toggle:hover {
  color: var(--text);
  border-color: var(--border-hover);
}

.nav-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--border);
  transition: border-color 0.2s, box-shadow 0.2s;
  flex-shrink: 0;
}

.nav-avatar:hover {
  border-color: var(--accent);
  box-shadow: var(--glow-accent);
}

.nav-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.theme-toggle:hover {
  box-shadow: var(--glow-accent);
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  cursor: pointer;
  padding: 8px;
  color: var(--text-muted);
  transition: color 0.2s, border-color 0.2s;
}

.hamburger:hover {
  color: var(--text);
  border-color: var(--border-hover);
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--green);
  border-radius: 1px;
  transition: transform 0.25s, opacity 0.25s;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 3.5rem;
  right: 0;
  width: 220px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 0 0 0 12px;
  box-shadow: var(--shadow-lg);
  z-index: 99;
  padding: 0.5rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
}

.mobile-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.mobile-menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  color: var(--text);
  text-decoration: none;
  font-size: 0.9375rem;
  font-family: "JetBrains Mono", monospace;
  transition: background 0.15s;
}

.mobile-menu-item:hover {
  background: var(--surface-hover);
}

.mobile-menu-item svg {
  color: var(--green);
  flex-shrink: 0;
}

[data-theme="dark"] .theme-icon-light { display: none; }
[data-theme="light"] .theme-icon-dark { display: none; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.45rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  font-family: "Inter", sans-serif;
  cursor: pointer;
  border: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.01em;
}

.btn-primary {
  background: var(--accent-grad);
  color: #fff;
  box-shadow: var(--glow-accent);
}

.btn-primary:hover {
  box-shadow: var(--glow-accent-hover);
  transform: translateY(-1px);
  filter: brightness(1.1);
}

.btn-primary:active {
  transform: translateY(0);
  filter: brightness(0.95);
}

.btn-success {
  background: transparent;
  color: var(--green);
  border: 1px solid var(--green-a25);
}

.btn-success:hover {
  background: var(--green-a08);
  border-color: var(--green);
  box-shadow: var(--glow-green);
}

.btn-danger {
  background: transparent;
  color: var(--red);
  border: 1px solid var(--red-a25);
}

.btn-danger:hover {
  background: var(--red-a08);
  border-color: var(--red);
}

.btn-cancel {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.45rem 1rem;
  font-size: 0.8125rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-cancel:hover {
  color: var(--text);
  border-color: var(--border-hover);
  background: var(--surface-hover);
}

.btn-save {
  background: var(--green-grad);
  color: #000;
  border: none;
  border-radius: 0.5rem;
  padding: 0.625rem 1.5rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
  box-shadow: var(--glow-green);
}

.btn-save:hover {
  filter: brightness(1.1);
  box-shadow: var(--glow-green), 0 0 20px rgba(87,242,135,0.2);
}

.btn-upload {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8125rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.btn-upload:hover {
  border-color: var(--green);
  color: var(--green);
  box-shadow: var(--glow-green);
}

.btn-icon {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  transition: color 0.15s;
}

.btn-icon:hover { 
  color: var(--text);
}

.btn-icon-danger:hover {
  color: var(--red);
}

main {
  display: flex;
  flex-direction: column;
  max-width: 112.5rem;
  margin: 0 auto;
  position: relative;
}

.main {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem 1.75rem;
  max-width: 100rem;
  margin: 0 auto;
  width: 100%;
  align-items: flex-start;
}

.left-side {
  min-width: 15rem;
  max-width: 20rem;
  flex: 1;
}

form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  gap: 0.5rem;
}

.form-control {
  width: 100%;
  padding: 0.625rem 0.875rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  color: var(--text);
  font-size: 0.875rem;
  font-family: "Inter", sans-serif;
  outline: none;
  backdrop-filter: blur(8px);
  transition: border-color 0.25s, box-shadow 0.25s;
}

.entry-select {
  position: relative;
}

.entry-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.625rem 0.875rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: border-color 0.2s;
}

.entry-select-trigger:hover {
  border-color: var(--accent2);
}

.entry-select.open .entry-select-trigger {
  border-color: var(--accent);
  border-radius: 0.5rem 0.5rem 0 0;
}

.entry-select-value {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8125rem;
  color: var(--text);
}

.entry-select-value.placeholder {
  color: var(--text-muted);
  opacity: 0.5;
}

.entry-select-options {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface-solid);
  border: 1px solid var(--accent);
  border-top: none;
  border-radius: 0 0 0.5rem 0.5rem;
  max-height: 11.25rem;
  overflow-y: auto;
  z-index: 9999;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(var(--glass-blur));
}

.entry-select.open .entry-select-options {
  display: block;
}

.entry-option {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 0.875rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8125rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.1s, color 0.1s;
}

.entry-option:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.entry-option.selected {
  color: var(--accent2);
  background: var(--accent-a10);
}

.entry-option-icon {
  display: inline-flex;
  flex-shrink: 0;
}

.entry-option-path {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-a12), var(--glow-accent);
}

textarea.form-control {
  resize: vertical;
  min-height: 5.625rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8125rem;
}

.form-box {
  display: flex;
  padding: 0.625rem 20vw;
}

.form {
  background-color: var(--surface);
  border-radius: 0.5rem;
  border: none;
  width: 100%;
  padding: 2.5rem;
}

.form-heading {
  font-family: "JetBrains Mono", monospace;
  font-weight: 200;
  letter-spacing: 0.125rem;
}

.form label {
  font-family: "JetBrains Mono", monospace;
  letter-spacing: 0.125rem;
}

.alert {
  border-radius: 0.375rem;
  padding: 0.45rem 0.7rem;
  font-size: 0.75rem;
  font-family: "Inter", sans-serif;
}

.alert-danger {
  background: var(--red-a06);
  border: 1px solid var(--red-a25);
  color: var(--red);
}

.auth-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 4rem);
  padding: 2rem 1rem;
}

.auth-card {
  width: 100%;
  max-width: 26rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 2.5rem;
  backdrop-filter: blur(var(--glass-blur));
  box-shadow: var(--shadow-lg);
  animation: fadeInUp 0.5s ease-out;
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-header svg {
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.auth-title {
  font-family: "JetBrains Mono", monospace;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.25rem 0;
}

.auth-subtitle {
  font-family: "Inter", sans-serif;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.auth-field label {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.auth-field .form-control {
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  border-radius: 0.625rem;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.auth-field .form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.15);
}

.field-error {
  font-size: 0.75rem;
  color: var(--red);
  font-family: "Inter", sans-serif;
}

.auth-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  cursor: pointer;
}

.auth-checkbox input[type="checkbox"] {
  accent-color: var(--accent);
  width: 1rem;
  height: 1rem;
}

.auth-submit {
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 0.625rem;
  margin-top: 0.5rem;
  cursor: pointer;
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-family: "Inter", sans-serif;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.auth-footer a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  margin-left: 0.25rem;
}

.auth-footer a:hover {
  text-decoration: underline;
}

select {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  font-family: "JetBrains Mono", monospace;
  color: var(--text);
  outline: none;
  width: 100%;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.875rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.status-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.3s, box-shadow 0.3s;
}

.status-dot.running {
  background: var(--yellow);
  box-shadow: 0 0 0.5rem var(--yellow-a50);
  animation: pulse 1s infinite;
}

.status-dot.done  {
  background: var(--green);
  box-shadow: 0 0 0.5rem var(--green-a50), var(--glow-green);
}

.status-dot.error { 
  background: var(--red);
  box-shadow: 0 0 0.5rem var(--red-a50);
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.editor-page {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: calc(100vh - 6.5rem);
  padding: 0.875rem;
  gap: 0.875rem;
}

.editor-layout {
  display: flex;
  gap: 0.875rem;
  flex: 1;
  min-height: 0;
}

.pane {
  flex: 2;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  overflow: hidden;
  backdrop-filter: blur(var(--glass-blur)) saturate(1.2);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.2);
  box-shadow: var(--shadow-md);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.pane:hover { 
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md), var(--glow-accent);
}

.pane-header {
  padding: 0.56rem 1rem;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.pane-header::before {
  content: "";
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: var(--border);
}

.CodeMirror {
  flex: 1;
  height: 100% !important;
  font-size: 0.84375rem;
  font-family: "JetBrains Mono", monospace;
  background: var(--surface) !important;
  line-height: 1.7;
}

[data-theme="light"] .CodeMirror {
  background: #fff !important;
  color: #2e3338;
}

[data-theme="light"] .CodeMirror-gutters {
  background: #f2f3f5;
  border-right: 1px solid #d4d6db;
}

[data-theme="light"] .CodeMirror-linenumber {
  color: #9a9ca5;
}

[data-theme="light"] #output {
  color: #2d7d46;
}

[data-theme="light"] #output:empty::before {
  color: #c4c6cc;
}

#output {
  flex: 1;
  padding: 1rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8125rem;
  white-space: pre-wrap;
  overflow-y: auto;
  color: var(--green);
  line-height: 1.7;
}

#output:empty::before {
  content: "// output will appear here";
  color: var(--border);
}

.toolbar {
  display: flex;
  gap: 0.5rem;
  padding: 0.625rem 0.875rem;
  border-top: 1px solid var(--border);
  background: var(--surface2);
  flex-shrink: 0;
}

#run-btn {
  padding: 0.5rem 1.25rem;
  background: var(--accent-grad);
  color: #fff;
  border: none;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.8125rem;
  font-family: "Inter", sans-serif;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--glow-accent);
}

#run-btn:hover {
  box-shadow: var(--glow-accent-hover);
  transform: translateY(-1px);
  filter: brightness(1.1);
}

#run-btn:active {
  transform: translateY(0);
}

#run-btn:disabled {
  background: var(--surface2-solid);
  color: var(--text-muted);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  filter: none;
}

#clear-btn {
  padding: 0.5rem 0.875rem;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  font-family: "Inter", sans-serif;
  cursor: pointer;
  transition: all 0.2s;
}

#clear-btn:hover {
  color: var(--text);
  border-color: var(--border-hover);
  background: var(--surface-hover);
}

.pane-tree {
  width: 15rem;
  min-width: 11.25rem;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  overflow: hidden;
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  box-shadow: var(--shadow-md);
}

.pane-tree .pane-header {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.pane-tree .pane-header .btn-icon:last-child {
  margin-left: auto;
}

.tree {
  flex: 1;
  overflow-y: auto;
  padding: 0.375rem;
}

.tree-node {
  user-select: none;
}

.tree-row {
  display: flex;
  align-items: center;
  padding: 0.3125rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.8125rem;
  font-family: "JetBrains Mono", monospace;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  gap: 0.25rem;
}

.tree-row:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.tree-row.active {
  background: var(--accent-a12);
  color: var(--accent2);
}

.tree-arrow {
  width: 0.875rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s;
}

.tree-icon {
  display: inline-flex;
  align-items: center;
}

.tree-name {
  overflow: hidden;
  text-overflow: ellipsis;
}

.tree-lang-badge {
  margin-left: auto;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.5625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--accent-a12);
  color: var(--accent2);
  white-space: nowrap;
  flex-shrink: 0;
}

.tree-dots {
  margin-left: 0.25rem;
  padding: 0.25rem;
  border: none;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 0.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s, background 0.15s;
  flex-shrink: 0;
}

.tree-row:hover .tree-dots,
.tree-row.active .tree-dots {
  opacity: 1;
}

.tree-dots:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.tree-actions {
  padding: 0.625rem;
  border-top: 1px solid var(--border);
}

.tree-actions .btn {
  width: 100%;
  text-align: center;
  font-size: 0.75rem;
}

.context-menu {
  display: none;
  position: fixed;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.25rem 0;
  z-index: 9999;
  min-width: 10rem;
  box-shadow: var(--shadow-lg);
}

.context-menu.show {
  display: block;
}

.context-item {
  padding: 0.45rem 0.875rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.1s;
}

.context-item:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.context-item[data-action="delete"] {
  color: var(--red);
}

.context-item[data-action="delete"]:hover {
  background: var(--red-a08);
  color: var(--red-hover);
}

.file-saved {
  font-size: 0.75rem;
  color: var(--green);
  margin-left: 0.5rem;
  opacity: 0;
  transition: opacity 0.3s;
}

.file-saved.show { 
  opacity: 1;
}

.lang-badge {
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  background: var(--accent-a12);
  color: var(--accent2);
  margin-left: 0.375rem;
  flex-shrink: 0;
}

.lang-badge:empty {
  display: none;
}

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--overlay);
  backdrop-filter: blur(0.5rem);
  z-index: 200;
  align-items: center;
  justify-content: center;
}

.modal-overlay.show { 
  display: flex;
}

.modal {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 2rem;
  width: 32.5rem;
  max-width: 90vw;
  max-height: 85vh;
  box-shadow: var(--shadow-xl);
  backdrop-filter: blur(var(--glass-blur));
}

.publish-left {
  flex: 1;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: visible;
}

.publish-left .form-group:last-of-type {
  flex-shrink: 0;
}

.publish-left .modal-actions {
  flex-shrink: 0;
}

.modal h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  color: var(--text);
}

.modal .form-group {
  margin-bottom: 0.875rem;
}

.modal .form-group label {
  display: flex;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.375rem;
}

.modal select.form-control {
  margin-bottom: 0.625rem;
}

.modal-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.file-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  max-height: 12.5rem;
  overflow-y: auto;
  padding: 0.25rem;
  flex-shrink: 0;
}

.publish-modal {
  display: flex;
  width: 50rem;
  max-width: 95vw;
  padding: 0;
  overflow: visible;
}

.publish-right {
  width: 21rem;
  min-width: 17.5rem;
  background: var(--surface);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  backdrop-filter: blur(8px);
}

.publish-preview-header {
  display: flex;
  align-items: center;
  padding: 0.875rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.publish-page {
  max-width: 40rem;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

.publish-page-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.publish-page-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
}

.publish-back-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  text-decoration: none;
  transition: background 0.15s;
}

.publish-back-btn:hover {
  background: var(--surface-hover);
}

.publish-page-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.publish-preview-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  overflow: hidden;
  max-height: 20rem;
  overflow-y: auto;
}

.publish-page-actions {
  margin-top: 1rem;
}

.publish-page-actions .btn-large {
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
}

.publish-preview-empty {
  padding: 1.5rem 1rem;
  color: var(--text-muted);
  font-size: 0.8125rem;
  text-align: center;
  opacity: 0.5;
}

.publish-preview-code {
  flex: 1;
  overflow-y: auto;
  padding: 0.875rem 1rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--text-muted);
  white-space: pre-wrap;
  word-break: break-word;
}

.publish-folder-label {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.5rem 0.375rem;
  border-radius: 0.375rem;
  transition: background 0.15s;
}

.publish-folder-label:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.publish-folder-icon {
  display: inline-flex;
  color: var(--accent2);
}

.publish-file-row {
  justify-content: space-between;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.publish-file-label {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  font-size: 0.8125rem;
  font-family: "JetBrains Mono", monospace;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.375rem;
  border-radius: 0.375rem;
  flex: 1;
  transition: background 0.15s;
}

.publish-file-label:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.publish-file-icon {
  display: inline-flex;
  color: var(--text-muted);
}

.publish-file-name {
  flex: 1;
}

.publish-preview-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  opacity: 0.4;
  transition: opacity 0.15s, background 0.15s;
}

.publish-preview-btn:hover {
  opacity: 1;
  background: var(--surface-hover);
}

.publish-preview-btn.active {
  opacity: 1;
  color: var(--accent2);
}

.custom-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 1.125rem;
  height: 1.125rem;
  border: 2px solid var(--border);
  border-radius: 0.25rem;
  background: var(--surface);
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: all 0.2s;
}

.custom-checkbox:checked {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 8px var(--accent-a25);
}

.custom-checkbox:checked::after {
  content: '';
  position: absolute;
  left: 0.3125rem;
  top: 0.125rem;
  width: 0.25rem;
  height: 0.5rem;
  border: solid var(--bg);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.custom-checkbox:hover {
  border-color: var(--accent2);
}

.feed {
  display: flex;
  flex-direction: column;
  flex: 2;
  max-width: 47.5rem;
  margin: 0 auto;
}

.feed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.feed-header h2 {
  font-size: 1.75rem;
  font-weight: 300;
  color: var(--text);
}

.feed-empty {
  text-align: center;
  padding: 3.75rem 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
  margin-bottom: 1.25rem;
  overflow: hidden;
  backdrop-filter: blur(var(--glass-blur)) saturate(1.2);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.2);
  box-shadow: var(--shadow-md);
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}

.post-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-lg), var(--glow-accent);
  transform: translateY(-2px);
}

.post-header {
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid var(--border);
}

.post-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.625rem;
  margin-bottom: 0.5rem;
}

.post-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.post-author {
  font-size: 0.8125rem;
  font-weight: 600;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.post-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.post-title {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.375rem;
  letter-spacing: -0.02rem;
}

.post-description {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.post-files {
  border-bottom: 1px solid var(--border);
}

.post-file {
  border-bottom: 1px solid var(--border);
}

.post-file:last-child {
  border-bottom: none;
}

.post-file-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  cursor: pointer;
  transition: background 0.2s;
  background: var(--surface2);
}

.post-file-header:hover {
  background: var(--surface-hover);
}

.file-name {
  font-size: 0.8125rem;
  font-family: "JetBrains Mono", monospace;
  color: var(--text-muted);
  flex: 1;
}

.file-toggle {
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
}

.post-file-body {
  display: none;
  max-height: 20rem;
}

.post-file-body.open {
  display: block;
}

.post-file-body .CodeMirror {
  height: 20rem !important;
  font-size: 0.8125rem;
}

.post-run-panel {
  padding: 0.875rem 1rem;
}

.post-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.625rem;
}

.post-output {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8125rem;
  color: var(--green);
  white-space: pre-wrap;
  min-height: 0;
  max-height: 12.5rem;
  overflow-y: auto;
  transition: min-height 0.2s;
}

.post-output:not(:empty) { 
  min-height: 3rem;
}

.stdin-input {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8125rem;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 0.5rem 0.5rem 0 0;
  padding: 0.5rem 0.75rem;
  resize: vertical;
  width: 100%;
  margin-top: 0.5rem;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  min-height: 0;
  transition: max-height 0.3s ease, opacity 0.25s ease, padding 0.3s ease, margin 0.3s ease;
  pointer-events: none;
}
.stdin-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(88, 101, 242, 0.25);
}
.post-run-panel:hover .stdin-input,
.stdin-input:focus {
  max-height: 10rem;
  opacity: 1;
  padding: 0.5rem 0.75rem;
  margin-top: 0.5rem;
  pointer-events: auto;
}
#mobile-pane-output .stdin-input {
  max-height: 10rem;
  opacity: 1;
  pointer-events: auto;
}

.right-side {
  margin-top: 3.375rem;
  position: sticky;
  top: 10rem;
  width: 20rem;
  min-width: 17.5rem;
  max-width: 22.5rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  gap: 1rem;
}

.sidebar-top-posts {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  backdrop-filter: blur(var(--glass-blur)) saturate(1.2);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.2);
  box-shadow: var(--shadow-md);
}

.sidebar-top-posts h3 {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.25rem;
}

.sidebar-top-post {
  padding: 0.625rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: var(--surface2);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.sidebar-top-post:hover {
  border-color: var(--border-hover);
  background: var(--surface-hover);
  box-shadow: var(--shadow-sm);
}

.sidebar-top-post h4 {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.comments-panel {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  overflow: hidden;
  height: calc(100dvh - 31.25rem);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.2);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.2);
  box-shadow: var(--shadow-md);
}

.comments-panel.hidden {
  display: none;
}

.comments-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.8125rem;
  font-weight: 600;
  flex-shrink: 0;
}

.comments-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 0.25rem;
  border-radius: 0.25rem;
  transition: color 180ms ease;
}

.comments-close-btn:hover {
  color: var(--text);
}

.comments-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding-bottom: 0.625rem;
}

.comment-item {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  margin: 0 0.625rem;
  margin-top: 0.625rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transition: border-color 0.2s;
}

.comment-item:hover {
  border-color: var(--border-hover);
}

.comment-author {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
}

.comment-author a {
  color: inherit;
  text-decoration: none;
}

.comment-author a:hover {
  text-decoration: underline;
}

.comment-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: 0.375rem;
  font-weight: 400;
}

.comment-text { 
  font-size: 0.875rem;
  color: var(--text);
  line-height: 1.5;
  word-break: break-word;
  overflow-wrap: break-word;
}

.comments-empty,
.comments-loading {
  color: var(--text-muted);
  font-size: 0.875rem;
  text-align: center;
  margin-top: 1.5rem;
}

.comments-input-area {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-shrink: 0;
}

.comments-input-area textarea {
  width: 100%;
  padding: 0.5rem 0.625rem;
  border-radius: 0.5rem;
  border: 1.5px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  font-family: inherit;
  font-size: 0.875rem;
  resize: none;
  transition: border-color 0.25s, box-shadow 0.25s;
  outline: none;
}

.comments-input-area textarea:focus { 
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--accent-a12);
}

.comments-auth-hint {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.comments-auth-hint a { 
  color: var(--primary);
}

.like-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.875rem;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  backdrop-filter: blur(8px);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.like-btn:hover {
  border-color: var(--red-border);
  color: var(--red);
  background: var(--red-bg);
  box-shadow: 0 0 12px rgba(237,66,69,0.1);
}

.like-btn.liked {
  border-color: var(--red-border);
  color: var(--red);
  background: var(--red-bg);
}

.heart-icon { 
  transition: all 0.18s ease; 
  flex-shrink: 0;
}

.like-btn.liked .heart-icon {
  fill: var(--red);
  stroke: var(--red);
}

@keyframes heartPop {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.6); }
  60%  { transform: scale(0.88); }
  100% { transform: scale(1); }
}

.like-btn.pop .heart-icon {
  animation: heartPop 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.count-wrap { 
  overflow: hidden;
  height: 1.2em;
  display: flex;
  align-items: center;
}

.like-count { 
  display: inline-block;
}

@keyframes slideUp   { 
  from {
    transform: translateY(65%); 
    opacity: 0;
  } to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideDown {
  from {
    transform: translateY(-65%);
    opacity: 0;
  } to {
    transform: translateY(0);
    opacity: 1;
  }
}

.like-count.anim-up   {
  animation: slideUp 0.22s ease forwards;
}

.like-count.anim-down {
  animation: slideDown 0.22s ease forwards;
}

.comment-open-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.25s ease;
}

.comment-open-btn:hover {
  border-color: var(--border-hover);
  color: var(--text);
  background: var(--surface-hover);
}

.profile-page {
  max-width: 62rem;
  width: 100%;
  margin: 1rem auto 0 auto;
  padding: 0 1.75rem 3rem;
}

.profile-banner {
  height: 7.5rem;
  border-radius: 0.875rem 0.875rem 0 0;
  overflow: hidden;
  position: relative;
}
.profile-banner-inner {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 50%, var(--green) 100%);
  opacity: 0.25;
}

.profile-header {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  padding: 0 1.5rem;
  margin-top: -3rem;
  position: relative;
  z-index: 1;
}

.profile-avatar-wrap {
  flex-shrink: 0;
}
.profile-avatar-img {
  width: 7rem;
  height: 7rem;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--bg);
  box-shadow: var(--shadow-md);
}

.profile-header-info {
  flex: 1;
  min-width: 0;
  padding-top: 3.25rem;
}
.profile-name {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}
.profile-username {
  font-size: 0.9375rem;
  color: var(--text-muted);
  font-family: "JetBrains Mono", monospace;
  display: block;
  margin-top: 0.125rem;
}
.profile-bio {
  font-size: 0.9375rem;
  color: var(--text);
  margin-top: 0.625rem;
  line-height: 1.5;
}

.profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.75rem;
}
.profile-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-family: "JetBrains Mono", monospace;
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.profile-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-decoration: none;
  font-family: "JetBrains Mono", monospace;
  transition: color 0.2s;
}
.profile-link:hover { color: var(--accent); }

.profile-header-stats {
  display: flex;
  gap: 1.5rem;
  padding-top: 3.75rem;
  flex-shrink: 0;
}
.profile-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.125rem;
}
.profile-stat-num {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}
.profile-stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: "JetBrains Mono", monospace;
}

.profile-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-top: 1.5rem;
  padding: 0 1.5rem;
  position: relative;
}
.profile-tab-item {
  flex: 1;
  text-align: center;
  padding: 0.75rem 1.25rem;
  font-size: 0.875rem;
  font-family: "JetBrains Mono", monospace;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.2s;
}
.profile-tab-item:hover { color: var(--text); }
.profile-tab-item.active {
  color: var(--text);
  font-weight: 600;
}
.profile-tab-indicator {
  position: absolute;
  bottom: -1px;
  height: 2px;
  background: var(--accent);
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 2px 2px 0 0;
}

.profile-tab-content {
  padding: 1.5rem;
  animation: tabFadeIn 0.3s ease;
}
.profile-tab-content.hidden { display: none; }

@keyframes tabFadeIn {
  from { opacity: 0; transform: translateY(0.5rem); }
  to { opacity: 1; transform: translateY(0); }
}

.profile-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  gap: 1rem;
}
.profile-post-card {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding: 1.125rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.625rem;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, transform 0.2s;
  backdrop-filter: blur(var(--glass-blur));
}
.profile-post-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}
.profile-post-card h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.3;
}
.profile-post-card p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.profile-post-meta {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: "JetBrains Mono", monospace;
  margin-top: auto;
  padding-top: 0.5rem;
}
.profile-post-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.profile-private,
.profile-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 3rem 1rem;
  text-align: center;
  color: var(--text-muted);
}
.profile-private h2,
.profile-empty h3 {
  color: var(--text);
  font-size: 1.125rem;
}
.profile-private p,
.profile-empty p {
  font-size: 0.875rem;
}

.settings-layout {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}
.settings-nav {
  display: flex;
  flex-direction: column;
  min-width: 10rem;
  background: var(--surface);
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid var(--border);
  backdrop-filter: blur(var(--glass-blur));
  box-shadow: var(--shadow-sm);
}
.settings-nav-item {
  padding: 0.75rem 1rem;
  font-size: 0.8125rem;
  font-family: "JetBrains Mono", monospace;
  color: var(--text-muted);
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: background 0.2s, color 0.2s;
}
.settings-nav-item:hover {
  background: var(--surface-hover);
  color: var(--text);
}
.settings-nav-item.active {
  color: var(--accent);
  border-left-color: var(--accent);
  background: var(--surface-hover);
  font-weight: 600;
}

.settings-body {
  flex: 1;
  min-width: 0;
}
.settings-section {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  background: var(--surface);
  border-radius: 0.75rem;
  padding: 1.75rem;
  border: 1px solid var(--border);
  backdrop-filter: blur(var(--glass-blur));
  box-shadow: var(--shadow-sm);
}
.settings-section.hidden { display: none; }

.settings-title {
  font-size: 1rem;
  font-family: "JetBrains Mono", monospace;
  color: var(--text);
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.profile-avatar-edit {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.profile-avatar-edit img {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}

.profile-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.profile-field label {
  font-size: 0.75rem;
  font-family: "JetBrains Mono", monospace;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03rem;
}
.profile-field input,
.profile-field textarea,
.profile-field select {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  font-family: "JetBrains Mono", monospace;
  color: var(--text);
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.profile-field input:focus,
.profile-field textarea:focus,
.profile-field select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
}
.profile-field textarea {
  resize: vertical;
  min-height: 5.625rem;
}

.danger-zone {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  margin-top: 0.5rem;
}
.danger-zone h3 {
  font-size: 0.9375rem;
  font-family: "JetBrains Mono", monospace;
  color: var(--red);
  margin-bottom: 0.5rem;
}
.danger-zone p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.section-title {
  font-size: 0.875rem;
  font-family: "JetBrains Mono", monospace;
  color: var(--text);
}

.section-divider {
  border: none;
  border-top: 1px solid var(--border);
}

.avatar-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.375rem;
}

.hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: "JetBrains Mono", monospace;
}

.input-prefix {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  overflow: hidden;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.input-prefix:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
}
.input-prefix span {
  padding: 0.625rem 0.75rem;
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-family: "JetBrains Mono", monospace;
  border-right: 1px solid var(--border);
  white-space: nowrap;
}
.input-prefix input {
  border: none;
  border-radius: 0;
  flex: 1;
  background: transparent;
  color: var(--text);
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  font-family: "JetBrains Mono", monospace;
  outline: none;
}
.input-prefix input:focus { border-color: transparent; }

.profile-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--border);
}
.profile-toggle div span {
  font-size: 0.875rem;
  font-family: "JetBrains Mono", monospace;
  color: var(--text);
}
.profile-toggle div p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.profile-message {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--accent);
  color: var(--text);
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.875rem;
  box-shadow: var(--shadow-lg);
  z-index: 100;
}

.toggle {
  position: relative;
  display: inline-block;
  width: 2.75rem;
  height: 1.5rem;
  flex-shrink: 0;
}
.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 1.5rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 1.125rem;
  height: 1.125rem;
  left: 0.1875rem;
  top: 0.1875rem;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.pagination{
  display: flex;
  justify-content: space-between;
}

.toggle input:checked + .toggle-slider {
  background: var(--green);
  box-shadow: var(--glow-green);
}

.toggle input:checked + .toggle-slider::before {
  transform: translateX(1.25rem);
}

::-webkit-scrollbar { 
  width: 0.375rem;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--surface2);
  border-radius: 0.1875rem;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border);
}

#comments-title{
  font-size: 1rem;
  font-family: "JetBrains Mono";
  font-weight: 300;
}

.comment-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 0.875rem 1rem;
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  backdrop-filter: blur(var(--glass-blur));
  box-shadow: var(--shadow-md);
}

.comment-form textarea {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  color: var(--text);
  font-family: inherit;
  font-size: 0.875rem;
  padding: 0.625rem;
  resize: vertical;
  outline: none;
  transition: border-color 0.25s;
}

.comment-form textarea:focus {
  border-color: var(--accent);
}

#comments-list {
  margin-top: 0.5rem;
}

#comments-list .comment-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 0.875rem 1rem;
  margin-top: 0.5rem;
}

@keyframes commentSlideIn {
  from {
    opacity: 0;
    transform: translateY(0.75rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.comment-appear {
  animation: commentSlideIn 0.3s ease forwards;
  opacity: 0;
}

.landing {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.75rem;
}

.hero {
  display: flex;
  align-items: center;
  gap: 3rem;
  min-height: calc(100vh - 5rem);
  padding: 2rem 0;
  position: relative;
}



.hero-content {
  flex: 1;
  min-width: 0;
}

.hero-title {
  font-size: 4rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--text) 40%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1.25rem;
}

.hero-sub {
  font-size: 1.125rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 30rem;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

.btn-large {
  padding: 0.75rem 1.75rem;
  font-size: 0.9375rem;
  border-radius: 0.625rem;
}

.hero-stats {
  display: flex;
  gap: 2rem;
}

.hero-stat {
  display: flex;
  flex-direction: column;
}

.hero-stat-num {
  font-size: 1.75rem;
  font-weight: 700;
  font-family: "JetBrains Mono", monospace;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-stat-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-code {
  flex: 1.2;
  min-width: 0;
  max-width: 42rem;
}

.hero-code-window {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.875rem;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(var(--glass-blur));
}

.hero-code-dots {
  display: flex;
  gap: 0.375rem;
  padding: 0.75rem 1rem;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
}

.hero-code-dots span {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
}

.hero-code-dots span:nth-child(1) { background: #ed4245; }
.hero-code-dots span:nth-child(2) { background: #fee75c; }
.hero-code-dots span:nth-child(3) { background: #57f287; }

.hero-code-content {
  padding: 1rem 1.25rem;
  padding-bottom: 3rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  line-height: 1.65;
  color: var(--text-muted);
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 32rem;
  overflow: hidden;
  position: relative;
}
.hero-code-content::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 6rem;
  background: linear-gradient(transparent, var(--surface));
  pointer-events: none;
}

.hero-code-keyword { color: var(--accent2); font-weight: 600; }
.hero-code-func { color: var(--green); }
.hero-code-num { color: var(--yellow); }

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1.25rem;
  padding: 4rem 0;
}

.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.875rem;
  padding: 1.75rem;
  backdrop-filter: blur(var(--glass-blur));
  box-shadow: var(--shadow-md);
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}

.feature:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md), var(--glow-accent);
  transform: translateY(-4px);
}

.feature-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.625rem;
  background: var(--accent-a10);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 1rem;
}

.feature h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.feature p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.landing-posts {
  padding: 2rem 0 4rem;
}

.landing-section-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1.25rem;
}

.landing-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 1rem;
}

.landing-post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  backdrop-filter: blur(var(--glass-blur));
  box-shadow: var(--shadow-md);
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}

.landing-post-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-lg), var(--glow-accent);
  transform: translateY(-3px);
}

.landing-post-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.landing-post-card h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
}

.landing-post-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.notification-wrap {
  position: relative;
}

.notification-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--red);
  color: #fff;
  font-size: 0.625rem;
  font-weight: 700;
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 1;
  pointer-events: none;
  animation: notifBadgePop 0.3s ease;
}

@keyframes notifBadgePop {
  0% { transform: scale(0); }
  60% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.notification-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 340px;
  max-height: 420px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
  z-index: 100;
  overflow: hidden;
}

.notification-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.notification-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 0.875rem;
}

.notification-mark-all {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 0.75rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s;
}

.notification-mark-all:hover {
  background: var(--accent-a06);
}

.notification-list {
  overflow-y: auto;
  max-height: 360px;
  padding: 4px 0;
}

.notification-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.15s;
  animation: fadeInUp 0.25s ease both;
}

.notification-item:hover {
  background: var(--surface-hover);
}

.notification-item.unread {
  background: var(--accent-a06);
}

.notification-item.unread:hover {
  background: var(--accent-a10);
}

.notification-icon {
  flex-shrink: 0;
  font-size: 1rem;
  line-height: 1;
  margin-top: 2px;
}

.notification-text {
  flex: 1;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--text);
  min-width: 0;
}

.notification-text b {
  font-weight: 600;
}

.notification-date {
  flex-shrink: 0;
  font-size: 0.6875rem;
  color: var(--text-muted);
  white-space: nowrap;
  margin-top: 2px;
}

.notification-empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.notification-dropdown .notification-item {
  animation: none;
}

.notification-friend-actions {
  display: flex;
  gap: 0.375rem;
  margin-top: 0.375rem;
}

.profile-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  padding-top: 3.75rem;
}

.btn-small {
  padding: 0.3rem 0.75rem;
  font-size: 0.75rem;
}

.btn-friend {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  font-family: "JetBrains Mono", monospace;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.btn-primary-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.btn-primary-outline:hover {
  background: rgba(88, 101, 242, 0.08);
  box-shadow: var(--glow-accent);
  transform: translateY(-1px);
}

.btn-pending {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  cursor: default;
}

.btn-pending:hover {
  border-color: var(--border-hover);
}

.btn-accepted {
  background: rgba(87, 242, 135, 0.08);
  color: var(--green);
  border: 1px solid rgba(87, 242, 135, 0.25);
}

.btn-accepted:hover {
  background: rgba(87, 242, 135, 0.15);
  border-color: var(--green);
  box-shadow: var(--glow-green);
}

.friend-request-actions {
  display: flex;
  gap: 0.375rem;
  padding-top: 3.75rem;
  flex-shrink: 0;
}

.friends-section-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  margin: 1rem 0 0.75rem;
  padding: 0 1.5rem;
}

.friends-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
  padding: 0 1.5rem;
}

.friend-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 0.625rem;
  background: var(--surface);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: all 0.2s;
}

.friend-card:hover {
  border-color: var(--border-hover);
  background: var(--surface-hover);
  transform: translateY(-1px);
}

.friend-request-card {
  background: var(--surface);
}

.friend-request-card:hover {
  transform: none;
}

.friend-request-btns {
  display: flex;
  gap: 0.375rem;
  margin-left: auto;
  flex-shrink: 0;
}

.friend-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.friend-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.friend-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.friend-username {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: "JetBrains Mono", monospace;
}

@media (prefers-reduced-motion: reduce) {
  .notification-badge,
  .notification-dropdown,
  .notification-item {
    animation: none !important;
    transition: none !important;
  }
}

.chat-page {
  display: flex;
  height: calc(100dvh - 3.5rem);
  overflow: hidden;
}

.chat-list {
  width: 22rem;
  flex-shrink: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--surface-solid);
  border-right: 1px solid var(--border);
}

.chat-list-header {
  padding: 1rem 1.25rem 0.75rem;
  font-size: 1.125rem;
  font-weight: 700;
  font-family: "JetBrains Mono", monospace;
  color: var(--text);
}

.chat-list-body {
  flex: 1;
  overflow-y: auto;
}

.chat-conv-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  text-decoration: none;
  color: var(--text);
  transition: background 0.15s;
  position: relative;
}

.chat-conv-item:hover {
  background: var(--surface-hover);
}

.chat-conv-item.active {
  background: var(--accent-a06);
}

.chat-conv-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: var(--accent);
}

.chat-conv-avatar {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--surface2-solid);
}

.chat-conv-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-conv-info {
  flex: 1;
  min-width: 0;
}

.chat-conv-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.chat-conv-name {
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-conv-time {
  font-size: 0.6875rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.chat-conv-preview {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 0.125rem;
}

.chat-conv-preview-empty {
  font-style: italic;
}

.chat-conv-unread {
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.375rem;
  border-radius: 0.625rem;
  background: var(--accent);
  color: #fff;
  font-size: 0.625rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chat-empty {
  padding: 4rem 1rem;
  text-align: center;
  color: var(--text-muted);
}

.chat-empty svg {
  margin-bottom: 1rem;
}

.chat-empty p {
  font-size: 0.875rem;
}

.chat-chat {
  flex: 1;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.chat-chat-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface-solid);
}

.chat-back-btn {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  text-decoration: none;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}

.chat-back-btn:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.chat-chat-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text);
  flex: 1;
  min-width: 0;
  padding: 0.25rem 0.5rem;
  border-radius: 0.5rem;
  transition: background 0.15s;
}

.chat-chat-user:hover {
  background: var(--surface-hover);
}

.chat-chat-avatar {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface2-solid);
}

.chat-chat-name {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
}

.chat-chat-username {
  display: block;
  font-size: 0.6875rem;
  color: var(--text-muted);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.chat-msg {
  max-width: 65%;
  animation: fadeInUp 0.15s ease;
}

.chat-msg.own {
  align-self: flex-end;
}

.chat-msg-bubble {
  padding: 0.5rem 0.875rem;
  border-radius: 1.125rem;
  font-size: 0.875rem;
  line-height: 1.4;
  word-break: break-word;
  background: var(--surface);
  border: 1px solid var(--border);
  width: fit-content;
  position: relative;
}

.chat-msg.own .chat-msg-bubble {
  background: var(--accent);
  border-color: transparent;
  color: #fff;
}

.chat-msg:not(.own) .chat-msg-bubble {
  border-top-left-radius: 0.25rem;
}

.chat-msg.own .chat-msg-bubble {
  border-top-right-radius: 0.25rem;
}

.chat-msg-bubble p {
  margin: 0;
}

.chat-msg-meta {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 0.125rem;
  padding: 0 0.25rem;
}

.chat-msg.own .chat-msg-meta {
  justify-content: flex-end;
}

.chat-msg-time {
  font-size: 0.5625rem;
  color: var(--text-muted);
}

.chat-msg.own .chat-msg-time {
  color: rgba(255,255,255,0.5);
}

.chat-msg-read {
  display: inline-flex;
  align-items: center;
  color: rgba(255,255,255,0.7);
}

.chat-msg-read.chat-msg-sent {
  color: rgba(255,255,255,0.4);
}

.chat-msg-read svg {
  display: block;
}

.chat-no-messages {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.875rem;
  gap: 0.75rem;
}

.chat-no-chat {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: var(--text-muted);
}

.chat-no-chat h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
}

.chat-no-chat p {
  font-size: 0.8125rem;
}

.chat-input-bar {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
  background: var(--surface-solid);
}

.chat-input-bar input {
  flex: 1;
  padding: 0.625rem 1rem;
  border-radius: 1.375rem;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.chat-input-bar input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-a25);
}

#chat-send-btn {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, transform 0.15s, opacity 0.15s;
  opacity: 0.5;
}

#chat-send-btn.active {
  opacity: 1;
}

#chat-send-btn:hover {
  background: var(--accent2);
  transform: scale(1.08);
}

.mobile-tab-bar {
  display: none;
}

.mobile-fab-run {
  display: none;
}

@media (max-width: 768px) {
  nav {
    padding: 0 0.5rem;
    gap: 0.25rem;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: var(--surface-solid);
  }
  .left-nav, .right-nav {
    min-width: 0;
    max-width: none;
    flex: 0 1 auto;
    gap: 0.375rem;
  }
  .brand-svg {
    height: 42px;
    width: auto;
  }
  .nav-center {
    display: none;
  }
  .nav-center {
    display: none;
  }
  .hamburger {
    display: flex;
  }
  .nav-avatar {
    display: none;
  }
  .mobile-menu {
    display: block;
  }
  .notification-dropdown {
    position: fixed;
    width: calc(100vw - 1rem);
    left: 0.5rem;
    top: 3.75rem;
    right: auto;
  }
  .notification-dropdown.show {
    transform: translateY(0);
  }

  .main {
    flex-direction: column;
    padding: 0.5rem;
  }
  .left-side {
    display: none;
  }
  .feed {
    max-width: 100%;
  }
  .right-side {
    width: 100%;
    min-width: 0;
    max-width: none;
    position: static;
    margin-top: 0.75rem;
  }
  .comments-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    max-height: none;
    height: 65dvh;
    background: var(--surface-solid);
    border-radius: 1rem 1rem 0 0;
    border: none;
    animation: commentsSlideUp 0.25s ease;
  }
  .comments-panel.hidden {
    display: none;
  }
  .comments-overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 199;
    background: rgba(0,0,0,0.5);
  }
  .comments-overlay.hidden {
    display: none;
  }
  @keyframes commentsSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }

  .editor-page {
    height: calc(100dvh - 3.5rem - 3.25rem);
    padding: 0;
    padding-bottom: 0;
  }
  .editor-layout {
    flex-direction: column;
  }
  .pane-tree,
  #mobile-pane-editor,
  #mobile-pane-output {
    width: 100%;
    min-width: 0;
    min-height: 0;
    flex: 1;
    max-height: none;
    border-right: none;
    border-bottom: none;
    border-radius: 0;
  }
  .mobile-pane-hidden {
    display: none !important;
  }
  .pane {
    flex: 1;
    min-height: 0;
    border-radius: 0;
  }
  .status {
    display: none;
  }
  .toolbar {
    display: none;
  }
  .mobile-tab-bar {
    display: flex;
    align-items: center;
    height: 3.25rem;
    background: var(--surface-solid);
    border-top: 1px solid var(--border);
    padding: 0 0.5rem;
    gap: 0;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
  }
  .mobile-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.625rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.375rem 0;
    transition: color 0.15s;
  }
  .mobile-tab.active {
    color: var(--accent);
  }
  .mobile-tab svg {
    flex-shrink: 0;
  }
  .mobile-fab-run {
    position: fixed;
    bottom: 4.5rem;
    right: 1.25rem;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--accent-grad);
    color: #fff;
    border: none;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--glow-accent), 0 4px 12px rgba(0,0,0,0.3);
    z-index: 101;
    transition: transform 0.15s;
  }
  .mobile-fab-run:active {
    transform: scale(0.9);
  }
  .post-file-body.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
    max-height: none;
    background: var(--surface-solid);
    overflow: hidden;
    padding: 0;
  }
  .post-file-body.open .CodeMirror {
    height: 100% !important;
  }
  .post-file-body.open .mobile-file-bar {
    display: flex;
  }
  .post-file-body.open .CodeMirror {
    height: 100% !important;
  }
  .mobile-file-bar {
    display: none;
    align-items: center;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border);
    background: var(--surface-solid);
    flex-shrink: 0;
    gap: 0.5rem;
  }
  .mobile-file-bar-name {
    flex: 1;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: "JetBrains Mono", monospace;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .mobile-file-bar-close {
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
  }
  .mobile-file-bar-close:active {
    color: var(--text);
    background: var(--surface-hover);
  }
  .tree-dots {
    opacity: 1;
  }
  .context-menu {
    border-radius: 0.75rem;
    padding: 0.375rem 0;
    min-width: 11rem;
  }
  .context-menu.show {
    display: block;
  }
  .context-item {
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
  }
  .tree-lang-badge {
    margin-left: auto;
  }
  .publish-modal {
    flex-direction: column;
    width: 100vw;
    max-width: 100vw;
    max-height: 100dvh;
    height: 100dvh;
    border-radius: 0;
  }
  .publish-right {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 300;
    background: var(--surface-solid);
    flex-direction: column;
    width: 100%;
    max-width: 100vw;
    border-left: none;
    backdrop-filter: none;
  }
  .publish-right.mobile-preview-open {
    display: flex;
  }
  .mobile-preview-close {
    margin-left: auto;
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    color: var(--text-muted);
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
  }
  .mobile-preview-close:active {
    color: var(--text);
    background: var(--surface-hover);
  }
  .publish-preview-header {
    display: flex;
    align-items: center;
  }
  .publish-left {
    padding: 1.25rem;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
  }
  .modal-overlay.show {
    align-items: stretch;
    padding: 0;
  }
  .modal {
    width: 100vw;
    max-width: 100vw;
    max-height: 100dvh;
    height: 100dvh;
    border-radius: 0;
    padding: 1.25rem;
  }

  .hero {
    flex-direction: column;
    gap: 1.5rem;
    min-height: auto;
    padding: 1.5rem 0;
  }
  .hero-title {
    font-size: 2rem;
  }
  .hero-code {
    max-width: 100%;
    order: 2;
  }
  .hero-code-content {
    max-height: 16rem;
    padding-bottom: 2rem;
  }
  .hero-code-content::after {
    height: 3rem;
  }
  .hero-actions {
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
  }
  .hero-actions .btn-large {
    width: 100%;
    text-align: center;
  }
  .hero-stats {
    gap: 1.25rem;
    justify-content: center;
  }
  .hero-stat-num {
    font-size: 1.25rem;
  }
  .features {
    padding: 2rem 0;
  }
  .landing {
    padding: 0 0.75rem;
  }
  .landing-posts {
    padding: 1rem 0 2rem;
  }

  .profile-page {
    padding: 0 0.5rem 2rem;
  }
  .profile-banner {
    height: 4rem;
  }
  .profile-header {
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0 0.5rem;
    margin-top: -2rem;
  }
  .profile-avatar-img {
    width: 4.5rem;
    height: 4.5rem;
  }
  .profile-avatar-wrap {
    width: 4.5rem;
    height: 4.5rem;
  }
  .profile-header-info {
    padding-top: 0;
    flex: 1 1 calc(100% - 5.5rem);
  }
  .profile-name {
    font-size: 1.125rem;
  }
  .profile-header-stats {
    padding-top: 0;
    width: 100%;
    justify-content: center;
    flex-shrink: 1;
  }
  .profile-message-btn {
    width: 100%;
    text-align: center;
  }
  .profile-actions {
    width: 100%;
    flex-wrap: wrap;
    padding-top: 0;
    gap: 0.5rem;
  }
  .profile-actions .btn-friend,
  .profile-actions .profile-message-btn {
    flex: 1;
    justify-content: center;
    min-width: 0;
  }
  .friend-request-actions {
    width: 100%;
    padding-top: 0;
    justify-content: center;
  }
  .friends-grid {
    grid-template-columns: 1fr;
    padding: 0 0.5rem;
  }
  .friends-section-title {
    padding: 0 0.5rem;
  }
  .profile-tabs {
    padding: 0 0.25rem;
  }
  .profile-tab-item {
    padding: 0.5rem 0.625rem;
    font-size: 0.8125rem;
  }
  .settings-layout {
    flex-direction: column;
  }
  .settings-nav {
    min-width: 0;
    width: 100%;
    flex-direction: row;
    border-left: none;
    border-bottom: 2px solid var(--border);
    overflow-x: auto;
  }
  .settings-nav-item {
    border-left: none;
    border-bottom: 2px solid transparent;
    padding: 0.625rem 0.875rem;
    white-space: nowrap;
  }
  .settings-nav-item.active {
    border-left: none;
    border-bottom-color: var(--accent);
  }
  .settings-section {
    padding: 1rem;
  }
  .profile-posts-grid {
    grid-template-columns: 1fr;
  }

  .publish-modal {
    flex-direction: column;
    width: 95vw;
  }
  .publish-right {
    width: 100%;
    min-width: 0;
    border-left: none;
    border-top: 1px solid var(--border);
    max-height: 25dvh;
  }
  .publish-left {
    padding: 1rem;
  }
  .modal {
    width: 95vw;
    padding: 1rem;
  }

  .form-box {
    padding: 0.5rem 0.75rem;
  }
  .form {
    padding: 1rem;
  }

  .post-header {
    padding: 0.75rem;
  }
  .post-meta {
    flex-wrap: wrap;
    gap: 0.375rem;
  }
  .post-toolbar {
    flex-wrap: wrap;
    gap: 0.375rem;
  }

  .chat-msg {
    max-width: 85%;
  }
  .chat-messages {
    padding: 0.75rem;
  }
  .chat-input-bar {
    padding: 0.5rem 0.5rem;
  }
  .chat-page {
    flex-direction: column;
  }
  .chat-list {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .chat-list.chat-mobile-hidden {
    display: none !important;
  }
  .chat-chat.chat-mobile-hidden {
    display: none !important;
  }
  .chat-back-btn {
    display: flex;
  }

  .feed-header h2 {
    font-size: 1.25rem;
  }
  .feed-empty {
    padding: 2rem 0;
  }
  .pagination {
    gap: 0.5rem;
  }
}

@media (max-width: 480px) {
  .brand-svg {
    height: 36px;
  }
  .mobile-menu {
    width: 180px;
  }
  .mobile-menu-item {
    padding: 0.625rem 1rem;
    font-size: 0.8125rem;
  }
  .chat-conv-avatar {
    width: 40px;
    height: 40px;
  }
  .chat-msg-bubble {
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
  }
}

.admin-page {
  display: flex;
  gap: 1.5rem;
  min-width: 72rem;
  margin: 0 auto;
  padding: 1.5rem;
}
.admin-sidebar {
  min-width: 10rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.admin-nav-item {
  padding: 0.625rem 1rem;
  font-size: 0.8125rem;
  font-family: "JetBrains Mono", monospace;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 0.5rem;
  transition: background 0.2s, color 0.2s;
}
.admin-nav-item:hover {
  background: var(--surface-hover);
  color: var(--text);
}
.admin-nav-item.active {
  background: var(--surface-hover);
  color: var(--accent);
  font-weight: 600;
}
.admin-body {
  flex: 1;
  min-width: 0;
}
.admin-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.5rem;
}
.admin-stats {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}
.admin-stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  min-width: 8rem;
  backdrop-filter: blur(var(--glass-blur));
}
.admin-stat-num {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}
.admin-stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: "JetBrains Mono", monospace;
}
.admin-section {
  margin-bottom: 2rem;
}
.admin-section h2 {
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 0.75rem;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
  font-family: "JetBrains Mono", monospace;
}
.admin-table th {
  text-align: left;
  padding: 0.625rem 0.75rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  font-size: 0.6875rem;
  letter-spacing: 0.05rem;
}
.admin-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.admin-table tr:hover td {
  background: var(--surface-hover);
}
.admin-table a {
  color: var(--accent);
  text-decoration: none;
}
.admin-table a:hover {
  text-decoration: underline;
}
.admin-search {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.admin-search input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  color: var(--text);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8125rem;
  outline: none;
}
.admin-search input:focus {
  border-color: var(--accent);
}
.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.6875rem;
}
.admin-pagination {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-family: "JetBrains Mono", monospace;
}