:root{ --bg1:#0b1220; --bg2:#0e1630; }

/* ===== GLOBAL SCALE FOR BIG SCREENS ===== */
/* Поднимаем базовый размер на больших разрешениях, чтобы текст не выглядел мелким */
@media (min-width: 1536px){
  html { font-size: 17px; }
}
@media (min-width: 1920px){
  html { font-size: 18px; }
}
@media (min-width: 2560px){
  html { font-size: 19px; }
}

.bg-surface{
  background:
    radial-gradient(1200px 600px at 20% 0%, rgba(34,211,238,.08), transparent 60%),
    radial-gradient(900px 600px at 80% 10%, rgba(192,38,211,.10), transparent 55%),
    radial-gradient(700px 500px at 50% 100%, rgba(91,91,214,.12), transparent 60%),
    linear-gradient(180deg, var(--bg1), var(--bg2));
}

.bg-gradient{
  position:fixed;
  inset:-10%;
  pointer-events:none;
  z-index:0;
  background: conic-gradient(
    from 200deg at 50% 50%,
    rgba(192,38,211,.12),
    rgba(34,211,238,.10),
    rgba(91,91,214,.12),
    rgba(192,38,211,.12)
  );
  filter: blur(60px) saturate(120%);
  animation: swirl 22s linear infinite;
  opacity:.6;
}
@keyframes swirl{from{transform:rotate(0)} to{transform:rotate(360deg)}}

.bg-noise{
  position:fixed;
  inset:0;
  z-index:0;
  pointer-events:none;
  background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="120" height="120" viewBox="0 0 120 120"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="2" stitchTiles="stitch"/></filter><rect width="120" height="120" filter="url(%23n)" opacity="0.05"/></svg>');
  mix-blend-mode:overlay;
}

/* hover lift */
.group:hover{ transform: translateY(-1px); }

/* Иконка-кнопка (моб. хедер) */
.icon-btn{
  width:40px;
  height:40px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:9999px;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.12);
  cursor:pointer;
  user-select:none;
}

/* Dropdown (checkbox hack) */
.dd-toggle{ position:absolute; opacity:0; pointer-events:none; }
.dd-menu{
  position:absolute;
  right:0;
  top:calc(100% + .35rem);
  min-width:10rem;
  background:rgba(2,6,23,.92);
  backdrop-filter: blur(8px);
  border:1px solid rgba(255,255,255,.10);
  border-radius:.75rem;
  padding:.25rem;
  display:block;
  opacity:0;
  transform: translateY(-4px) scale(.98);
  transition: opacity .15s ease, transform .15s ease;
  pointer-events:none;
  z-index:50;
}
#lang-dd.dd-toggle:checked ~ .dd-menu{
  opacity:1;
  transform: translateY(0) scale(1);
  pointer-events:auto;
}
.menu-item{
  display:block;
  padding:.55rem .7rem;
  border-radius:.5rem;
  color:#e5e7eb;
}
.menu-item:hover{ background:rgba(255,255,255,.08); }

/* password eye button */
.pw-eye{
  position:absolute;
  right:.55rem;
  top:50%;
  transform:translateY(-50%);
  display:flex;
  align-items:center;
  justify-content:center;
  width:2.25rem;
  height:2.25rem;
  border-radius:.75rem;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.12);
}
.pw-eye:hover{ background:rgba(255,255,255,.10); }
.pw-eye:active{ transform:translateY(-50%) scale(.98); }
.pw-eye svg{ width:1.15rem; height:1.15rem; color:#e5e7eb; }

/* Toast */
.toast{
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  color: #fff;
  border-radius: 14px;
  box-shadow: 0 14px 40px rgba(124,58,237,.35);
  backdrop-filter: blur(6px);
  animation: toastIn .35s ease both;
}
.toast.hide{ animation: toastOut .35s ease both; }
@keyframes toastIn{
  from { opacity: 0; transform: translateY(-10px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toastOut{
  to { opacity: 0; transform: translateY(-10px) scale(.98); }
}

.toast-success{
  background:
    radial-gradient(120% 120% at 0% 0%, #22c55e33, transparent 60%),
    linear-gradient(135deg, #7c3aed, #0ea5e9);
}

.toast-icon{
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.18);
  font-weight: 800;
}

.toast-body{ display: grid; gap: 2px; }
.toast-title{ font-weight: 800; font-size: 16px; letter-spacing: .2px; }
.toast-text{ opacity: .95; font-size: 14px; }

.toast-close{
  appearance: none;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 6px;
  opacity: .85;
}
.toast-close:hover{ opacity: 1; }

.font-rubik-dirt{
  font-family: "Rubik Dirt", cursive;
  font-weight: 400;
  font-style: normal;
  font-synthesis: none;
  text-rendering: geometricPrecision;
}

/* ===== MAIN TEXT PATTERN (LESS REPETITIVE) ===== */
/* Твой паттерн: делаем тайл реже, прозрачность ниже и маску по краям */
.bg-main-text{
  background-image: url("/static/main.png");
  background-repeat: repeat;
  background-size: 1800px;
  background-position: center;
  opacity: 0.10;
  filter: blur(0.3px);
  pointer-events: none;

  /* маска чтобы по краям не било в глаза */
  -webkit-mask-image: radial-gradient(circle at center, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 55%, rgba(0,0,0,0) 85%);
  mask-image: radial-gradient(circle at center, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 55%, rgba(0,0,0,0) 85%);
}

/* На очень больших экранах делаем паттерн еще мягче и реже */
@media (min-width: 1920px){
  .bg-main-text{
    background-size: 2000px;
    opacity: 0.085;
  }
}
@media (min-width: 2560px){
  .bg-main-text{
    background-size: 2200px;
    opacity: 0.075;
  }
}