@font-face {
  font-family: "Minecraft";
  src: url("fonts/Minecraft.woff2") format("woff2"),
       url("fonts/Minecraft.woff") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* Цвета */
:root {
  --bg1:#344a64;
  --bg2:#4b6584;
  --card:#0f1a24;
  --accent:#3fb950;
  --accent2:#2ea043;
  --text:#e7f1ff;
  --muted:#b9c6d3;
  --border:#0b1117;
  --glow: 0 0 12px rgba(63,185,80,.45);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

/* Фон */
body {
  color: var(--text);
  font-family: "Minecraft", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: url("images/bg.png") center / cover fixed no-repeat;
}

/* Навбар */
.navbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  background: var(--card);
  border-bottom: 4px solid var(--border);
  padding: 10px 16px;
  box-shadow: 0 0 0 4px #0004 inset;
  transform: translateY(-8px);
  opacity: 0;
  animation: navbarIn .5s ease-out forwards;
}
@keyframes navbarIn {
  to { transform: translateY(0); opacity: 1; }
}
.navbar.scrolled {
  box-shadow: 0 6px 18px rgba(0,0,0,.35);
}
.navbar-left img {
  height: 56px;
  width: auto;
  display: block;
}
.nav-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}
.btn-nav {
  background: var(--accent);
  border: 2px solid #1f6f3a;
  color: #082012;
  padding: 8px 12px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  box-shadow: 0 2px 0 #144c29;
  transition: transform .08s ease, background .2s ease, box-shadow .2s ease, filter .2s ease;
}
.btn-nav:hover {
  background: var(--accent2);
  transform: translateY(-1px);
  box-shadow: 0 2px 0 #144c29, var(--glow);
  filter: saturate(1.1);
}
.btn-nav:active {
  transform: translateY(1px) scale(.98);
}

/* Контент */
main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.card {
  width: min(92vw, 560px);
  background: var(--card);
  border: 4px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 0 0 4px #0004 inset, 0 10px 24px rgba(0,0,0,.45);
  padding: 28px;
  text-align: center;
}
h1 {
  margin: 0 0 16px;
  font-size: 24px;
  letter-spacing: .5px;
}
p {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}

/* Анимация появления */
.reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.reveal-show {
  opacity: 1;
  transform: translateY(0);
}

/* Discord виджет */
.discord-widget {
  margin: 40px auto 24px;
  width: clamp(280px, 90vw, 440px);
  height: 560px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--card);
  border: 4px solid var(--border);
  box-shadow: 0 10px 24px rgba(0,0,0,.45);
}
.discord-widget iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Кнопка вверх */
.scroll-top {
  position: fixed;
  right: 16px;
  bottom: 70px;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--accent);
  border: 3px solid #1f6f3a;
  color: #082012;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 0 #144c29, 0 8px 16px rgba(0,0,0,.35);
  transition: transform .08s ease, opacity .2s ease, background .2s ease;
  opacity: 0;
  pointer-events: none;
}
.scroll-top.show {
  opacity: 1;
  pointer-events: auto;
}
.scroll-top:hover {
  background: var(--accent2);
  transform: translateY(-2px);
}

/* Копирайт */
footer.copyright {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  padding: 12px;
  background: var(--card);
  border-top: 4px solid var(--border);
  opacity: .9;
  width: 100%;
}

/* Адаптация */
@media (max-width: 720px) {
  .navbar { justify-content: center; gap: 10px; }
  .navbar-left img { height: 46px; }
  .nav-links { justify-content: center; }
  main { padding: 16px; }
  .card { padding: 20px; width: 92vw; }
  .discord-widget { width: 92vw; height: 480px; }
}

/* ===== Стили формы загрузки ===== */

.card {
  width: min(92vw, 560px);
  background: var(--card);
  border: 4px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 0 0 4px #0004 inset, 0 10px 24px rgba(0,0,0,.45);
  padding: 36px; /* Было 28px — увеличено для формы */
  text-align: center;
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px; /* Было 16px — увеличено для дыхания */
}

label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: .3px;
}

.field {
  background: #0b1620;
  border: 3px solid #061018;
  border-radius: 8px;
  color: var(--text);
  padding: 12px 14px;
  width: 100%;
  outline: none;
  transition: border-color .15s ease;
  font-family: inherit;
  font-size: 14px;
  margin-bottom: 6px;
}

.field:focus {
  border-color: #19364a;
}

input[type="file"].field {
  background: #0b1620;
  color: var(--muted);
  padding: 10px;
  margin-bottom: 6px;
}

.preview {
  background: #0b1620;
  border: 3px dashed #19364a;
  border-radius: 10px;
  padding: 14px;
  text-align: center;
  margin-top: 16px;
}

.preview-title {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
}

#preview-image {
  max-width: 100%;
  max-height: 220px;
  image-rendering: pixelated;
  border-radius: 6px;
  box-shadow: 0 0 0 4px #061018;
  background: #111;
}

.btn {
  width: 100%;
  background: var(--accent);
  border: 4px solid #1f6f3a;
  color: #082012;
  font-weight: 700;
  padding: 14px 16px;
  border-radius: 10px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: .6px;
  box-shadow: 0 4px 0 #144c29, 0 8px 16px rgba(0,0,0,.35);
  transition: transform .05s ease, background .2s ease;
  margin-top: 20px;
}

.btn:hover {
  background: var(--accent2);
}

.btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #144c29, 0 6px 12px rgba(0,0,0,.3);
}

.note {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  margin-top: 14px;
}

/* ===== Статус загрузки ===== */

.status {
  margin-top: 24px;
  padding: 12px 14px;
  border-radius: 8px;
  text-align: center;
  border: 3px solid #061018;
  display: none;
  white-space: pre-wrap;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 0 0 3px #0004 inset;
}

.status.show {
  display: block;
}

.status.ok {
  background: #0f2a1b;
  border-color: #1f6f3a;
  color: #c9f7da;
}

.status.err {
  background: #2a1210;
  border-color: #6e2922;
  color: #ffd8d3;
}

.status.warn {
  background: #2a1e10;
  border-color: #7a4a1c;
  color: #ffe6cc;
}

/* ===== Подпись ===== */

.footer {
  margin-top: 24px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  opacity: .9;
}
