:root {
  --bg: #0b1020;
  --panel: rgba(15, 23, 42, 0.72);
  --stroke: rgba(255, 255, 255, 0.08);
  --text: #e5eefc;
  --muted: rgba(229, 238, 252, 0.72);

  --blue: #4285f4;
  --green: #34a853;
  --yellow: #fbbc05;
  --red: #ea4335;

  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 10%, rgba(66, 133, 244, 0.18), transparent 22%),
    radial-gradient(circle at 85% 25%, rgba(52, 168, 83, 0.12), transparent 22%),
    linear-gradient(180deg, #08101d 0%, #0b1020 100%);
  overflow-x: hidden;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

.hidden {
  display: none !important;
}

/* Фон */
.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.35;
  pointer-events: none;
  animation: float 14s ease-in-out infinite;
}

.orb-1 {
  width: 380px;
  height: 380px;
  background: #4285f4;
  top: -120px;
  left: -120px;
}

.orb-2 {
  width: 300px;
  height: 300px;
  background: #34a853;
  right: -90px;
  bottom: 8vh;
  animation-delay: -6s;
}

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.06;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* Общие стеклянные блоки */
.glass {
  background: var(--panel);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* Верхняя панель */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;

  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 18px 28px;

  background: linear-gradient(
    180deg,
    rgba(8, 16, 29, 0.92),
    rgba(8, 16, 29, 0.55)
  );

  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 44px;
  height: 44px;

  display: grid;
  place-items: center;

  border-radius: 14px;
  background: linear-gradient(135deg, #4285f4, #7c4dff);

  font-weight: 800;
  font-size: 1.25rem;

  box-shadow: 0 10px 24px rgba(66, 133, 244, 0.35);
}

.brand strong {
  display: block;
  font-size: 1.15rem;
}

.brand small {
  display: block;
  color: var(--muted);
}

.ghost-btn,
.primary-btn,
.tag,
.banner-close {
  border: 0;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ghost-btn {
  padding: 12px 18px;
  border-radius: 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.ghost-btn:hover,
.primary-btn:hover,
.tag:hover {
  transform: translateY(-2px);
}

/* Контейнер */
.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0 80px;
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 28px;
  align-items: center;
  min-height: calc(100vh - 180px);
}

.chip {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(66, 133, 244, 0.14);
  color: #9dc0ff;
  border: 1px solid rgba(66, 133, 244, 0.22);
}

.hero h1 {
  margin: 18px 0 16px;
  font-size: clamp(3rem, 6vw, 5.8rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 58ch;
  color: var(--muted);
  line-height: 1.8;
  font-size: 1.1rem;
}

/* Поиск */
.search-card {
  padding: 18px;
  border-radius: 28px;
}

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

.search-row input,
.admin-form input,
.admin-form select,
.admin-form textarea,
.modal input,
.modal select,
.modal textarea {
  width: 100%;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  outline: none;
}

.search-row input:focus,
.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus,
.modal input:focus {
  border-color: rgba(66, 133, 244, 0.42);
  box-shadow: 0 0 0 4px rgba(66, 133, 244, 0.12);
}

.primary-btn {
  padding: 15px 22px;
  border-radius: 16px;
  white-space: nowrap;
  color: white;
  font-weight: 700;
  background: linear-gradient(135deg, #4285f4, #7c4dff);
  box-shadow: 0 16px 30px rgba(66, 133, 244, 0.24);
}

.quick-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.tag {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Секция списка */
.section-head {
  margin-top: 40px;
  margin-bottom: 20px;

  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
}

.section-head h2 {
  margin: 0 0 8px;
  font-size: 2rem;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

.count-label {
  color: var(--muted);
}

/* Карточки сайтов */
.site-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
}

.site-card {
  padding: 22px;
  border-radius: 24px;
  animation: pop 0.25s ease;
}

.site-card h3 {
  margin: 0 0 8px;
  font-size: 1.4rem;
}

.site-card p {
  margin: 8px 0;
  color: var(--muted);
  line-height: 1.7;
}

.site-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

/* Бейджи статусов */
.status-badge {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
}

.status-badge.safe {
  background: rgba(52, 168, 83, 0.12);
  color: #8ff1a8;
}

.status-badge.unwanted {
  background: rgba(251, 188, 5, 0.12);
  color: #ffe08a;
}

.status-badge.unsafe {
  background: rgba(234, 67, 53, 0.12);
  color: #ff9c93;
}

.status-badge.blocked {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

/* Футер */
.footer {
  padding: 30px 16px 40px;
  text-align: center;
  color: var(--muted);
}

.footer a {
  color: #a8c7ff;
}

/* Баннер и модалки */
.banner-overlay,
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;

  display: grid;
  place-items: center;

  padding: 18px;
  background: rgba(1, 6, 15, 0.62);

  animation: fadeIn 0.2s ease;
}

.banner,
.modal {
  position: relative;
  width: min(560px, 100%);
  padding: 26px;
  border-radius: 28px;
  animation: pop 0.25s ease;
}

.banner-kicker {
  color: #9dc0ff;
  margin-bottom: 8px;
}

.banner-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
}

.banner-text {
  margin-top: 10px;
  color: var(--muted);
}

.banner-text a {
  color: #a8c7ff;
}

.banner-close {
  position: absolute;
  top: 14px;
  right: 14px;

  width: 40px;
  height: 40px;

  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: white;
  font-size: 1.6rem;
}

/* Админка */
.full {
  width: 100%;
}

.login-msg {
  margin-top: 10px;
  min-height: 20px;
  color: #ff9c93;
}

.admin-form {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.admin-list {
  margin-top: 18px;
  display: grid;
  gap: 10px;
}

/* Анимации */
@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

/* Адаптивность */
@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 30px;
  }
}

@media (max-width: 640px) {
  .topbar {
    padding: 14px;
  }

  .shell {
    width: calc(100% - 18px);
    padding-top: 20px;
  }

  .search-row {
    flex-direction: column;
  }

  .section-head {
    flex-direction: column;
    align-items: start;
  }
}
