@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;600;700&family=Unbounded:wght@400;600;800&display=swap");

:root {
  --bg-deep: #07101f;
  --bg-mid: #0c2440;
  --bg-light: #163a52;
  --text-main: #f6f3ea;
  --text-soft: rgba(246, 243, 234, 0.72);
  --accent-gold: #ffb347;
  --accent-mint: #3dd6a6;
  --accent-ice: #b6f0ff;
  --accent-rose: #ff6b6b;
  --glass: rgba(255, 255, 255, 0.08);
  --glass-strong: rgba(255, 255, 255, 0.16);
  --stroke: rgba(255, 255, 255, 0.16);
  --shadow: 0 24px 70px rgba(5, 12, 25, 0.45);
  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --max-width: 1180px;
  color-scheme: dark;
}

[data-theme="light"] {
  --bg-deep: #f3f7fb;
  --bg-mid: #e7edf5;
  --bg-light: #d8e3f1;
  --text-main: #0d1a2b;
  --text-soft: rgba(13, 26, 43, 0.75);
  --accent-gold: #f09c45;
  --accent-mint: #28b88e;
  --accent-ice: #70b8ff;
  --accent-rose: #ff7b8b;
  --glass: rgba(255, 255, 255, 0.75);
  --glass-strong: rgba(255, 255, 255, 0.9);
  --stroke: rgba(13, 26, 43, 0.1);
  --shadow: 0 20px 40px rgba(12, 36, 64, 0.18);
  color-scheme: light;
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text-main);
  background: radial-gradient(circle at 12% 18%, rgba(61, 214, 166, 0.26), transparent 45%),
    radial-gradient(circle at 85% 10%, rgba(255, 179, 71, 0.18), transparent 40%),
    radial-gradient(circle at 40% 85%, rgba(88, 160, 255, 0.22), transparent 50%),
    linear-gradient(150deg, var(--bg-deep), var(--bg-mid) 50%, var(--bg-light) 100%);
  background-attachment: fixed;
  line-height: 1.6;
  overflow-x: hidden;
  transition: background 0.5s ease, color 0.3s ease;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: -40% 0 0 -40%;
  width: 180%;
  height: 180%;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.8) 2px, transparent 3px);
  background-size: 140px 140px;
  opacity: 0.2;
  animation: snow 46s linear infinite;
  z-index: 0;
}

body::after {
  opacity: 0.3;
  background-size: 220px 220px;
  animation-duration: 72s;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

main {
  position: relative;
  z-index: 1;
}

.container {
  width: min(100% - 32px, var(--max-width));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(16px);
  background: rgba(5, 10, 22, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: "Unbounded", sans-serif;
  font-size: 20px;
  letter-spacing: 0.4px;
}

.brand-badge {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 179, 71, 0.9), rgba(61, 214, 166, 0.9));
  box-shadow: 0 18px 30px rgba(255, 179, 71, 0.35);
  font-weight: 800;
  animation: badgeGlow 4s ease-in-out infinite;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.theme-toggle {
  position: relative;
  width: 52px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.07);
  display: inline-flex;
  align-items: center;
  padding: 4px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.theme-icon {
  font-size: 12px;
  opacity: 0.7;
  width: 16px;
  text-align: center;
}

.theme-knob {
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-mint), var(--accent-gold));
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.25s ease;
}

[data-theme="dark"] .theme-knob {
  transform: translateX(0);
}

[data-theme="light"] .theme-knob {
  transform: translateX(22px);
}

.nav-links a {
  font-size: 13px;
  letter-spacing: 0.3px;
  color: var(--text-soft);
  padding: 6px 4px;
  position: relative;
  transition: color 0.2s ease;
}

.nav-links a.is-active,
.nav-links a:hover {
  color: var(--text-main);
}

.nav-links a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-mint), var(--accent-gold));
}

.hero {
  padding: 70px 0 40px;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 36px;
  align-items: start;
}

.hero--simple {
  padding-bottom: 20px;
}

.hero-text {
  max-width: 560px;
}

.hero h1 {
  font-family: "Unbounded", sans-serif;
  font-size: clamp(32px, 3.6vw, 52px);
  margin: 0 0 16px;
  line-height: 1.15;
}

.hero p {
  color: var(--text-soft);
  margin: 0 0 26px;
  font-size: 16px;
}

.hero-cards {
  display: grid;
  gap: 18px;
  max-width: 520px;
  justify-self: end;
}

.hero-glow {
  position: absolute;
  right: 6%;
  top: 10%;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(182, 240, 255, 0.7), transparent 70%);
  filter: blur(2px);
  opacity: 0.55;
  animation: float 8s ease-in-out infinite;
  pointer-events: none;
}

.glass-card {
  background: var(--glass);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 13px;
  border: 1px solid transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-mint), var(--accent-gold));
  color: #0c1424;
  box-shadow: 0 18px 32px rgba(61, 214, 166, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 36px rgba(61, 214, 166, 0.38);
}

.btn-outline {
  border-color: var(--stroke);
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.stat {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.stat strong {
  font-size: 20px;
  display: block;
}

.section {
  padding: 38px 0;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  font-family: "Unbounded", sans-serif;
  font-size: clamp(20px, 2.4vw, 30px);
}

.section-title span {
  width: 28px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-mint));
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.feature-card {
  padding: 22px;
  border-radius: var(--radius-md);
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.05);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.28);
}

.feature-card h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.feature-card p {
  margin: 0;
  color: var(--text-soft);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  background: linear-gradient(130deg, rgba(255, 179, 71, 0.9), rgba(255, 107, 107, 0.9));
  color: #0b0b0b;
}

.badge-xl {
  font-size: 13px;
  padding: 8px 16px;
  letter-spacing: 0.5px;
  border-radius: 999px;
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.18);
}

.badge.mint {
  background: linear-gradient(130deg, rgba(61, 214, 166, 0.9), rgba(105, 228, 255, 0.9));
}

.badge.ice {
  background: linear-gradient(130deg, rgba(182, 240, 255, 0.9), rgba(255, 255, 255, 0.9));
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
}

.admin-card {
  padding: 24px;
  border-radius: var(--radius-md);
  background: var(--glass);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
}

.admin-card h3 {
  margin: 14px 0 6px;
  font-size: 18px;
}

.admin-card p {
  margin: 0;
  color: var(--text-soft);
}

.admin-form {
  padding: 24px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--stroke);
}

.admin-inline {
  margin-top: 16px;
}

.admin-users {
  display: grid;
  gap: 16px;
}

.admin-user-card {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 420px);
  gap: 18px;
  padding: 20px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--stroke);
}

.admin-user-card p {
  margin: 6px 0 0;
  color: var(--text-soft);
}

.admin-user-form {
  display: grid;
  gap: 10px;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-soft);
}

.account-card {
  padding: 24px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--stroke);
}

.server-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.server-card {
  padding: 22px;
  border-radius: var(--radius-md);
  background: rgba(15, 25, 45, 0.7);
  border: 1px solid var(--stroke);
  position: relative;
  overflow: hidden;
}

.server-card::after {
  content: "";
  position: absolute;
  top: -40%;
  right: -30%;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(255, 179, 71, 0.5), transparent 70%);
  opacity: 0.6;
}

.server-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(61, 214, 166, 0.18);
  color: #baf7e2;
  border: 1px solid rgba(61, 214, 166, 0.5);
}

.server-status.offline {
  background: rgba(255, 107, 107, 0.15);
  color: #ffd4d4;
  border-color: rgba(255, 107, 107, 0.5);
}

.server-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.server-meta div {
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  padding: 10px;
  font-size: 13px;
  color: var(--text-soft);
}

.news-grid {
  display: grid;
  gap: 18px;
}

.news-card {
  padding: 20px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--stroke);
}
[data-theme="light"] .news-card {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(12, 26, 43, 0.08);
}

.news-card h3 {
  margin: 8px 0 8px;
  font-size: 18px;
}

.news-card p {
  margin: 0;
  color: var(--text-soft);
}

.news-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: rgba(255, 255, 255, 0.6);
}

.news-card iframe {
  width: 100%;
  border-radius: 16px;
}

.donate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.donate-card {
  padding: 24px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--stroke);
}
[data-theme="light"] .donate-card {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(12, 26, 43, 0.08);
}

.donate-card h3 {
  margin: 0 0 12px;
}

.donate-price {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent-gold);
}

.donate-filter {
  margin: 0 0 14px;
  display: inline-flex;
  flex-direction: column;
  gap: 6px;
}

.rules-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 18px;
  color: var(--text-soft);
}

.auth-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.auth-card {
  padding: 24px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--stroke);
}
[data-theme="light"] .auth-card {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(12, 26, 43, 0.1);
}

label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-soft);
  margin-bottom: 6px;
}

input,
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(8, 15, 30, 0.7);
  color: var(--text-main);
  font-size: 14px;
}
[data-theme="light"] input,
[data-theme="light"] select,
[data-theme="light"] textarea {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(12, 26, 43, 0.12);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent-mint);
  box-shadow: 0 0 0 2px rgba(61, 214, 166, 0.2);
}

form button {
  margin-top: 12px;
}

h2 {
  font-family: "Unbounded", sans-serif;
  font-size: 22px;
  margin: 0 0 12px;
}

.footer {
  padding: 32px 0 50px;
  color: var(--text-soft);
  font-size: 14px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  font-size: 12px;
  color: var(--text-soft);
}

.text-soft {
  color: var(--text-soft);
}

.flash {
  margin: 14px 0;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.07);
}
[data-theme="light"] .flash {
  border-color: rgba(12, 26, 43, 0.12);
  background: rgba(255, 255, 255, 0.95);
}

.flash-error {
  border-color: rgba(255, 107, 107, 0.5);
  color: #ffd6d6;
}

.flash-success {
  border-color: rgba(61, 214, 166, 0.5);
  color: #c7ffe9;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(5, 10, 22, 0.65);
  backdrop-filter: blur(6px);
  z-index: 120;
  padding: 16px;
}

.modal-backdrop.is-open {
  display: flex;
}

.modal {
  width: min(680px, 100%);
  background: var(--glass);
  border: 1px solid var(--stroke);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 20px;
  color: var(--text-main);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.modal-title {
  font-family: "Unbounded", sans-serif;
  font-size: 20px;
}

.modal-sub {
  color: var(--text-soft);
  font-size: 14px;
}

.modal-close {
  background: none;
  border: 1px solid var(--stroke);
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: var(--text-main);
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.modal-close:hover {
  border-color: rgba(255, 255, 255, 0.4);
  transform: rotate(6deg);
}

.modal-options {
  display: grid;
  gap: 10px;
}

.modal-option {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.modal-option:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.2);
}

.modal-option.win {
  background: linear-gradient(135deg, rgba(36, 152, 255, 0.25), rgba(36, 152, 255, 0.1));
}

.modal-option.mac {
  background: linear-gradient(135deg, rgba(120, 120, 120, 0.22), rgba(160, 160, 160, 0.12));
}

.modal-option.linux {
  background: linear-gradient(135deg, rgba(255, 200, 50, 0.2), rgba(120, 90, 20, 0.15));
}

.modal-icon {
  font-size: 24px;
}

.modal-body .modal-name {
  font-weight: 700;
}

.modal-body .modal-desc {
  color: var(--text-soft);
  font-size: 13px;
}

.modal-size {
  text-align: right;
  font-size: 12px;
  color: var(--text-soft);
}

.modal-size strong {
  display: block;
  color: var(--text-main);
  font-size: 15px;
}

.modal-footer {
  margin-top: 12px;
  text-align: center;
  color: var(--text-soft);
  font-size: 13px;
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

[data-theme="light"] body::before,
[data-theme="light"] body::after {
  opacity: 0.15;
}

[data-theme="light"] .site-header {
  background: rgba(255, 255, 255, 0.8);
  border-bottom-color: rgba(12, 26, 43, 0.08);
}

[data-theme="light"] .nav-links a {
  color: var(--text-soft);
}

[data-theme="light"] .glass-card,
[data-theme="light"] .feature-card,
[data-theme="light"] .admin-card,
[data-theme="light"] .server-card,
[data-theme="light"] .admin-form,
[data-theme="light"] .admin-user-card,
[data-theme="light"] .account-card {
  background: var(--glass);
  border-color: var(--stroke);
  color: var(--text-main);
}

[data-theme="light"] .server-card::after {
  opacity: 0.4;
}

[data-theme="light"] .server-meta div {
  background: rgba(12, 26, 43, 0.03);
  color: var(--text-soft);
}

[data-theme="light"] .server-status {
  color: #0f3b2f;
}

[data-theme="light"] .badge {
  color: #0b0b0b;
}

[data-theme="light"] .btn-outline {
  background: rgba(12, 26, 43, 0.04);
  border-color: rgba(12, 26, 43, 0.1);
}

[data-theme="light"] .footer {
  color: var(--text-soft);
}

.theme-transition * {
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease !important;
}

@keyframes snow {
  0% {
    transform: translateY(-8%);
  }
  100% {
    transform: translateY(20%);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(12px);
  }
}

@keyframes badgeGlow {
  0%,
  100% {
    box-shadow: 0 18px 30px rgba(255, 179, 71, 0.35);
  }
  50% {
    box-shadow: 0 22px 38px rgba(61, 214, 166, 0.45);
  }
}

@media (max-width: 980px) {
  .nav {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .admin-user-card {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

.modal-option {
  display: flex;
  align-items: center;
  gap: 12px;
}

.os-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.os-icon.apple {
  background-image: url("/images/apple-logo.png"); /* путь к твоему PNG/SVG */
}
