
:root {
  --bg: #111311;
  --panel: #181b18;
  --panel-2: #202420;
  --text: #ecefe9;
  --muted: #a8aea5;
  --line: #303630;
  --green: #72c96b;
  --green-dark: #4b8f49;
  --danger: #d56767;
  --header: rgba(17, 19, 17, .96);
}

html[data-theme="light"] {
  --bg: #eceee8;
  --panel: #f7f8f4;
  --panel-2: #e4e7df;
  --text: #20231f;
  --muted: #61675f;
  --line: #cdd2c9;
  --green: #438e43;
  --green-dark: #306d31;
  --header: rgba(236, 238, 232, .96);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background: var(--bg);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.55;
  transition: background .2s ease, color .2s ease;
}
button, input, select, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }

.background-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .18;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 32px 32px;
  z-index: -1;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1080px, calc(100% - 24px));
  margin: 0 auto;
  min-height: 64px;
  border-bottom: 1px solid var(--line);
  background: var(--header);
  backdrop-filter: blur(10px);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.logo-cube {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 2px solid var(--text);
  background: var(--green);
  color: #111;
  font-family: monospace;
  font-weight: 900;
  box-shadow: 3px 3px 0 var(--text);
}

.logo-cube.small {
  width: 28px;
  height: 28px;
  font-size: 12px;
  box-shadow: 2px 2px 0 var(--text);
}

.desktop-nav {
  display: flex;
  gap: 2px;
}

.desktop-nav a,
.mobile-nav a {
  padding: 9px 11px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  border-bottom: 2px solid transparent;
}

.desktop-nav a:hover,
.desktop-nav a.active {
  color: var(--text);
  border-bottom-color: var(--green);
}

.header-actions {
  display: flex;
  gap: 8px;
}

.theme-toggle,
.menu-toggle {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel);
  cursor: pointer;
}

.theme-icon { width: 21px; height: 21px; }
.menu-toggle { display: none; color: var(--text); }

.mobile-nav {
  display: none;
  position: sticky;
  top: 64px;
  z-index: 19;
  width: calc(100% - 24px);
  margin: 0 auto;
  border: 1px solid var(--line);
  background: var(--panel);
}
.mobile-nav.open { display: grid; }

.section {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0;
}

.hero {
  min-height: 680px;
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  align-items: center;
  gap: 52px;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--green);
  font-family: monospace;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
}

h1, h2, h3, p { margin-top: 0; }
h1 {
  margin-bottom: 18px;
  max-width: 760px;
  font-size: clamp(42px, 7vw, 72px);
  line-height: 1;
  letter-spacing: -.045em;
}
h1 span { color: var(--green); }

.hero-text {
  max-width: 620px;
  color: var(--muted);
  font-size: 18px;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 16px;
  border-radius: 4px;
  font-weight: 800;
  cursor: pointer;
}

.primary-button {
  border: 1px solid var(--green-dark);
  color: #101510;
  background: var(--green);
}

.primary-button:hover { background: #84d27e; }

.primary-button strong {
  margin-left: 10px;
  padding-left: 10px;
  border-left: 1px solid rgba(0,0,0,.25);
  font-family: monospace;
}

.secondary-button {
  border: 1px solid var(--line);
  color: var(--text);
  background: var(--panel);
}

.secondary-button:hover { background: var(--panel-2); }

.server-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 14px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}

.status-divider {
  width: 1px;
  height: 14px;
  background: var(--line);
}

.hero-card,
.schedule-card,
.mod-card,
.site-form,
.download-box,
.notice-card {
  border: 1px solid var(--line);
  background: var(--panel);
}

.hero-card {
  padding: 22px;
  box-shadow: 8px 8px 0 rgba(0,0,0,.18);
}

.hero-card-top,
.connection-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.hero-card-top { margin-bottom: 16px; }

.pixel-label {
  font-family: monospace;
  font-size: 12px;
  font-weight: 800;
}

.online-badge {
  padding: 4px 7px;
  color: var(--green);
  border: 1px solid var(--green-dark);
  font-size: 10px;
  font-weight: 800;
}

.connection-row {
  padding: 13px 0;
  border-top: 1px solid var(--line);
}

.connection-row span { color: var(--muted); }
.connection-row strong { text-align: right; }

.card-note {
  margin-top: 14px;
  padding: 12px;
  color: var(--muted);
  border-left: 3px solid var(--green);
  background: var(--panel-2);
  font-size: 13px;
}

.section-heading {
  max-width: 700px;
  margin-bottom: 30px;
}

.section-heading h2 {
  margin-bottom: 10px;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.05;
  letter-spacing: -.035em;
}

.section-heading p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 16px;
}

.schedule-grid,
.mods-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.schedule-card {
  padding: 20px;
}

.schedule-card.accent {
  border-color: var(--green-dark);
}

.schedule-card span,
.schedule-card small {
  display: block;
  color: var(--muted);
}

.schedule-card strong {
  display: block;
  margin: 10px 0 5px;
  font-size: 24px;
}

.page-main { min-height: calc(100vh - 160px); }
.page-hero {
  padding-top: 88px;
  padding-bottom: 26px;
}
.page-hero h1 { font-size: clamp(40px, 6vw, 64px); }
.content-section { padding-top: 28px; }

.mod-card {
  display: flex;
  gap: 14px;
  min-height: 150px;
  padding: 20px;
}

.mod-icon {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: var(--panel-2);
}
.mod-icon img { width: 24px; height: 24px; }

.mod-card h3 {
  margin-bottom: 6px;
  font-size: 18px;
}
.mod-card p {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 14px;
}
.mod-version {
  display: inline-block;
  padding: 3px 7px;
  color: var(--green);
  border: 1px solid var(--green-dark);
  font-size: 12px;
  font-weight: 800;
}

.download-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 18px;
  padding: 18px;
}
.download-box strong,
.download-box span { display: block; }
.download-box span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 14px;
}

.notice-card {
  max-width: 820px;
  padding: 16px 18px;
  margin-bottom: 18px;
  color: var(--muted);
  border-left: 3px solid var(--green);
}

.site-form {
  max-width: 820px;
  padding: 24px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

label {
  display: block;
  margin-bottom: 14px;
  font-size: 14px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  margin-top: 7px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 3px;
  outline: none;
  color: var(--text);
  background: var(--panel-2);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--green);
}

textarea { resize: vertical; }

.checkbox-label {
  display: none;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
  font-weight: 500;
}
.checkbox-label input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--green);
}

.submit-button { width: 100%; }
.form-message {
  min-height: 22px;
  margin: 10px 0 0;
  color: var(--green);
  font-size: 14px;
  text-align: center;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 42px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.footer-logo strong,
.footer-logo span { display: block; }
.footer-logo strong { color: var(--text); }
.footer-credit a { color: var(--green); text-decoration: underline; }

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  max-width: min(360px, calc(100% - 36px));
  padding: 12px 14px;
  border: 1px solid var(--line);
  color: var(--text);
  background: var(--panel);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: .2s ease;
}
.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 880px) {
  .desktop-nav { display: none; }
  .menu-toggle { display: grid; }
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 70px;
  }
  .schedule-grid,
  .mods-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .section {
    width: calc(100% - 24px);
    padding: 54px 0;
  }
  h1 { font-size: 42px; }
  .hero-buttons { flex-direction: column; }
  .primary-button,
  .secondary-button { width: 100%; }
  .form-grid { grid-template-columns: 1fr; gap: 0; }
  .site-form { padding: 18px; }
  .download-box,
  footer {
    flex-direction: column;
    align-items: flex-start;
  }
}




/* Исправленные отступы */
main {
  display: block;
}

.section {
  padding: 48px 0;
}

.hero.section {
  padding-top: 56px;
  padding-bottom: 56px;
}

.page-hero {
  padding-top: 56px;
  padding-bottom: 20px;
}

.content-section {
  padding-top: 20px;
  padding-bottom: 48px;
}

.page-hero + .content-section {
  padding-top: 8px;
}

.section-heading {
  margin-bottom: 22px;
}

.section-heading h1,
.section-heading h2,
.section-heading p {
  margin-bottom: 0;
}

.section-heading h1 + p,
.section-heading h2 + p {
  margin-top: 10px;
}

.hero-content > *:last-child,
.hero-card > *:last-child,
.schedule-card > *:last-child,
.mod-card > div > *:last-child,
.site-form > *:last-child,
.download-box > div > *:last-child {
  margin-bottom: 0;
}

.schedule-grid,
.mods-grid {
  align-items: stretch;
}

.schedule-card,
.mod-card {
  height: 100%;
}

.site-form {
  margin-top: 0;
}

.notice-card + .site-form {
  margin-top: 14px;
}

.download-box {
  margin-top: 16px;
}

footer {
  padding-top: 24px;
  padding-bottom: 28px;
}

.footer-logo div:empty {
  display: none;
}

@media (max-width: 880px) {
  .hero.section {
    padding-top: 44px;
    padding-bottom: 44px;
  }

  .section,
  .content-section {
    padding-top: 40px;
    padding-bottom: 40px;
  }

  .page-hero {
    padding-top: 44px;
    padding-bottom: 14px;
  }

  .page-hero + .content-section {
    padding-top: 6px;
  }
}

@media (max-width: 600px) {
  .section,
  .content-section {
    padding-top: 34px;
    padding-bottom: 34px;
  }

  .hero.section {
    padding-top: 36px;
    padding-bottom: 36px;
  }

  .page-hero {
    padding-top: 36px;
    padding-bottom: 10px;
  }

  .section-heading {
    margin-bottom: 16px;
  }

  .schedule-grid,
  .mods-grid {
    gap: 12px;
  }

  .hero-buttons {
    margin-top: 20px;
  }
}

/* === Админ-панель === */

.status-dot.offline {
  background: var(--danger);
}

.online-badge.offline {
  color: var(--danger);
  border-color: var(--danger);
}

.notice-card.notice-ok {
  border-left-color: var(--green);
  color: var(--green);
}

.notice-card.notice-err {
  border-left-color: var(--danger);
  color: var(--danger);
}

.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid #8f3838;
  border-radius: 4px;
  color: #fff;
  background: var(--danger);
  font-weight: 800;
  cursor: pointer;
}

.danger-button:hover {
  background: #c45a5a;
}

.admin-table-wrap {
  overflow-x: auto;
  max-width: 100%;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.admin-table th,
.admin-table td {
  padding: 10px 12px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  background: var(--panel-2);
  font-weight: 800;
  font-size: 13px;
}

.admin-table td.actions {
  white-space: nowrap;
}

.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.badge.pending {
  background: #d29922;
  color: #111;
}

.badge.approved {
  background: var(--green);
  color: #111;
}

.badge.rejected {
  background: var(--danger);
  color: #fff;
}

.mod-row {
  display: grid;
  grid-template-columns: 2fr 1fr 2fr auto;
  gap: 8px;
  margin-bottom: 10px;
}

@media (max-width: 600px) {
  .mod-row {
    grid-template-columns: 1fr;
  }
  .admin-table {
    font-size: 13px;
  }
}
