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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'Segoe UI', Arial, sans-serif;
  background: url('Fundo.jpg') center center / cover no-repeat;
}

/* ── GRID DE FUNDO ── */
.bg-grid {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  transform: rotate(-10deg) scale(1.3);
  transform-origin: center center;
  z-index: 0;
}

.bg-track {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
  animation: slideTrack 30s linear infinite;
}

.bg-track.track-2 { animation-direction: reverse; animation-duration: 35s; }
.bg-track.track-3 { animation-duration: 28s; }
.bg-track.track-4 { animation-direction: reverse; animation-duration: 32s; }
.bg-track.track-5 { animation-duration: 25s; }

@keyframes slideTrack {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.tile {
  width: 200px;
  height: 150px;
  border-radius: 10px;
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
}

.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── OVERLAY ── */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1;
}

/* ── LOGIN WRAPPER ── */
.login-wrapper {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

/* ── CAIXA DE LOGIN ── */
.login-box {
  background: rgba(42, 42, 54, 0.97);
  border-radius: 12px;
  padding: 40px 44px 36px;
  width: 100%;
  max-width: 460px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
}

.login-title {
  font-size: 26px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 28px;
  text-align: center;
}

/* ── INPUTS ── */
form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.input-group {
  width: 100%;
  margin-bottom: 12px;
}

.input-field {
  width: 100%;
  background: #3a3a4a;
  border: 1px solid #4a4a5a;
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 15px;
  color: #e0e0e0;
  outline: none;
  transition: border-color 0.2s;
}

.input-field::placeholder {
  color: #8a8a9a;
}

.input-field:focus {
  border-color: #6a6aaa;
  background: #404050;
}

/* ── BOTÕES ── */
.btn {
  width: 100%;
  padding: 13px 16px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, opacity 0.2s;
  letter-spacing: 0.3px;
}

.btn-login {
  background: transparent;
  color: #ffffff;
  border: 2px solid #ffffff;
  margin-top: 4px;
  margin-bottom: 0;
}

.btn-login:hover {
  background: rgba(255,255,255,0.1);
}

.btn-secondary {
  background: #3a3a4a;
  color: #d0d0e0;
  border: 1px solid #4a4a5a;
  margin-top: 12px;
}

.btn-secondary:hover {
  background: #454558;
  border-color: #6a6a7a;
}

/* ── LINKS ── */
.promo-text {
  width: 100%;
  text-align: center;
  margin-top: 16px;
  font-size: 14px;
  color: #c0c0d8;
}

/* ── RESPONSIVO ── */
@media (max-width: 520px) {
  .login-box {
    margin: 0 16px;
    padding: 32px 24px 28px;
  }
  .tile {
    width: 140px;
    height: 110px;
  }
}
