/* Google Fonts Import - Add this at the top of your CSS or in HTML head */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* Custom Font Declaration */
@font-face {
  font-family: 'SK Glypher Trial';
  src: url('SK Glypher Trial.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --primary-color: #006dff;
  --primary-light: rgba(0, 109, 255, 0.1);
  --primary-hover: #0056cc;
  --accent-color: #0088ff;
  --accent-light: #66b3ff;
  --white: #fffcef;
  --cream: #fffcef;
  --glass-bg: rgba(255, 252, 239, 0.9);
  --glass-border: rgba(255, 252, 239, 0.4);
  
  /* Position colors */
  --atacante-color: #ff6b35;
  --defensor-color: #4ecdc4;
  --hibrido-color: #a78bfa;
  
  /* Field colors */
  --field-color: #006dff;
  --field-line-color: rgba(255, 252, 239, 0.7);
  --field-shadow: inset 0 0 50px rgba(0, 109, 255, 0.2);
  
  /* Vest color */
  --vest-color: #ffd700;
  
  /* Enhanced card spacing variables */
  --card-gap: 3rem;
  --card-gap-mobile: 2rem;
}

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

body {
  font-family: 'Poppins', sans-serif;
  background: #006dff;
  color: #333;
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
}

/* Optimize homepage for welcome screen experience */
#homepage {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem 0;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
  position: relative;
  z-index: 1;
}

/* Page Navigation with Innovative Popup Animations */
.page {
  display: none;
  position: relative;
  width: 100%;
  min-height: 100vh;
  background: #006dff;
  z-index: 1000;
  opacity: 0;
  transform: scale(0.8) rotateY(90deg);
  transition: all 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Authentication Styles */
.user-section {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--white);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--white);
}

.user-name {
  font-weight: 600;
  font-size: 0.9rem;
}

.logout-btn {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logout-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
}

.auth-buttons {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
}

.login-btn, .signup-btn {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.login-btn:hover, .signup-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
}

/* Header layout adjustments */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.page.active {
  display: block;
  opacity: 1;
  transform: scale(1) rotateY(0deg);
}

/* Funky entrance animations for different pages */
.page.slide-in-right {
  transform: translateX(100%) rotateZ(15deg) scale(0.8);
}

.page.slide-in-right.active {
  transform: translateX(0) rotateZ(0deg) scale(1);
}

.page.bounce-in {
  transform: scale(0.3) rotate(360deg);
  transition: all 1s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.page.bounce-in.active {
  transform: scale(1) rotate(0deg);
}

.page.flip-in {
  transform: perspective(1000px) rotateX(-90deg) scale(0.8);
  transform-origin: center top;
}

.page.flip-in.active {
  transform: perspective(1000px) rotateX(0deg) scale(1);
}

/* Page content container for smooth transitions - Fixed white space issue */
.page-content {
  padding: 0 2rem 2rem 2rem;
  min-height: 100vh;
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.6s ease 0.4s;
  background: #006dff;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Desktop Layout Adjustments */
@media (min-width: 769px) {
  .page-content {
    align-items: flex-start;
    text-align: left;
  }
  
  .page-header {
    width: 100%;
    max-width: none;
    justify-content: flex-start;
  }
  
  .page-logo-section {
    text-align: center;
    width: 100%;
    max-width: none;
  }
  
  main {
    width: 100%;
    max-width: none;
    padding: 0;
  }
}

.page.active .page-content {
  opacity: 1;
  transform: translateY(0);
}

/* Homepage Styles */
#homepage header {
  text-align: center;
  margin-bottom: 0.5rem;
  animation: fadeInDown 0.8s ease;
}

#homepage .logo-container {
  margin-bottom: 0;
  padding: 1rem;
}

#homepage #logo {
  width: 450px;
  height: 450px;
  object-fit: contain;
  transition: all 0.3s ease;
}



/* App Features Grid - Enhanced Spacing and Separation */
.homepage-main {
  animation: fadeInUp 0.8s ease 0.2s both;
  margin-top: 0;
  padding: 0 2rem;
}

.app-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--card-gap);
  margin: 0 auto;
  max-width: 1200px;
  padding: 2rem 0;
  border-radius: 20px;
  position: relative;
}

/* Enhanced Feature Cards with Superior Spacing and Visual Effects */
.feature-card {
  background: var(--cream);
  padding: 2.5rem 2rem;
  text-align: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 300px;
  
  /* Enhanced shadow and border system for better separation - NO BORDER RADIUS */
  border: 4px solid var(--primary-color);
  border-radius: 0;
  box-shadow: 
    0 8px 16px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  
  /* Static positioning - NO TRANSFORMS OR HOVER ANIMATIONS */
  transform: none;
  transform-style: flat;
  
  /* Simplified transition for basic interactions only */
  transition: box-shadow 0.2s ease;
  
  /* Isolation for better stacking context */
  isolation: isolate;
}

/* Remove all gradient border animations and hover effects */
.feature-card::before {
  display: none;
}

/* Remove all hover transformations - keep static positioning */
.feature-card:hover {
  transform: none;
  box-shadow: 
    0 12px 24px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  border-color: var(--primary-color);
}

/* Remove active state animations */
.feature-card:active {
  transform: none;
  transition: all 0.1s ease;
}

/* Staggered animation delays for cascading entrance effect */
.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.2s; }
.feature-card:nth-child(3) { animation-delay: 0.3s; }
.feature-card:nth-child(4) { animation-delay: 0.4s; }
.feature-card:nth-child(5) { animation-delay: 0.5s; }
.feature-card:nth-child(6) { animation-delay: 0.6s; }

/* Enhanced visual separation with alternating effects */
.feature-card:nth-child(odd) {
  background: linear-gradient(135deg, var(--cream) 0%, rgba(255, 252, 239, 0.95) 100%);
}

.feature-card:nth-child(even) {
  background: linear-gradient(135deg, rgba(255, 252, 239, 0.95) 0%, var(--cream) 100%);
}

/* Feature icon enhancements - Larger but controlled sizing */
.feature-icon {
  width: 140px;
  height: 140px;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  font-size: 4.5rem;
  transition: color 0.3s ease;
  position: relative;
  z-index: 2;
}

/* Simplified hover effect - only color change */
.feature-card:hover .feature-icon {
  color: var(--accent-color);
  transform: none;
  filter: none;
}

/* Enhanced feature image styling - Larger but controlled */
.feature-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: filter 0.3s ease;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.1));
}

/* Simplified hover effect - only filter change */
.feature-card:hover .feature-image {
  transform: none;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.15));
}

/* Simplified text styling with minimal hover effects */
.feature-card h3 {
  font-family: 'SK Glypher Trial', 'Poppins', sans-serif;
  color: var(--primary-color);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;

  transition: color 0.3s ease;
}

/* Simplified hover effect - only color change */
.feature-card:hover h3 {
  color: var(--accent-color);
  transform: none;
}

.feature-card p {
  color: #666;
  font-size: 1rem;
  line-height: 1.5;
  text-align: center;
  max-width: 220px;
  font-weight: 500;
  transition: color 0.3s ease;
  font-family: 'Poppins', sans-serif;
}

/* Simplified hover effect - only color change */
.feature-card:hover p {
  color: #555;
  transform: none;
}

/* Page Headers - Subtle and Clean Design */
.page-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1.5rem;
  margin: 0;
  padding: 1.5rem 0 1rem 0;
  animation: fadeInDown 0.8s ease;
  position: relative;
  z-index: 10;
}

/* Mobile-First Enhancements - Applied to All Breakpoints */
@media (max-width: 1024px) {
  /* Enhanced Typography for Better Mobile Reading */
  body {
    font-size: 16px;
    line-height: 1.7;
  }

  /* Better Touch Targets for Mobile */
  button, .count-btn, .generate-btn, .back-to-home-btn {
    min-height: 44px;
    min-width: 44px;
    touch-action: manipulation;
  }

  /* Improved Input Fields for Mobile */
  input[type="text"], select {
    font-size: 16px; /* Prevents zoom on iOS */
    padding: 1.2rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
  }

  input[type="text"]:focus, select:focus {
    transform: scale(1.02);
    box-shadow: 0 0 0 4px var(--primary-light);
  }

  /* Better Visual Hierarchy */
  h1, h2, h3 {
    line-height: 1.3;
    margin-bottom: 1rem;
  }

  /* Optimized Animations for Mobile Performance */
  * {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-perspective: 1000;
    perspective: 1000;
  }

  /* Smooth Scrolling */
  html {
    scroll-behavior: smooth;
  }
}

/* Page Logo Section - Exactly like Homepage */
.page-logo-section {
  text-align: center;
  margin-bottom: 0.5rem;
  padding: 1rem;
  animation: fadeInDown 0.8s ease;
}

.page-logo-section .logo-container {
  margin-bottom: 0;
}

.page-main-logo {
  width: 400px;
  height: 400px;
  object-fit: contain;
  transition: all 0.3s ease;
}

.page-logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-logo {
  width: 120px;
  height: 120px;
  object-fit: contain;
}

.back-to-home-btn {
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-to-home-btn:hover {
  transform: translateX(-2px) scale(1.1);
}

.back-arrow-icon {
  width: 4rem;
  height: 4rem;
  object-fit: contain;
  transition: all 0.3s ease;
}



/* Coming Soon Pages - Enhanced with Image Icon Support and Proper Spacing */
.coming-soon {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 3px solid var(--primary-color);
  border-radius: 0;
  margin: 2rem 0;
  animation: fadeInUp 0.8s ease;
  transform: none;
  transition: box-shadow 0.3s ease;
}

.coming-soon:hover {
  transform: none;
  box-shadow: 0 12px 24px rgba(0, 109, 255, 0.2);
}

/* Coming Soon Icon - Support for both Font Awesome and Images */
.coming-soon i {
  font-size: 5rem;
  color: var(--primary-color);
  margin-bottom: 2rem;
  display: block;
}

.coming-soon-icon {
  width: 140px;
  height: 140px;
  object-fit: contain;
  margin: 0 auto 2rem;
  display: block;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.1));
}

.coming-soon h2 {
  color: var(--primary-color);
  font-size: 2rem;
  margin-bottom: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: 'SK Glypher Trial', 'Poppins', sans-serif;
}

.coming-soon p {
  color: #666;
  font-size: 1.1rem;
  font-family: 'Poppins', sans-serif;
}

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

@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);
  }
}

/* Team Generator Styles */
.players-container {
  background: var(--cream);
  padding: 3rem;
  backdrop-filter: blur(20px);
  border: 3px solid var(--primary-color);
  border-radius: 0;
  box-shadow: 
      0 24px 48px rgba(0, 0, 0, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.3);
  margin-bottom: 3rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  animation: fadeInUp 0.8s ease 0.2s both;
  position: relative;
  overflow: hidden;
  transform: perspective(1000px) rotateX(3deg);
}

.players-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
}

.players-container:hover {
  transform: perspective(1000px) rotateX(0deg) translateY(-8px);
  box-shadow: 
      0 32px 64px rgba(0, 0, 0, 0.25),
      inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* Player Count Selector Styles */
.player-count-selector {
  margin-bottom: 3rem;
  text-align: center;
}

.count-label {
  display: block;
  color: var(--primary-color);
  font-weight: 700;
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: 'SK Glypher Trial', 'Poppins', sans-serif;
}

.count-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-bottom: 3rem;
}

.count-btn {
  padding: 2rem 1.5rem;
  border: 3px solid var(--primary-color);
  border-radius: 0;
  background: var(--cream);
  color: var(--primary-color);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: 'Poppins', sans-serif;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
}

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

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

.count-btn:hover {
  transform: none;
  box-shadow: none;
}

.count-btn.active {
  background: var(--primary-color);
  color: var(--cream);
  transform: perspective(1000px) rotateX(0deg) translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 109, 255, 0.4);
}

.count-btn.active .count-btn-icon {
  filter: brightness(0) saturate(100%) invert(100%) sepia(0%) saturate(0%) hue-rotate(93deg) brightness(103%) contrast(103%);
}

.input-group {
  display: grid;
  gap: 1.8rem;
  margin-bottom: 2rem;
}

.player-input {
  background: var(--cream);
  padding: 1.8rem;
  box-shadow: 
      0 8px 16px rgba(0, 0, 0, 0.1),
      inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid rgba(0, 109, 255, 0.2);
  border-radius: 0;
  position: relative;
  overflow: hidden;
}

.player-input::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.player-input:hover::before {
  transform: scaleX(1);
}

.player-input:hover {
  transform: translateY(-3px);
  box-shadow: 
      0 12px 24px rgba(0, 0, 0, 0.15),
      inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

input[type="text"] {
  width: 100%;
  padding: 1rem;
  border: 2px solid rgba(0, 109, 255, 0.2);
  border-radius: 0;
  font-size: 1.1rem;
  font-family: 'Poppins', sans-serif;
  margin-bottom: 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(255, 252, 239, 0.5);
}

input[type="text"]:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px var(--primary-light);
  background: var(--cream);
  transform: scale(1.02);
}

.player-attributes {
  display: flex;
  gap: 1.5rem;
}

.skill-selector, .position-selector {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
}

.skill-selector label, .position-selector label {
  font-size: 1rem;
  color: var(--primary-color);
  font-weight: 700;
  min-width: 70px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-family: 'SK Glypher Trial', 'Montserrat', sans-serif;
}

select {
  padding: 1rem 3rem 1rem 1.5rem;
  border: 2px solid rgba(0, 109, 255, 0.2);
  border-radius: 0;
  background: var(--cream);
  color: #333;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23006dff'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1.5em;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  width: 100%;
  font-weight: 600;
}

select:hover {
  border-color: var(--primary-color);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 109, 255, 0.1);
}

select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px var(--primary-light);
}

.generate-btn {
  width: 100%;
  padding: 2rem;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: var(--cream);
  border: none;
  border-radius: 0;
  font-size: 1.4rem;
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
      0 6px 16px rgba(0, 109, 255, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 1px;
  transform: perspective(1000px) rotateX(2deg);
}

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

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

.generate-btn:hover {
  transform: perspective(1000px) rotateX(0deg) translateY(-4px) scale(1.02);
  box-shadow: 
      0 8px 24px rgba(0, 109, 255, 0.4),
      inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.generate-btn:active {
  transform: translateY(-2px);
}

.generate-icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

/* Action buttons container */
.action-buttons {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 3rem;
  padding: 1.5rem;
}

/* Regenerate button specific styles */
.regenerate-btn, .back-btn {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1.2rem 2rem;
  border: none;
  border-radius: 0;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: 'Poppins', sans-serif;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.regenerate-btn {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: var(--cream);
  box-shadow: 0 6px 16px rgba(0, 109, 255, 0.3);
}

.back-btn {
  background: var(--cream);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  backdrop-filter: blur(12px);
}

.regenerate-btn:hover, .back-btn:hover {
  transform: none;
  box-shadow: none;
}

.regenerate-btn:active, .back-btn:active {
  transform: translateY(-1px);
}

.regenerate-icon, .back-icon {
  font-size: 1.3rem;
}

/* Football pitch visualization */
.pitch-container {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  margin: 3rem 0;
  animation: fadeInUp 0.8s ease;
}

.team-info-section {
  margin-bottom: 3rem;
}

.team-info-panels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2.5rem;
}

.team-info-panel {
  background: var(--cream);
  padding: 2.5rem;
  backdrop-filter: blur(20px);
  border: 3px solid var(--primary-color);
  border-radius: 12px;
  box-shadow: 
      0 16px 32px rgba(0, 0, 0, 0.15),
      inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  transform: perspective(1000px) rotateX(2deg);
}

.team-info-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.team-info-panel:hover {
  transform: perspective(1000px) rotateX(0deg) translateY(-10px) scale(1.02);
  box-shadow: 
      0 24px 48px rgba(0, 0, 0, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.team-info-panel h2 {
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  font-weight: 700;
  text-align: center;
  font-size: 1.8rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--primary-light);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.team-info-panel.team-a h2 {
  color: #006dff;
}

.team-info-panel.team-b h2 {
  color: #0056cc;
}

.team-info-panel.team-c h2 {
  color: #004299;
}

.team-players-list {
  list-style: none;
}

.team-players-list li {
  padding: 1.2rem;
  border-bottom: 1px solid rgba(0, 109, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.3s ease;
  margin-bottom: 0.5rem;
  border-radius: 6px;
}

.team-players-list li:hover {
  background: rgba(0, 109, 255, 0.05);
  transform: translateX(5px);
}

.team-players-list li:last-child {
  border-bottom: none;
}

.player-indicator {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.team-a .player-indicator {
  background: linear-gradient(135deg, #006dff, #0056cc);
}

.team-b .player-indicator {
  background: linear-gradient(135deg, #0056cc, #004299);
}

.team-c .player-indicator {
  background: linear-gradient(135deg, #004299, #003366);
}

.player-details {
  flex: 1;
}

.player-details-name {
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #333;
  font-size: 1.1rem;
}

.player-details-badges {
  display: flex;
  gap: 0.8rem;
}

.skill-badge, .position-badge {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 4px;
}

.skill-badge {
  background: var(--primary-light);
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
}

.position-badge {
  color: var(--cream);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.position-atacante {
  background: linear-gradient(135deg, var(--atacante-color), #ff5722);
}

.position-defensor {
  background: linear-gradient(135deg, var(--defensor-color), #26a69a);
}

.position-híbrido {
  background: linear-gradient(135deg, var(--hibrido-color), #8b5cf6);
}

.team-stats {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.team-total-skill {
  padding: 1.2rem;
  background: linear-gradient(135deg, var(--primary-light), rgba(0, 109, 255, 0.2));
  color: var(--primary-color);
  text-align: center;
  font-weight: 700;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: 2px solid var(--primary-color);
  border-radius: 6px;
}

.team-positions {
  display: flex;
  justify-content: space-between;
  padding: 1.2rem;
  background: rgba(255, 252, 239, 0.5);
  border: 1px solid rgba(0, 109, 255, 0.2);
  border-radius: 6px;
}

.position-count {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  color: #333;
}

.position-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.position-icon.atacante {
  background: linear-gradient(135deg, var(--atacante-color), #ff5722);
}

.position-icon.defensor {
  background: linear-gradient(135deg, var(--defensor-color), #26a69a);
}

.position-icon.híbrido {
  background: linear-gradient(135deg, var(--hibrido-color), #8b5cf6);
}

/* Error states */
input.error {
  border-color: #666;
  background-color: rgba(102, 102, 102, 0.05);
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

input.error:focus {
  border-color: #666;
  box-shadow: 0 0 0 3px rgba(102, 102, 102, 0.1);
}

/* Vest badge styling */
.vest-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--vest-color), #ffed4e);
  color: #333;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 700;
  margin-left: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 8px rgba(255, 215, 0, 0.3);
  border-radius: 4px;
}

.team-name-container {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Responsive Design - Enhanced for Better Spacing */
@media (max-width: 1200px) {
  .app-features {
    gap: 2.5rem;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
}

@media (max-width: 900px) {
  #homepage #logo {
      width: 450px;
      height: 450px;
  }

  /* Medium Mobile - Tablet Portrait Layout */
  .page-content {
      padding: 0 2rem 3rem 2rem;
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
      min-height: 100vh;
  }

  .page-header {
      width: 100%;
      max-width: 600px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 1.5rem;
      padding: 2rem 0 1rem 0;
      margin-bottom: 1.5rem;
      position: relative;
  }

  .back-to-home-btn {
      width: 3.2rem;
      height: 3.2rem;
      position: absolute;
      left: 0;
  }

  .back-arrow-icon {
      width: 2.8rem;
      height: 2.8rem;
  }

  .page-logo-section {
      width: 100%;
      max-width: 600px;
      margin: 1rem auto 2rem auto;
      padding: 1rem 1.5rem;
      display: flex;
      justify-content: center;
      align-items: center;
  }

  .page-main-logo {
      width: 320px;
      height: 320px;
      margin: 0 auto;
      display: block;
  }

  main {
      width: 100%;
      max-width: 600px;
      margin: 0 auto;
      padding: 0 1.5rem;
  }

  .coming-soon {
      padding: 4rem 3rem;
      margin: 2.5rem auto;
      border-radius: 0;
      width: 100%;
      max-width: 550px;
  }

  .coming-soon h2 {
      font-size: 2.4rem;
      margin-bottom: 1.8rem;
  }

  .coming-soon p {
      font-size: 1.3rem;
      max-width: 350px;
  }

  .coming-soon-icon {
      width: 160px;
      height: 160px;
      margin: 0 auto 3rem auto;
  }

  /* Homepage Medium Mobile */
  .app-features {
      grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
      gap: var(--card-gap-mobile);
      padding: 2rem 0;
  }
  
  .homepage-main {
      padding: 0 1.5rem;
  }
  
  .team-info-panels {
      grid-template-columns: 1fr;
      max-width: 100%;
      width: 100%;
      margin: 0 auto;
  }

  #homepage header {
      margin-bottom: 1rem;
      padding: 0.5rem;
  }

  .feature-icon {
      width: 140px;
      height: 140px;
      font-size: 3.5rem;
  }
  
  .feature-card {
      padding: 2.5rem 2rem;
      min-height: 300px;
      max-width: 400px;
      margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .container {
      padding: 16px;
      max-width: 100%;
  }

  #homepage header {
      margin-bottom: 1rem;
      padding: 0.5rem;
  }

  #homepage #logo {
      width: 260px;
      height: 260px;
  }

  /* Mobile Page Structure - Centered and Spacious */
  .page-content {
      padding: 0 1rem 2rem 1rem;
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
      min-height: 100vh;
  }

  /* Mobile Page Header - Elegant and Centered */
  .page-header {
      width: 100%;
      max-width: 500px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 1rem;
      padding: 2rem 0 1.5rem 0;
      margin-bottom: 1rem;
      position: relative;
  }

  .back-to-home-btn {
      width: 3rem;
      height: 3rem;
      position: absolute;
      left: 0;
  }

  .back-to-home-btn:hover {
      transform: translateX(-3px) scale(1.15);
  }

  .back-arrow-icon {
      width: 2.2rem;
      height: 2.2rem;
  }

  /* Mobile Logo Section - Perfectly Centered */
  .page-logo-section {
      width: 100%;
      max-width: 500px;
      margin: 1rem auto 2rem auto;
      padding: 0.5rem 1rem;
      display: flex;
      justify-content: center;
      align-items: center;
  }

  .page-main-logo {
      width: 280px;
      height: 280px;
      margin: 0 auto;
      display: block;
  }

  /* Mobile Main Content - Centered and Spacious */
  main {
      width: 100%;
      max-width: 100%;
      margin: 0 auto;
      padding: 0 0.5rem;
  }

  /* Mobile Coming Soon - Enhanced Design */
     .coming-soon {
       padding: 4rem 2rem;
       margin: 2rem auto;
       border-radius: 0;
       width: 100%;
       max-width: 450px;
       background: linear-gradient(135deg, var(--glass-bg) 0%, rgba(255, 252, 239, 0.8) 100%);
       backdrop-filter: blur(25px);
       border: 3px solid var(--primary-color);
       box-shadow: 
           0 20px 40px rgba(0, 0, 0, 0.2),
           inset 0 1px 0 rgba(255, 255, 255, 0.3);
       transform: translateY(0);
       transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
   }

  .coming-soon:hover {
      transform: translateY(-8px);
      box-shadow: 
          0 28px 50px rgba(0, 109, 255, 0.25),
          inset 0 1px 0 rgba(255, 255, 255, 0.4);
  }

  .coming-soon-icon {
      width: 140px;
      height: 140px;
      margin: 0 auto 2.5rem auto;
      display: block;
      filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.15));
  }

  .coming-soon h2 {
      font-size: 2.2rem;
      margin-bottom: 1.5rem;
      font-weight: 700;
      color: var(--primary-color);

      letter-spacing: 1.5px;
      font-family: 'SK Glypher Trial', 'Poppins', sans-serif;
  }

  .coming-soon p {
      font-size: 1.2rem;
      line-height: 1.6;
      color: #555;
      font-weight: 500;
      max-width: 300px;
      margin: 0 auto;
  }

  /* Homepage Mobile Improvements */
  .app-features {
      grid-template-columns: 1fr;
      gap: 2.5rem;
      padding: 2rem 0;
  }
  
  .homepage-main {
      padding: 0 1.5rem;
  }

  .feature-card {
      padding: 3rem 2rem;
      min-height: 300px;
      aspect-ratio: 1;
      width: 100%;
      max-width: 380px;
      margin: 0 auto;
      border-radius: 0;
  }

  .feature-icon {
      width: 150px;
      height: 150px;
      font-size: 3.8rem;
  }

  /* Team Generator Mobile Improvements - Mobile-First & Compact */
  .players-container {
      padding: 1rem 0.5rem;
      margin: 1rem auto;
      border-radius: 0;
      max-width: 100%;
      width: 100%;
      box-shadow: 
          0 8px 16px rgba(0, 0, 0, 0.15),
          inset 0 1px 0 rgba(255, 255, 255, 0.3);
  }

  .player-count-selector {
      margin-bottom: 1.5rem;
  }

  .count-label {
      font-size: 1rem;
      margin-bottom: 1rem;
  }

  .count-buttons {
      flex-direction: row;
      justify-content: center;
      gap: 0.6rem;
      margin-bottom: 1.5rem;
  }

  .count-btn {
      padding: 0.8rem 1rem;
      font-size: 0.9rem;
      border-radius: 6px;
      min-width: 70px;
      border: 2px solid var(--primary-color);
  }

  .input-group {
      gap: 0.8rem;
      margin-bottom: 1.2rem;
  }

  .player-input {
      padding: 1rem 0.8rem;
      margin-bottom: 0.8rem;
      border-radius: 8px;
      border: 2px solid rgba(0, 109, 255, 0.2);
  }

  .player-input input[type="text"] {
      padding: 0.7rem;
      font-size: 0.9rem;
      margin-bottom: 0.6rem;
  }

  .player-attributes {
      flex-direction: column;
      gap: 1rem;
  }

  .skill-selector, .position-selector {
      width: 100%;
  }

  .skill-selector label, .position-selector label {
      font-size: 0.85rem;
      min-width: 60px;
      font-family: 'SK Glypher Trial', 'Montserrat', sans-serif;
  }

  .skill-selector select, .position-selector select {
      padding: 0.7rem 2rem 0.7rem 0.8rem;
      font-size: 0.85rem;
  }

  .generate-btn {
      padding: 1rem;
      font-size: 1rem;
      margin-top: 1rem;
      border-radius: 8px;
      font-family: 'SK Glypher Trial', 'Montserrat', sans-serif;
  }

  .action-buttons {
      flex-direction: row;
      justify-content: center;
      gap: 0.8rem;
      margin: 1.5rem 0 1rem 0;
      padding: 0.8rem;
  }

  .regenerate-btn, .back-btn {
      padding: 0.8rem 1.2rem;
      font-size: 0.9rem;
  }

  .team-positions {
      flex-wrap: wrap;
      gap: 0.8rem;
      justify-content: center;
      padding: 1rem;
  }

  .position-count {
      font-size: 0.9rem;
      min-width: 40%;
  }

  .team-info-panel {
      padding: 1.2rem 0.8rem;
      border-radius: 8px;
      margin-bottom: 1rem;
  }

  .team-info-panel h2 {
      font-size: 1.3rem;
      margin-bottom: 1rem;
      padding-bottom: 0.8rem;
  }

  .team-players-list li {
      padding: 0.8rem;
      margin-bottom: 0.3rem;
  }

  .player-details-name {
      font-size: 0.95rem;
  }

  .skill-badge, .position-badge {
      padding: 0.3rem 0.6rem;
      font-size: 0.75rem;
  }

  .team-total-skill {
      padding: 0.8rem;
      font-size: 0.95rem;
  }

  .team-info-panels {
      grid-template-columns: 1fr;
      gap: 1.5rem;
      max-width: 420px;
      margin: 0 auto;
  }
}

@media (max-width: 480px) {
  .container {
      padding: 12px;
  }

  #homepage header {
      margin-bottom: 0.5rem;
      padding: 0.25rem;
  }

  #homepage #logo {
      width: 320px;
      height: 320px;
  }

  /* Small Mobile Page Structure - Ultra Clean */
  .page-content {
      padding: 0 0.8rem 2rem 0.8rem;
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
      min-height: 100vh;
  }

  /* Small Mobile Page Header - Refined */
  .page-header {
      width: 100%;
      max-width: 400px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.8rem;
      padding: 1.5rem 0 1rem 0;
      margin-bottom: 0.8rem;
      position: relative;
  }

  .back-to-home-btn {
      width: 2.8rem;
      height: 2.8rem;
      position: absolute;
      left: 0;
  }

  .back-to-home-btn:hover {
      transform: translateX(-2px) scale(1.1);
  }

  .back-arrow-icon {
      width: 2rem;
      height: 2rem;
  }

  /* Small Mobile Logo Section - Perfectly Balanced */
  .page-logo-section {
      width: 100%;
      max-width: 400px;
      margin: 0.5rem auto 1.5rem auto;
      padding: 0.5rem 0.5rem;
      display: flex;
      justify-content: center;
      align-items: center;
  }

  .page-main-logo {
      width: 240px;
      height: 240px;
      margin: 0 auto;
      display: block;
  }

  /* Small Mobile Main Content - Optimized */
  main {
      width: 100%;
      max-width: 100%;
      margin: 0 auto;
      padding: 0 0.3rem;
  }

  /* Small Mobile Coming Soon - Premium Design */
     .coming-soon {
       padding: 3.5rem 1.5rem;
       margin: 2rem auto;
       border-radius: 0;
       width: 100%;
       max-width: 380px;
       background: linear-gradient(135deg, var(--glass-bg) 0%, rgba(255, 252, 239, 0.9) 100%);
       backdrop-filter: blur(30px);
       border: 2px solid var(--primary-color);
       box-shadow: 
           0 16px 32px rgba(0, 0, 0, 0.2),
           inset 0 1px 0 rgba(255, 255, 255, 0.4);
       transform: translateY(0);
       transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
   }

  .coming-soon:hover {
      transform: translateY(-6px);
      box-shadow: 
          0 24px 40px rgba(0, 109, 255, 0.25),
          inset 0 1px 0 rgba(255, 255, 255, 0.5);
  }

  .coming-soon-icon {
      width: 120px;
      height: 120px;
      margin: 0 auto 2rem auto;
      display: block;
      filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.15));
  }

  .coming-soon h2 {
      font-size: 1.8rem;
      margin-bottom: 1.2rem;
      font-weight: 700;
      color: var(--primary-color);

      letter-spacing: 1px;
      font-family: 'SK Glypher Trial', 'Montserrat', sans-serif;
  }

  .coming-soon p {
      font-size: 1.1rem;
      line-height: 1.5;
      color: #555;
      font-weight: 500;
      max-width: 280px;
      margin: 0 auto;
  }

  /* Homepage Small Mobile Improvements */
  .app-features {
      gap: 2rem;
      padding: 1.5rem 0;
  }

  #homepage {
      min-height: 100vh;
      justify-content: center;
      padding: 1.5rem 0;
  }

  .feature-card {
      padding: 2.5rem 1.5rem;
      min-height: 260px;
      aspect-ratio: 1;
      width: 100%;
      max-width: 320px;
      margin: 0 auto;
      border-radius: 0;
  }

  .feature-card h3 {
      font-family: 'SK Glypher Trial', 'Montserrat', sans-serif;
      font-size: 1.3rem;
      margin-bottom: 1rem;
  }

  .feature-card p {
      font-size: 1rem;
      line-height: 1.5;
  }

  .feature-icon {
      width: 120px;
      height: 120px;
      font-size: 3rem;
      margin-bottom: 1.2rem;
  }

  /* Team Generator Small Mobile */
  .players-container {
      padding: 1.5rem 0.8rem;
      margin: 1.5rem auto;
      border-radius: 0;
      max-width: 100%;
      width: 100%;
  }

  .count-buttons {
      flex-direction: column;
      align-items: center;
      gap: 1rem;
      margin-bottom: 2.5rem;
  }

  .count-btn {
      width: 100%;
      max-width: 200px;
      padding: 0.8rem 1.2rem;
      font-size: 0.95rem;
      border-radius: 8px;
  }

  .player-input {
      padding: 1.2rem 1rem;
      margin-bottom: 1rem;
      border-radius: 8px;
  }

  .generate-btn {
      padding: 1rem;
      font-size: 0.95rem;
      margin-top: 1.5rem;
      border-radius: 8px;
      font-family: 'SK Glypher Trial', 'Montserrat', sans-serif;
  }

  .action-buttons {
      flex-direction: column;
      gap: 0.8rem;
      margin: 2rem 0;
      padding: 1rem;
  }

  .team-info-panel {
      padding: 1.5rem 1rem;
      border-radius: 8px;
      margin-bottom: 1rem;
  }

  .team-info-panels {
      gap: 1.5rem;
      max-width: 100%;
      width: 100%;
      margin: 0 auto;
  }
}

/* Transitions for showing/hiding sections */
.players-container, .pitch-container {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.players-container[style*="display: none"] {
  opacity: 0;
  transform: translateY(-30px);
}

.pitch-container {
  opacity: 0;
  transform: translateY(30px);
  display: none;
}

.pitch-container.active {
  opacity: 1;
  transform: translateY(0);
  display: block;
}

/* Stagger animations for player inputs */
.player-input:nth-child(1) { animation: slideInRight 0.6s ease 0.1s both; }
.player-input:nth-child(2) { animation: slideInRight 0.6s ease 0.2s both; }
.player-input:nth-child(3) { animation: slideInRight 0.6s ease 0.3s both; }
.player-input:nth-child(4) { animation: slideInRight 0.6s ease 0.4s both; }
.player-input:nth-child(5) { animation: slideInRight 0.6s ease 0.5s both; }
.player-input:nth-child(6) { animation: slideInRight 0.6s ease 0.6s both; }
.player-input:nth-child(7) { animation: slideInRight 0.6s ease 0.7s both; }
.player-input:nth-child(8) { animation: slideInRight 0.6s ease 0.8s both; }
.player-input:nth-child(9) { animation: slideInRight 0.6s ease 0.9s both; }
.player-input:nth-child(10) { animation: slideInRight 0.6s ease 1.0s both; }
.player-input:nth-child(11) { animation: slideInRight 0.6s ease 1.1s both; }
.player-input:nth-child(12) { animation: slideInRight 0.6s ease 1.2s both; }
.player-input:nth-child(13) { animation: slideInRight 0.6s ease 1.3s both; }
.player-input:nth-child(14) { animation: slideInRight 0.6s ease 1.4s both; }
.player-input:nth-child(15) { animation: slideInRight 0.6s ease 1.5s both; }

/* ===== ENHANCED TEAM GENERATOR STYLES ===== */

/* Generator Steps Navigation */
.generator-steps {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  margin: 1.5rem 0 2rem 0;
  padding: 0 2rem;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 0.7rem;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

.step::before {
  content: '';
  position: absolute;
  top: 50%;
  right: -2rem;
  width: 2rem;
  height: 2px;
  background: rgba(0, 109, 255, 0.3);
  transform: translateY(-50%);
  transition: all 0.3s ease;
}

.step:last-child::before {
  display: none;
}

.step.active::before {
  background: var(--primary-color);
}

.step-number {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--cream);
  border: 2px solid rgba(255, 252, 239, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'SK Glypher Trial', 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--primary-color);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.step span {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--cream);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

.step.active .step-number {
  background: var(--cream);
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: scale(1.1);
}

.step.active span {
  color: var(--cream);
  transform: scale(1.05);
}

/* Step Content */
.step-content {
  animation: fadeInUp 0.6s ease;
}

.step-content.hidden {
  display: none;
}

/* Enhanced Player Count Buttons */
.count-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.count-btn {
  padding: 2rem 1.5rem;
  border: 3px solid var(--primary-color);
  border-radius: 0;
  background: var(--cream);
  color: var(--primary-color);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: 'Poppins', sans-serif;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
}

.count-btn i {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  transition: all 0.3s ease;
}

.count-btn-icon {
  width: 5rem;
  height: 5rem;
  object-fit: contain;
  margin-bottom: 0.3rem;
  padding: 0;
  transition: all 0.3s ease;
  filter: brightness(0) saturate(100%) invert(20%) sepia(100%) saturate(2000%) hue-rotate(210deg) brightness(90%) contrast(100%);
}

.count-btn span {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.count-btn small {
  font-size: 0.9rem;
  opacity: 0.8;
  font-weight: 500;
}

.count-btn::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.6s;
}

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

.count-btn:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 12px 24px rgba(0, 109, 255, 0.3);
}

.count-btn:hover i {
  transform: none;
}

.count-btn.active {
  background: var(--primary-color);
  color: var(--cream);
  transform: translateY(-8px) scale(1.05);
  box-shadow: 0 16px 32px rgba(0, 109, 255, 0.4);
}

/* Next Step Button */
.next-step-btn {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  padding: 1.5rem 2rem;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: var(--cream);
  border: none;
  border-radius: 0;
  font-size: 1.2rem;
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  overflow: hidden;
}

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

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

.next-step-btn:hover {
  transform: none;
  box-shadow: none;
}

.next-step-btn i {
  transition: transform 0.3s ease;
}

.next-step-btn:hover i {
  transform: none;
}

/* Generation Options */
.generation-options {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.quick-option {
  text-align: center;
  padding: 2rem;
  border-top: 2px solid rgba(0, 109, 255, 0.1);
  width: 100%;
  max-width: 500px;
}

.quick-text {
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  color: #666;
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.quick-generate-btn {
  padding: 1.2rem 2rem;
  background: transparent;
  border: 2px solid var(--primary-color);
  border-radius: 0;
  color: var(--primary-color);
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
}

.quick-generate-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--primary-color);
  transition: left 0.4s;
  z-index: -1;
}

.quick-generate-btn:hover::before {
  left: 0;
}

.quick-generate-btn:hover {
  color: var(--cream);
}

.quick-generate-btn i {
  transition: transform 0.3s ease;
}

.quick-generate-btn:hover i {
  transform: none;
}

/* Player Configuration Styles */
.players-config-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1rem;
}

.config-header {
  text-align: center;
  margin-bottom: 3rem;
}

.config-header h2 {
  font-family: 'SK Glypher Trial', 'Poppins', sans-serif;
  font-size: 2.5rem;
  color: var(--cream);
  margin-bottom: 2rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Player Progress Bar */
.player-progress {
  margin-bottom: 2rem;
}

.progress-bar {
  width: 100%;
  max-width: 400px;
  height: 8px;
  background: rgba(0, 109, 255, 0.1);
  border-radius: 0;
  margin: 0 auto 1rem auto;
  overflow: hidden;
  border: 1px solid rgba(0, 109, 255, 0.2);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  width: 0%;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.player-counter {
  font-family: 'Poppins', sans-serif;
  font-size: 1.2rem;
  color: var(--cream);
  font-weight: 600;
}

/* Player Navigation */
.player-navigation {
  margin-bottom: 3rem;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 2rem;
}

.player-navigation h3 {
  font-family: 'SK Glypher Trial', 'Poppins', sans-serif;
  font-size: 1.3rem;
  color: var(--cream);
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
}

.players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
  gap: 0.8rem;
  max-width: 600px;
  margin: 0 auto;
}

.player-nav-btn {
  width: 60px;
  height: 60px;
  border: 2px solid rgba(0, 109, 255, 0.3);
  border-radius: 50%;
  background: rgba(255, 252, 239, 0.8);
  color: var(--primary-color);
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.player-nav-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--primary-color);
  transition: left 0.3s;
  z-index: -1;
}

.player-nav-btn:hover::before {
  left: 0;
}

.player-nav-btn:hover {
  color: var(--cream);
  border-color: var(--primary-color);
}

.player-nav-btn.current {
  background: var(--primary-color);
  color: var(--cream);
  border-color: var(--primary-color);
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 109, 255, 0.3);
}

.player-nav-btn.completed {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: var(--cream);
}

.player-nav-btn.completed::after {
  content: '✓';
  position: absolute;
  font-size: 0.8rem;
  font-weight: 700;
}

/* Generate Section */
.generate-section {
  text-align: center;
  margin-top: 3rem;
  padding: 3rem 2rem;
  background: transparent;
  border: none;
  border-radius: 0;
}

.final-generate-btn {
  padding: 2rem 3rem;
  background: var(--cream);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  border-radius: 0;
  font-size: 1.4rem;
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  overflow: hidden;
  margin: 0 auto;
}

.final-generate-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: transparent;
  transition: left 0.6s;
}

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

.final-generate-btn:hover {
  background: rgba(255, 252, 239, 0.9);
}

.final-generate-btn i {
  font-size: 4rem;
  transition: transform 0.3s ease;
}

.final-generate-btn img {
  width: 3rem;
  height: 3rem;
  object-fit: contain;
}

.final-generate-btn:hover i {
  transform: none;
}

/* Player Config Card */
.player-config-card {
  background: var(--cream);
  border: 3px solid var(--primary-color);
  border-radius: 0;
  padding: 3rem;
  margin-bottom: 3rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.player-config-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

/* Form Styles */
.form-group {
  margin-bottom: 2rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.form-group label {
  display: block;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--primary-color);
  margin-bottom: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.player-name-input {
  width: 100%;
  padding: 1.2rem 1.5rem;
  border: 2px solid rgba(0, 109, 255, 0.2);
  border-radius: 0;
  background: rgba(255, 252, 239, 0.8);
  font-family: 'Poppins', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
  transition: all 0.3s ease;
}

.player-name-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(0, 109, 255, 0.1);
  background: var(--cream);
}

.level-select, .position-select {
  width: 100%;
  padding: 1.2rem 1.5rem;
  border: 2px solid rgba(0, 109, 255, 0.2);
  border-radius: 0;
  background: rgba(255, 252, 239, 0.8);
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: #333;
  cursor: pointer;
  transition: all 0.3s ease;
}

.level-select:focus, .position-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(0, 109, 255, 0.1);
  background: var(--cream);
}

/* Attributes Grid */
.attributes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.attribute-btn {
  background: rgba(255, 252, 239, 0.8);
  border: 2px solid rgba(0, 109, 255, 0.2);
  border-radius: 0;
  padding: 1.5rem 1rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.attribute-btn i, .attribute-icon {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  display: block;
  transition: all 0.3s ease;
}

.attribute-icon {
  width: 4rem;
  height: 4rem;
  object-fit: contain;
}

.attribute-btn span {
  display: block;
  font-family: 'SK Glypher Trial', 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--primary-color);
  margin-bottom: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.attribute-btn small {
  display: block;
  font-size: 0.75rem;
  color: #666;
  font-weight: 500;
  line-height: 1.3;
  font-family: 'Poppins', sans-serif;
}

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

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

.attribute-btn:hover {
  border-color: var(--primary-color);
}

.attribute-btn:hover i {
  transform: none;
}

.attribute-btn.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--cream);
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 109, 255, 0.3);
}

.attribute-btn.active i,
.attribute-btn.active span,
.attribute-btn.active small {
  color: var(--cream);
}

.attribute-btn.active .attribute-icon {
  filter: brightness(0) saturate(100%) invert(27%) sepia(51%) saturate(2878%) hue-rotate(346deg) brightness(104%) contrast(97%);
}

/* Form Actions */
.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid rgba(0, 109, 255, 0.1);
}

.prev-player-btn, .save-continue-btn {
  padding: 1.2rem 2rem;
  border: 2px solid var(--primary-color);
  border-radius: 0;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.prev-player-btn {
  background: transparent;
  color: var(--primary-color);
}

.prev-player-btn:hover {
  background: rgba(0, 109, 255, 0.1);
}

.save-continue-btn {
  background: var(--primary-color);
  color: var(--cream);
}

.save-continue-btn:hover {
  background: var(--primary-hover);
}

/* Teams Display */
.teams-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.teams-header {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 3rem;
  flex-wrap: wrap;
  gap: 1rem;
  text-align: center;
}

.teams-header h2 {
  font-family: 'SK Glypher Trial', 'Poppins', sans-serif;
  font-size: 2.5rem;
  color: var(--cream);
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: center;
  margin-bottom: 0;
  width: 100%;
}

.action-buttons {
  display: flex;
  gap: 1rem;
}

.regenerate-btn, .back-btn {
  padding: 1rem 1.5rem;
  border: 2px solid var(--primary-color);
  border-radius: 0;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.regenerate-btn {
  background: var(--primary-color);
  color: var(--cream);
}

.regenerate-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 109, 255, 0.3);
}

.back-btn {
  background: transparent;
  color: var(--primary-color);
}

.back-btn:hover {
  background: rgba(0, 109, 255, 0.1);
  transform: translateY(-2px);
}

/* Teams Display Grid */
.teams-display {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.team-card {
  background: var(--cream);
  border: 3px solid var(--primary-color);
  border-radius: 0;
  padding: 1.5rem 2.5rem;
  position: relative;
  overflow: hidden;
  transition: none;
  min-height: auto;
  margin-bottom: 2rem;
}

.team-card.sem-colete {
  border-color: #ff6b35;
  background: linear-gradient(135deg, var(--cream) 0%, rgba(255, 107, 53, 0.05) 100%);
}

.team-card.sem-colete::before {
  background: linear-gradient(90deg, #ff6b35, #ff8c42);
}

.sem-colete-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: #ff6b35;
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 0;
  font-family: 'SK Glypher Trial', 'Poppins', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 10;
}

.team-header {
  text-align: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid rgba(0, 109, 255, 0.1);
}

.team-name {
  font-family: 'SK Glypher Trial', 'Poppins', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.team-skill {
  font-family: 'Poppins', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: #666;
}

.team-players {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
}

.team-player {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(0, 109, 255, 0.1);
  border-radius: 0;
  transition: none;
  background: rgba(255, 252, 239, 0.5);
}

.team-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.team-card:hover {
  transform: none;
  box-shadow: none;
}

.team-header {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid rgba(0, 109, 255, 0.1);
}

.team-name {
  font-family: 'SK Glypher Trial', 'Poppins', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.team-skill {
  font-family: 'Poppins', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: #666;
}

.team-players {
  list-style: none;
}

.team-player {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 0;
  border-bottom: 1px solid rgba(0, 109, 255, 0.1);
  transition: none;
}

.team-player:hover {
  background: transparent;
  transform: none;
}

.player-info {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.player-name-team {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--primary-color);
  margin-bottom: 0.2rem;
}

.player-attributes {
  font-size: 0.8rem;
  color: #666;
  line-height: 1.3;
  font-family: 'Poppins', sans-serif;
}

.player-level-badge {
  background: var(--primary-color);
  color: var(--cream);
  padding: 0.3rem 0.6rem;
  border-radius: 0;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
}

/* Teams Statistics */
.teams-stats {
  border: none;
  border-radius: 0;
  padding: 2rem;
  margin-top: 3rem;
  background: transparent;
}

.stats-title {
  font-family: 'SK Glypher Trial', 'Poppins', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--cream);
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.stat-item {
  text-align: center;
  padding: 1rem;
  background: transparent;
  border: none;
  border-radius: 0;
}

.stat-label {
  font-family: 'SK Glypher Trial', 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--cream);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--cream);
}

/* Enhanced Mobile Responsive for Perfect Mobile Experience */
@media (max-width: 768px) {
  .generator-steps {
    gap: 0.5rem;
    margin: 1rem 0 2rem 0;
    padding: 0 1rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  .step::before {
    display: none; /* Hide connecting lines on mobile */
  }

  .step {
    min-width: 80px;
    padding: 0.5rem;
  }

  .step-number {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1rem;
    margin-bottom: 0.3rem;
  }

  .step span {
    font-size: 0.8rem;
    text-align: center;
  }

  .count-buttons {
    grid-template-columns: 1fr;
    gap: 1.2rem;
    max-width: 100%;
    padding: 0 1rem;
  }

  .count-btn {
    padding: 2rem 1.5rem;
    max-width: none;
    width: 100%;
    text-align: center;
    min-height: 120px;
  }

  .count-btn i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
  }
  
  .count-btn-icon {
    width: 4rem;
    height: 4rem;
    margin-bottom: 1rem;
  }

  .count-btn span {
    font-size: 1.1rem;
    display: block;
    margin-bottom: 0.5rem;
  }

  .count-btn small {
    font-size: 0.9rem;
    opacity: 0.9;
  }

  .config-header h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
  }

  .player-progress {
    margin-bottom: 2rem;
  }

  .progress-bar {
    max-width: 100%;
    height: 8px;
    margin-bottom: 1rem;
  }

  .player-counter {
    font-size: 1.1rem;
  }

  .player-navigation {
    padding: 1.5rem 1rem;
    margin-bottom: 2rem;
    background: rgba(255, 252, 239, 0.1);
    border: 1px solid rgba(255, 252, 239, 0.2);
    border-radius: 12px;
  }

  .player-navigation h3 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--cream);
  }

  .players-grid {
    grid-template-columns: repeat(auto-fill, minmax(55px, 1fr));
    gap: 0.8rem;
    max-width: 100%;
  }

  .player-nav-btn {
    width: 55px;
    height: 55px;
    font-size: 1rem;
    border-radius: 50%;
    border: 2px solid rgba(255, 252, 239, 0.3);
    background: rgba(255, 252, 239, 0.9);
    color: var(--primary-color);
    font-weight: 700;
    transition: all 0.3s ease;
  }

  .player-nav-btn:hover,
  .player-nav-btn.current {
    background: var(--cream);
    border-color: var(--cream);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 252, 239, 0.4);
  }

  .player-nav-btn.completed {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--cream);
  }

  .player-config-card {
    padding: 2rem 1.5rem;
    margin-bottom: 2rem;
    border-radius: 12px;
    border: 2px solid var(--primary-color);
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

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

  .form-group label {
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
    display: block;
  }

  .player-name-input,
  .level-select,
  .position-select {
    padding: 1.2rem 1rem;
    font-size: 1rem;
    border-radius: 0;
    border: 2px solid rgba(0, 109, 255, 0.3);
    width: 100%;
    background: rgba(255, 252, 239, 0.95);
  }

  .player-name-input:focus,
  .level-select:focus,
  .position-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 109, 255, 0.1);
    transform: scale(1.02);
  }

  .attributes-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
  }

  .attribute-btn {
    padding: 1.5rem 1rem;
    border-radius: 0;
    border: 2px solid rgba(0, 109, 255, 0.3);
    background: rgba(255, 252, 239, 0.95);
    min-height: 100px;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 1rem;
  }

  .attribute-btn i, .attribute-icon {
    font-size: 2.5rem;
    margin-bottom: 0;
    flex-shrink: 0;
  }
  
  .attribute-icon {
    width: 3rem;
    height: 3rem;
  }

  .attribute-btn .content {
    flex: 1;
  }

  .attribute-btn span {
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
    display: block;
  }

  .attribute-btn small {
    font-size: 0.75rem;
    line-height: 1.3;
    display: block;
  }

  .attribute-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: scale(1.02);
  }

  .form-actions {
    flex-direction: column;
    gap: 1.2rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
  }

  .prev-player-btn, .save-continue-btn {
    width: 100%;
    justify-content: center;
    padding: 1.3rem 1.5rem;
    font-size: 1rem;
    border-radius: 0;
    min-height: 56px;
  }

  .generate-section {
    margin-top: 2.5rem;
    padding: 2.5rem 1.5rem;
    border-radius: 12px;
    background: transparent;
    border: none;
  }

  .final-generate-btn {
    width: 100%;
    padding: 1.8rem 2rem;
    font-size: 1.2rem;
    border-radius: 0;
    min-height: 80px;
  }
  
  .final-generate-btn i {
    font-size: 3rem;
  }

  .back-to-step1-section {
    margin-bottom: 2.5rem;
    text-align: center;
  }

  .back-to-step1-btn {
    padding: 1rem 2rem;
    border-radius: 0;
    font-size: 1rem;
    background: var(--cream);
    color: var(--primary-color);
    border: 2px solid var(--cream);
  }

  /* Teams display improvements */
  .teams-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 2rem;
    gap: 1.5rem;
  }

  .teams-header h2 {
    font-size: 2rem;
    margin-bottom: 0;
    color: var(--cream);
  }

  .action-buttons {
    flex-direction: row;
    width: 100%;
    max-width: 400px;
    gap: 1rem;
  }

  .regenerate-btn, .back-btn {
    flex: 1;
    padding: 1rem 1.2rem;
    font-size: 0.9rem;
    border-radius: 0;
    min-height: 50px;
  }

  .teams-display {
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
  }

  .team-card {
    padding: 2rem 1.5rem;
    border-radius: 12px;
    border: 2px solid var(--primary-color);
  }

  .team-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
  }

  .team-name {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
  }

  .team-skill {
    font-size: 1rem;
  }

  .team-player {
    padding: 1rem 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .player-info {
    width: 100%;
  }

  .player-name-team {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
  }

  .player-attributes {
    font-size: 0.85rem;
    color: #666;
  }

  .player-level-badge {
    align-self: flex-end;
    margin-top: 0.5rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .stat-item {
    padding: 1rem;
    border-radius: 8px;
  }
}

@media (max-width: 480px) {
  .generator-steps {
    gap: 0.3rem;
    margin: 0.5rem 0 1.5rem 0;
    padding: 0 0.5rem;
  }

  .step {
    min-width: 70px;
    padding: 0.3rem;
  }

  .step span {
    font-size: 0.7rem;
  }

  .step-number {
    width: 2.2rem;
    height: 2.2rem;
    font-size: 0.9rem;
  }

  .config-header h2 {
    font-size: 1.6rem;
  }

  .player-counter {
    font-size: 1rem;
  }

  .player-navigation {
    padding: 1.5rem 1rem;
  }

  .players-grid {
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    gap: 0.6rem;
  }

  .player-nav-btn {
    width: 50px;
    height: 50px;
    font-size: 0.9rem;
  }

  .player-config-card {
    padding: 1.5rem 1rem;
  }

  .attribute-btn {
    padding: 1.2rem 0.8rem;
    min-height: 90px;
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }

  .attribute-btn i, .attribute-icon {
    font-size: 2rem;
  }
  
  .attribute-icon {
    width: 2.5rem;
    height: 2.5rem;
  }

  .attribute-btn span {
    font-size: 0.8rem;
  }

  .attribute-btn small {
    font-size: 0.7rem;
  }

  .teams-header h2 {
    font-size: 1.6rem;
  }

  .action-buttons {
    flex-direction: column;
    max-width: 100%;
  }

  .team-name {
    font-size: 1.4rem;
  }

  .final-generate-btn {
    padding: 1.5rem 1.5rem;
    font-size: 1.1rem;
    min-height: 70px;
  }
  
  .final-generate-btn i {
    font-size: 2.5rem;
  }

  .generate-section {
    padding: 2rem 1rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .count-btn-icon {
    width: 5rem;
    height: 5rem;
    margin-bottom: 0.2rem;
  }
}

/* Back to Step 1 Button */
.back-to-step1-section {
  margin-bottom: 2rem;
  text-align: center;
}

.back-to-step1-btn {
  padding: 1rem 2rem;
  background: var(--cream);
  color: var(--primary-color);
  border: 2px solid var(--cream);
  border-radius: 0;
  font-size: 1rem;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 auto;
}

.back-to-step1-btn:hover {
  background: var(--cream);
  color: var(--primary-color);
}

.back-to-step1-btn i {
  font-size: 1rem;
  transition: transform 0.3s ease;
}

.back-to-step1-btn:hover i {
  transform: none;
}

/* Additional Mobile Touch Optimizations */
@media (max-width: 768px) {
  /* Better touch targets and spacing */
  .next-step-btn {
    min-height: 60px;
    padding: 1.5rem 2rem;
    border-radius: 0;
    font-size: 1.1rem;
    font-family: 'Poppins', sans-serif;
  }

  /* Improved input focus states for mobile */
  input[type="text"]:focus, select:focus {
    transform: scale(1.02);
    box-shadow: 0 0 0 4px rgba(0, 109, 255, 0.15);
    outline: none;
  }

  /* Better button hover states for touch devices */
  .count-btn:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
  }

  .attribute-btn:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
  }

  /* Ensure proper spacing for thumb navigation */
  .player-navigation {
    margin-bottom: 2.5rem;
  }

  /* Better visual feedback for touch */
  button:active {
    opacity: 0.8;
  }

  /* Improved scrolling behavior */
  .teams-container {
    scroll-behavior: smooth;
  }

  .config-header h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    font-family: 'SK Glypher Trial', 'Poppins', sans-serif;
  }

  .player-navigation h3 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--cream);
    font-family: 'SK Glypher Trial', 'Poppins', sans-serif;
  }

  .teams-header h2 {
    font-size: 2rem;
    margin-bottom: 0;
    color: var(--cream);
    font-family: 'SK Glypher Trial', 'Poppins', sans-serif;
  }

  .final-generate-btn {
    width: 100%;
    padding: 1.8rem 2rem;
    font-size: 1.2rem;
    border-radius: 0;
    min-height: 80px;
    font-family: 'Poppins', sans-serif;
  }

  .back-to-step1-btn {
    padding: 1rem 2rem;
    border-radius: 0;
    font-size: 1rem;
    background: var(--cream);
    color: var(--primary-color);
    border: 2px solid var(--cream);
    font-family: 'Poppins', sans-serif;
  }

  /* Bottom action buttons mobile styling */
  .action-buttons-bottom {
    flex-direction: column;
    gap: 1rem;
    margin: 2rem 0;
    padding: 1rem;
  }

  .action-buttons-bottom .regenerate-btn,
  .action-buttons-bottom .back-btn {
    flex: 1;
    padding: 1rem 1.2rem;
    font-size: 0.9rem;
    border-radius: 8px;
    min-height: 50px;
  }

  /* Mobile team display improvements */
  .teams-display {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
  }

  .teams-container {
    padding: 1rem;
  }

  .teams-header {
    margin-bottom: 1.5rem;
  }

  .teams-header h2 {
    font-size: 1.8rem;
  }

  .team-card {
    padding: 1rem 1rem;
    border-radius: 0;
    border: 2px solid var(--primary-color);
    min-height: auto;
    margin-bottom: 1.5rem;
  }

  .team-card.sem-colete {
    border-color: #ff6b35;
  }

  .sem-colete-badge {
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.2rem 0.6rem;
    font-size: 0.7rem;
  }

  .team-header {
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
  }

  .team-name {
    font-size: 1.4rem;
    margin-bottom: 0.3rem;
    padding-right: 4rem; /* Make space for sem-colete badge */
  }

  .team-skill {
    font-size: 0.9rem;
  }

  .team-players {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }

  .team-player {
    padding: 0.5rem;
    margin-bottom: 0.2rem;
  }

  .player-name-team {
    font-size: 0.9rem;
  }

  .player-attributes {
    font-size: 0.7rem;
  }

  .player-level-badge {
    font-size: 0.7rem;
    padding: 0.15rem 0.3rem;
  }
}

/* Extra small screens (iPhone 13 mini, etc.) */
@media (max-width: 375px) {
  .team-card {
    padding: 0.8rem;
    margin-bottom: 1rem;
  }

  .team-name {
    font-size: 1.2rem;
    padding-right: 3.5rem;
  }

  .team-skill {
    font-size: 0.8rem;
  }

  .team-player {
    padding: 0.4rem;
    margin-bottom: 0.15rem;
  }

  .player-name-team {
    font-size: 0.85rem;
  }

  .player-attributes {
    font-size: 0.65rem;
  }

  .player-level-badge {
    font-size: 0.65rem;
    padding: 0.1rem 0.25rem;
  }

  .sem-colete-badge {
    font-size: 0.6rem;
    padding: 0.15rem 0.5rem;
  }

  .team-skill {
    font-size: 1rem;
  }

  .team-players {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .team-player {
    padding: 0.6rem;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid rgba(0, 109, 255, 0.1);
    margin-bottom: 0.3rem;
    background: rgba(255, 252, 239, 0.5);
  }

  .player-info {
    flex: 1;
    min-width: 0;
  }

  .player-name-team {
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .player-attributes {
    font-size: 0.75rem;
    color: #666;
    line-height: 1.2;
  }

  .player-level-badge {
    flex-shrink: 0;
    font-size: 0.75rem;
    padding: 0.2rem 0.4rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .stat-item {
    padding: 1rem;
    border-radius: 0;
  }
}

/* Enhanced Mobile Typography */
@media (max-width: 480px) {
  /* Ensure readability on small screens */
  .count-label {
    font-size: 1.1rem;
    margin-bottom: 1.2rem;
    font-family: 'SK Glypher Trial', 'Poppins', sans-serif;
  }

  .next-step-btn {
    font-size: 1rem;
    min-height: 56px;
    font-family: 'Poppins', sans-serif;
  }

  /* Better spacing for small screens */
  .players-container {
    margin: 1.5rem auto;
    padding: 2rem 1.2rem;
  }

  .config-header h2 {
    font-size: 1.6rem;
    font-family: 'SK Glypher Trial', 'Poppins', sans-serif;
  }

  .player-counter {
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
  }

  .player-navigation h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-family: 'SK Glypher Trial', 'Poppins', sans-serif;
  }

  .teams-header h2 {
    font-size: 1.6rem;
    font-family: 'SK Glypher Trial', 'Poppins', sans-serif;
  }

  .team-name {
    font-size: 1.4rem;
    font-family: 'SK Glypher Trial', 'Poppins', sans-serif;
  }

  .final-generate-btn {
    padding: 1.5rem 1.5rem;
    font-size: 1.1rem;
    min-height: 70px;
    font-family: 'Poppins', sans-serif;
  }

  .generate-section {
    padding: 2rem 1rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }
  
  .count-btn-icon {
    width: 3rem;
    height: 3rem;
    margin-bottom: 0.6rem;
  }
}

/* Action buttons at bottom of page */
.action-buttons-bottom {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin: 3rem 0;
  padding: 2rem;
}

.action-buttons-bottom .regenerate-btn,
.action-buttons-bottom .back-btn {
  padding: 1.2rem 2rem;
  border: 2px solid var(--primary-color);
  border-radius: 0;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  transition: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  min-height: 56px;
}

.action-buttons-bottom .regenerate-btn {
  background: var(--cream);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.action-buttons-bottom .regenerate-btn:hover {
  background: var(--cream);
  color: var(--primary-color);
  border-color: var(--primary-color);
  transform: none;
  box-shadow: none;
}

.action-buttons-bottom .back-btn {
  background: var(--cream);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.action-buttons-bottom .back-btn:hover {
  background: var(--cream);
  color: var(--primary-color);
  border-color: var(--primary-color);
  transform: none;
}

.attribute-btn .attribute-icon {
  width: 3rem;
  height: 3rem;
  object-fit: contain;
  display: block;
  margin: 0 auto 0.5rem auto;
}

.attribute-btn.active .attribute-icon {
  filter: brightness(0) saturate(100%) invert(98%) sepia(6%) saturate(100%) hue-rotate(346deg) brightness(104%) contrast(97%);
}

@media (min-width: 1024px) {
  .attribute-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  .attribute-btn .attribute-icon {
    margin-bottom: 0.5rem;
    margin-left: 0;
    margin-right: 0;
  }
  .attribute-btn .content {
    text-align: center;
  }
}

@media (max-width: 1023px) {
  .attribute-btn .attribute-icon {
    width: 3.5rem;
    height: 3.5rem;
  }
}

@media (max-width: 480px) {
  .attribute-btn .attribute-icon {
    width: 2.8rem;
    height: 2.8rem;
  }
}