/* Animon Character Creator - Enhanced Professional Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary-color: #2563eb;
  --primary-light: #3b82f6;
  --primary-dark: #1d4ed8;
  --secondary-color: #dc2626;
  --secondary-light: #ef4444;
  --accent-color: #06b6d4;
  --success-color: #059669;
  --warning-color: #d97706;
  --light-bg: #f8fafc;
  --dark-bg: #0f172a;
  --text-color: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --light-text: #f8fafc;
  --border-color: #e2e8f0;
  --border-radius: 12px;
  --border-radius-lg: 16px;
  --border-radius-xl: 20px;
  --box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --box-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --box-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --box-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --card-bg: #ffffff;
  --gradient-animon: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-kid: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  --glass-bg: rgba(255, 255, 255, 0.8);
  --glass-border: rgba(255, 255, 255, 0.2);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  color: var(--text-color);
  line-height: 1.6;
  padding: 20px;
  min-height: 100vh;
  font-feature-settings: 'kern' 1, 'liga' 1;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Enhanced Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-color);
  letter-spacing: -0.025em;
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-color);
  position: relative;
}

h2 {
  font-size: 1.875rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  color: var(--text-color);
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-color);
}

h4 {
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
  color: var(--text-color);
}

p {
  margin-bottom: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* Enhanced Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

/* Professional Section Styling */
.section {
  background: var(--card-bg);
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--box-shadow-md);
  border: 1px solid var(--border-color);
  transition: var(--transition-slow);
  position: relative;
  overflow: hidden;
}

.section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
}

.section:hover {
  box-shadow: var(--box-shadow-lg);
  transform: translateY(-2px);
}

/* Enhanced Form Elements */
.row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.box {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.label {
  font-weight: 500;
  color: var(--text-color);
  font-size: 0.875rem;
  letter-spacing: 0.025em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

/* Professional Input Styling */
select, input[type="text"], input[type="number"], textarea {
  appearance: none;
  background: var(--card-bg);
  border: 1.5px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 0.875rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text-color);
  transition: var(--transition);
  width: 100%;
  box-shadow: var(--box-shadow);
}

select:focus, input:focus, textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  transform: translateY(-1px);
}

select:hover, input:hover, textarea:hover {
  border-color: var(--primary-light);
}

/* Enhanced Button Styling */
button {
  background: var(--gradient-primary);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  padding: 0.875rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--box-shadow-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  letter-spacing: 0.025em;
  position: relative;
  overflow: hidden;
}

button::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;
}

button:hover::before {
  left: 100%;
}

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

button:active {
  transform: translateY(0);
  box-shadow: var(--box-shadow);
}

.secondary-button {
  background: var(--card-bg);
  color: var(--text-color);
  border: 1.5px solid var(--border-color);
  box-shadow: var(--box-shadow);
}

.secondary-button:hover {
  background: var(--light-bg);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

/* Enhanced Quality Tags */
.quality-tag {
  display: inline-block;
  background: var(--light-bg);
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius-xl);
  border: 1.5px solid var(--border-color);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  margin: 0.25rem;
  user-select: none;
}

.quality-tag:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateY(-1px);
  box-shadow: var(--box-shadow-md);
}

.quality-tag.selected {
  background: var(--gradient-primary);
  color: white;
  border-color: var(--primary-dark);
  transform: scale(1.05);
  box-shadow: var(--box-shadow-lg);
}

/* Enhanced Cards */
.card {
  background: var(--card-bg);
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  margin-top: 2rem;
  box-shadow: var(--box-shadow-lg);
  border: 1px solid var(--border-color);
  transition: var(--transition-slow);
  position: relative;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
}

.character-header {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--border-color);
  position: relative;
}

.character-header h2 {
  font-size: 2.25rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

/* Enhanced Feature Lists */
.feature-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.feature-list p {
  padding: 0.75rem;
  background: var(--light-bg);
  border-radius: var(--border-radius);
  border-left: 4px solid var(--primary-color);
  margin: 0;
  transition: var(--transition);
}

.feature-list p:hover {
  background: var(--card-bg);
  box-shadow: var(--box-shadow);
  transform: translateX(4px);
}

.feature-list strong {
  color: var(--text-color);
  font-weight: 600;
}

/* Enhanced Evolution Stages */
.evolution-showcase {
  margin: 2rem 0;
  padding: 2rem;
  background: var(--card-bg);
  border-radius: var(--border-radius-xl);
  border: 1px solid var(--border-color);
  box-shadow: var(--box-shadow);
}

.evolution-showcase h3 {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.evolution-intro {
  text-align: center;
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 2rem;
  line-height: 1.5;
}

.evolution-stages {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.stage {
  padding: 1.5rem;
  border-radius: var(--border-radius-lg);
  border: 2px solid var(--border-color);
  background: var(--light-bg);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.stage::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.stage:hover::before {
  transform: scaleX(1);
}

.stage:hover {
  transform: translateY(-4px);
  box-shadow: var(--box-shadow-lg);
  border-color: var(--primary-color);
}

.stage.selected {
  border-color: var(--primary-color);
  background: rgba(37, 99, 235, 0.05);
  box-shadow: var(--box-shadow-md);
}

.stage.selected::before {
  transform: scaleX(1);
}

.stage-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.stage-header h4 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-color);
}

.stage-badge {
  padding: 0.25rem 0.75rem;
  border-radius: var(--border-radius);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stage.fledgling .stage-badge {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}

.stage.basic .stage-badge {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
}

.stage.super .stage-badge {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: white;
}

.stage.ultra .stage-badge {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
}

.stage.giga .stage-badge {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
}

.stage-formula {
  font-family: 'Courier New', monospace;
  font-weight: 600;
  color: var(--primary-color);
  background: rgba(37, 99, 235, 0.1);
  padding: 0.75rem;
  border-radius: var(--border-radius);
  margin: 1rem 0;
  text-align: center;
  border: 1px solid rgba(37, 99, 235, 0.2);
}

.stage-description {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.6;
  margin: 0;
}

/* Mobile Responsiveness for Evolution Stages */
@media (max-width: 768px) {
  .evolution-stages {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .stage {
    padding: 1.25rem;
  }
  
  .stage-header h4 {
    font-size: 1.125rem;
  }
  
  .stage-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
  }
}

/* Enhanced Stat Displays */
.stat-total {
  font-weight: 600;
  color: var(--primary-color);
  background: var(--light-bg);
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius-xl);
  border: 1px solid var(--border-color);
  font-size: 0.875rem;
}

.stat-total.over-limit {
  color: var(--secondary-color);
  background: rgba(220, 38, 38, 0.1);
  border-color: var(--secondary-color);
  animation: pulse-warning 1s infinite;
}

@keyframes pulse-warning {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Enhanced Character Creation Info */
.character-creation-info {
  background: linear-gradient(135deg, var(--light-bg) 0%, rgba(37, 99, 235, 0.05) 100%);
  padding: 1.5rem;
  border-radius: var(--border-radius-lg);
  border-left: 4px solid var(--primary-color);
  margin-bottom: 1.5rem;
  position: relative;
}

.character-creation-info::before {
  content: '💡';
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.5rem;
  opacity: 0.7;
}

/* Enhanced Descriptions */
.description-text {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.6;
  margin-top: 0.5rem;
  padding: 0.75rem;
  background: var(--light-bg);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
}

/* Enhanced Mobile Responsiveness */
@media (max-width: 768px) {
  body {
    padding: 16px;
  }

  .container {
    padding: 16px;
  }

  .section {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
  }

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

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .evolution-stages {
    grid-template-columns: 1fr;
  }



  button {
    padding: 1rem 1.5rem;
    font-size: 1rem;
  }
}

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

  .section {
    padding: 1rem;
  }

  h1 {
    font-size: 1.75rem;
  }

  .character-header h2 {
    font-size: 1.875rem;
  }
}

/* === HOME PAGE ENHANCED STYLES === */
.home-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  text-align: center;
}

.home-title {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  color: var(--text-color);
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
  letter-spacing: -0.02em;
}

.home-subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 3rem;
  font-weight: 400;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.generator-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

.generator-card {
  background: var(--card-bg);
  border-radius: var(--border-radius-xl);
  padding: 2.5rem;
  color: var(--text-color);
  text-decoration: none;
  transition: var(--transition-slow);
  box-shadow: var(--box-shadow-lg);
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.generator-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  transition: var(--transition);
}

.generator-card.animon::before {
  background: var(--gradient-animon);
}

.generator-card.kid::before {
  background: var(--gradient-kid);
}

.generator-card.cheatsheet::before {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.generator-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--box-shadow-xl);
  text-decoration: none;
  color: var(--text-color);
}

.card-icon {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  display: block;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
}

.card-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.card-description {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* === KID PAGE ENHANCED STYLES === */
.kid-section, .traits-section, .stamina-section, .virtue-section, .bonds-section, .relationships-section, .generation-section {
  background: var(--card-bg);
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--box-shadow-md);
  border: 1px solid var(--border-color);
  position: relative;
}

.kid-section::before, .traits-section::before, .stamina-section::before, 
.virtue-section::before, .bonds-section::before, .relationships-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-kid);
}

.character-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.feature-explanation {
  background: var(--light-bg);
  padding: 1.5rem;
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border-color);
  transition: var(--transition-slow);
  position: relative;
}

.feature-explanation:hover {
  transform: translateY(-4px);
  box-shadow: var(--box-shadow-lg);
}

.feature-explanation h4 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.125rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.feature-explanation p {
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.feature-explanation p strong {
  color: var(--text-color);
  font-weight: 600;
}

.traits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.trait-explanation {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: var(--border-radius-lg);
  border: 2px solid var(--border-color);
  transition: var(--transition-slow);
  position: relative;
}

.trait-explanation:nth-child(1) {
  border-color: #3b82f6;
}

.trait-explanation:nth-child(2) {
  border-color: #10b981;
}

.trait-explanation:nth-child(3) {
  border-color: #f59e0b;
}

.trait-explanation:hover {
  transform: translateY(-4px);
  box-shadow: var(--box-shadow-lg);
}

.trait-explanation h4 {
  margin-bottom: 1rem;
  font-size: 1.25rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.trait-explanation:nth-child(1) h4 { color: #3b82f6; }
.trait-explanation:nth-child(2) h4 { color: #10b981; }
.trait-explanation:nth-child(3) h4 { color: #f59e0b; }

.trait-examples {
  background: var(--light-bg);
  padding: 1rem;
  border-radius: var(--border-radius);
  margin-top: 1rem;
  border-left: 4px solid #3b82f6;
}

.trait-explanation:nth-child(2) .trait-examples {
  border-left-color: #10b981;
}

.trait-explanation:nth-child(3) .trait-examples {
  border-left-color: #f59e0b;
}

.trait-examples em {
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.5;
}

.virtue-list {
  background: var(--light-bg);
  padding: 2rem;
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border-color);
}

.virtue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.virtue-item {
  background: var(--gradient-primary);
  color: white;
  padding: 1rem;
  border-radius: var(--border-radius);
  text-align: center;
  font-weight: 500;
  font-size: 0.875rem;
  transition: var(--transition);
  cursor: pointer;
  box-shadow: var(--box-shadow);
}

.virtue-item:nth-child(even) {
  background: var(--gradient-kid);
}

.virtue-item:nth-child(3n) {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.virtue-item:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--box-shadow-lg);
}

.virtue-note {
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
  font-size: 0.875rem;
  background: var(--card-bg);
  padding: 1rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
}

/* === SPECIAL ITEMS AND LISTS === */
.special-items-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.special-items-list li {
  background: var(--light-bg);
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  border-radius: var(--border-radius);
  border-left: 4px solid var(--primary-color);
  position: relative;
  transition: var(--transition);
}

.special-items-list li::before {
  content: '🎁';
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
}

.special-items-list li:hover {
  background: var(--card-bg);
  transform: translateX(4px);
  box-shadow: var(--box-shadow);
}

/* === ENHANCED MOBILE RESPONSIVENESS === */
@media (max-width: 1024px) {
  .home-container {
    padding: 1.5rem;
  }

  .generator-cards {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
  }

  .character-features-grid, .traits-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

@media (max-width: 768px) {
  .home-title {
    font-size: 2.5rem;
  }

  .home-subtitle {
    font-size: 1.125rem;
    margin-bottom: 2rem;
  }

  .generator-cards {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .generator-card {
    padding: 2rem;
  }

  .card-icon {
    font-size: 3rem;
  }

  .virtue-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
  }

  .virtue-item {
    padding: 0.75rem 0.5rem;
    font-size: 0.8rem;
  }

  .feature-explanation, .trait-explanation {
    padding: 1rem;
  }

  .character-creation-info {
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  .home-title {
    font-size: 2rem;
  }

  .home-subtitle {
    font-size: 1rem;
  }

  .generator-card {
    padding: 1.5rem;
  }

  .card-icon {
    font-size: 2.5rem;
  }

  .card-title {
    font-size: 1.25rem;
  }

  .card-description {
    font-size: 0.875rem;
  }

  .virtue-grid {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  }

  .virtue-item {
    padding: 0.5rem;
    font-size: 0.75rem;
  }
}

/* === ENHANCED EVOLUTION TABLE STYLES === */
.evolution-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1.5rem 0;
  background: var(--card-bg);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--box-shadow-lg);
  border: 1px solid var(--border-color);
  font-size: 0.875rem;
}

.evolution-table thead {
  background: var(--gradient-primary);
  position: relative;
}

.evolution-table thead::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-dark), var(--primary-color));
}

.evolution-table th {
  color: white;
  padding: 1rem 0.75rem;
  text-align: center;
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.025em;
  text-transform: uppercase;
  border: none;
  position: relative;
}

.evolution-table th:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 25%;
  bottom: 25%;
  width: 1px;
  background: rgba(255, 255, 255, 0.2);
}

.evolution-table tbody tr {
  transition: var(--transition);
  border-bottom: 1px solid var(--border-color);
}

.evolution-table tbody tr:last-child {
  border-bottom: none;
}

.evolution-table tbody tr:nth-child(even) {
  background: var(--light-bg);
}

.evolution-table tbody tr:hover {
  background: rgba(37, 99, 235, 0.05);
  transform: scale(1.01);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
}

.evolution-table td {
  padding: 1rem 0.75rem;
  border: none;
  vertical-align: middle;
  transition: var(--transition);
}

/* Stage Name Column */
.stage-name {
  font-weight: 600;
  color: var(--text-color);
  text-align: left;
  position: relative;
  padding-left: 1.5rem;
  min-width: 100px;
}

.stage-name::before {
  content: '';
  position: absolute;
  left: 0.25rem;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary-color);
}

/* Individual Stage Colors using row position */
.evolution-table tbody tr:nth-child(1) .stage-name {
  color: #059669; /* Fledgling - Green */
}

.evolution-table tbody tr:nth-child(1) .stage-name::before {
  background: linear-gradient(135deg, #10b981, #059669);
}

.evolution-table tbody tr:nth-child(2) .stage-name {
  color: #1d4ed8; /* Basic - Blue */
}

.evolution-table tbody tr:nth-child(2) .stage-name::before {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.evolution-table tbody tr:nth-child(3) .stage-name {
  color: #7c3aed; /* Super - Purple */
}

.evolution-table tbody tr:nth-child(3) .stage-name::before {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.evolution-table tbody tr:nth-child(4) .stage-name {
  color: #d97706; /* Ultra - Orange */
}

.evolution-table tbody tr:nth-child(4) .stage-name::before {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.evolution-table tbody tr:nth-child(5) .stage-name {
  color: #dc2626; /* Giga - Red */
}

.evolution-table tbody tr:nth-child(5) .stage-name::before {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

/* Current Stage Highlighting */
.evolution-table tr.current-stage {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(59, 130, 246, 0.05));
  border-left: 4px solid var(--primary-color);
  font-weight: 600;
}

/* Current stage highlighting with individual colors */
.evolution-table tbody tr.current-stage:nth-child(1) {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.05));
  border-left-color: #059669;
}

.evolution-table tbody tr.current-stage:nth-child(2) {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(29, 78, 216, 0.05));
  border-left-color: #1d4ed8;
}

.evolution-table tbody tr.current-stage:nth-child(3) {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(124, 58, 237, 0.05));
  border-left-color: #7c3aed;
}

.evolution-table tbody tr.current-stage:nth-child(4) {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(217, 119, 6, 0.05));
  border-left-color: #d97706;
}

.evolution-table tbody tr.current-stage:nth-child(5) {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(220, 38, 38, 0.05));
  border-left-color: #dc2626;
}

.evolution-table tr.current-stage .stage-name {
  font-weight: 700;
  /* Keep individual stage colors */
}

.evolution-table tr.current-stage .stage-name::before {
  width: 12px;
  height: 12px;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3);
  /* Keep individual stage gradient backgrounds */
}

/* Current stage dot shadows with individual colors */
.evolution-table tbody tr.current-stage:nth-child(1) .stage-name::before {
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.3);
}

.evolution-table tbody tr.current-stage:nth-child(2) .stage-name::before {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

.evolution-table tbody tr.current-stage:nth-child(3) .stage-name::before {
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.3);
}

.evolution-table tbody tr.current-stage:nth-child(4) .stage-name::before {
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.3);
}

.evolution-table tbody tr.current-stage:nth-child(5) .stage-name::before {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.3);
}

.evolution-table tr.current-stage .stage-name::after {
  content: '►';
  position: absolute;
  left: -0.25rem;
  font-size: 1rem;
  font-weight: bold;
  animation: pulse-arrow 2s ease-in-out infinite;
}

/* Current stage arrows with individual colors */
.evolution-table tbody tr.current-stage:nth-child(1) .stage-name::after {
  color: #059669; /* Fledgling - Green */
}

.evolution-table tbody tr.current-stage:nth-child(2) .stage-name::after {
  color: #1d4ed8; /* Basic - Blue */
}

.evolution-table tbody tr.current-stage:nth-child(3) .stage-name::after {
  color: #7c3aed; /* Super - Purple */
}

.evolution-table tbody tr.current-stage:nth-child(4) .stage-name::after {
  color: #d97706; /* Ultra - Orange */
}

.evolution-table tbody tr.current-stage:nth-child(5) .stage-name::after {
  color: #dc2626; /* Giga - Red */
}

@keyframes pulse-arrow {
  0%, 100% { opacity: 1; transform: translateY(-50%) scale(1); }
  50% { opacity: 0.7; transform: translateY(-50%) scale(1.1); }
}

/* Formula Cells */
.formula-cell {
  background: linear-gradient(135deg, var(--light-bg) 0%, rgba(241, 245, 249, 0.8) 100%);
  text-align: center;
  padding: 0.75rem 0.5rem;
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
}

.formula-text {
  font-family: 'JetBrains Mono', 'SF Mono', 'Monaco', 'Cascadia Code', monospace;
  font-size: 0.8rem;
  color: var(--text-color);
  background: var(--card-bg);
  padding: 0.5rem 0.75rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  display: inline-block;
  white-space: nowrap;
  font-weight: 500;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Stat Value Cells */
.stat-value {
  font-weight: 700;
  font-size: 1.125rem;
  text-align: center;
  min-width: 60px;
  padding: 0.75rem;
  position: relative;
}

.hp-value {
  color: #dc2626;
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.1), rgba(252, 165, 165, 0.05));
}

.damage-value {
  color: var(--primary-color);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(147, 197, 253, 0.05));
}

.stat-value::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 30px;
  height: 2px;
  border-radius: 1px;
  transition: var(--transition);
}

.hp-value::after {
  background: #dc2626;
}

.damage-value::after {
  background: var(--primary-color);
}

/* Enhanced Column Widths */
.evolution-table th:nth-child(1) { width: 15%; } /* Stage */
.evolution-table th:nth-child(2) { width: 35%; } /* HP Formula */
.evolution-table th:nth-child(3) { width: 12%; } /* HP */
.evolution-table th:nth-child(4) { width: 35%; } /* Damage Formula */
.evolution-table th:nth-child(5) { width: 15%; } /* Damage */

/* Mobile Responsiveness for Evolution Table */
@media (max-width: 1024px) {
  .evolution-table {
    font-size: 0.8rem;
  }
  
  .evolution-table th,
  .evolution-table td {
    padding: 0.75rem 0.5rem;
  }
  
  .formula-text {
    font-size: 0.75rem;
    padding: 0.4rem 0.6rem;
  }
  
  .stat-value {
    font-size: 1rem;
    padding: 0.6rem 0.4rem;
  }
}

@media (max-width: 768px) {
  .evolution-table {
    font-size: 0.75rem;
    border-radius: var(--border-radius);
  }
  
  .evolution-table th,
  .evolution-table td {
    padding: 0.6rem 0.4rem;
  }
  
  .stage-name {
    padding-left: 1rem;
    min-width: 80px;
  }
  
  .stage-name::before {
    left: 0.25rem;
    width: 6px;
    height: 6px;
  }
  
  .formula-text {
    font-size: 0.7rem;
    padding: 0.3rem 0.5rem;
    white-space: normal;
    word-break: break-word;
  }
  
  .stat-value {
    font-size: 0.9rem;
    padding: 0.5rem 0.3rem;
  }
}

@media (max-width: 640px) {
  /* Hide formula columns on very small screens */
  .evolution-table th:nth-child(2),
  .evolution-table th:nth-child(4),
  .evolution-table td:nth-child(2),
  .evolution-table td:nth-child(4) {
    display: none;
  }
  
  /* Adjust remaining column widths */
  .evolution-table th:nth-child(1) { width: 40%; } /* Stage */
  .evolution-table th:nth-child(3) { width: 30%; } /* HP */
  .evolution-table th:nth-child(5) { width: 30%; } /* Damage */
  
  .stage-name {
    font-size: 0.8rem;
  }
  
  .stat-value {
    font-size: 1rem;
    font-weight: 700;
  }
}

/* === STATUS EFFECTS TABLE STYLES === */
.status-effects-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--card-bg);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.status-effects-table th {
  background: var(--gradient-primary);
  color: white;
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.025em;
  text-transform: uppercase;
  border: none;
}

.status-effects-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

.status-effects-table tbody tr:hover {
  background: rgba(37, 99, 235, 0.05);
}

.status-effects-table tbody tr:last-child td {
  border-bottom: none;
}

/* Individual Status Effect Colors */
.status-stunned {
  color: #7c3aed;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(124, 58, 237, 0.05));
  padding: 0.25rem 0.75rem;
  border-radius: var(--border-radius);
  border: 1px solid rgba(124, 58, 237, 0.2);
}

.status-weakened {
  color: #dc2626;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(220, 38, 38, 0.05));
  padding: 0.25rem 0.75rem;
  border-radius: var(--border-radius);
  border: 1px solid rgba(220, 38, 38, 0.2);
}

.status-bound {
  color: #d97706;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(217, 119, 6, 0.05));
  padding: 0.25rem 0.75rem;
  border-radius: var(--border-radius);
  border: 1px solid rgba(217, 119, 6, 0.2);
}

.status-enraged {
  color: #b91c1c;
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.15), rgba(185, 28, 28, 0.05));
  padding: 0.25rem 0.75rem;
  border-radius: var(--border-radius);
  border: 1px solid rgba(185, 28, 28, 0.3);
}

.status-shielded {
  color: #059669;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.05));
  padding: 0.25rem 0.75rem;
  border-radius: var(--border-radius);
  border: 1px solid rgba(5, 150, 105, 0.2);
}

/* === ENHANCED ANIMON PAGE STYLES === */

/* Animon Section Header */
.animon-section {
  position: relative;
  overflow: hidden;
}

.animon-section::before {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
}

.animon-section h2 {
  position: relative;
  z-index: 2;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 1.875rem;
  font-weight: 700;
  margin-bottom: 2rem;
}

/* Enhanced Stats Section */
.animon-section h3 {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 2rem 0 1rem 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-color);
}

.stat-method-selection {
  background: linear-gradient(135deg, var(--light-bg) 0%, rgba(37, 99, 235, 0.05) 100%);
  padding: 1.5rem;
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
}

.stat-method-selection h4 {
  margin-bottom: 1rem;
  color: var(--primary-color);
  font-size: 1.125rem;
  font-weight: 600;
}

.stat-method-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--card-bg);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
}

.stat-method-toggle:hover {
  background: var(--light-bg);
  border-color: var(--primary-color);
}

.stat-method-toggle input[type="radio"] {
  accent-color: var(--primary-color);
}

/* Enhanced Signature Attack Section */
.advanced-attack-builder {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.05) 0%, rgba(14, 165, 233, 0.05) 100%);
  padding: 1.5rem;
  border-radius: var(--border-radius-lg);
  border: 1px solid rgba(6, 182, 212, 0.2);
  margin: 1.5rem 0;
}

.advanced-attack-builder h4 {
  color: var(--accent-color);
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.advanced-attack-builder h4::before {
  content: '⚔️';
  font-size: 1.25rem;
}

/* Enhanced Evolved Features */
.evolved-features {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.05) 0%, rgba(124, 58, 237, 0.05) 100%);
  padding: 2rem;
  border-radius: var(--border-radius-lg);
  border: 1px solid rgba(139, 92, 246, 0.2);
  margin: 1.5rem 0;
}

.evolved-features h3 {
  color: #7c3aed;
  margin-bottom: 1.5rem;
  font-size: 1.375rem;
}

.evolved-attacks-section,
.evolved-qualities-section {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
}

.evolved-attacks-section:last-child,
.evolved-qualities-section:last-child {
  margin-bottom: 0;
}

.evolved-attacks-section h4,
.evolved-qualities-section h4 {
  color: #7c3aed;
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* Enhanced Qualities Container */
#qualitiesContainer {
  background: var(--light-bg);
  padding: 1.5rem;
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  min-height: 80px;
  position: relative;
}

#qualitiesContainer::before {
  content: '💫 Select qualities that describe your Animon';
  position: absolute;
  top: -1.5rem;
  left: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Enhanced Trait Randomizer */
.trait-randomizer {
  margin: 2rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius-xl);
  box-shadow: var(--box-shadow-lg);
}

.trait-randomizer-inner {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.trait-randomizer-inner::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  animation: shimmer 3s ease-in-out infinite;
  z-index: -1;
}

@keyframes shimmer {
  0%, 100% { transform: rotate(0deg); opacity: 0.5; }
  50% { transform: rotate(180deg); opacity: 0.8; }
}

.trait-randomizer h3 {
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  position: relative;
  z-index: 2;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.theme-toggles {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}

.theme-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--border-radius-xl);
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.theme-toggle input[type="radio"] {
  accent-color: white;
  width: 16px;
  height: 16px;
}

.theme-toggle span {
  font-weight: 600;
  letter-spacing: 0.02em;
}

.surprise-button {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  padding: 1rem 2rem;
  border-radius: var(--border-radius-xl);
  font-size: 1.125rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  z-index: 2;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.surprise-button:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* Enhanced Import/Export Section */
.import-export-section {
  background: linear-gradient(135deg, var(--light-bg) 0%, rgba(99, 102, 241, 0.05) 100%);
  padding: 2rem;
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border-color);
  margin: 2rem 0;
}

.import-export-section h3 {
  color: #6366f1;
  margin-bottom: 1.5rem;
  font-size: 1.375rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.import-export-message {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: var(--border-radius);
  font-weight: 500;
  text-align: center;
}

.import-export-message.success {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.05));
  color: #059669;
  border: 1px solid rgba(5, 150, 105, 0.2);
}

.import-export-message.error {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(220, 38, 38, 0.05));
  color: #dc2626;
  border: 1px solid rgba(220, 38, 38, 0.2);
}

/* Enhanced Generation Buttons */
.animon-section > .row:has(button) {
  background: var(--light-bg);
  padding: 1.5rem;
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border-color);
  margin: 2rem 0;
}

/* Enhanced Character Output */
#output {
  background: linear-gradient(135deg, var(--card-bg) 0%, var(--light-bg) 100%);
  border: 2px solid var(--border-color);
  padding: 2rem;
  margin-top: 2rem;
  border-radius: var(--border-radius-xl);
  box-shadow: var(--box-shadow-lg);
  position: relative;
  overflow: hidden;
}

#output::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
}

#output:empty {
  display: none;
}

#output:not(:empty) {
  display: block;
  animation: slideInUp 0.5s ease-out;
}

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

/* Enhanced Character Stats Display */
.character-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
  padding: 1.5rem;
  background: var(--light-bg);
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border-color);
}

.character-stats > div {
  text-align: center;
}

.stat-bubble {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
  margin: 0 auto 0.5rem auto;
  box-shadow: var(--box-shadow);
}

.power-bubble {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.heart-bubble {
  background: linear-gradient(135deg, #ec4899, #db2777);
}

.brains-bubble {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.agility-bubble {
  background: linear-gradient(135deg, #06b6d4, #0891b2);
}

.stat-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Enhanced Attack Tags */
.attack-details {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.attack-tag {
  padding: 0.25rem 0.75rem;
  border-radius: var(--border-radius-xl);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.melee-type { background: linear-gradient(135deg, #f59e0b, #d97706); color: white; }
.ranged-type { background: linear-gradient(135deg, #3b82f6, #1d4ed8); color: white; }
.area-type { background: linear-gradient(135deg, #8b5cf6, #7c3aed); color: white; }

.damage-effect { background: linear-gradient(135deg, #ef4444, #dc2626); color: white; }
.status-effect { background: linear-gradient(135deg, #f59e0b, #d97706); color: white; }
.heal-effect { background: linear-gradient(135deg, #10b981, #059669); color: white; }
.buff-effect { background: linear-gradient(135deg, #06b6d4, #0891b2); color: white; }
.debuff-effect { background: linear-gradient(135deg, #8b5cf6, #7c3aed); color: white; }

.single-target { background: linear-gradient(135deg, #6b7280, #4b5563); color: white; }
.group-target { background: linear-gradient(135deg, #f59e0b, #d97706); color: white; }
.self-target { background: linear-gradient(135deg, #10b981, #059669); color: white; }

/* Enhanced Formula Display */
.formula {
  background: var(--light-bg);
  padding: 1rem;
  border-radius: var(--border-radius);
  border-left: 4px solid var(--primary-color);
  margin: 0.5rem 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875rem;
}

.formula-legend {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 2px;
}

.legend-color.power-stat { background: linear-gradient(135deg, #ef4444, #dc2626); }
.legend-color.heart-stat { background: linear-gradient(135deg, #ec4899, #db2777); }
.legend-color.agility-stat { background: linear-gradient(135deg, #06b6d4, #0891b2); }

.stat-highlight {
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  font-weight: 600;
}

.stat-highlight.power-stat {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(220, 38, 38, 0.05));
  color: #dc2626;
}

.stat-highlight.heart-stat {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.1), rgba(219, 39, 119, 0.05));
  color: #db2777;
}

.stat-highlight.agility-stat {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.1), rgba(8, 145, 178, 0.05));
  color: #0891b2;
}

/* Mobile Responsiveness for Animon Page */
@media (max-width: 768px) {
  .character-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  
  .theme-toggles {
    flex-direction: column;
    align-items: center;
  }
  
  .attack-details {
    justify-content: center;
  }
  
  .formula-legend {
    justify-content: center;
  }
}

/* === ANIMATED GRADIENT HERO/SECTION HEADERS === */
@keyframes animated-gradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.section::before {
  background: linear-gradient(270deg, #667eea, #764ba2, #f093fb, #f5576c, #2563eb);
  background-size: 200% 200%;
  animation: animated-gradient 6s ease-in-out infinite;
}

/* === BUTTON SHINE & RIPPLE EFFECTS === */
button {
  position: relative;
  overflow: hidden;
}
button::after {
  content: '';
  position: absolute;
  left: -75%;
  top: 0;
  width: 50%;
  height: 100%;
  background: linear-gradient(120deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.6) 50%, rgba(255,255,255,0.2) 100%);
  transform: skewX(-20deg);
  transition: left 0.7s cubic-bezier(0.4,0,0.2,1);
  pointer-events: none;
}
button:hover::after {
  left: 120%;
}
button:active {
  transform: scale(0.97);
}

/* Ripple effect utility (add .ripple to button for click effect) */
.ripple {
  position: relative;
  overflow: hidden;
}
.ripple:active::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  background: rgba(37,99,235,0.15);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: ripple-effect 0.5s linear;
}
@keyframes ripple-effect {
  to {
    width: 200%;
    height: 200%;
    opacity: 0;
  }
}

/* === CARD HOVER ANIMATED BORDER/GRADIENT === */
.generator-card, .card, .section {
  transition: box-shadow 0.3s, transform 0.3s, border 0.3s;
  border-image: linear-gradient(120deg, #2563eb 0%, #f093fb 100%) 1;
}
.generator-card:hover, .card:hover, .section:hover {
  box-shadow: 0 8px 32px rgba(37,99,235,0.15), 0 1.5px 8px rgba(220,38,38,0.08);
  border-width: 2px;
  border-image: linear-gradient(120deg, #f093fb 0%, #2563eb 100%) 1;
  transform: translateY(-6px) scale(1.02);
}

/* === SECTION FADE/SLIDE-IN ON LOAD === */
.section, .card, .generator-card {
  opacity: 0;
  transform: translateY(30px);
  animation: fade-slide-in 0.8s cubic-bezier(0.4,0,0.2,1) forwards;
  animation-delay: 0.2s;
}
@keyframes fade-slide-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === ANIMATED UNDERLINE FOR NAVIGATION === */
.nav-link, .nav-active {
  position: relative;
  overflow: visible;
}
.nav-link::after, .nav-active::after {
  content: '';
  display: block;
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 3px;
  background: linear-gradient(90deg, #2563eb, #f093fb);
  border-radius: 2px;
  transform: scaleX(0);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
}
.nav-link:hover::after, .nav-active::after {
  transform: scaleX(1);
}

/* === QUALITY TAG POP/BOUNCE ON SELECT === */
.quality-tag.selected {
  animation: pop-bounce 0.4s cubic-bezier(0.34,1.56,0.64,1) both;
}
@keyframes pop-bounce {
  0% { transform: scale(1); }
  60% { transform: scale(1.15); }
  80% { transform: scale(0.97); }
  100% { transform: scale(1.05); }
}

/* === INPUT FOCUS ANIMATION === */
input:focus, select:focus, textarea:focus {
  box-shadow: 0 0 0 4px rgba(37,99,235,0.15), 0 1.5px 8px rgba(220,38,38,0.08);
  border-color: #2563eb;
  transition: box-shadow 0.2s, border-color 0.2s;
}

/* === SLEEK LOADING SPINNER (UTILITY CLASS) === */
.loading-spinner {
  width: 2.5rem;
  height: 2.5rem;
  border: 4px solid #e2e8f0;
  border-top: 4px solid #2563eb;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
  display: block;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* === MICROINTERACTIONS FOR STAT CHANGES === */
.stat-bubble {
  transition: transform 0.2s cubic-bezier(0.4,0,0.2,1), box-shadow 0.2s;
}
.stat-bubble.stat-changed {
  animation: stat-bounce 0.5s cubic-bezier(0.34,1.56,0.64,1);
  box-shadow: 0 0 0 6px rgba(37,99,235,0.12);
}
@keyframes stat-bounce {
  0% { transform: scale(1); }
  40% { transform: scale(1.18); }
  60% { transform: scale(0.95); }
  100% { transform: scale(1); }
}
/*
 Authentication Forms */
.auth-form {
  max-width: 400px;
  margin: 50px auto;
  background: var(--card-bg);
  padding: 40px;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--box-shadow-lg);
  border: 1px solid var(--border-color);
}

.auth-form h2 {
  text-align: center;
  margin-bottom: 30px;
  color: var(--text-color);
  font-weight: 600;
  font-size: 1.5rem;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text-color);
  font-size: 0.9rem;
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: 1rem;
  transition: var(--transition);
  background: #fff;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group input:invalid {
  border-color: var(--secondary-color);
}

.error {
  color: var(--secondary-color);
  font-size: 0.8rem;
  margin-top: 5px;
  display: block;
  min-height: 1rem;
}

.auth-form button[type="submit"] {
  width: 100%;
  padding: 12px;
  background: var(--gradient-primary);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 10px;
}

.auth-form button[type="submit"]:hover {
  transform: translateY(-1px);
  box-shadow: var(--box-shadow-md);
}

.auth-form button[type="submit"]:active {
  transform: translateY(0);
}

.auth-form p {
  text-align: center;
  margin-top: 20px;
  color: var(--text-muted);
}

.auth-form p a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

.auth-form p a:hover {
  text-decoration: underline;
}

/* Profile Page Styles */
.profile-info {
  background: var(--card-bg);
  padding: 30px;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--box-shadow-md);
  margin-bottom: 30px;
  border: 1px solid var(--border-color);
}

.profile-info h2 {
  color: var(--text-color);
  margin-bottom: 15px;
  font-weight: 600;
}

.profile-info p {
  color: var(--text-muted);
  margin-bottom: 10px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--border-color);
}

.section-header h2 {
  color: var(--text-color);
  font-weight: 600;
  font-size: 1.3rem;
}

.action-buttons {
  display: flex;
  gap: 12px;
}

.character-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.character-pair, .character-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
}

.character-pair:hover, .character-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--box-shadow-lg);
}

.pair-header, .character-header {
  background: var(--light-bg);
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
}

.pair-header h4, .character-header h4 {
  color: var(--text-color);
  font-weight: 600;
  font-size: 1rem;
}

.pair-actions, .character-actions {
  display: flex;
  gap: 8px;
}

.pair-characters {
  display: flex;
  padding: 20px;
  gap: 20px;
}

.character {
  flex: 1;
  text-align: center;
}

.character img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--border-color);
  margin-bottom: 10px;
}

.character p {
  color: var(--text-color);
  font-weight: 500;
  font-size: 0.9rem;
}

.character-preview {
  padding: 20px;
  text-align: center;
}

.character-preview img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--border-color);
  margin-bottom: 15px;
}

.character-preview p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Button Styles */
.btn-primary {
  background: var(--gradient-primary);
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  font-weight: 500;
  font-size: 0.9rem;
  transition: var(--transition);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--box-shadow-md);
}

.btn-secondary {
  background: var(--secondary-color);
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-weight: 500;
  font-size: 0.9rem;
  transition: var(--transition);
}

.btn-secondary:hover {
  background: var(--secondary-light);
  transform: translateY(-1px);
  box-shadow: var(--box-shadow-md);
}

.btn-small {
  padding: 6px 12px;
  font-size: 0.8rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.btn-small:hover {
  background: var(--primary-light);
  transform: translateY(-1px);
}

.btn-edit {
  background: var(--warning-color);
}

.btn-edit:hover {
  background: #f59e0b;
}

.btn-pair {
  background: #8b5cf6;
}

.btn-pair:hover {
  background: #a78bfa;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.modal-content {
  background: var(--card-bg);
  margin: 10% auto;
  padding: 30px;
  border-radius: var(--border-radius-lg);
  width: 90%;
  max-width: 600px;
  box-shadow: var(--box-shadow-xl);
  border: 1px solid var(--border-color);
}

.close {
  color: var(--text-muted);
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: var(--transition);
}

.close:hover {
  color: var(--text-color);
}

.pairing-options {
  margin-top: 20px;
  max-height: 400px;
  overflow-y: auto;
}

.pairing-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

.pairing-option:hover {
  background: var(--light-bg);
}

.option-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.option-info img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--border-color);
}

.option-info h4 {
  color: var(--text-color);
  font-weight: 500;
}

.loading {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* Character View Page */
.character-single-view, .character-pair-view {
  max-width: 1000px;
  margin: 0 auto;
}

.character-pair-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin: 30px 0;
}

@media (max-width: 768px) {
  .character-pair-container {
    grid-template-columns: 1fr;
  }
  
  .character-grid {
    grid-template-columns: 1fr;
  }
  
  .section-header {
    flex-direction: column;
    gap: 15px;
    align-items: stretch;
  }
  
  .action-buttons {
    justify-content: center;
  }
}

.character-card.human {
  border-left: 4px solid var(--primary-color);
}

.character-card.animon {
  border-left: 4px solid var(--secondary-color);
}

.character-image {
  text-align: center;
  margin-bottom: 20px;
}

.character-image img {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--border-color);
  box-shadow: var(--box-shadow-md);
}

.character-details {
  padding: 0 20px 20px;
}

.character-details p {
  margin-bottom: 10px;
  color: var(--text-muted);
}

.character-details strong {
  color: var(--text-color);
}

.character-description, .character-story, .character-stats, .character-abilities {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

.character-description h3, .character-story h3, .character-stats h3, .character-abilities h3 {
  color: var(--text-color);
  font-weight: 600;
  margin-bottom: 10px;
  font-size: 1rem;
}

.character-stats ul, .character-abilities ul {
  list-style: none;
  padding: 0;
}

.character-stats li, .character-abilities li {
  margin-bottom: 8px;
  color: var(--text-muted);
}

.character-story-together {
  margin-top: 40px;
  padding: 30px;
  background: var(--light-bg);
  border-radius: var(--border-radius-lg);
  border-left: 4px solid #8b5cf6;
  border: 1px solid var(--border-color);
}

.character-story-together h2 {
  color: var(--text-color);
  font-weight: 600;
  margin-bottom: 15px;
}

.character-story-together p {
  color: var(--text-muted);
  line-height: 1.6;
}

.error-message {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.error-message h2 {
  color: var(--text-color);
  margin-bottom: 15px;
  font-weight: 600;
}
/* Authent
ication Forms */
.auth-form {
  max-width: 400px;
  margin: 50px auto;
  padding: 40px;
  background: var(--card-bg);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--box-shadow-lg);
  border: 1px solid var(--border-color);
}

.auth-form h2 {
  text-align: center;
  margin-bottom: 30px;
  color: var(--text-color);
  font-weight: 600;
  font-size: 1.5rem;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text-color);
  font-size: 0.9rem;
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: 1rem;
  transition: var(--transition);
  background: #ffffff;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group input:invalid {
  border-color: var(--secondary-color);
}

.error {
  color: var(--secondary-color);
  font-size: 0.8rem;
  margin-top: 5px;
  display: block;
  min-height: 1rem;
}

.auth-form button[type="submit"] {
  width: 100%;
  padding: 12px;
  background: var(--gradient-primary);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 10px;
}

.auth-form button[type="submit"]:hover {
  transform: translateY(-1px);
  box-shadow: var(--box-shadow-md);
}

.auth-form button[type="submit"]:active {
  transform: translateY(0);
}

.auth-form p {
  text-align: center;
  margin-top: 20px;
  color: var(--text-muted);
}

.auth-form p a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

.auth-form p a:hover {
  text-decoration: underline;
}

/* Profile Page Styles */
.profile-info {
  background: var(--card-bg);
  padding: 30px;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--box-shadow-md);
  margin-bottom: 30px;
  border: 1px solid var(--border-color);
}

.profile-info h2 {
  color: var(--text-color);
  margin-bottom: 15px;
  font-weight: 600;
}

.profile-info p {
  color: var(--text-muted);
  margin-bottom: 10px;
}

.btn-secondary {
  background: var(--secondary-color);
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
}

.btn-secondary:hover {
  background: var(--secondary-light);
  transform: translateY(-1px);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--border-color);
}

.section-header h2 {
  color: var(--text-color);
  font-weight: 600;
}

.action-buttons {
  display: flex;
  gap: 15px;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  display: inline-block;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--box-shadow-md);
  text-decoration: none;
  color: white;
}

.character-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 25px;
  margin-bottom: 40px;
}

.character-pair, .character-card {
  background: var(--card-bg);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--box-shadow-md);
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: var(--transition);
}

.character-pair:hover, .character-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--box-shadow-lg);
}

.pair-header, .character-header {
  background: var(--light-bg);
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
}

.pair-header h4, .character-header h4 {
  color: var(--text-color);
  font-weight: 600;
  margin: 0;
}

.pair-actions, .character-actions {
  display: flex;
  gap: 8px;
}

.btn-small {
  padding: 6px 12px;
  font-size: 0.8rem;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  display: inline-block;
}

.btn-small:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.btn-small {
  background: var(--primary-color);
  color: white;
}

.btn-small.btn-edit {
  background: var(--warning-color);
  color: white;
}

.btn-small.btn-pair {
  background: #9c27b0;
  color: white;
}

.pair-characters {
  display: flex;
  padding: 20px;
  gap: 20px;
}

.character {
  flex: 1;
  text-align: center;
}

.character img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--border-color);
  margin-bottom: 10px;
}

.character p {
  color: var(--text-color);
  font-weight: 500;
  margin: 0;
}

.character-preview {
  padding: 20px;
  text-align: center;
}

.character-preview img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--border-color);
  margin-bottom: 15px;
}

.character-preview p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.loading {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
  font-style: italic;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.modal-content {
  background: var(--card-bg);
  margin: 5% auto;
  padding: 30px;
  border-radius: var(--border-radius-lg);
  width: 90%;
  max-width: 600px;
  box-shadow: var(--box-shadow-xl);
  border: 1px solid var(--border-color);
  position: relative;
}

.close {
  color: var(--text-muted);
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  position: absolute;
  right: 20px;
  top: 20px;
  transition: var(--transition);
}

.close:hover {
  color: var(--text-color);
}

.modal-content h3 {
  color: var(--text-color);
  margin-bottom: 20px;
  font-weight: 600;
}

.pairing-options {
  margin-top: 20px;
  max-height: 400px;
  overflow-y: auto;
}

.pairing-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

.pairing-option:hover {
  background: var(--light-bg);
}

.option-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.option-info img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--border-color);
}

.option-info h4 {
  color: var(--text-color);
  font-weight: 500;
  margin: 0;
}

.btn-select {
  background: var(--success-color);
  color: white;
}

/* Character View Page */
.character-pair-view, .character-single-view {
  max-width: 1200px;
  margin: 0 auto;
}

.character-pair-view h1, .character-single-view h1 {
  text-align: center;
  color: var(--text-color);
  margin-bottom: 30px;
  font-weight: 700;
  font-size: 2.5rem;
}

.character-pair-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin: 40px 0;
}

@media (max-width: 768px) {
  .character-pair-container {
    grid-template-columns: 1fr;
  }
}

.character-card.human {
  border-left: 4px solid #3498db;
}

.character-card.animon {
  border-left: 4px solid #e74c3c;
}

.character-image {
  text-align: center;
  margin-bottom: 25px;
}

.character-image img {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--border-color);
  box-shadow: var(--box-shadow-lg);
}

.character-details {
  padding: 0 20px;
}

.character-details > p {
  margin-bottom: 15px;
  color: var(--text-muted);
}

.character-details strong {
  color: var(--text-color);
}

.character-description, .character-story, .character-stats, .character-abilities {
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

.character-description h3, .character-story h3, .character-stats h3, .character-abilities h3 {
  color: var(--text-color);
  margin-bottom: 15px;
  font-weight: 600;
}

.character-stats ul, .character-abilities ul {
  list-style: none;
  padding: 0;
}

.character-stats li, .character-abilities li {
  margin-bottom: 10px;
  color: var(--text-muted);
}

.character-story-together {
  margin-top: 40px;
  padding: 30px;
  background: var(--light-bg);
  border-radius: var(--border-radius-lg);
  border-left: 4px solid #9b59b6;
  box-shadow: var(--box-shadow-md);
}

.character-story-together h2 {
  color: var(--text-color);
  margin-bottom: 20px;
  font-weight: 600;
}

.error-message {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.error-message h2 {
  color: var(--secondary-color);
  margin-bottom: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .auth-form {
    margin: 20px auto;
    padding: 30px 20px;
  }
  
  .character-grid {
    grid-template-columns: 1fr;
  }
  
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  
  .action-buttons {
    width: 100%;
    justify-content: center;
  }
  
  .pair-characters {
    flex-direction: column;
    text-align: center;
  }
}

/* === MODERN NAVIGATION STYLES === */
.main-navigation {
  background: var(--card-bg);
  border-radius: var(--border-radius-xl);
  box-shadow: var(--box-shadow-lg);
  border: 1px solid var(--border-color);
  margin: 2rem auto 3rem auto;
  max-width: 900px;
  overflow: hidden;
  position: relative;
}

.main-navigation::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  gap: 2rem;
}

.nav-links {
  display: flex;
  gap: 0.75rem;
  flex: 1;
}

.auth-links {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-shrink: 0;
}

.nav-item {
  padding: 0.75rem 1.25rem;
  border-radius: var(--border-radius-lg);
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.875rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  background: transparent;
  border: 1px solid transparent;
  white-space: nowrap;
}

.nav-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.1), transparent);
  transition: left 0.5s;
}

.nav-item:hover::before {
  left: 100%;
}

.nav-item:hover {
  color: var(--primary-color);
  background: rgba(37, 99, 235, 0.05);
  border-color: rgba(37, 99, 235, 0.2);
  transform: translateY(-1px);
}

.nav-item.nav-active {
  background: var(--gradient-primary);
  color: white;
  border-color: var(--primary-dark);
  box-shadow: var(--box-shadow-md);
  transform: translateY(-2px);
}

.nav-item.nav-active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 3px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 2px;
}

.logout-btn {
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  background: transparent;
}

.logout-btn:hover {
  background: rgba(220, 38, 38, 0.1) !important;
  color: var(--secondary-color) !important;
  border-color: rgba(220, 38, 38, 0.3) !important;
}

/* Mobile Responsiveness for Navigation */
@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }
  
  .nav-links, .auth-links {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .nav-item {
    padding: 0.625rem 0.875rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .main-navigation {
    margin: 1.5rem auto 2rem auto;
  }
  
  .nav-item {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
  }
}

/* === PAGE HEADER STYLES === */
.page-header {
  text-align: center;
  margin-bottom: 2rem;
  padding: 2rem;
  background: linear-gradient(135deg, var(--card-bg) 0%, rgba(37, 99, 235, 0.05) 100%);
  border-radius: var(--border-radius-xl);
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
}

.page-header h1 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--text-color);
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
  letter-spacing: -0.02em;
}

.page-description {
  font-size: 1.125rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.quick-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.quick-action-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  border-radius: var(--border-radius-lg);
  border: 2px solid var(--border-color);
  background: var(--card-bg);
  color: var(--text-color);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

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

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

.quick-action-btn:hover {
  border-color: var(--primary-color);
  background: rgba(37, 99, 235, 0.05);
  transform: translateY(-2px);
  box-shadow: var(--box-shadow-md);
}

.btn-icon {
  font-size: 1.25rem;
}

.btn-text {
  font-weight: 600;
  letter-spacing: 0.025em;
}

/* Mobile Responsiveness for Page Header */
@media (max-width: 768px) {
  .page-header {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
  }
  
  .page-header h1 {
    font-size: 2.25rem;
  }
  
  .page-description {
    font-size: 1rem;
  }
  
  .quick-actions {
    gap: 0.75rem;
  }
  
  .quick-action-btn {
    padding: 0.75rem 1.25rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .page-header h1 {
    font-size: 1.875rem;
  }
  
  .quick-actions {
    flex-direction: column;
    align-items: center;
  }
  
  .quick-action-btn {
    width: 100%;
    max-width: 200px;
    justify-content: center;
  }
}