/* =============================================
   Paleta base (fiel ao pwa2)
============================================= */
:root {
  --bg-900: #0b1d26;
  --bg-800: #132631;
  --bg-700: #1d3442;
  --text-main: #f5e9c9;
  --text-soft: #c8bd9f;
  --line: rgba(255, 255, 255, 0.14);
  --accent: #f6be63;
  --danger: #fb7185;
  --success: #22c55e;
}

/* Override Bootstrap base */
body {
  font-family: 'Barlow', 'Segoe UI', sans-serif;
  color: var(--text-main);
  background-color: transparent;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

/* =============================================
   Aurora Background animado
   ============================================= */
.aurora-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  background: var(--bg-900);
  pointer-events: none;
}

.aurora-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 18% 8%, rgba(64, 57, 194, 0.39), transparent 40%),
    radial-gradient(circle at 84% 12%, rgba(32, 103, 128, 0.20), transparent 40%);
  opacity: 0.6;
}

.aurora-blob {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.25;
  mix-blend-mode: screen;
  animation: move-aurora 20s infinite alternate ease-in-out;
}

.aurora-1 {
  background: radial-gradient(circle, #f6be63 0%, transparent 70%);
  top: -200px;
  left: -100px;
  animation-duration: 25s;
}

.aurora-2 {
  background: radial-gradient(circle, #206780 0%, transparent 70%);
  bottom: -200px;
  right: -100px;
  animation-duration: 30s;
  animation-delay: -5s;
}

.aurora-3 {
  background: radial-gradient(circle, #ef965f 0%, transparent 70%);
  top: 30%;
  left: 60%;
  width: 400px;
  height: 400px;
  animation-duration: 22s;
  animation-delay: -10s;
}

@keyframes move-aurora {
  0% {
    transform: translate(0, 0) rotate(0deg) scale(1);
  }

  33% {
    transform: translate(100px, 150px) rotate(120deg) scale(1.2);
  }

  66% {
    transform: translate(-50px, 100px) rotate(240deg) scale(0.8);
  }

  100% {
    transform: translate(0, 0) rotate(360deg) scale(1);
  }
}


a {
  color: var(--text-main);
  text-decoration: none;
}

a:hover {
  color: var(--accent);
}

/* =============================================
   Header (fiel ao PWA: logo | nav central | user-area)
============================================= */
.header-root {
  position: static;
  z-index: 40;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 16px;
  height: 72px !important;
  padding: 0 24px !important;
  background: transparent !important;
  border: none;
  flex-wrap: nowrap;
}

.header-logo img {
  height: 40px;
  width: auto;
  max-width: 120px;
  display: block;
  filter: drop-shadow(4px 5px 4px rgba(0, 0, 0, 0.45)) drop-shadow(6px 6px 24px rgba(0, 0, 0, 0.35));
}

/* Nav central */
.header-nav>ul {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 4px;
  flex-wrap: nowrap;
}

.header-nav>ul>li {
  position: relative;
  list-style: none !important;
}

/* User area */
.user-area {
  display: flex;
  align-items: center;
  gap: 20px !important;
  margin-left: auto;
}

.user-badge {
  background: #000;
  color: #fff;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 11px;
  letter-spacing: 0.5px;
  font-weight: 700;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.user-type-badge {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  color: #fff;
  line-height: 1.2;
}

.zap-icon {
  height: 32px;
  width: 32px;
  cursor: pointer;
}

.avatar-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--text-main);
  font-size: 13px;
  font-weight: 600;
}

.avatar-btn img {
  height: 32px;
  width: 32px;
  border-radius: 50%;
  object-fit: cover;
}

/* Botões nav */
.btn-nav {
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-main);
  border-radius: 10px;
  padding: 9px 12px;
  cursor: pointer;
  font-size: 14px;
  text-decoration: none;
  display: inline-block;
  transition: background 0.15s ease-in-out, transform 0.15s ease-in-out, opacity 0.15s ease-in-out;
}

.btn-nav:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-main);
}

.btn-nav.primary {
  border: none;
  color: #1d1d1d;
  background: linear-gradient(120deg, #ef965f, #f6be63 40%, #fee7a5);
  font-weight: 700;
}

.btn-nav.primary:hover {
  opacity: 0.9;
}


/* =============================================
   Layout de página
============================================= */
.page-root {
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.page {
  width: min(1100px, 96vw);
  margin: 24px auto;
  display: grid;
  gap: 16px;
}

.page-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

@media (max-width: 600px) {
  .page-hero {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Login / Register: 2 colunas */
.login-page {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: calc(100vh - 60px);
}

@media (max-width: 768px) {
  .login-page {
    grid-template-columns: 1fr;
  }

  .login-col:last-child {
    display: none;
  }
}

.login-col {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.login-box {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  max-width: 400px;
  align-items: center;
  text-align: center;
}

/* Home */
.demo-container {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  width: min(1100px, 96vw);
  flex: 1;
  margin: 0 auto;
  padding: 0 16px;
}

@media (max-width: 900px) {
  .demo-container {
    grid-template-columns: 1fr;
  }

  .col-side {
    display: none;
  }
}

.col-main {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.main-box {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 0;
}

.col-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: flex-end;
}

.row-top {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  min-height: 100px;
  flex-direction: column;
}

.row-top img {
  flex: 1;
  max-width: calc(50% - 4px);
  height: auto;
  border-radius: 12px;
}

.row-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  flex: 1;
  overflow: hidden;
}

.row-bottom img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

/* =============================================
   Card (fiel ao pwa2)
============================================= */
.card-box {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(0, 0, 0, 0.15));
  border-radius: 16px;
  padding: 18px;
}

.card-box h2,
.card-box h3 {
  margin: 0 0 10px;
  color: var(--text-main);
}

/* =============================================
   Formulários
============================================= */
.form-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-main);
  font-size: 15px;
  outline: none;
  box-sizing: border-box;
}

.form-input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.form-input:focus {
  border-color: rgba(246, 190, 99, 0.5);
}

.form-input::placeholder {
  color: rgba(245, 233, 201, 0.45);
}

select.form-input option {
  background: #132631;
  color: var(--text-main);
}

.btn-submit {
  margin-top: 8px;
  padding: 12px 16px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  background: linear-gradient(90deg, #e59063 0%, #fbf4a5 50%, #e59063 100%);
  color: #1f1f1f;
  font-weight: 700;
  font-size: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  width: 100%;
  transition: opacity 0.15s ease-in-out, transform 0.1s ease-in-out;
}

.btn-submit:hover {
  opacity: 0.9;
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Switches & Form Check */
.form-check-input {
  background-color: rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.2);
  cursor: pointer;
}

.form-check-input:checked {
  background-color: var(--accent);
  border-color: var(--accent);
}

.form-check-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 0.25rem rgba(246, 190, 99, 0.15);
}

.form-switch .form-check-input {
  height: 1.5em;
  width: 3em;
  margin-right: 0.5rem;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba(255, 255, 255, 0.5)'/%3e%3c/svg%3e");
}

.form-switch .form-check-input:checked {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23000'/%3e%3c/svg%3e");
}

.fs-12px {
  font-size: 12px;
}

.opacity-50 {
  opacity: 0.5;
}

.btn-ghost {
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text-main);
  font-weight: 600;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  width: 100%;
  text-decoration: none;
  transition: background 0.15s ease-in-out, transform 0.15s ease-in-out;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
}

.btn-link {
  background: transparent;
  border: none;
  color: var(--text-main);
  text-decoration: underline;
  cursor: pointer;
  font-size: 14px;
  padding: 0;
}

/* Separador */
.or-divider {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-main);
  font-size: 13px;
}

.or-divider::before,
.or-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.2);
}

/* Mensagens */
.msg-error {
  color: #fca5a5;
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.15);
}

.msg-success {
  color: #86efac;
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(34, 197, 94, 0.4);
  background: rgba(34, 197, 94, 0.15);
}

/* Tipografia pwa2 */
.destaque1 {
  position: relative;
  font-size: 48px;
  font-weight: 700;
  color: transparent;
  background: linear-gradient(90deg, #e59063 0%, #fbf4a5 50%);
  -webkit-background-clip: text;
  background-clip: text;
  margin: 0;
  line-height: 1;
  display: inline-block;
  padding-bottom: 8px;
  filter: drop-shadow(4px 5px 4px rgba(0, 0, 0, 0.45)) drop-shadow(6px 6px 24px rgba(0, 0, 0, 0.35));
}

.destaque2 {
  font-size: 24px;
  font-weight: 600;
  padding-top: 16px;
  margin: 0;
}

.destaque2-color {
  position: relative;
  font-size: 24px;
  font-weight: 600;
  color: transparent;
  background: linear-gradient(90deg, #e59063 0%, #fbf4a5 50%);
  -webkit-background-clip: text;
  background-clip: text;
  margin: 0;
  line-height: 1;
  display: inline-block;
  padding-bottom: 8px;
  filter: drop-shadow(4px 5px 4px rgba(0, 0, 0, 0.45)) drop-shadow(6px 6px 24px rgba(0, 0, 0, 0.35));
}

.destaque3 {
  font-size: 16px;
  padding-top: 16px;
  font-weight: normal;
  max-width: 573px;
  margin: 0;
}

.detalhe1 {
  font-size: 28px;
  font-weight: 900;
  margin: 0;
}

.detalhe2 {
  font-size: 16px;
  color: var(--text-soft);
  margin: 0;
  padding-top: 4px;
}

.detalhe3 {
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.6;
  margin: 0;
}

.btn-jogar {
  padding: 14px 28px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, #ef965f, #f6be63 50%, #fee7a5);
  color: #1d1d1d;
  font-weight: 800;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(246, 190, 99, 0.35);
  transition: transform 0.15s ease-in-out, opacity 0.15s ease-in-out;
}

.btn-jogar:hover {
  transform: translateY(-2px);
  opacity: 0.95;
}

/* Grid 2 col */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

/* Badge */
.badge-plan {
  background: rgba(248, 233, 178, 0.12);
  color: var(--text-main);
  border: 1px solid rgba(248, 233, 178, 0.35);
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 12px;
}

/* Popup de conflito de sessão */
#session-conflict-popup {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.7);
  align-items: center;
  justify-content: center;
}

#session-conflict-popup.active {
  display: flex;
}

.popup-box {
  background: var(--bg-700);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
  max-width: 380px;
  width: 90%;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Galeria */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}

.gallery-grid img {
  width: 100%;
  border-radius: 10px;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid var(--line);
}

/* Plano card */
.plan-card {
  text-align: left;
  width: 100%;
  border-radius: 14px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text-main);
  display: grid;
  gap: 6px;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
  cursor: pointer;
}

.plan-card:hover,
.plan-card.selected {
  border-color: rgba(248, 233, 178, 0.55);
  background: rgba(248, 233, 178, 0.10);
}

/* Transação row */
.transacao-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.25);
}

/* Footer simples */
footer {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  color: var(--text-soft);
  font-size: 13px;
}

/* =============================================
   Nav central (links tipo pwa2)
============================================= */
.nav-link-item {
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-main);
  text-decoration: none;
  border-radius: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 0.15s;
}

.nav-link-item:hover {
  color: var(--accent);
}

/* Dropdown */
.dropdown-wrap {
  position: relative;
}

.dropdown-toggle-btn {
  font-family: inherit;
}

.dropdown-menu-custom {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 180px;
  background: rgba(13, 36, 50, 0.97);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  z-index: 100;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}

.dropdown-wrap:hover .dropdown-menu-custom {
  display: block;
}

.dropdown-item-custom {
  display: block;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--text-main);
  font-size: 14px;
  text-decoration: none;
}

.dropdown-item-custom:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--accent);
}

/* =============================================
   Offcanvas & Mobile Burger (PWA)
============================================= */
.burger-btn {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  width: 24px;
  height: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.burger-btn span {
  width: 24px;
  height: 2px;
  background: var(--text-main);
  border-radius: 10px;
  transition: all 0.3s linear;
  position: relative;
  transform-origin: 1px;
}

.mobile-nav-item {
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-main);
  transition: background 0.15s;
  text-decoration: none;
  display: block;
}

.mobile-nav-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--accent);
}

/* Remove small arrow from Bootstrap dropdown */
.dropdown-toggle-trigger::after {
  display: none !important;
}

@media (max-width: 768px) {
  .card-body {
    padding: 1rem !important;
  }

  .row>[class*="col-"] {
    padding-left: 10px;
    padding-right: 10px;
  }

  .destaque2-color {
    font-size: 1.25rem;
  }

  .form-switch .form-check-input {
    width: 2.5em;
    height: 1.25em;
  }

  .user-badge {
    font-size: 11px !important;
    padding: 4px 6px !important;
    min-width: 85px;
  }
}

/* =============================================
   Dropdown Hover (Desktop)
============================================= */
@media (min-width: 992px) {
  .header-nav .dropdown:hover .dropdown-menu {
    display: block;
    margin-top: 0;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {

  *,
  ::before,
  ::after {
    animation-delay: -1ms !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    background-attachment: initial !important;
    scroll-behavior: auto !important;
    transition-duration: 0s !important;
    transition-delay: 0s !important;
  }
}

/* Accessibility Focus */
:focus-visible {
  outline: 2px solid var(--accent) !important;
  outline-offset: 2px !important;
}

button:focus:not(:focus-visible),
a:focus:not(:focus-visible),
input:focus:not(:focus-visible),
select:focus:not(:focus-visible),
textarea:focus:not(:focus-visible) {
  outline: none !important;
}