:root {
  --bg: #070b14;
  --card: rgba(255, 255, 255, 0.08);
  --card-hover: rgba(255, 255, 255, 0.13);
  --border: rgba(255, 255, 255, 0.14);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.65);
  --muted-strong: rgba(255, 255, 255, 0.82);
  --blue: #00d4ff;
  --purple: #7c3cff;
  --red: #ff3b5c;
  --green: #33d17a;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

button,
input {
  font-family: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

.background {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at top left, rgba(0, 212, 255, 0.18), transparent 34%),
    radial-gradient(circle at bottom right, rgba(124, 60, 255, 0.20), transparent 34%),
    linear-gradient(135deg, #060913, #0b1020 55%, #070b14);
}

.background::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.85), transparent);
}

.orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(70px);
  opacity: 0.55;
  animation: floatOrb 12s ease-in-out infinite;
}

.orb-one {
  width: 260px;
  height: 260px;
  background: var(--blue);
  top: 10%;
  left: 8%;
}

.orb-two {
  width: 300px;
  height: 300px;
  background: var(--purple);
  right: 10%;
  bottom: 10%;
  animation-delay: -4s;
}

.orb-three {
  width: 220px;
  height: 220px;
  background: #2dffb3;
  right: 35%;
  top: 50%;
  opacity: 0.18;
  animation-delay: -7s;
}

@keyframes floatOrb {
  0%, 100% {
    transform: translateY(0) translateX(0);
  }

  50% {
    transform: translateY(-35px) translateX(25px);
  }
}

.topbar {
  width: min(1180px, calc(100% - 36px));
  margin: 24px auto 0;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--border);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.075);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

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

.brand-logo {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 26px;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  box-shadow: 0 0 34px rgba(0, 212, 255, 0.32);
}

.brand h1 {
  font-size: 24px;
  line-height: 1;
}

.brand p {
  color: var(--muted);
  font-size: 14px;
  margin-top: 5px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.container {
  width: min(1180px, calc(100% - 36px));
  margin: 70px auto 50px;
}

.hero {
  text-align: center;
  margin-bottom: 42px;
}

.hero-badge {
  width: fit-content;
  margin: 0 auto 18px;
  padding: 9px 14px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted-strong);
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(14px);
  font-size: 14px;
}

.hero-badge span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 18px rgba(51, 209, 122, 0.9);
}

.hero h2 {
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.95;
  letter-spacing: -3px;
  margin-bottom: 20px;
  background: linear-gradient(90deg, #fff, #9befff, #c7b0ff);
  -webkit-background-clip: text;
  color: transparent;
}

.hero p {
  max-width: 660px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 22px;
}

.hub-card {
  position: relative;
  min-height: 220px;
  padding: 24px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--card);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: 0.25s ease;
}

.hub-card:hover {
  transform: translateY(-8px);
  background: var(--card-hover);
  border-color: rgba(0, 212, 255, 0.46);
  box-shadow: 0 28px 90px rgba(0, 212, 255, 0.14);
}

.hub-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  opacity: 0;
  background:
    radial-gradient(circle at top left, rgba(0, 212, 255, 0.28), transparent 45%),
    radial-gradient(circle at bottom right, rgba(124, 60, 255, 0.26), transparent 45%);
  transition: 0.25s ease;
}

.hub-card:hover::before {
  opacity: 1;
}

.card-content {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card-icon,
.card-img {
  width: 62px;
  height: 62px;
  border-radius: 20px;
  margin-bottom: 20px;
}

.card-img {
  object-fit: cover;
  background: rgba(255, 255, 255, 0.12);
}

.card-icon {
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.25);
}

.hub-card h3 {
  font-size: 24px;
  margin-bottom: 10px;
}

.hub-card p {
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 18px;
}

.card-link {
  margin-top: auto;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  word-break: break-all;
}

.loading-card,
.empty-card {
  grid-column: 1 / -1;
  min-height: 160px;
  display: grid;
  place-items: center;
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.05);
}

.status-box {
  margin-bottom: 24px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.07);
  color: var(--muted-strong);
}

.status-box.success {
  border-color: rgba(51, 209, 122, 0.45);
  background: rgba(51, 209, 122, 0.10);
}

.status-box.error {
  border-color: rgba(255, 59, 92, 0.45);
  background: rgba(255, 59, 92, 0.10);
}

.admin-panel {
  margin-top: 55px;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.075);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.section-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.section-header h2 {
  font-size: 28px;
  margin-bottom: 7px;
}

.section-header p {
  color: var(--muted);
}

.admin-form {
  padding: 20px;
  border-radius: 24px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 26px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group.full {
  grid-column: 1 / -1;
}

.form-group label {
  color: var(--muted-strong);
  font-weight: 650;
  font-size: 14px;
}

.form-group input {
  width: 100%;
  padding: 14px 14px;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  outline: none;
  color: white;
  background: rgba(0, 0, 0, 0.26);
  transition: 0.2s ease;
}

.form-group input:focus {
  border-color: rgba(0, 212, 255, 0.7);
  box-shadow: 0 0 0 4px rgba(0, 212, 255, 0.10);
}

.form-actions {
  margin-top: 20px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.primary-btn,
.ghost-btn,
.danger-btn,
.small-btn {
  border: none;
  border-radius: 15px;
  padding: 12px 17px;
  color: white;
  font-weight: 800;
  transition: 0.2s ease;
}

.primary-btn {
  background: linear-gradient(135deg, var(--blue), var(--purple));
  box-shadow: 0 12px 34px rgba(0, 212, 255, 0.18);
}

.ghost-btn {
  background: rgba(255, 255, 255, 0.11);
}

.danger-btn {
  background: rgba(255, 59, 92, 0.85);
}

.primary-btn:hover,
.ghost-btn:hover,
.danger-btn:hover,
.small-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.12);
}

.full-btn {
  width: 100%;
  margin-top: 6px;
}

.admin-table-wrapper h3 {
  font-size: 21px;
  margin-bottom: 14px;
}

.admin-list {
  display: grid;
  gap: 12px;
}

.admin-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.admin-item strong {
  display: block;
  margin-bottom: 5px;
  font-size: 17px;
}

.admin-item span {
  display: block;
  color: var(--muted);
  font-size: 14px;
  word-break: break-all;
}

.admin-actions {
  display: flex;
  gap: 9px;
}

.small-btn.edit {
  background: rgba(0, 170, 255, 0.82);
}

.small-btn.delete {
  background: rgba(255, 59, 92, 0.86);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(10px);
}

.modal-card {
  position: relative;
  width: min(430px, 100%);
  padding: 28px;
  border-radius: 28px;
  background: rgba(13, 18, 32, 0.96);
  border: 1px solid var(--border);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.55);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 13px;
  color: white;
  font-size: 24px;
  background: rgba(255, 255, 255, 0.10);
}

.modal-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.10);
  font-size: 26px;
}

.modal-card h2 {
  font-size: 28px;
  margin-bottom: 8px;
}

.modal-card p {
  color: var(--muted);
  margin-bottom: 20px;
}

.footer {
  padding: 32px 20px;
  text-align: center;
  color: rgba(255, 255, 255, 0.45);
}

.hidden {
  display: none !important;
}

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

  .top-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .top-actions button {
    width: 100%;
  }

  .container {
    margin-top: 48px;
  }

  .hero h2 {
    letter-spacing: -1.5px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

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

  .admin-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

.draggable-item {
  cursor: grab;
  user-select: none;
}

.draggable-item:active {
  cursor: grabbing;
}

.draggable-item.dragging {
  opacity: 0.45;
  transform: scale(0.98);
  border-color: rgba(0, 212, 255, 0.65);
  background: rgba(0, 212, 255, 0.12);
}

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

.drag-handle {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.10);
  font-size: 20px;
  font-weight: 900;
}

.drag-handle:hover {
  background: rgba(0, 212, 255, 0.18);
  color: white;
}