/* Enhanced Auth Page Styles */

.auth-page {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 2rem;
  background: linear-gradient(180deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
}

.auth-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1200px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

/* Welcome Section */
.auth-welcome {
  color: white;
}

.welcome-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50px;
  padding: 0.5rem 1.5rem;
  margin-bottom: 2rem;
  animation: fadeInDown 0.8s ease;
}

.auth-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  font-family: 'Orbitron', sans-serif;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.8s ease 0.2s both;
}

.auth-description {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.8;
  margin-bottom: 2rem;
  animation: fadeInUp 0.8s ease 0.4s both;
}

.auth-features {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  animation: fadeInUp 0.8s ease 0.6s both;
}

.feature-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50px;
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.feature-badge:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(102, 126, 234, 0.5);
  transform: translateY(-2px);
}

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

/* Auth Forms */
.auth-forms {
  position: relative;
}

.form-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 3rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: fadeInRight 0.8s ease;
}

.form-header {
  text-align: center;
  margin-bottom: 2rem;
}

.form-header h2 {
  font-size: 2rem;
  font-weight: 700;
  color: white;
  margin-bottom: 0.5rem;
  font-family: 'Orbitron', sans-serif;
}

.form-header p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1rem;
}

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

.form-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: white;
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.label-icon {
  font-size: 1rem;
}

.form-group input {
  width: 100%;
  padding: 1rem 1.25rem;
  background: rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  color: white;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-group input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.form-group input:focus {
  outline: none;
  border-color: rgba(102, 126, 234, 0.8);
  background: rgba(0, 0, 0, 0.4);
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.btn-full {
  width: 100%;
  justify-content: center;
  margin-top: 1rem;
}

.form-footer {
  text-align: center;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.form-footer p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
}

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

.form-link:hover {
  color: #764ba2;
  text-decoration: underline;
}

/* Auth Background Orbs */
.auth-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
}

/* Character Selection View */
.character-selection-view {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

.selection-header {
  text-align: center;
  margin-bottom: 3rem;
  animation: fadeInDown 0.8s ease;
}

.selection-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 900;
  font-family: 'Orbitron', sans-serif;
  line-height: 1.1;
  margin-bottom: 1rem;
}

.selection-description {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.7);
  max-width: 600px;
  margin: 0 auto;
}

.characters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

/* Desktop: 3 columns max for better layout */
@media (min-width: 1200px) {
  .characters-grid {
    grid-template-columns: repeat(3, 1fr);
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* Tablet: 2 columns */
@media (min-width: 768px) and (max-width: 1199px) {
  .characters-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile: 1 column */
@media (max-width: 767px) {
  .characters-grid {
    grid-template-columns: 1fr;
  }
}

.character-card {
  position: relative;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  cursor: pointer;
  animation: fadeInUp 0.6s ease backwards;
  animation-delay: calc(var(--index, 0) * 0.1s);
}

.character-card:hover {
  transform: translateY(-8px);
  border-color: rgba(102, 126, 234, 0.5);
  box-shadow: 0 16px 48px rgba(102, 126, 234, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

.character-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.character-avatar {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2));
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.character-card:hover .character-avatar {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
}

.avatar-emoji {
  font-size: 3rem;
}

.character-badge {
  padding: 0.5rem 1rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
}

.character-badge.class-warrior { background: linear-gradient(135deg, #f59e0b, #ea580c); }
.character-badge.class-mage { background: linear-gradient(135deg, #3b82f6, #8b5cf6); }
.character-badge.class-rogue { background: linear-gradient(135deg, #10b981, #059669); }
.character-badge.class-engineer { background: linear-gradient(135deg, #6366f1, #4f46e5); }

.character-card-body {
  flex-grow: 1;
  margin-bottom: 1.5rem;
}

.character-name {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  margin: 0 0 1rem 0;
}

.character-info {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
  font-weight: 600;
}

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

.character-location {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: 6px;
  margin-bottom: 1rem;
}

.character-location.in-transit {
  background: rgba(251, 146, 60, 0.1);
  border-color: rgba(251, 146, 60, 0.3);
}

.location-icon {
  font-size: 1rem;
}

.location-name {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.875rem;
  font-weight: 600;
}

.character-stats-mini {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.stat-mini {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.stat-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.6);
  min-width: 30px;
}

.stat-bar {
  flex-grow: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.stat-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.stat-bar-fill.hp {
  background: linear-gradient(90deg, #ef4444, #dc2626);
}

.stat-bar-fill.energy {
  background: linear-gradient(90deg, #3b82f6, #2563eb);
}

.stat-bar-fill.tech {
  background: linear-gradient(90deg, #8b5cf6, #7c3aed);
}

.stat-value {
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.8);
  min-width: 25px;
  text-align: right;
}

/* Ship Info */
.character-ship-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 6px;
  margin-bottom: 1rem;
}

.ship-icon {
  font-size: 1rem;
}

.ship-name {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.875rem;
  font-weight: 600;
  flex-grow: 1;
}

.ship-status {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-weight: 600;
}

.ship-status.active {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

.ship-status.docked {
  background: rgba(156, 163, 175, 0.2);
  color: #9ca3af;
}

/* Home Hub */
.character-home-hub {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: rgba(251, 146, 60, 0.1);
  border: 1px solid rgba(251, 146, 60, 0.3);
  border-radius: 6px;
  margin-top: 1rem;
}

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

.home-name {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.875rem;
  font-weight: 600;
}

.select-character-btn {
  margin-top: auto;
}

/* Create New Character Card */
.character-card-create {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: rgba(255, 255, 255, 0.03);
  border: 2px dashed rgba(255, 255, 255, 0.2);
  text-decoration: none;
  min-height: 320px;
}

.character-card-create:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(102, 126, 234, 0.5);
}

.create-card-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  animation: pulse 2s ease-in-out infinite;
}

.create-card-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  margin: 0 0 0.5rem 0;
}

.create-card-description {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
  margin: 0;
}

.selection-footer {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.link-secondary {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  font-family: inherit;
}

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

/* No Characters View */
.no-characters-view {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

/* Animations */
@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* Responsive */
@media (max-width: 968px) {
  .auth-content {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .auth-welcome {
    text-align: center;
  }

  .auth-features {
    justify-content: center;
  }

  .form-card {
    padding: 2rem;
  }

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

  .character-card {
    padding: 1.5rem;
  }
}

@media (max-width: 768px) {
  .selection-header {
    margin-bottom: 2rem;
  }

  .characters-grid {
    grid-template-columns: 1fr;
  }

  .cta-buttons {
    flex-direction: column;
  }

  .cta-buttons .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .form-card {
    padding: 1.5rem;
  }

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

  .character-card {
    padding: 1.25rem;
  }

  .character-avatar {
    width: 60px;
    height: 60px;
  }

  .avatar-emoji {
    font-size: 2rem;
  }

  .character-name {
    font-size: 1.25rem;
  }

  .auth-container {
    padding: 1rem;
  }
}

/* Session Expired Notice */
.session-expired-notice {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: linear-gradient(135deg, rgba(255, 102, 0, 0.1), rgba(255, 68, 0, 0.1));
  border: 1px solid rgba(255, 102, 0, 0.4);
  border-radius: 12px;
  padding: 1.25rem;
  margin-top: 1.5rem;
  box-shadow: 0 4px 15px rgba(255, 102, 0, 0.2);
  animation: slideIn 0.5s ease;
}

.session-expired-notice .notice-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.session-expired-notice .notice-content {
  flex: 1;
}

.session-expired-notice .notice-content strong {
  display: block;
  color: #ff6600;
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
  font-family: 'Orbitron', sans-serif;
}

.session-expired-notice .notice-content p {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  line-height: 1.4;
}

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

@media (max-width: 768px) {
  .session-expired-notice {
    padding: 1rem;
  }

  .session-expired-notice .notice-icon {
    font-size: 1.5rem;
  }

  .session-expired-notice .notice-content strong {
    font-size: 1rem;
  }

  .session-expired-notice .notice-content p {
    font-size: 0.85rem;
  }
}
