/* ===== Reset & Base ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Black and gold luxury color palette */
  --color-background: #000000;
  --color-surface: #0a0a0a;
  --color-surface-elevated: #141414;

  --color-gold-primary: #ffd700;
  --color-gold-light: #fff4cc;
  --color-gold-dark: #b8860b;
  --color-gold-darker: #8b6914;

  --color-white: #ffffff;
  --color-white-soft: #f5f5f5;
  --color-gray-light: #cccccc;
  --color-gray: #808080;

  --color-border: #1a1a1a;
  --color-border-gold: rgba(255, 215, 0, 0.3);

  --shadow-gold: 0 0 20px rgba(255, 215, 0, 0.3);
  --shadow-gold-strong: 0 0 30px rgba(255, 215, 0, 0.5);
  --shadow-card: 0 20px 60px rgba(0, 0, 0, 0.8);

  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;

  --spacing-xs: 0.5rem;
  --spacing-sm: 0.75rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 2.5rem;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--color-background);
  color: var(--color-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Animated background canvas */
.background-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  /* Substituindo animação de partículas por gradiente elegante animado */
  background: radial-gradient(circle at 50% 50%, rgba(255, 215, 0, 0.03) 0%, rgba(0, 0, 0, 1) 100%);
  overflow: hidden;
}

.background-canvas::before {
  content: "";
  position: absolute;
  width: 200%;
  height: 200%;
  top: -50%;
  left: -50%;
  background: radial-gradient(circle at 20% 30%, rgba(255, 215, 0, 0.08) 0%, transparent 25%),
    radial-gradient(circle at 80% 70%, rgba(184, 134, 11, 0.06) 0%, transparent 25%),
    radial-gradient(circle at 40% 80%, rgba(255, 215, 0, 0.05) 0%, transparent 30%);
  animation: floatingGradient 20s ease-in-out infinite;
}

.background-canvas::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background: linear-gradient(45deg, transparent 48%, rgba(255, 215, 0, 0.02) 50%, transparent 52%),
    linear-gradient(-45deg, transparent 48%, rgba(255, 215, 0, 0.02) 50%, transparent 52%);
  background-size: 100px 100px;
  opacity: 0.3;
  animation: shimmer 15s linear infinite;
}

@keyframes floatingGradient {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
  33% {
    transform: translate(10%, 10%) rotate(5deg);
  }
  66% {
    transform: translate(-10%, 5%) rotate(-5deg);
  }
}

@keyframes shimmer {
  0% {
    transform: translateX(0) translateY(0);
  }
  100% {
    transform: translateX(100px) translateY(100px);
  }
}

/* ===== Container ===== */
.container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: var(--spacing-lg);
  position: relative;
  z-index: 1;
}

/* ===== Login Card ===== */
.login-card {
  background: linear-gradient(135deg, var(--color-surface) 0%, var(--color-surface-elevated) 100%);
  border: 1px solid var(--color-border-gold);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card), var(--shadow-gold);
  width: 100%;
  max-width: 460px;
  padding: var(--spacing-2xl);
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Decorative gold corners */
.corner-decoration {
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-gold-primary);
  opacity: 0.6;
}

.corner-top-left {
  top: 16px;
  left: 16px;
  border-right: none;
  border-bottom: none;
  border-radius: 4px 0 0 0;
}

.corner-top-right {
  top: 16px;
  right: 16px;
  border-left: none;
  border-bottom: none;
  border-radius: 0 4px 0 0;
}

.corner-bottom-left {
  bottom: 16px;
  left: 16px;
  border-right: none;
  border-top: none;
  border-radius: 0 0 0 4px;
}

.corner-bottom-right {
  bottom: 16px;
  right: 16px;
  border-left: none;
  border-top: none;
  border-radius: 0 0 4px 0;
}

/* ===== Header ===== */
.login-header {
  text-align: center;
  margin-bottom: var(--spacing-2xl);
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}

.brand-icon {
  filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.6));
  animation: iconGlow 3s ease-in-out infinite;
}

@keyframes iconGlow {
  0%,
  100% {
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.6));
  }
  50% {
    filter: drop-shadow(0 0 16px rgba(255, 215, 0, 0.9));
  }
}

.brand-name {
  font-family: "Playfair Display", serif;
  font-size: 2.25rem;
  font-weight: 700;
  background: linear-gradient(
    135deg,
    var(--color-gold-light) 0%,
    var(--color-gold-primary) 50%,
    var(--color-gold-dark) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.05em;
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

/* Gold decorative line */
.gold-line {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-gold-primary), transparent);
  margin: var(--spacing-sm) auto;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.subtitle {
  font-size: 0.9375rem;
  color: var(--color-gray-light);
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ===== Form ===== */
.login-form {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.form-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-gold-primary);
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

/* Input with gold glow on focus */
.input-wrapper {
  position: relative;
}

.form-input {
  width: 100%;
  padding: 0.875rem 1rem;
  background-color: rgba(20, 20, 20, 0.6);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-white);
  font-size: 0.9375rem;
  font-family: inherit;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
  backdrop-filter: blur(10px);
}

.form-input::placeholder {
  color: var(--color-gray);
}

.form-input:hover {
  border-color: rgba(255, 215, 0, 0.3);
  background-color: rgba(20, 20, 20, 0.8);
}

.form-input:focus {
  border-color: var(--color-gold-primary);
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.15), 0 0 20px rgba(255, 215, 0, 0.2);
  background-color: rgba(20, 20, 20, 0.9);
}

/* ===== Form Options ===== */
.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: -0.25rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  cursor: pointer;
}

.checkbox-input {
  width: 1.125rem;
  height: 1.125rem;
  cursor: pointer;
  accent-color: var(--color-gold-primary);
  filter: brightness(1.2);
}

.checkbox-text {
  font-size: 0.875rem;
  color: var(--color-gray-light);
  user-select: none;
}

.forgot-link {
  font-size: 0.875rem;
  color: var(--color-gold-primary);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  position: relative;
}

.forgot-link::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-gold-primary);
  transition: width 0.3s ease;
}

.forgot-link:hover::after {
  width: 100%;
}

.forgot-link:hover {
  color: var(--color-gold-light);
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}

/* Luxury gold button with intense glow */
.submit-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  width: 100%;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, var(--color-gold-primary) 0%, var(--color-gold-dark) 100%);
  color: var(--color-background);
  border: none;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

.submit-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

.submit-button:hover::before {
  left: 100%;
}

.submit-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 215, 0, 0.6), 0 0 30px rgba(255, 215, 0, 0.4);
  background: linear-gradient(135deg, var(--color-gold-light) 0%, var(--color-gold-primary) 100%);
}

.submit-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(255, 215, 0, 0.4);
}

.button-text {
  line-height: 1;
  position: relative;
  z-index: 1;
}

.button-icon {
  transition: transform 0.3s ease;
  position: relative;
  z-index: 1;
}

.submit-button:hover .button-icon {
  transform: translateX(4px);
}

/* ===== Divider ===== */
.divider {
  position: relative;
  text-align: center;
  margin: var(--spacing-xl) 0;
}

.divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.3), transparent);
}

.divider-text {
  position: relative;
  display: inline-block;
  padding: 0 var(--spacing-md);
  background-color: var(--color-surface);
  color: var(--color-gray);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ===== Footer ===== */
.footer-links {
  text-align: center;
}

.footer-text {
  font-size: 0.875rem;
  color: var(--color-gray-light);
}

.signup-link {
  color: var(--color-gold-primary);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
  position: relative;
}

.signup-link::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-gold-primary);
  transition: width 0.3s ease;
}

.signup-link:hover::after {
  width: 100%;
}

.signup-link:hover {
  color: var(--color-gold-light);
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}

/* ===== Responsive ===== */
@media (max-width: 480px) {
  .container {
    padding: var(--spacing-md);
  }

  .login-card {
    padding: var(--spacing-xl);
  }

  .brand-name {
    font-size: 1.75rem;
  }

  .form-options {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-sm);
  }

  .corner-decoration {
    width: 15px;
    height: 15px;
  }
}

/* ===== Focus Visible ===== */
.submit-button:focus-visible,
.form-input:focus-visible,
.forgot-link:focus-visible,
.signup-link:focus-visible {
  outline: 2px solid var(--color-gold-primary);
  outline-offset: 3px;
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2);
}
