/* =========================
   Font
========================= */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

/* =========================
   Base
========================= */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-primary: #12121c;
  --bg-secondary: #1e1e2f;
  --text-primary: #ffffff;
  --accent: #ffcc00;

  --card-bg: rgba(255, 255, 255, 0.08);
  --card-hover: rgba(255, 255, 255, 0.15);
}

/* =========================
   Layout
========================= */
body {
  font-family: 'Poppins', sans-serif;
  background: radial-gradient(circle at top, var(--bg-secondary), var(--bg-primary));
  color: var(--text-primary);

  display: flex;
  justify-content: center;
  align-items: flex-start;

  min-height: 100vh;
  padding-top: 120px;

  overflow: hidden;
}

.container {
  text-align: center;
}

.site-title {
  font-size: 3rem;
  font-weight: 600;
  margin-bottom: 60px;
}

/* =========================
   Grid
========================= */
.services {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
}

/* =========================
   Service Card (FIXED STRUCTURE)
========================= */
.service-box {
  width: 160px;
  height: 160px;

  display: flex;
  flex-direction: column;
  align-items: center;

  padding: 16px 12px;

  background: var(--card-bg);
  border-radius: 20px;
  border: none;

  cursor: pointer;

  backdrop-filter: blur(8px);
  transition: 0.25s ease;

  justify-content: space-between;
}

.service-box:hover {
  transform: translateY(-6px);
  background: var(--card-hover);
}

/* =========================
   Logo Zone (CRITICAL FIX)
========================= */
/* This is the "fixed height area" that prevents shifting */
.logo,
.help-logo {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* =========================
   Logos (NO POSITION HACKS)
========================= */
.logo {
  object-fit: contain;
}

/* Plex */
.plex-logo {
  height: 80px;
}

/* Jellyseerr */
.jellyseerr-logo {
  height: 60px;
  margin-top: 10px;
}

/* Minecraft */
.minecraft-logo {
  height: 90px;
  width: auto;
}

/* =========================
   Help Icon
========================= */
.help-logo {
  font-size: 4rem;
  font-weight: 700;
  color: var(--accent);
}

/* =========================
   Text (FIXED ALIGNMENT)
========================= */
.service-box span {
  height: 40px;

  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;

  color: #ffffff;

  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.5px;

  /* “chunky / 3D-ish” effect */
  text-shadow:
    1px 1px 0 #000,
    2px 2px 0 rgba(0, 0, 0, 0.35);

  transform: translateZ(0);
}

/* Minecraft IP override */
.ip-text {
  font-size: 0.75rem;
  word-break: break-word;
}

/* =========================
   Toast
========================= */
.service-box {
  position: relative;
}

.toast {
  position: absolute;
  bottom: -42px;
  left: 50%;
  transform: translateX(-50%);

  background: #fff;
  color: #12121c;

  padding: 8px 16px;
  border-radius: 10px;

  font-size: 0.85rem;
  font-weight: 600;

  opacity: 0;
  animation: toast-in 0.25s forwards;
}

.toast.fade-out {
  animation: toast-out 0.5s forwards;
}

/* =========================
   Modal
========================= */
.modal {
  position: fixed;
  inset: 0;

  display: none;
  align-items: center;
  justify-content: center;

  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(3px);
}

.modal.show {
  display: flex;
}

.modal-content {
  width: 90%;
  max-width: 420px;

  padding: 20px;
  border-radius: 12px;

  background: var(--bg-secondary);
  color: var(--text-primary);
}

/* Close */
.close-btn {
  position: absolute;
  top: 12px;
  right: 16px;

  font-size: 1.5rem;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
}

/* =========================
   Form
========================= */
.modal-content input,
.modal-content textarea,
.modal-content select {
  width: 100%;
  padding: 8px;
  margin-bottom: 14px;

  border-radius: 6px;
  border: 1px solid #555;

  background: var(--bg-primary);
  color: white;
}

.modal-content button {
  padding: 10px 18px;
  border-radius: 8px;

  background: var(--accent);
  color: #12121c;

  border: none;
  font-weight: 600;
  cursor: pointer;
}

/* =========================
   Dynamic Fields
========================= */
.dynamic-group {
  margin-top: 10px;
}

.dynamic-bullet-list {
  margin: 8px 0 12px 18px;
}

.dynamic-bullet-list label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

/* =========================
   Animations
========================= */
@keyframes toast-in {
  to {
    opacity: 1;
    transform: translateX(-50%);
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateX(-50%);
  }
}