@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;900&family=Inter:wght@400;500;600&display=swap');

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

body {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%,   rgba(40,20,0,0.9) 0%, transparent 70%),
    radial-gradient(ellipse 60% 80% at 80% 100%,  rgba(10,30,10,0.8) 0%, transparent 70%),
    radial-gradient(ellipse 60% 80% at 20% 100%,  rgba(10,10,40,0.6) 0%, transparent 70%),
    #08090d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', 'Segoe UI', sans-serif;
  overflow: hidden;
}

/* ── Floating suit symbols ───────────────────────────────────────────── */
.bg-cards {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.bg-cards span {
  position: absolute;
  font-size: 9rem;
  opacity: 0;
  animation: floatUp 14s infinite ease-in-out;
  user-select: none;
}
.bg-cards span:nth-child(1) { left:  7%; top: 8%;   color: rgba(255,255,255,0.055); animation-delay:  0s;   font-size: 7rem; }
.bg-cards span:nth-child(2) { right: 8%; top: 12%;  color: rgba(220,60,60,0.07);   animation-delay:  2s;   font-size:10rem; }
.bg-cards span:nth-child(3) { left: 18%; bottom:18%;color: rgba(220,60,60,0.06);   animation-delay:  5s;   font-size: 8rem; }
.bg-cards span:nth-child(4) { right: 6%; bottom:10%;color: rgba(255,255,255,0.05); animation-delay:  8s;   font-size:11rem; }
.bg-cards span:nth-child(5) { left:  2%; top: 45%;  color: rgba(255,255,255,0.04); animation-delay:  3s;   font-size: 6rem; }
.bg-cards span:nth-child(6) { right: 3%; top: 55%;  color: rgba(220,60,60,0.06);   animation-delay:  6.5s; font-size: 9rem; }
.bg-cards span:nth-child(7) { left: 35%; top:  5%;  color: rgba(255,255,255,0.03); animation-delay:  1s;   font-size:13rem; }
.bg-cards span:nth-child(8) { right:28%; bottom: 5%;color: rgba(220,60,60,0.04);   animation-delay:  9s;   font-size:12rem; }

@keyframes floatUp {
  0%   { transform: translateY(30px) rotate(-8deg); opacity: 0; }
  15%  { opacity: 1; }
  85%  { opacity: 1; }
  100% { transform: translateY(-30px) rotate(8deg); opacity: 0; }
}

/* ── Card ─────────────────────────────────────────────────────────────── */
.login-container {
  background: linear-gradient(160deg, rgba(255,255,255,0.07) 0%, rgba(255,255,255,0.03) 100%);
  border: 1px solid rgba(255,255,255,0.1);
  border-top-color: rgba(255,255,255,0.18);
  border-radius: 24px;
  padding: 52px 44px 44px;
  width: 100%;
  max-width: 420px;
  backdrop-filter: blur(20px);
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.4),
    0 30px 80px rgba(0,0,0,0.7),
    0 0 60px rgba(245,180,0,0.06) inset;
  position: relative;
  z-index: 1;
  animation: cardIn 0.55s cubic-bezier(0.22,1,0.36,1) both;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(28px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}

/* ── Logo ─────────────────────────────────────────────────────────────── */
.logo {
  text-align: center;
  margin-bottom: 40px;
}

.logo-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px; height: 72px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(255,210,50,0.25), rgba(0,0,0,0));
  border: 1.5px solid rgba(245,200,66,0.35);
  margin-bottom: 16px;
  position: relative;
  animation: pulseBorder 3s ease-in-out infinite;
}
@keyframes pulseBorder {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245,200,66,0.0), 0 0 24px rgba(245,180,0,0.2); }
  50%       { box-shadow: 0 0 0 8px rgba(245,200,66,0.08), 0 0 40px rgba(245,180,0,0.35); }
}
.logo-icon {
  font-size: 2.4rem;
  filter: drop-shadow(0 0 12px rgba(245,200,66,0.9));
  animation: spadeGlow 3s ease-in-out infinite;
}
@keyframes spadeGlow {
  0%,100% { filter: drop-shadow(0 0 10px rgba(245,200,66,0.7)); }
  50%      { filter: drop-shadow(0 0 22px rgba(245,220,80,1)); }
}

.logo h1 {
  font-family: 'Playfair Display', Georgia, serif;
  color: #f5c842;
  font-size: 2.4rem;
  font-weight: 900;
  letter-spacing: 4px;
  line-height: 1;
  background: linear-gradient(135deg, #fde68a 0%, #f5c842 45%, #d97706 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  filter: drop-shadow(0 2px 10px rgba(245,180,0,0.4));
}

.logo-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px auto 0;
  width: fit-content;
}
.logo-divider::before,
.logo-divider::after {
  content: '';
  display: block;
  width: 36px;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(245,200,66,0.5));
}
.logo-divider::after {
  background: linear-gradient(to left, transparent, rgba(245,200,66,0.5));
}
.logo p {
  color: rgba(245,200,66,0.55);
  font-size: 0.72rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  font-weight: 500;
  white-space: nowrap;
}

/* ── Form ─────────────────────────────────────────────────────────────── */
.login-form .field {
  margin-bottom: 18px;
}
.login-form label {
  display: block;
  color: rgba(255,255,255,0.5);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.login-form input {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 14px 18px;
  color: #fff;
  font-size: 0.98rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.login-form input:focus {
  background: rgba(255,255,255,0.08);
  border-color: rgba(245,200,66,0.6);
  box-shadow: 0 0 0 3px rgba(245,200,66,0.12), 0 0 16px rgba(245,180,0,0.1);
}
.login-form input::placeholder { color: rgba(255,255,255,0.2); }

.error {
  background: rgba(220,50,50,0.15);
  border: 1px solid rgba(220,50,50,0.35);
  border-radius: 10px;
  color: #ff9090;
  padding: 10px 14px;
  font-size: 0.86rem;
  margin-bottom: 14px;
}
.hidden { display: none !important; }

/* ── Submit button ───────────────────────────────────────────────────── */
button[type="submit"] {
  width: 100%;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #f8d44a 0%, #e8a500 50%, #c87800 100%);
  border: none;
  border-radius: 14px;
  padding: 16px;
  color: #1a0f00;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s;
  box-shadow:
    0 4px 24px rgba(245,180,0,0.45),
    0 1px 0 rgba(255,255,255,0.25) inset;
  margin-top: 10px;
}
button[type="submit"]::after {
  content: '';
  position: absolute;
  top: 0; left: -75%;
  width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
  transform: skewX(-20deg);
  animation: shimmer 3.5s ease-in-out infinite;
}
@keyframes shimmer {
  0%   { left: -75%; }
  60%, 100% { left: 125%; }
}
button[type="submit"]:hover  {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(245,180,0,0.6), 0 1px 0 rgba(255,255,255,0.25) inset;
}
button[type="submit"]:active { transform: translateY(0); }
button[type="submit"]:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

/* ── Hint ─────────────────────────────────────────────────────────────── */
.hint {
  text-align: center;
  color: rgba(255,255,255,0.2);
  font-size: 0.75rem;
  margin-top: 22px;
  letter-spacing: 0.3px;
}
