/* ==========
   Variáveis
   ========== */
:root {
  --bg: #020617;
  --bg-elevated: #020617;
  --card-bg: #020617;

  /* Paleta roxo/azul estilo Discord */
  --primary: #5865f2;
  --primary-soft: rgba(88, 101, 242, 0.22);
  --primary-strong: #4f46e5;

  --border-subtle: #1f2937;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --danger: #b91c1c;
  --danger-soft: #fecaca;
  --shadow-soft: 0 20px 45px rgba(15, 23, 42, 0.9);
  --radius-lg: 18px;
  --radius-xl: 24px;
}

/* ==========
   Reset & Base
   ========== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: radial-gradient(circle at top, #0b1120 0, #020617 55%, #000 100%);
  color: var(--text);
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* ==========
   Layout geral
   ========== */

.container {
  width: min(1100px, 100% - 2rem);
  margin-left: auto;
  margin-right: auto;
}

.page {
  flex: 1;
  padding: 5rem 0 3rem;
}

/* Títulos gerais centrados no topo da página */
.page > h1,
.page > h2 {
  text-align: center;
}

/* ==========
   Navbar
   ========== */

#navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(
    to bottom,
    rgba(2, 6, 23, 0.98),
    rgba(2, 6, 23, 0.9),
    transparent
  );
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.9);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 0;
  gap: 1rem;
}

.nav-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link {
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--muted);
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: 0.18s ease;
}

/* Hover em gradient suave */
.nav-link:hover {
  color: #fff;
  background: linear-gradient(
      90deg,
      rgba(168, 85, 247, 0.25) 0%,
      rgba(99, 102, 241, 0.25) 25%,
      rgba(59, 130, 246, 0.25) 55%,
      rgba(6, 182, 212, 0.25) 100%
    ),
    rgba(15, 23, 42, 0.6);
  border-color: rgba(168, 85, 247, 0.5);
}

/* Link da página atual com gradient forte */
.nav-link.active {
  background: linear-gradient(
    90deg,
    #a855f7 0%,
    #6366f1 25%,
    #3b82f6 55%,
    #06b6d4 100%
  );
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
  font-weight: 600;
}

/* Navbar responsiva */
@media (max-width: 640px) {
  .nav-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-links {
    justify-content: flex-start;
  }
}

/* ==========
   Nome / brand com gradient do logo
   ========== */

.brand {
  background: linear-gradient(
    90deg,
    #a855f7 0%,
    #6366f1 25%,
    #3b82f6 55%,
    #06b6d4 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 1.05rem;
}

/* ==========
   Títulos com gradient
   ========== */

h1,
h2,
h3 {
  margin: 0 0 0.75rem;
  background: linear-gradient(
    90deg,
    #a855f7 0%,
    #6366f1 25%,
    #3b82f6 55%,
    #06b6d4 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

h1 {
  font-size: clamp(1.9rem, 4vw, 2.4rem);
}

h2.section-title {
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

/* ==========
   HERO (index) – centrado e responsivo
   ========== */

.hero {
  text-align: center;
  padding: 90px 0 50px;
  background:
    radial-gradient(1100px 380px at 50% -10%, rgba(99, 102, 241, 0.16), transparent),
    radial-gradient(900px 360px at 50% 100%, rgba(6, 182, 212, 0.14), transparent);
}

.hero p {
  color: var(--muted);
  margin: 0 0 22px;
  font-size: clamp(1rem, 2.5vw, 1.1rem);
}

/* ==========
   Grid de produtos (página Produtos)
   ========== */

.grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr; /* mobile: 1 por linha */
  justify-items: center;
}

/* Tablet & Desktop: 3 colunas */
@media (min-width: 768px) {
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ==========
   Cards / Produtos
   ========== */

.form-card {
  background: radial-gradient(
      circle at top left,
      rgba(15, 23, 42, 0.9),
      transparent 60%
    ),
    linear-gradient(145deg, #020617, #020617);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(15, 23, 42, 0.95);
  padding: 1.2rem 1.25rem;
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.95);
  position: relative;
}

/* Card específico de produto com gradient & glow */
.product-card {
  display: flex;
  flex-direction: column;
  text-align: center;

  border: 1px solid transparent;
  background-origin: border-box;
  background-clip: padding-box, border-box;
  background-image:
    radial-gradient(circle at top left, rgba(0,0,0,0.8), rgba(0,0,0,0.5)),
    linear-gradient(
      90deg,
      #a855f7,
      #6366f1,
      #3b82f6,
      #06b6d4
    );

  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.95);
  transition: 0.3s ease;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 22px rgba(99, 102, 241, 0.45),
              0 0 40px rgba(6, 182, 212, 0.25);
}

/* Imagem do produto proporcional (tipo 1920x1080 → 16:9) */
.product-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 14px;
  margin-bottom: 10px;
}

@media (max-width: 400px) {
  .product-image {
    border-radius: 12px;
  }
}

/* ==========
   Form groups
   ========== */

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.9rem;
}

.form-group label {
  font-size: 0.85rem;
  color: var(--muted);
}

.form-group input,
.form-group textarea {
  border-radius: 999px;
  border: 1px solid rgba(30, 64, 175, 0.65);
  padding: 0.55rem 0.85rem;
  font-size: 0.9rem;
  background: radial-gradient(
      circle at top left,
      rgba(15, 23, 42, 0.9),
      transparent 65%
    ),
    rgba(15, 23, 42, 0.98);
  color: var(--text);
  outline: none;
  transition: 0.17s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #6b7280;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px rgba(88, 101, 242, 0.6);
}

/* Centrar form de login / admin */
#login-form,
#product-form {
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

/* ==========
   Botões
   ========== */

.btn {
  appearance: none;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  padding: 0.55rem 1.15rem;
  font-size: 0.9rem;
  background: radial-gradient(
      circle at top,
      rgba(15, 23, 42, 0.92),
      rgba(15, 23, 42, 1)
    ),
    #020617;
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  text-decoration: none;
  transition: 0.16s ease;
}

.btn:hover {
  border-color: rgba(226, 232, 240, 0.85);
  color: #f9fafb;
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.9);
}

/* Botão de destaque (inclui "Entrar no Discord") */
.btn.neon {
  border-color: var(--primary);
  background-image: radial-gradient(
      circle at top,
      var(--primary-soft),
      transparent 70%
    ),
    linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: #e5e7eb;
  font-weight: 600;
}

.btn.neon:hover {
  filter: brightness(1.05);
  box-shadow: 0 18px 40px rgba(88, 101, 242, 0.65);
}

/* Botão pequeno */
.btn.small {
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
}

/* Botão de perigo (apagar) */
.btn.danger {
  background: var(--danger);
  border-color: var(--danger-soft);
}

.btn.danger:hover {
  filter: brightness(1.1);
}

/* ==========
   Slider "Produtos em Destaque"
   ========== */

.featured {
  margin-top: 10px;
}

.slider {
  position: relative;
  background: var(--bg-elevated);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: var(--radius-lg);
  overflow: hidden;
  padding: 16px;
  max-width: 900px;
  margin: 0 auto;
}

.slide {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 18px;
  align-items: center;
  min-height: 260px;
}

.slide-img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
}

.slide-info {
  text-align: left;
}

.slide-desc {
  color: var(--muted);
}

/* Controlo do slider */
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.6);
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  user-select: none;
  color: var(--text);
}

.slider-btn:hover {
  transform: translateY(-50%) scale(1.06);
  box-shadow: 0 0 22px rgba(99, 102, 241, 0.45),
              0 0 40px rgba(6, 182, 212, 0.25);
  background: linear-gradient(
    90deg,
    #a855f7,
    #6366f1,
    #3b82f6,
    #06b6d4
  );
  color: #020617;
}

.slider-btn.prev {
  left: 10px;
}

.slider-btn.next {
  right: 10px;
}

.slider-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 12px;
}

.slider-dots .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.35);
  cursor: pointer;
  transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
}

.slider-dots .dot.active {
  background: #ffffff;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.7);
  transform: scale(1.2);
}

/* Slider responsivo */
@media (max-width: 768px) {
  .slide {
    grid-template-columns: 1fr;
  }

  .slide-img {
    height: 200px;
  }

  .slide-info {
    text-align: center;
  }
}

/* ==========
   Texto utilitário
   ========== */

.muted {
  color: var(--muted);
  font-size: 0.85rem;
}

.center {
  text-align: center;
}

/* ==========
   Footer
   ========== */

.footer {
  border-top: 1px solid rgba(15, 23, 42, 0.95);
  background: radial-gradient(circle at top, #020617 0, #020617 55%, #000 100%);
  padding: 1.3rem 0 1.6rem;
  margin-top: auto;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ==========
   Responsividade extra
   ========== */

@media (max-width: 480px) {
  .page {
    padding-top: 4.2rem;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 1.5rem, 100%);
  }
}

/* ==== Drag & drop visual ====\ */

.product-card.dragging {
  opacity: 0.6;
  transform: scale(0.97);
  cursor: grabbing;
}

/* ==== Animação de fade no slideshow ==== */

#featured-slider .slide {
  opacity: 1;
  transition: opacity 0.25s ease;
}

#featured-slider .slide.fade-out {
  opacity: 0;
}

#featured-slider .slide.fade-in {
  opacity: 1;
}

/* ==== Animação lateral no slideshow ==== */

#featured-slider .slide {
  transition: opacity 0.25s ease, transform 0.25s ease;
}

#featured-slider .slide.out-next {
  opacity: 0;
  transform: translateX(-40px); /* desliza para a esquerda ao mudar */
}

#featured-slider .slide.out-prev {
  opacity: 0;
  transform: translateX(40px);  /* desliza para a direita ao voltar */
}

/* Drag & drop visual (caso ainda não tenhas) */
.product-card.dragging {
  opacity: 0.6;
  transform: scale(0.97);
  cursor: grabbing;
}
