
/* === Таблицы === */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 2em 0;
  background: var(--overlay);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.25);
  position: relative;
  table-layout: fixed;
  backdrop-filter: blur(var(--blur));
  border: 1px solid rgba(255, 255, 255, 0.05);
}

body.theme-nocturne table {
  border: 1px dashed var(--highlight);
  background-color: rgba(20, 20, 24, 0.5);
  box-shadow: 0 0 8px rgba(100, 90, 70, 0.15);
}

table th {
  position: sticky;
  position: -webkit-sticky;
  top: 0;
  background: var(--subtle);
  z-index: 2;
  color: var(--highlight);
  font-weight: 500;
  text-align: left;
  font-size: 0.95em;
  letter-spacing: 0.05em;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

th, td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--subtle);
  vertical-align: top;
}

tr:nth-child(even) {
  background-color: rgba(49, 50, 68, 0.1);
}

tr:hover {
  background-color: rgba(250, 179, 135, 0.1);
  transition: background 0.3s ease;
}

td:nth-child(1) { width: 30%; text-align: left; }
td:nth-child(2) { width: 50%; text-align: left; }
td:nth-child(3) { width: 20%; text-align: right; color: var(--green); font-weight: 500; }

a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--highlight);
  text-decoration: underline;
}

strong {
  color: var(--accent);
  font-weight: 600;
}

em {
  color: var(--green);
  font-style: italic;
}

code {
  background: var(--subtle);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: 'Fira Code', monospace;
  color: var(--blue);
}

ul, ol {
  margin: 1.5em 0;
  padding-left: 1.5em;
}

li::marker {
  color: var(--highlight);
}

.table-wrapper {
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  position: relative;
  border-radius: 10px;
}

/* === Адаптивность === */
@media (max-width: 640px) {
  th, td {
    padding: 10px 14px;
    vertical-align: top;
    font-size: 0.95em;
  }

  th:nth-child(1), td:nth-child(1) {
    text-align: left;
  }

  th:nth-child(2), td:nth-child(2) {
    text-align: left;
  }

  th:nth-child(3), td:nth-child(3) {
    text-align: right;
  }
}

/* === Переключатель темы === */
.theme-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  background: var(--subtle);
  border: none;
  color: var(--text);
  font-family: inherit;
  padding: 0.5em 1em;
  font-size: 0.9em;
  cursor: pointer;
  border-radius: 6px;
  box-shadow: 0 0 8px rgba(0,0,0,0.3);
  z-index: 999;
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  background: var(--highlight);
  color: #000;
\}
