:root {
  --chart-bg: #070b08;
  --chart-grid: #1b251d;
  --chart-line: #5fd286;
}

html[data-theme="glass"] {
  color-scheme: dark;
  --bg: #05070a;
  --ink: #f6fbff;
  --text: #f6fbff;
  --muted: rgba(226, 235, 242, 0.76);
  --line: rgba(255, 255, 255, 0.22);
  --panel: rgba(230, 237, 244, 0.12);
  --panel-strong: rgba(232, 239, 246, 0.18);
  --panel-2: rgba(232, 239, 246, 0.2);
  --green: #9fffd1;
  --green-strong: rgba(159, 255, 209, 0.86);
  --lime: #b7f38a;
  --amber: #ffd37a;
  --stone: #e7f1fa;
  --blue: #9ed8ff;
  --accent: #8df8c5;
  --red: #ffaaa6;
  --danger: #ff8585;
  --shadow: rgba(0, 0, 0, 0.38);
  --chart-bg: rgba(6, 10, 16, 0.36);
  --chart-grid: rgba(255, 255, 255, 0.16);
  --chart-line: #9fffd1;
}

html[data-theme="glass"] body {
  background:
    linear-gradient(180deg, rgba(5, 8, 12, 0.64), rgba(5, 8, 12, 0.82)),
    url("minecraft-spring26-bw-bg.jpg") center / cover fixed no-repeat,
    #05070a;
}

html[data-theme="glass"] body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 18% 10%, rgba(255, 255, 255, 0.18), transparent 26rem),
    radial-gradient(circle at 84% 0%, rgba(255, 255, 255, 0.16), transparent 28rem),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06), transparent 18%, transparent 82%, rgba(255, 255, 255, 0.05));
}

html[data-theme="glass"] .top-image-wrap {
  display: none;
}

html[data-theme="glass"] .wrap {
  width: min(1180px, calc(100% - 48px));
  max-width: 1180px;
  padding-left: 0;
  padding-right: 0;
}

html[data-theme="glass"] a {
  color: var(--blue);
}

html[data-theme="glass"] header,
html[data-theme="glass"] section,
html[data-theme="glass"] footer {
  border-color: var(--line);
}

html[data-theme="glass"] header {
  width: min(1180px, calc(100% - 48px));
  margin: 48px auto 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(244, 248, 252, 0.2), rgba(244, 248, 252, 0.09));
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(30px) saturate(1.18);
  -webkit-backdrop-filter: blur(30px) saturate(1.18);
}

html[data-theme="glass"] header .hero,
html[data-theme="glass"] header .wrap {
  padding: 28px;
}

html[data-theme="glass"] .top-image {
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.56), 0 0 0 1px rgba(141, 248, 197, 0.08);
}

html[data-theme="glass"] main > section,
html[data-theme="glass"] main.section {
  margin: 0 0 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(245, 249, 253, 0.16), rgba(245, 249, 253, 0.075));
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(28px) saturate(1.16);
  -webkit-backdrop-filter: blur(28px) saturate(1.16);
}

html[data-theme="glass"] .stat,
html[data-theme="glass"] .chart-card,
html[data-theme="glass"] .version-card,
html[data-theme="glass"] .update-card,
html[data-theme="glass"] .update-countdown,
html[data-theme="glass"] .update-activity,
html[data-theme="glass"] .run-block,
html[data-theme="glass"] .manual-update,
html[data-theme="glass"] .card,
html[data-theme="glass"] .download,
html[data-theme="glass"] .pill,
html[data-theme="glass"] pre,
html[data-theme="glass"] .terminal-cmd,
html[data-theme="glass"] .terminal-output,
html[data-theme="glass"] .table-shell,
html[data-theme="glass"] .sheet-grid,
html[data-theme="glass"] table {
  border-color: var(--line);
  background: linear-gradient(135deg, rgba(246, 250, 255, 0.17), rgba(246, 250, 255, 0.07));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(24px) saturate(1.18);
  -webkit-backdrop-filter: blur(24px) saturate(1.18);
}

html[data-theme="glass"] .stat,
html[data-theme="glass"] .chart-card,
html[data-theme="glass"] .version-card,
html[data-theme="glass"] .update-card,
html[data-theme="glass"] .update-countdown,
html[data-theme="glass"] .update-activity,
html[data-theme="glass"] .run-block,
html[data-theme="glass"] .manual-update,
html[data-theme="glass"] .card,
html[data-theme="glass"] .download,
html[data-theme="glass"] .sheet-grid,
html[data-theme="glass"] .table-shell,
html[data-theme="glass"] table {
  border-radius: 8px;
}

html[data-theme="glass"] .chart-card canvas {
  border-radius: 8px;
  background: var(--chart-bg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

html[data-theme="glass"] .button,
html[data-theme="glass"] .release-version,
html[data-theme="glass"] .copy-button,
html[data-theme="glass"] .sheet-grid .tabulator-page {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(244, 248, 252, 0.13);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

html[data-theme="glass"] .button:not(.secondary),
html[data-theme="glass"] .sheet-grid .tabulator-page.active {
  border-color: rgba(141, 248, 197, 0.62);
  background: rgba(182, 241, 255, 0.76);
  color: #031015;
}

html[data-theme="glass"] .button.secondary:hover,
html[data-theme="glass"] .release-version:hover,
html[data-theme="glass"] .copy-button:hover {
  border-color: rgba(141, 248, 197, 0.72);
  color: var(--accent);
}

html[data-theme="glass"] .search {
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(8, 12, 16, 0.42);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 12px 34px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

html[data-theme="glass"] .search::placeholder {
  color: rgba(246, 251, 255, 0.72);
  opacity: 1;
}

html[data-theme="glass"] .search:focus {
  border-color: rgba(141, 248, 197, 0.82);
  outline: 2px solid rgba(141, 248, 197, 0.24);
  outline-offset: 2px;
}

html[data-theme="glass"] .table-count {
  color: rgba(246, 251, 255, 0.9);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.38);
}

html[data-theme="glass"] .operator-warning {
  border-color: rgba(255, 211, 122, 0.78);
  background: rgba(57, 42, 11, 0.28);
  color: #ffe8b6;
}

html[data-theme="glass"] .safe-reset-command {
  color: #ff8d8d;
}

html[data-theme="glass"] .note,
html[data-theme="glass"] .operator-section,
html[data-theme="glass"] .operator-warning,
html[data-theme="glass"] .safe-reset-command {
  max-width: 100%;
  overflow-wrap: anywhere;
}

html[data-theme="glass"] .sheet-grid .tabulator,
html[data-theme="glass"] .sheet-grid .tabulator-tableholder,
html[data-theme="glass"] .sheet-grid .tabulator-table {
  background: transparent !important;
  color: var(--ink);
}

html[data-theme="glass"] .sheet-grid .tabulator-tableholder {
  background: rgba(3, 6, 10, 0.34) !important;
  backdrop-filter: blur(14px) saturate(1.08);
  -webkit-backdrop-filter: blur(14px) saturate(1.08);
}

html[data-theme="glass"] .sheet-grid .tabulator-row {
  background: rgba(8, 13, 18, 0.52) !important;
  color: var(--ink);
}

html[data-theme="glass"] .sheet-grid .tabulator-row.tabulator-row-even {
  background: rgba(12, 17, 23, 0.58) !important;
  color: var(--ink);
}

html[data-theme="glass"] .sheet-grid .tabulator-header,
html[data-theme="glass"] .sheet-grid .tabulator-col,
html[data-theme="glass"] .sheet-grid .tabulator-footer {
  background: rgba(10, 15, 21, 0.72) !important;
  border-color: var(--line);
  color: rgba(246, 251, 255, 0.94);
}

html[data-theme="glass"] .sheet-grid .tabulator-row {
  border-color: rgba(255, 255, 255, 0.14);
}

html[data-theme="glass"] .sheet-grid .tabulator-row:hover {
  background: rgba(18, 32, 39, 0.74) !important;
}

html[data-theme="glass"] .sheet-grid.tabulator .tabulator-cell,
html[data-theme="glass"] .sheet-grid .tabulator-row .tabulator-cell,
html[data-theme="glass"] th,
html[data-theme="glass"] td {
  border-color: rgba(255, 255, 255, 0.16);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(0, 0, 0, 0.08)) !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.44);
}

html[data-theme="glass"] th,
html[data-theme="glass"] .updates-table th {
  background: rgba(246, 250, 255, 0.14);
  color: var(--stone);
}

html[data-theme="glass"] tr:hover td,
html[data-theme="glass"] .updates-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.09);
}

html[data-theme="glass"] .compat {
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

html[data-theme="glass"] .compat-active,
html[data-theme="glass"] .compat-compatible,
html[data-theme="glass"] .compat-staged,
html[data-theme="glass"] .badge-applied {
  color: #d8ffe7;
  background: rgba(19, 90, 48, 0.58);
  border-color: rgba(141, 248, 197, 0.42);
}

html[data-theme="glass"] .compat-needs-test,
html[data-theme="glass"] .compat-compatible-by-file,
html[data-theme="glass"] .badge-dryrun {
  color: #ffedbf;
  background: rgba(91, 65, 16, 0.58);
  border-color: rgba(255, 211, 122, 0.42);
}

html[data-theme="glass"] .compat-not-installed,
html[data-theme="glass"] .badge-failed {
  color: #ffd2cf;
  background: rgba(91, 28, 27, 0.56);
  border-color: rgba(255, 170, 166, 0.42);
}

html[data-theme="glass"] .compat-unknown,
html[data-theme="glass"] .compat-live-data-unavailable {
  color: #d6e4ee;
  background: rgba(35, 47, 62, 0.58);
}

@media (max-width: 760px) {
  html[data-theme="glass"] body {
    overflow-x: hidden;
  }

  html[data-theme="glass"] .sheet-grid .tabulator-header {
    overflow: hidden;
  }
}
