/* ==============================================
   PRISMA TRADE - PREMIUM LOGIN DESIGN
   Award-Winning Layout & User Experience
   ============================================== */

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

:root {
  /* Brand Colors - Cartesiano + Binance Guidelines + Prisma */
  --cartesiano-primary: #2ecc71;
  --cartesiano-secondary: #27ae60;
  --cartesiano-blue: #3498db;
  --cartesiano-dark: #485563;
  --cartesiano-darker: #29323c;

  /* Binance Official Colors (Brand Guidelines) */
  --binance-yellow: #f0b90b;
  --binance-dark: #0b0e11;
  --binance-white: #ffffff;

  /* Prisma Brand Colors */
  --prisma-cyan: #00d4ff;
  --prisma-purple: #b347d9;
  --prisma-gradient: linear-gradient(135deg, #00d4ff 0%, #b347d9 100%);

  /* Enhanced Color System */
  --color-primary: var(--cartesiano-primary);
  --color-secondary: var(--cartesiano-blue);
  --color-accent: var(--binance-yellow);
  --color-dark: var(--cartesiano-dark);
  --color-darker: var(--cartesiano-darker);
  --color-light: #f8f9fa;
  --color-text-dark: #2c3e50;
  --color-text-light: #ffffff;
  --success: var(--cartesiano-primary);
  --warning: #f39c12;
  --error: #e74c3c;
  --info: var(--cartesiano-blue);

  /* Background Gradients */
  --primary-gradient: linear-gradient(
    135deg,
    var(--cartesiano-dark) 0%,
    var(--cartesiano-darker) 100%
  );
  --secondary-gradient: linear-gradient(
    135deg,
    var(--cartesiano-primary) 0%,
    var(--cartesiano-secondary) 100%
  );
  --accent-gradient: var(--prisma-gradient);
  --bg-glass: rgba(255, 255, 255, 0.1);
  --bg-glass-strong: rgba(255, 255, 255, 0.15);

  /* Neutral Colors */
  --white: #ffffff;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;

  /* Typography */
  --font-primary: "Inter", system-ui, -apple-system, sans-serif;
  --font-secondary: "Space Grotesk", system-ui, -apple-system, sans-serif;

  /* Spacing Scale (8px base) */
  --space-1: 0.125rem; /* 2px */
  --space-2: 0.25rem; /* 4px */
  --space-3: 0.375rem; /* 6px */
  --space-4: 0.5rem; /* 8px */
  --space-6: 0.75rem; /* 12px */
  --space-8: 1rem; /* 16px */
  --space-10: 1.25rem; /* 20px */
  --space-12: 1.5rem; /* 24px */
  --space-16: 2rem; /* 32px */
  --space-20: 2.5rem; /* 40px */
  --space-24: 3rem; /* 48px */
  --space-32: 4rem; /* 64px */

  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-2xl: 1rem;
  --radius-3xl: 1.5rem;
  --radius-full: 9999px;

  /* Enhanced Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md:
    0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg:
    0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl:
    0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --shadow-glow: 0 0 20px rgba(46, 204, 113, 0.3);
  --shadow-binance: 0 0 20px rgba(240, 185, 11, 0.3);

  /* Premium Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 500ms cubic-bezier(0.68, -0.55, 0.265, 1.55);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Styles */
html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-secondary);
  background: var(--primary-gradient);
  min-height: 100vh;
  color: var(--color-text-dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  /* Mobile viewport optimization */
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

/* ==============================================
   NAVIGATION HEADER - MOBILE-OPTIMIZED
   ============================================== */

.premium-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--color-dark);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: var(--shadow-md);
  /* Mobile-specific optimizations */
  -webkit-backdrop-filter: blur(20px);
  will-change: transform;
  transition: transform var(--transition-base);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--space-4) var(--space-6);
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  align-items: center;
  gap: var(--space-8);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.company-logo {
  height: 64px;
  width: auto;
  object-fit: contain;
  transition: transform var(--transition-base);
}

.company-logo:hover {
  transform: scale(1.05);
}

.nav-center {
  display: flex;
  justify-content: center;
}

.product-identity {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  text-align: center;
}

.product-text {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.product-name {
  font-family: var(--font-secondary);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--white);
  letter-spacing: -0.025em;
  margin: 0;
  background: var(--prisma-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.product-icon {
  height: 36px;
  width: auto;
  object-fit: contain;
}

.product-tagline {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
  letter-spacing: 0.025em;
}

.nav-badge {
  display: flex;
  justify-content: flex-end;
}

.partner-badge {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  padding: var(--space-6) var(--space-8);
  background: var(--bg-glass);
  border: 1px solid rgba(240, 185, 11, 0.3);
  border-radius: var(--radius-xl);
  transition: all var(--transition-base);
  min-height: 48px;
}

.partner-badge:hover {
  background: rgba(240, 185, 11, 0.1);
  border-color: rgba(240, 185, 11, 0.5);
  transform: translateY(-2px);
}

.partner-text {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  letter-spacing: 0.025em;
}

.partner-logo {
  min-width: 100px;
  height: 28px;
  object-fit: contain;
}

.partner-badge {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  padding: var(--space-6) var(--space-8);
  background: var(--bg-glass);
  border: 1px solid rgba(240, 185, 11, 0.3);
  border-radius: var(--radius-xl);
  transition: all var(--transition-base);
  /* Safe space around BNB Chain logo as per guidelines */
  min-height: 48px;
}

.partner-badge:hover {
  background: rgba(240, 185, 11, 0.1);
  border-color: rgba(240, 185, 11, 0.5);
  transform: translateY(-1px);
  box-shadow: var(--shadow-binance);
}

.partner-logo {
  /* Minimum width of 97px for horizontal BNB Chain logo as per guidelines */
  min-width: 97px;
  height: 28px;
  width: auto;
  object-fit: contain;
  /* Safe space 'X' around logo as per Binance guidelines */
  margin: var(--space-3);
  filter: brightness(1.1);
}

.partner-text {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

/* ==============================================
   HERO SECTION - PREMIUM LAYOUT
   ============================================== */

.hero-section {
  flex: 1;
  min-height: 40vh;
  padding-top: 100px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(
      circle at 20% 80%,
      rgba(46, 204, 113, 0.15) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 20%,
      rgba(240, 185, 11, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 40% 40%,
      rgba(0, 212, 255, 0.1) 0%,
      transparent 50%
    );
  pointer-events: none;
}

.hero-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--space-8) var(--space-6);
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: var(--space-16);
  align-items: center;
  position: relative;
  z-index: 10;
}

/* ==============================================
   HERO CONTENT (LEFT SIDE)
   ============================================== */

.hero-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
}

.hero-brand {
  text-align: left;
}

.hero-logo {
  height: 80px;
  width: auto;
  object-fit: contain;
  margin-bottom: var(--space-6);
  filter: drop-shadow(0 10px 20px rgba(102, 126, 234, 0.2));
  transition: all var(--transition-slow);
}

.hero-logo:hover {
  transform: scale(1.05) rotate(2deg);
  filter: drop-shadow(0 15px 30px rgba(102, 126, 234, 0.3));
}

.hero-title {
  font-family: var(--font-primary);
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin-bottom: var(--space-4);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-subtitle {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.025em;
}

.hero-features {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-6);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all var(--transition-base);
}

.feature-item:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.feature-icon {
  font-size: 2rem;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  flex-shrink: 0;
}

.feature-text h3 {
  font-family: var(--font-primary);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: var(--space-2);
  letter-spacing: -0.025em;
}

.feature-text p {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
}

/* ==============================================
   LOGIN SECTION (RIGHT SIDE)
   ============================================== */

.login-section {
  position: relative;
}

.login-card {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-2xl);
  padding: var(--space-10);
  box-shadow: var(--shadow-2xl);
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
}

.login-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--secondary-gradient);
}

.login-header {
  text-align: center;
  margin-bottom: var(--space-8);
}

.login-title {
  font-family: var(--font-primary);
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-text-dark);
  margin-bottom: var(--space-2);
  letter-spacing: -0.025em;
}

.login-subtitle {
  font-size: 1rem;
  color: var(--color-text-dark);
  font-weight: 500;
}

/* ==============================================
   FORM INPUTS
   ============================================== */

.login-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.input-group {
  position: relative;
}

.input-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: var(--space-2);
  letter-spacing: 0.025em;
}

.input-wrapper {
  position: relative;
}

.premium-input {
  width: 100%;
  padding: var(--space-4) var(--space-4);
  font-size: 1rem;
  font-family: var(--font-secondary);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  background: var(--white);
  color: var(--gray-800);
  transition: all var(--transition-base);
  outline: none;
}

.premium-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(46, 204, 113, 0.1);
}

.premium-input::placeholder {
  color: var(--gray-400);
  font-weight: 400;
}

.input-border {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--secondary-gradient);
  transform: scaleX(0);
  transition: transform var(--transition-base);
}

.premium-input:focus + .input-border {
  transform: scaleX(1);
}

/* ==============================================
   FORM OPTIONS
   ============================================== */

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: var(--space-2) 0;
}

.checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
  user-select: none;
}

.premium-checkbox {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.checkmark {
  width: 20px;
  height: 20px;
  background: var(--white);
  border: 2px solid var(--gray-300);
  border-radius: var(--radius-sm);
  position: relative;
  transition: all var(--transition-base);
}

.premium-checkbox:checked + .checkmark {
  background: var(--secondary-gradient);
  border-color: var(--color-primary);
}

.premium-checkbox:checked + .checkmark::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 700;
}

.checkbox-text {
  font-size: 0.875rem;
  color: var(--gray-600);
  font-weight: 500;
}

.forgot-link {
  font-size: 0.875rem;
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
  transition: color var(--transition-base);
}

.forgot-link:hover {
  color: var(--color-secondary);
}

/* ==============================================
   PREMIUM BUTTON
   ============================================== */

.premium-button {
  position: relative;
  width: 100%;
  padding: var(--space-4) var(--space-6);
  font-family: var(--font-primary);
  font-size: 1rem;
  font-weight: 600;
  color: var(--white);
  background: var(--secondary-gradient);
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  overflow: hidden;
  transition: all var(--transition-base);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: var(--space-4) 0;
}

.premium-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.premium-button:active {
  transform: translateY(0);
}

.button-text {
  position: relative;
  z-index: 2;
}

.button-glow {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left var(--transition-slow);
}

.premium-button:hover .button-glow {
  left: 100%;
}

/* ==============================================
   DIVIDER & SOCIAL LOGIN
   ============================================== */

.divider {
  position: relative;
  text-align: center;
  margin: var(--space-8) 0 var(--space-6);
}

.divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gray-200);
}

.divider-text {
  background: var(--white);
  color: var(--gray-400);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0 var(--space-4);
  position: relative;
}

.social-login {
  margin-bottom: var(--space-6);
}

.social-button {
  width: 100%;
  padding: var(--space-4);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-700);
  background: var(--white);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-base);
}

.social-button:hover {
  border-color: var(--gray-300);
  background: var(--gray-50);
  transform: translateY(-1px);
}

.social-icon {
  width: 20px;
  height: 20px;
}

.signup-prompt {
  text-align: center;
  padding-top: var(--space-4);
  border-top: 1px solid var(--gray-200);
}

.signup-prompt p {
  font-size: 0.875rem;
  color: var(--gray-600);
  font-weight: 500;
}

.signup-link {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
  transition: color var(--transition-base);
}

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

/* ==============================================
   FOOTER
   ============================================== */

.premium-footer {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding: var(--space-6) 0;
  margin-top: auto;
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-6);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.footer-copyright {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}

.footer-right {
  display: flex;
  gap: var(--space-6);
}

.footer-link {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-base);
}

.footer-link:hover {
  color: var(--white);
}

/* ==============================================
   RESPONSIVE DESIGN - PREMIUM MOBILE-FIRST
   Designed for 10x Award-Winning UX
   ============================================== */

/* Desktop and Tablet (600px+) - Ensure all elements are visible */
@media (min-width: 600px) {
  .nav-brand,
  .nav-badge,
  .product-icon,
  .product-tagline {
    display: flex !important;
  }
}

/* Extra Large Screens (1400px+) */
@media (min-width: 1400px) {
  .nav-container {
    padding: var(--space-5) var(--space-8);
  }

  .hero-container {
    padding: var(--space-16) var(--space-8);
  }

  .hero-title {
    font-size: 4rem;
    line-height: 1.1;
  }

  .login-card {
    padding: var(--space-12) var(--space-10);
  }
}

/* Large Screens (1200px - 1399px) */
@media (max-width: 1399px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: var(--space-12);
    text-align: center;
    padding: var(--space-12) var(--space-6);
  }

  .hero-content {
    order: 2;
  }

  .login-section {
    order: 1;
    max-width: 480px;
    margin: 0 auto;
  }

  .hero-brand {
    text-align: center;
  }

  .hero-title {
    font-size: 3.5rem;
  }
}

/* Medium Screens (768px - 1199px) - Tablets */
@media (max-width: 1199px) {
  .nav-container {
    padding: var(--space-4) var(--space-5);
    gap: var(--space-6);
  }

  .hero-title {
    font-size: 3rem;
  }

  .login-card {
    padding: var(--space-10) var(--space-8);
  }
}

/* Small-Medium Screens (600px - 768px) - Large Mobile/Small Tablet */
@media (max-width: 768px) {
  /* Navigation Optimizations - Hide logo and badge on tablet */
  .nav-container {
    grid-template-columns: auto 1fr auto;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    align-items: center;
  }

  .nav-brand {
    gap: var(--space-2);
  }

  .company-logo {
    height: 48px;
  }

  .nav-center {
    justify-content: center;
    flex: 1;
  }

  .product-identity {
    gap: var(--space-3);
  }

  .product-icon {
    height: 32px;
  }

  .product-name {
    font-size: 1.3rem;
  }

  .product-tagline {
    font-size: 0.8rem;
  }

  .partner-badge {
    padding: var(--space-2) var(--space-4);
    gap: var(--space-3);
    font-size: 0.8rem;
  }

  .partner-logo {
    min-width: 80px;
    height: 24px;
  }

  .product-identity {
    gap: var(--space-3);
  }

  .product-name {
    font-size: 1.375rem;
  }

  .product-tagline {
    font-size: 0.8rem;
  }

  .nav-badge {
    justify-content: flex-end;
  }

  .partner-badge {
    padding: var(--space-2) var(--space-3);
    gap: var(--space-2);
  }

  .partner-logo {
    min-width: 85px; /* Slightly smaller but within guidelines */
    height: 26px;
  }

  .partner-text {
    font-size: 0.75rem;
  }

  /* Hero Section */
  .hero-container {
    padding: var(--space-8) var(--space-4);
    gap: var(--space-10);
  }

  .hero-title {
    font-size: 2.75rem;
    line-height: 1.15;
  }

  .hero-subtitle {
    font-size: 1.125rem;
  }

  /* Login Card */
  .login-card {
    padding: var(--space-8) var(--space-6);
    margin: var(--space-4);
  }

  .login-section {
    max-width: 420px;
  }

  /* Features */
  .feature-item {
    flex-direction: row;
    text-align: left;
    gap: var(--space-3);
  }

  .feature-icon {
    flex-shrink: 0;
  }

  /* Footer */
  .footer-container {
    flex-direction: column;
    text-align: center;
    gap: var(--space-4);
  }
}

/* Mobile Screens (480px - 599px) */
@media (max-width: 599px) {
  /* Mobile-First Navigation - Hide logos and badge for clean look */
  .nav-container {
    grid-template-columns: 1fr;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    justify-content: center;
    min-height: 60px;
  }

  /* Hide logos and badge on mobile */
  .nav-brand,
  .nav-badge {
    display: none;
  }

  .nav-center {
    justify-content: center;
  }

  .product-identity {
    justify-content: center;
    gap: var(--space-2);
  }

  /* Hide product icon on mobile */
  .product-icon {
    display: none;
  }

  .product-text {
    text-align: center;
    gap: 0;
  }

  .product-name {
    font-size: 1.4rem;
    line-height: 1.1;
  }

  /* Hide tagline on mobile for ultra-clean look */
  .product-tagline {
    display: none;
  }

  /* Hero Mobile Optimization */
  .hero-section {
    min-height: 100vh;
    padding-top: 80px; /* Adjusted for compact navbar */
  }

  .hero-container {
    padding: var(--space-4) var(--space-3);
    gap: var(--space-6);
    grid-template-columns: 1fr; /* Stack on mobile */
    text-align: center;
  }

  .hero-title {
    font-size: 2rem;
    line-height: 1.2;
    margin-bottom: var(--space-4);
  }

  .hero-subtitle {
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: var(--space-6);
  }

  /* Mobile Login Card */
  .login-card {
    padding: var(--space-6) var(--space-4);
    margin: var(--space-3);
    border-radius: var(--radius-lg);
  }

  .login-section {
    max-width: 100%;
  }

  .form-title {
    font-size: 1.5rem;
    margin-bottom: var(--space-6);
  }

  .form-group {
    margin-bottom: var(--space-5);
  }

  .form-input {
    padding: var(--space-4);
    font-size: 1rem;
  }

  .premium-button {
    padding: var(--space-4) var(--space-6);
    font-size: 1rem;
    font-weight: 600;
  }

  /* Mobile Features */
  .feature-item {
    flex-direction: column;
    text-align: center;
    gap: var(--space-3);
    padding: var(--space-4);
  }

  .feature-icon {
    align-self: center;
  }
}

/* Extra Small Mobile (320px - 479px) */
@media (max-width: 479px) {
  /* Ultra-compact navigation - Keep only product name */
  .nav-container {
    padding: var(--space-2);
    min-height: 56px;
  }

  .product-name {
    font-size: 1.2rem;
  }

  /* Ultra-compact hero */
  .hero-section {
    padding-top: 70px; /* Matched with main-content */
  }

  .hero-container {
    padding: var(--space-3) var(--space-2);
    gap: var(--space-4);
  }

  .hero-title {
    font-size: 1.75rem;
    line-height: 1.25;
  }

  .hero-subtitle {
    font-size: 0.9rem;
    margin-bottom: var(--space-4);
  }

  /* Ultra-compact login */
  .login-card {
    padding: var(--space-4) var(--space-3);
    margin: var(--space-2);
  }

  .form-title {
    font-size: 1.375rem;
  }

  .form-input {
    padding: var(--space-3);
    font-size: 0.95rem;
  }

  .premium-button {
    padding: var(--space-3) var(--space-5);
    font-size: 0.95rem;
  }
}

/* Touch-friendly improvements for all mobile */
@media (max-width: 768px) {
  /* Prevent horizontal scroll issues */
  html,
  body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
  }

  /* Increase touch targets */
  .form-input,
  .premium-button,
  .link-primary {
    min-height: 44px; /* Apple's recommended minimum */
  }

  .premium-button {
    padding: var(--space-4) var(--space-6);
  }

  /* Improve text readability */
  body {
    font-size: 16px; /* Prevents iOS zoom */
    line-height: 1.6;
  }

  /* Better focus states for touch */
  .form-input:focus {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
  }

  /* Smooth scrolling for mobile */
  html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
  }

  /* Ensure all containers respect mobile width */
  .nav-container,
  .hero-container,
  .login-card {
    max-width: 100vw;
    box-sizing: border-box;
  }
}

/* Landscape orientation optimizations */
@media (max-width: 768px) and (orientation: landscape) {
  .hero-container {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
    text-align: left;
    align-items: center;
  }

  .hero-content {
    order: 1;
  }

  .login-section {
    order: 2;
  }

  .hero-title {
    font-size: 2rem;
  }
}

/* ==============================================
   ANIMATIONS & MICRO-INTERACTIONS
   ============================================== */

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

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

.hero-content {
  animation: fadeInUp 0.8s ease-out;
}

.login-section {
  animation: slideInRight 0.8s ease-out 0.2s both;
}

.feature-item:nth-child(1) {
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

.feature-item:nth-child(2) {
  animation: fadeInUp 0.8s ease-out 0.6s both;
}

.feature-item:nth-child(3) {
  animation: fadeInUp 0.8s ease-out 0.8s both;
}

/* ==============================================
   ACCESSIBILITY IMPROVEMENTS
   ============================================== */

.premium-button:focus,
.premium-input:focus,
.social-button:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==============================================
   PRINT STYLES
   ============================================== */

@media print {
  .premium-nav,
  .premium-footer,
  .social-login,
  .hero-features {
    display: none;
  }

  .hero-section {
    min-height: auto;
    padding: 2rem 0;
  }

  .login-card {
    box-shadow: none;
    border: 1px solid var(--gray-300);
  }
}

/* Form Styles */
.login-form {
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  color: #555;
  font-weight: 500;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

/* Header right exchange badge */
.header-right {
  position: absolute;
  right: 2rem; /* place at the extreme right with small offset */
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
}

.exchange-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.06);
  color: white;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  font-size: 0.9rem;
  backdrop-filter: blur(6px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

.exchange-icon {
  display: inline-block;
  flex: 0 0 auto;
  border-radius: 4px;
}

.exchange-name {
  font-weight: 600;
}

.exchange-status {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #2ecc71; /* green = active */
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(46, 204, 113, 0.5);
}

@media (max-width: 600px) {
  .header-right {
    display: none;
    transition-duration: 0.1s;
  }
}

.btn-login {
  width: 100%;
  padding: 1rem;
  background: linear-gradient(45deg, #52c41a, #73d13d);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(82, 196, 26, 0.3);
  background: linear-gradient(45deg, #389e0d, #52c41a);
}

.btn-login:active {
  transform: translateY(0);
}

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

.register-link {
  color: #666;
  font-size: 0.9rem;
}

.link-accent {
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.link-accent:hover {
  color: #5a67d8;
  text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
  .main-content {
    padding-top: 80px; /* Reduced from 120px for better mobile experience */
  }

  .login-card {
    padding: 2rem 1.5rem;
    margin: 0 0.5rem;
  }

  .logo-prisma {
    height: 70px;
  }

  .login-title {
    font-size: 1.75rem;
  }

  .product-subtitle {
    font-size: 0.9rem;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .footer-links {
    gap: 1.5rem;
  }

  .legal-card {
    padding: 2rem 1.5rem;
    margin: 0 0.5rem;
  }

  .legal-title {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .main-content {
    padding-top: 70px; /* Optimized for compact mobile navbar */
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  .login-card {
    padding: 1.5rem 1rem;
  }

  .logo-prisma {
    height: 60px;
  }

  .login-title {
    font-size: 1.5rem;
  }

  .product-subtitle {
    font-size: 0.85rem;
  }

  .footer-content {
    padding: 0 1rem;
  }

  .footer-links {
    gap: 1rem;
    flex-direction: column;
  }

  .legal-card {
    padding: 1.5rem 1rem;
  }

  .legal-title {
    font-size: 1.75rem;
  }

  .legal-intro {
    font-size: 1rem;
  }
}

/* Loading Animation */
.btn-login.loading {
  position: relative;
  color: transparent;
}

.btn-login.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* Footer Styles */
.footer {
  background: rgba(52, 73, 94, 0.95);
  backdrop-filter: blur(10px);
  padding: 1.5rem 0;
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-copyright {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  margin: 0;
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-link {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: white;
  text-decoration: underline;
}

/* Legal Pages Styles */
.legal-container {
  width: 100%;
  max-width: 800px;
  padding: 0 1rem;
}

.legal-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 16px;
  padding: 3rem 2rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.legal-title {
  color: #2c3e50;
  font-size: 2.5rem;
  font-weight: 600;
  margin-bottom: 2rem;
  text-align: center;
  position: relative;
}

.legal-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: linear-gradient(45deg, #52c41a, #73d13d);
  border-radius: 2px;
}

.legal-content {
  color: #555;
  line-height: 1.8;
}

.legal-intro {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  text-align: center;
  color: #666;
}

.legal-section {
  margin-bottom: 2rem;
}

.legal-section h3 {
  color: #2c3e50;
  font-size: 1.3rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.back-button-container {
  text-align: center;
  margin-top: 3rem;
}

.btn-back {
  display: inline-block;
  padding: 1rem 2rem;
  background: linear-gradient(45deg, #667eea, #764ba2);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-back:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}
