*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #050505;
  --card-border: #121212;
  --card-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
  --text-dark: #0a0a0a;
  --text-muted: rgba(10, 10, 10, 0.72);
  --text-light: rgba(255, 255, 255, 0.82);
  --pink: #ff2d8f;
  --purple: #8b1f7a;
  --blue: #1f6bff;
}

html,
body {
  min-height: 100%;
}

body {
  font-family: "Inter", system-ui, sans-serif;
  background: var(--bg);
  color: #fff;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(
      135deg,
      rgba(255, 45, 143, 0.55) 0%,
      rgba(255, 45, 143, 0.18) 22%,
      transparent 52%
    ),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 31px,
      rgba(255, 255, 255, 0.035) 31px,
      rgba(255, 255, 255, 0.035) 32px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 31px,
      rgba(255, 255, 255, 0.035) 31px,
      rgba(255, 255, 255, 0.035) 32px
    );
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 18% 88%, rgba(255, 45, 143, 0.35), transparent 42%);
  pointer-events: none;
  z-index: 0;
}

.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.35rem;
  padding: 2.5rem 1.25rem;
  max-width: 920px;
  margin: 0 auto;
}

.card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  width: min(100%, 760px);
  min-height: 118px;
  padding: 1.35rem 1.5rem;
  border: 3px solid var(--card-border);
  border-radius: 14px;
  box-shadow: var(--card-shadow);
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.65);
}

.card:hover .card__icon {
  transform: translateY(-1px);
}

.card--about {
  background: linear-gradient(90deg, #ff2d8f 0%, #5a0f52 48%, #120812 100%);
}

.card--catalog {
  background: linear-gradient(90deg, #a01878 0%, #3a0a34 52%, #0a060a 100%);
}

.card--discord {
  background: linear-gradient(90deg, #1f6bff 0%, #0d1f52 52%, #050810 100%);
}

.card--tiktok {
  background: linear-gradient(90deg, #f2f2f2 0%, #9a9a9a 38%, #1a1a1a 62%, #050505 100%);
}

.card__logo {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(0, 0, 0, 0.2);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.card__logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card__content {
  flex: 1;
  min-width: 0;
}

.card__title {
  font-size: clamp(1.65rem, 4vw, 2rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--text-dark);
  line-height: 1.05;
}

.card__title--light {
  color: #fff;
}

.card__title--tiktok {
  color: #0a0a0a;
}

.card__text--tiktok {
  color: rgba(10, 10, 10, 0.72);
}

.card__text {
  margin-top: 0.35rem;
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.35;
}

.card__highlight {
  font-size: 1.15em;
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: 0.01em;
}

.card__text--mono {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.82rem;
  color: var(--text-light);
}

.card__icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 2px solid var(--card-border);
  background: rgba(5, 5, 5, 0.72);
  display: grid;
  place-items: center;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 8px 18px rgba(0, 0, 0, 0.35);
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    color 0.2s ease;
}

.card--about .card__icon {
  color: #ff8ec7;
  border-color: rgba(255, 45, 143, 0.35);
  background: rgba(20, 4, 14, 0.82);
}

.card--catalog .card__icon {
  color: #e88fd4;
  border-color: rgba(160, 24, 120, 0.45);
  background: rgba(14, 4, 12, 0.82);
}

.card--discord .card__icon {
  color: #8eb8ff;
  border-color: rgba(31, 107, 255, 0.45);
  background: rgba(4, 10, 24, 0.82);
}

.card--tiktok .card__icon {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(5, 5, 5, 0.88);
}

.card--about:hover .card__icon {
  border-color: rgba(255, 45, 143, 0.65);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 18px rgba(255, 45, 143, 0.28);
}

.card--catalog:hover .card__icon {
  border-color: rgba(255, 45, 143, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 18px rgba(160, 24, 120, 0.35);
}

.card--discord:hover .card__icon {
  border-color: rgba(31, 107, 255, 0.7);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 18px rgba(31, 107, 255, 0.35);
}

.card--tiktok:hover .card__icon {
  border-color: rgba(255, 255, 255, 0.65);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 18px rgba(255, 255, 255, 0.18);
}

@media (max-width: 640px) {
  .page {
    gap: 1rem;
    padding: 1.75rem 1rem;
  }

  .card {
    min-height: auto;
    padding: 1.1rem 1.15rem;
    gap: 1rem;
  }

  .card__logo {
    width: 58px;
    height: 58px;
  }

  .card__text {
    font-size: 0.88rem;
  }

  .card__text--mono {
    font-size: 0.74rem;
  }

  .card__icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
  }
}

/* Catalog pages */

.catalog-page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

.catalog-header {
  margin-bottom: 2rem;
}

.catalog-back {
  display: inline-block;
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.catalog-back:hover {
  color: #ff8ec7;
}

.catalog-eyebrow {
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ff8ec7;
  margin-bottom: 0.35rem;
}

.catalog-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.05;
}

.catalog-subtitle {
  margin-top: 0.5rem;
  color: rgba(255, 255, 255, 0.72);
  max-width: 36rem;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}

.catalog-item {
  border: 3px solid var(--card-border);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(10, 6, 10, 0.92);
  box-shadow: var(--card-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.catalog-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.65);
}

.catalog-item__image-wrap {
  aspect-ratio: 1;
  background: rgba(255, 255, 255, 0.04);
}

.catalog-item__image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.catalog-item__name {
  padding: 0.95rem 1rem 1.1rem;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}

.catalog-state,
.admin-panel {
  border: 3px solid var(--card-border);
  border-radius: 14px;
  padding: 1.5rem;
  background: linear-gradient(90deg, rgba(160, 24, 120, 0.28) 0%, rgba(10, 6, 10, 0.95) 55%);
  box-shadow: var(--card-shadow);
}

.catalog-state h2,
.admin-panel h2,
.admin-panel h3 {
  font-size: 1.35rem;
  margin-bottom: 0.65rem;
}

.catalog-state p,
.admin-panel p,
.admin-note {
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.5;
}

.setup-steps {
  margin-top: 1rem;
  padding-left: 1.2rem;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.7;
}

.setup-steps a {
  color: #ff8ec7;
}

.catalog-btn {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.75rem 1.1rem;
  border: 2px solid rgba(255, 45, 143, 0.45);
  border-radius: 12px;
  background: rgba(255, 45, 143, 0.18);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.catalog-btn:hover {
  background: rgba(255, 45, 143, 0.3);
  border-color: rgba(255, 45, 143, 0.7);
}

.catalog-btn--ghost {
  margin-top: 0;
  background: rgba(5, 5, 5, 0.55);
}

.admin-panel__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.admin-form {
  display: grid;
  gap: 1rem;
  max-width: 520px;
}

.admin-form label {
  display: grid;
  gap: 0.45rem;
  font-weight: 600;
}

.admin-form input[type="text"],
.admin-form input[type="email"],
.admin-form input[type="password"],
.admin-form input[type="file"] {
  width: 100%;
  padding: 0.75rem 0.85rem;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(5, 5, 5, 0.65);
  color: #fff;
  font: inherit;
}

.admin-preview {
  width: 100%;
  max-width: 280px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.12);
}

.form-message {
  margin-top: 0.25rem;
  font-size: 0.92rem;
}

.form-message--error {
  color: #ff8ba0;
}

.form-message--success {
  color: #8dffb0;
}

.admin-list-wrap {
  margin-top: 2rem;
}

.admin-list {
  display: grid;
  gap: 0.85rem;
  margin-top: 1rem;
}

.admin-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem;
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(5, 5, 5, 0.45);
}

.admin-item__thumb {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}

.admin-item__info {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 0.2rem;
}

.admin-item__info span {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.55);
}

.admin-item__delete {
  padding: 0.55rem 0.8rem;
  border: 2px solid rgba(255, 120, 120, 0.35);
  border-radius: 10px;
  background: rgba(255, 80, 80, 0.12);
  color: #ffb4b4;
  cursor: pointer;
  font: inherit;
}

.admin-note--error {
  color: #ff8ba0;
}

@media (max-width: 640px) {
  .catalog-page {
    padding: 1.5rem 1rem 2.5rem;
  }

  .admin-panel__top {
    flex-direction: column;
    align-items: flex-start;
  }

  .catalog-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
  }
}
