:root {
  --bg-deep: #0d1117;
  --bg-card: rgba(22, 27, 34, 0.82);
  --accent: #3fb950;
  --accent-dim: #238636;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --border: #30363d;
  --danger: #f85149;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: system-ui, 'Segoe UI', Roboto, Ubuntu, sans-serif;
  color: var(--text);
}

.page {
  min-height: 100vh;
  padding: 1.5rem 1rem 3rem;
  background-color: var(--bg-deep);
  background-image: url('/assets/bg.svg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.admin-trigger {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.admin-trigger:hover {
  color: var(--accent);
  border-color: var(--accent-dim);
  background: rgba(35, 134, 54, 0.12);
}

.admin-trigger__icon {
  width: 22px;
  height: 22px;
}

.hero {
  margin-top: clamp(2rem, 12vh, 6rem);
  text-align: center;
  max-width: 36rem;
}

.hero__logo {
  display: block;
  margin: 0 auto 1rem;
  max-width: min(280px, 80vw);
  height: auto;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.45));
}

.hero__tagline {
  margin: 0;
  font-size: 1.05rem;
  color: var(--text-muted);
}

.web-app {
  margin-top: clamp(1.75rem, 6vh, 2.75rem);
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 28rem;
}

.web-app .btn {
  min-width: 200px;
}

.downloads {
  margin-top: clamp(2.5rem, 8vh, 4rem);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  width: 100%;
  max-width: 28rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 1.75rem;
  font-size: 1.05rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.btn:active {
  transform: scale(0.98);
}

.btn--primary {
  flex: 1;
  min-width: 140px;
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-dim) 100%);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 14px rgba(46, 160, 67, 0.35);
}

.btn--primary:hover {
  filter: brightness(1.06);
}

.btn--ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
}

.btn--ghost:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem 1rem;
  overflow-y: auto;
}

.modal__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(1, 4, 9, 0.72);
  backdrop-filter: blur(4px);
}

.modal__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  margin-top: 10vh;
  padding: 1.5rem 1.5rem 1.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
}

.modal__title {
  margin: 0 0 1.25rem;
  font-size: 1.25rem;
  font-weight: 600;
}

.modal__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.modal__close:hover {
  color: var(--text);
  background: rgba(240, 246, 252, 0.06);
}

.form__label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.form__label input[type='text'],
.form__label input[type='password'] {
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #010409;
  color: var(--text);
  font-size: 1rem;
}

.form__label input[type='file'] {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.form__error {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  color: var(--danger);
}

.form__ok {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  color: var(--accent);
}

.form__submit {
  width: 100%;
  margin-top: 0.25rem;
}

.form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.form__actions .btn--primary {
  flex: 1;
  min-width: 120px;
}

.panel-upload__hint {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.45;
}
