/* ZAPMINE - Login Page Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  --bg-dark: #0A0E17;
  --surface: #111827;
  --surface-light: #1E293B;
  --border: #334155;
  --border-glow: rgba(99, 102, 241, 0.3);
  --accent-primary: #6366F1;
  --accent-secondary: #22D3EE;
  --success: #10B981;
  --gold: #F59E0B;
  --warning-red: #EF4444;
  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-sans);
  overflow-x: hidden;
  position: relative;
  padding: 1.5rem;
}

/* Background Animated Gradient Orbs */
.bg-orbs {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  animation: floatOrb 14s ease-in-out infinite alternate;
}

.orb-1 {
  top: -10%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #6366F1 0%, rgba(99, 102, 241, 0) 70%);
  animation-duration: 16s;
}

.orb-2 {
  bottom: -15%;
  right: -10%;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, #22D3EE 0%, rgba(34, 211, 238, 0) 70%);
  animation-duration: 18s;
  animation-delay: -5s;
}

.orb-3 {
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #8B5CF6 0%, rgba(139, 92, 246, 0) 70%);
  animation-duration: 12s;
  animation-delay: -2s;
}

@keyframes floatOrb {
  0% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(30px, 40px) scale(1.1);
  }
  100% {
    transform: translate(-20px, 20px) scale(0.95);
  }
}

/* Glassmorphism Login Container & Card */
.login-wrapper {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 450px;
}

.login-card {
  background: rgba(17, 24, 39, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 24px;
  padding: 2.75rem 2.25rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6), 
              0 0 30px rgba(99, 102, 241, 0.15),
              inset 0 1px 1px rgba(255, 255, 255, 0.1);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

.login-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.7), 
              0 0 40px rgba(99, 102, 241, 0.25),
              inset 0 1px 1px rgba(255, 255, 255, 0.15);
}

/* Header Section */
.card-header {
  text-align: center;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  text-decoration: none;
}

.brand-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #6366F1, #22D3EE);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}

.brand-icon svg {
  width: 24px;
  height: 24px;
  fill: #FFFFFF;
}

.brand-title {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #6366F1 0%, #22D3EE 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-tagline {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-top: 0.35rem;
  letter-spacing: 0.02em;
}

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.35), transparent);
  margin: 1.75rem 0;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 1.5rem;
}

/* Form Controls */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.6rem;
}

.input-container {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  transition: color 0.25s ease;
  pointer-events: none;
}

.input-container:focus-within .input-icon {
  color: var(--accent-primary);
}

.key-input {
  width: 100%;
  padding: 0.95rem 1.1rem 0.95rem 3rem;
  background: var(--surface-light);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  outline: none;
  transition: all 0.25s ease;
  text-transform: uppercase;
}

.key-input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: 1.5px;
}

.key-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2), 0 0 20px rgba(99, 102, 241, 0.35);
  background: rgba(30, 41, 59, 0.95);
}

/* Button */
.btn-submit {
  width: 100%;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, #6366F1 0%, #22D3EE 100%);
  border: none;
  border-radius: 14px;
  color: #FFFFFF;
  font-size: 1.05rem;
  font-weight: 700;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 1.5rem;
  position: relative;
  overflow: hidden;
}

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

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

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.6), 0 0 35px rgba(34, 211, 238, 0.5);
}

.btn-submit:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.4);
}

.btn-icon {
  width: 20px;
  height: 20px;
  transition: transform 0.25s ease;
}

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

/* Error Message Alert */
.error-message {
  display: none;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.25rem;
  padding: 0.85rem 1.1rem;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 12px;
  color: #FCA5A5;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
  animation: errorFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.error-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--warning-red);
}

@keyframes errorFadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Card Shake Animation for invalid submit */
.shake {
  animation: shakeCard 0.5s cubic-bezier(.36, .07, .19, .97) both;
}

@keyframes shakeCard {
  10%, 90% { transform: translate3d(-2px, 0, 0); }
  20%, 80% { transform: translate3d(4px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-6px, 0, 0); }
  40%, 60% { transform: translate3d(6px, 0, 0); }
}

/* Quick Demo Keys Helper Box */
.demo-keys-box {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px dashed rgba(99, 102, 241, 0.25);
  text-align: center;
}

.demo-keys-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.demo-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
}

.demo-chip {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(99, 102, 241, 0.25);
  color: var(--accent-secondary);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.demo-chip:hover {
  background: rgba(99, 102, 241, 0.25);
  border-color: var(--accent-primary);
  color: #FFFFFF;
  transform: translateY(-1px);
}

/* Footer Link & Main Footer */
.card-footer-link {
  display: block;
  text-align: center;
  margin-top: 1.5rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.card-footer-link:hover {
  color: var(--accent-secondary);
  text-decoration: underline;
}

.card-footer-link strong {
  color: var(--accent-primary);
  font-weight: 600;
}

.main-footer {
  position: relative;
  z-index: 10;
  margin-top: 2.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
}

@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .login-card {
    padding: 2rem 1.5rem;
    border-radius: 20px;
  }

  .brand-title {
    font-size: 1.9rem;
  }

  .key-input {
    font-size: 0.95rem;
    padding-left: 2.75rem;
  }
}
