/* EGS-ADMIN Advanced Login - Optimized & Mobile-First */

/* CSS Custom Properties for Theming - Sports Events Organization */
:root {
  --primary-blue: #1e88e5;        /* Vibrant Sports Blue */
  --primary-orange: #ff6b35;       /* Energy Orange for Events */
  --primary-green: #43a047;        /* Field Green */
  --accent-gold: #ffc107;          /* Winner's Gold */
  --text-primary: #1a237e;         /* Deep Navy Text */
  --text-secondary: #37474f;       /* Slate Gray */
  --text-muted: #78909c;           /* Cool Gray */
  --bg-light: #f5f7fa;             /* Clean Light Background */
  --bg-card: rgba(255, 255, 255, 0.95);  /* White Card with slight transparency */
  --bg-input: rgba(255, 255, 255, 0.9);   /* White Input */
  --border-color: rgba(30, 136, 229, 0.2); /* Soft Blue Border */
  --shadow-sm: 0 4px 12px rgba(30, 136, 229, 0.1);
  --shadow-lg: 0 25px 50px rgba(30, 136, 229, 0.15);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --border-radius: 16px;
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Reset & Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background: var(--bg-light);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Main Wrapper */
.egs-login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  position: relative;
  overflow: hidden;
}

/* Animated Background */
.login-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
}

.gradient-orb {
  position: absolute;
  border-radius: 50%;
  opacity: 0.25;
  filter: blur(80px);
  animation: float 20s ease-in-out infinite;
}

.orb-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--primary-blue) 0%, transparent 70%);
  top: -250px;
  left: -250px;
  animation-delay: 0s;
}

.orb-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--primary-orange) 0%, transparent 70%);
  bottom: -200px;
  right: -200px;
  animation-delay: 10s;
}

.floating-grid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(30, 136, 229, 0.08) 2px, transparent 2px),
    linear-gradient(90deg, rgba(30, 136, 229, 0.08) 2px, transparent 2px),
    linear-gradient(rgba(67, 160, 71, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(67, 160, 71, 0.04) 1px, transparent 1px);
  background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px;
  background-position: 0 0, 0 0, 10px 10px, 10px 10px;
  animation: gridMove 30s linear infinite;
  opacity: 0.6;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(50px, -50px) scale(1.1); }
  66% { transform: translate(-50px, 50px) scale(0.9); }
}

@keyframes gridMove {
  0% { transform: translate(0, 0); }
  100% { transform: translate(100px, 100px); }
}

/* Timeline & Events Planner Background System */
.smart-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

/* Timeline System */
.timeline-system {
  position: absolute;
  left: 5%;
  top: 10%;
  width: 300px;
  height: 80%;
  opacity: 0.4;
}

.timeline-spine {
  position: relative;
  width: 100%;
  height: 100%;
}

.timeline-line {
  position: absolute;
  left: 20px;
  top: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(to bottom,
    rgba(30, 136, 229, 0.4) 0%,
    rgba(255, 107, 53, 0.5) 50%,
    rgba(67, 160, 71, 0.4) 100%);
  border-radius: 2px;
  animation: timelineGlow 4s ease-in-out infinite;
}

.timeline-events {
  position: relative;
  width: 100%;
  height: 100%;
}

.timeline-event {
  position: absolute;
  top: var(--top);
  left: 0;
  width: 100%;
  opacity: 0;
  animation: eventAppear 1s ease-out var(--delay) forwards;
}

.event-marker {
  position: absolute;
  left: 16px;
  top: 0;
  width: 11px;
  height: 11px;
  background: radial-gradient(circle, rgba(30, 136, 229, 1), rgba(30, 136, 229, 0.7));
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(30, 136, 229, 0.3);
}

.event-pulse {
  position: absolute;
  left: 14px;
  top: -2px;
  width: 15px;
  height: 15px;
  border: 2px solid rgba(30, 136, 229, 0.5);
  border-radius: 50%;
  animation: eventPulse 3s ease-in-out infinite;
}

.event-content {
  position: absolute;
  left: 40px;
  top: -8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.event-title {
  font-size: 12px;
  color: var(--text-primary);
  font-weight: 600;
}

.event-time {
  font-size: 10px;
  color: var(--text-muted);
  font-family: monospace;
}

/* Progress Timeline */
.progress-timeline {
  position: absolute;
  bottom: 5%;
  right: 5%;
  width: 200px;
  height: 8px;
}

.progress-track {
  width: 100%;
  height: 100%;
  background: rgba(30, 136, 229, 0.15);
  border-radius: 4px;
}

.progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: linear-gradient(90deg,
    rgba(30, 136, 229, 0.9) 0%,
    rgba(255, 107, 53, 0.9) 50%,
    rgba(67, 160, 71, 0.9) 100%);
  border-radius: 4px;
  animation: progressFill 8s ease-in-out infinite;
  box-shadow: 0 0 10px rgba(30, 136, 229, 0.3);
}

.progress-indicator {
  position: absolute;
  top: -2px;
  width: 12px;
  height: 12px;
  background: rgba(30, 136, 229, 1);
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  animation: progressMove 8s ease-in-out infinite;
  box-shadow: 0 0 8px rgba(30, 136, 229, 0.5);
}

/* Planning Grid */
.planning-grid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.3;
}

.grid-lines {
  position: relative;
  width: 100%;
  height: 100%;
}

.grid-line {
  position: absolute;
  background: rgba(30, 136, 229, 0.3);
  animation: gridAppear 1s ease-out var(--delay) forwards;
  opacity: 0;
}

.grid-line.horizontal {
  width: 100%;
  height: 1px;
  top: var(--position);
  left: 0;
}

.grid-line.vertical {
  width: 1px;
  height: 100%;
  left: var(--position);
  top: 0;
}

.planning-nodes {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.planning-node {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%);
  opacity: 0;
  animation: nodeFloat 3s ease-in-out var(--delay) infinite;
}

.node-icon {
  font-size: 24px;
  filter: drop-shadow(0 2px 6px rgba(30, 136, 229, 0.4));
  position: relative;
  z-index: 2;
  animation: iconBounce 2s ease-in-out infinite;
}

/* Larger node variant */
.planning-node-large .node-icon {
  font-size: 36px;
  filter: drop-shadow(0 4px 8px rgba(30, 136, 229, 0.5));
  animation: iconBounceLarge 2.5s ease-in-out infinite;
}

@keyframes iconBounce {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-4px) rotate(5deg); }
}

@keyframes iconBounceLarge {
  0%, 100% {
    transform: translateY(0px) rotate(0deg) scale(1);
    filter: drop-shadow(0 4px 8px rgba(30, 136, 229, 0.5));
  }
  50% {
    transform: translateY(-8px) rotate(-5deg) scale(1.05);
    filter: drop-shadow(0 6px 12px rgba(255, 107, 53, 0.6));
  }
}

.node-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 30px;
  height: 30px;
  background: radial-gradient(circle, rgba(255, 107, 53, 0.3), transparent);
  border-radius: 50%;
  animation: nodeGlow 4s ease-in-out infinite;
}

.planning-node-large .node-glow {
  width: 50px;
  height: 50px;
  background: radial-gradient(circle, rgba(30, 136, 229, 0.4), rgba(255, 107, 53, 0.2), transparent);
  animation: nodeGlowLarge 4s ease-in-out infinite;
}

/* Schedule Flow Lines */
.schedule-flows {
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  height: 40%;
}

.flow-stream {
  position: absolute;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(30, 136, 229, 0.3) 20%,
    rgba(255, 107, 53, 0.5) 50%,
    rgba(67, 160, 71, 0.3) 80%,
    transparent 100%);
}

.flow-stream.stream-primary {
  top: 30%;
  animation: streamFlow 12s linear infinite;
}

.flow-stream.stream-secondary {
  top: 70%;
  animation: streamFlow 15s linear infinite reverse;
}

.flow-particles {
  position: relative;
  width: 100%;
  height: 100%;
}

.flow-particle {
  position: absolute;
  top: 0;
  width: 6px;
  height: 6px;
  background: radial-gradient(circle, rgba(255, 107, 53, 0.9), transparent);
  border-radius: 50%;
  animation: particleFlow var(--duration) linear var(--delay) infinite;
}

/* Task Completion Indicators */
.task-indicators {
  position: absolute;
  top: 15%;
  right: 20%;
  width: 150px;
  height: 200px;
  display: flex;
  flex-direction: column;
  gap: 30px;
  opacity: 0.5;
}

.task-completion {
  position: relative;
  width: 100%;
  height: 4px;
  background: rgba(30, 136, 229, 0.15);
  border-radius: 2px;
  animation: taskAppear 1s ease-out var(--delay) forwards;
  opacity: 0;
}

.completion-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: var(--progress);
  background: linear-gradient(90deg,
    rgba(67, 160, 71, 0.8) 0%,
    rgba(30, 136, 229, 0.9) 100%);
  border-radius: 2px;
  animation: completionFill 2s ease-out var(--delay) forwards;
  transform: scaleX(0);
  transform-origin: left;
}

.completion-glow {
  position: absolute;
  top: -1px;
  right: 0;
  width: 6px;
  height: 6px;
  background: rgba(30, 136, 229, 1);
  border-radius: 50%;
  animation: completionGlow 3s ease-in-out var(--delay) infinite;
  box-shadow: 0 0 8px rgba(30, 136, 229, 0.5);
}

/* Keyframe Animations */
@keyframes timelineGlow {
  0%, 100% { opacity: 0.4; box-shadow: 0 0 5px rgba(30, 136, 229, 0.3); }
  50% { opacity: 0.7; box-shadow: 0 0 15px rgba(30, 136, 229, 0.5); }
}

@keyframes eventAppear {
  0% { opacity: 0; transform: translateX(-20px); }
  100% { opacity: 1; transform: translateX(0); }
}

@keyframes eventPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.5;
    box-shadow: 0 0 0 0 rgba(30, 136, 229, 0.4);
  }
  50% {
    transform: scale(1.8);
    opacity: 0.8;
    box-shadow: 0 0 10px 2px rgba(30, 136, 229, 0.2);
  }
}

@keyframes progressFill {
  0% { width: 0%; }
  100% { width: 75%; }
}

@keyframes progressMove {
  0% { left: 0%; }
  100% { left: 75%; }
}

@keyframes gridAppear {
  0% { opacity: 0; transform: scale(0); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes nodeFloat {
  0%, 100% { opacity: 0.6; transform: translate(-50%, -50%) translateY(0px); }
  50% { opacity: 1; transform: translate(-50%, -50%) translateY(-5px); }
}

@keyframes nodeGlow {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.2; }
  50% { transform: translate(-50%, -50%) scale(1.5); opacity: 0.6; }
}

@keyframes nodeGlowLarge {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.3;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.8);
    opacity: 0.7;
  }
}

@keyframes streamFlow {
  0% { transform: translateX(-100%); opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { transform: translateX(100%); opacity: 0; }
}

@keyframes particleFlow {
  0% { left: -10px; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}

@keyframes taskAppear {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes completionFill {
  0% { transform: scaleX(0); }
  100% { transform: scaleX(1); }
}

@keyframes completionGlow {
  0%, 100% {
    opacity: 0.6;
    transform: scale(1);
    box-shadow: 0 0 8px rgba(30, 136, 229, 0.5);
  }
  50% {
    opacity: 1;
    transform: scale(1.5);
    box-shadow: 0 0 16px rgba(255, 193, 7, 0.8);
  }
}

@keyframes dataPulse {
  0%, 100% {
    transform: scale(0.8);
    opacity: 0.3;
    border-color: rgba(67, 160, 71, 0.3);
  }
  50% {
    transform: scale(1.5);
    opacity: 0.8;
    border-color: rgba(67, 160, 71, 0.8);
  }
}

.intelligence-scan {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 200px;
  height: 200px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 107, 53, 0.2);
  border-radius: 50%;
  animation: intelligenceScan 8s linear infinite;
}

.intelligence-scan::before {
  content: '';
  position: absolute;
  top: -2px;
  left: 50%;
  width: 4px;
  height: 20px;
  background: linear-gradient(to bottom, rgba(255, 107, 53, 1), transparent);
  transform: translateX(-50%);
  border-radius: 2px;
}

@keyframes intelligenceScan {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
    opacity: 0.3;
  }
  50% {
    opacity: 0.7;
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
    opacity: 0.3;
  }
}

/* Weekly Match Schedule */
.weekly-schedule {
  position: absolute;
  bottom: 8%;
  left: 5%;
  display: flex;
  gap: 15px;
  opacity: 0.8;
  z-index: 5;
}

.schedule-card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(30, 136, 229, 0.3);
  border-radius: 16px;
  padding: 14px 18px;
  min-width: 160px;
  box-shadow: 0 4px 16px rgba(30, 136, 229, 0.15);
  animation: scheduleCardAppear 1s ease-out var(--delay) forwards;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

.schedule-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(30, 136, 229, 0.3);
  border-color: rgba(255, 107, 53, 0.6);
  background: rgba(255, 255, 255, 0.95);
}

.schedule-day-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(30, 136, 229, 0.15);
}

.schedule-icon {
  font-size: 18px;
  animation: iconSpin 3s ease-in-out infinite;
}

@keyframes iconSpin {
  0%, 100% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(15deg) scale(1.1); }
}

.schedule-day {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-blue);
  letter-spacing: 0.5px;
}

.schedule-time {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-bottom: 8px;
  padding: 4px 8px;
  background: rgba(30, 136, 229, 0.08);
  border-radius: 8px;
}

.schedule-match {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}

.team-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.vs-text {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 3px 7px;
  background: rgba(30, 136, 229, 0.12);
  border-radius: 6px;
  border: 1px solid rgba(30, 136, 229, 0.2);
}

@keyframes scheduleCardAppear {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* EGS System Identity Background Shapes - REMOVED */

/* Main Container */
.login-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  max-width: 1000px;
  min-height: 600px;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 10;
  overflow: hidden;
}

/* Brand Section */
.brand-section {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  background: linear-gradient(135deg,
    rgba(30, 136, 229, 0.08) 0%,
    rgba(255, 107, 53, 0.06) 50%,
    rgba(67, 160, 71, 0.05) 100%);
  border-right: 1px solid var(--border-color);
  position: relative;
}

.brand-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="1" fill="%231e88e515"/></svg>') repeat;
  background-size: 30px 30px;
  animation: dots 15s linear infinite;
  opacity: 0.6;
}

@keyframes dots {
  0% { transform: translate(0, 0); }
  100% { transform: translate(30px, 30px); }
}

.brand-content {
  text-align: center;
  z-index: 2;
}

/* Main EGS Character in Brand Section */
.egs-main-character {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 2rem;
  animation: egsMainEntrance 1.5s ease-out;
  transform-origin: center center;
}

.egs-main-character .egs-character {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  justify-content: center;
  align-items: center;
}

.egs-main-character .egs-character:hover {
  transform: scale(1.1);
}

@keyframes egsMainEntrance {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.8);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.logo-wrapper {
  margin-bottom: 1.5rem;
  animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.brand-logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(30, 136, 229, 0.3));
}

.brand-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.05em;
}

.brand-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-weight: 500;
}

.brand-tagline {
  font-size: 0.875rem;
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  background: rgba(30, 136, 229, 0.1);
  border-radius: 20px;
  border: 1px solid rgba(30, 136, 229, 0.2);
  display: inline-block;
}

/* Form Section */
.form-section {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
}

.form-card {
  width: 100%;
  max-width: 400px;
}

.form-header {
  text-align: center;
  margin-bottom: 2rem;
}

.form-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.form-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Form Styles */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
  width: 100%;
}

.input-group {
  position: relative;
  width: 100%;
  max-width: 350px;
  margin-bottom: 1rem;
}

/* Floating Label Styles */
.floating-label {
  position: absolute;
  left: 3rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 400;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--bg-input);
  padding: 0 0.25rem;
  z-index: 3;
  transform-origin: left center;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.input-field {
  width: 100%;
  padding: 1.25rem 3.5rem 1.25rem 3rem;
  background: var(--bg-input);
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  color: var(--text-primary);
  font-size: 1rem;
  transition: var(--transition);
  backdrop-filter: blur(10px);
  height: 60px;
  box-sizing: border-box;
}

/* Floating Label Animation States - Hide on Focus/Content */
.input-field:focus + .floating-label,
.input-field:not(:placeholder-shown) + .floating-label,
.input-field.has-content + .floating-label {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-50%) scale(0.9);
}

.input-field:focus {
  outline: none;
  border-color: var(--primary-blue);
  background: rgba(30, 136, 229, 0.05);
  box-shadow: 0 0 0 4px rgba(30, 136, 229, 0.08);
}

.input-field::placeholder {
  color: transparent;
}

.input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.25rem;
  z-index: 2;
  transition: var(--transition);
}

.input-field:focus + .floating-label + .input-icon,
.input-wrapper:focus-within .input-icon {
  color: var(--primary-blue);
}

.password-toggle {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.25rem;
  padding: 0.25rem;
  border-radius: 6px;
  transition: var(--transition);
  z-index: 4;
}

.password-toggle:hover {
  color: var(--primary-blue);
  background: rgba(30, 136, 229, 0.08);
}

/* Error States */
.input-group.error .input-field {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.input-group.error .floating-label {
  color: #ef4444;
}

.input-group.error .input-icon {
  color: #ef4444;
}

/* Form Options */
.form-options {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 350px;
  margin: 0 auto;
}

.checkbox-wrapper {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.checkbox-wrapper input[type="checkbox"] {
  display: none;
}

.checkbox-custom {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-color);
  border-radius: 4px;
  margin-right: 0.5rem;
  position: relative;
  transition: var(--transition);
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkbox-custom {
  background: var(--primary-blue);
  border-color: var(--primary-blue);
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkbox-custom::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 12px;
  font-weight: bold;
}

/* Submit Button */
.submit-btn {
  position: relative;
  width: 100%;
  max-width: 350px;
  margin: 0 auto;
  padding: 1rem;
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-orange));
  border: none;
  border-radius: var(--border-radius);
  color: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(30, 136, 229, 0.35);
}

.submit-btn:active {
  transform: translateY(0);
}

.submit-btn.loading {
  pointer-events: none;
}

.submit-btn.loading .btn-text {
  opacity: 0;
}

.submit-btn.loading .btn-loader {
  opacity: 1;
}

.btn-text {
  transition: var(--transition);
}

.btn-loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s linear infinite;
  opacity: 0;
  transition: var(--transition);
}

@keyframes spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Success Overlay */
.success-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(245, 247, 250, 0.95);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.success-overlay.active {
  opacity: 1;
  visibility: visible;
}

.success-content {
  text-align: center;
  animation: successZoom 0.5s ease-out;
}

@keyframes successZoom {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.success-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1rem;
  background: linear-gradient(135deg, var(--primary-green), var(--primary-blue));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
  animation: pulse 2s ease-in-out infinite;
  box-shadow: 0 8px 24px rgba(67, 160, 71, 0.3);
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.success-content h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.success-content p {
  color: var(--text-secondary);
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
  .egs-login-wrapper {
    padding: 0.5rem;
  }
  
  .login-container {
    grid-template-columns: 1fr;
    min-height: auto;
    max-width: 420px;
    margin: 1rem;
  }
  
  .brand-section {
    padding: 2rem 1.5rem;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg,
      rgba(30, 136, 229, 0.08) 0%,
      rgba(255, 107, 53, 0.06) 100%);
  }
  
  .egs-main-character {
    margin-bottom: 1.5rem;
  }
  
  .egs-main-character .egs-character {
    transform: scale(0.8);
  }
  
  .brand-title {
    font-size: 1.35rem;
  }

  .brand-subtitle {
    font-size: 0.9rem;
  }

  .brand-tagline {
    font-size: 0.8rem;
  }
  
  .brand-logo {
    width: 60px;
    height: 60px;
  }
  
  .form-section {
    padding: 2rem 1.5rem;
  }
  
  .form-title {
    font-size: 1.5rem;
  }
  
  .input-field {
    padding: 0.875rem 0.875rem 0.875rem 2.75rem;
    font-size: 16px; /* Prevent zoom on iOS */
  }
  
  .input-icon {
    left: 0.875rem;
    font-size: 1.125rem;
  }
  
  .password-toggle {
    right: 0.875rem;
    font-size: 1.125rem;
  }
  
  .submit-btn {
    padding: 0.875rem;
    font-size: 1rem;
  }
  
  /* Optimize intelligent animations on mobile */
  .smart-background {
    opacity: 0.7;
  }
  
  .data-flow-lines .data-line {
    animation-duration: 4s;
  }
  
  .neural-nodes .neural-node {
    animation-duration: 2s;
  }
  
  .processing-wave,
  .data-pulse,
  .intelligence-scan {
    animation-duration: 3s;
  }
  
  /* Reduce some AI indicators on mobile */
  .data-flow-lines .data-line:nth-child(n+6) {
    display: none;
  }

  .neural-nodes .neural-node:nth-child(n+8) {
    display: none;
  }

  /* Hide some planning nodes on mobile */
  .planning-node:nth-child(n+7) {
    display: none;
  }

  /* Weekly schedule responsive */
  .weekly-schedule {
    bottom: 3%;
    left: 50%;
    transform: translateX(-50%);
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 95%;
  }

  .schedule-card {
    min-width: 120px;
    padding: 10px 14px;
  }

  .schedule-day-header {
    gap: 5px;
    margin-bottom: 8px;
    padding-bottom: 6px;
  }

  .schedule-icon {
    font-size: 16px;
  }

  .schedule-day {
    font-size: 11px;
    letter-spacing: 0.3px;
  }

  .schedule-time {
    font-size: 11px;
    padding: 3px 6px;
    margin-bottom: 6px;
  }

  .team-name {
    font-size: 13px;
  }

  .vs-text {
    font-size: 8px;
    padding: 2px 5px;
  }

  /* Reduce icon sizes on mobile */
  .node-icon {
    font-size: 20px;
  }

  .planning-node-large .node-icon {
    font-size: 28px;
  }
}

@media (max-width: 480px) {
  .login-container {
    margin: 0.5rem;
    border-radius: 12px;
  }
  
  .brand-section {
    padding: 1.5rem;
  }
  
  .form-section {
    padding: 1.5rem;
  }
  
  .brand-title {
    font-size: 1.15rem;
  }

  .brand-subtitle {
    font-size: 0.85rem;
  }

  .brand-tagline {
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
  }
  
  .brand-logo {
    width: 50px;
    height: 50px;
  }

  /* Further reduce schedule on small phones */
  .weekly-schedule {
    bottom: 2%;
    gap: 8px;
    max-width: 98%;
  }

  .schedule-card {
    min-width: 100px;
    padding: 8px 12px;
    border-radius: 12px;
  }

  .schedule-day-header {
    gap: 4px;
    margin-bottom: 6px;
    padding-bottom: 5px;
  }

  .schedule-icon {
    font-size: 14px;
  }

  .schedule-day {
    font-size: 10px;
    letter-spacing: 0.2px;
  }

  .schedule-time {
    font-size: 10px;
    padding: 3px 5px;
    margin-bottom: 5px;
  }

  .team-name {
    font-size: 12px;
  }

  .vs-text {
    font-size: 7px;
    padding: 2px 4px;
  }

  /* Hide more nodes on very small screens */
  .planning-node:nth-child(n+5) {
    display: none;
  }

  .node-icon {
    font-size: 18px;
  }

  .planning-node-large .node-icon {
    font-size: 24px;
  }
}

/* Touch Improvements for Mobile */
@media (hover: none) and (pointer: coarse) {
  .submit-btn:hover {
    transform: none;
    box-shadow: var(--shadow-sm);
  }
  
  .password-toggle:hover {
    background: none;
  }
  
  .input-field,
  .submit-btn,
  .password-toggle {
    min-height: 44px; /* iOS touch target minimum */
  }
}

/* Light mode optimization - keeping light theme consistent */
@media (prefers-color-scheme: dark) {
  :root {
    /* Keep the light theme even in dark mode preference for sports events branding */
    --text-primary: #1a237e;
    --text-secondary: #37474f;
    --text-muted: #78909c;
    --bg-light: #f5f7fa;
  }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  :root {
    --border-color: rgba(30, 136, 229, 0.4);
    --bg-input: rgba(255, 255, 255, 0.95);
  }

  .input-field {
    border-width: 3px;
  }
}

/* Print styles */
@media print {
  .egs-login-wrapper {
    display: none;
  }
}