/* Space Exploration Engine - Main Styles */
/* Global styles for the entire application */

:root {
  --primary-color: #2196F3;
  --primary-light: #64b5f6;
  --primary-dark: #1976d2;
  --secondary-color: #00bcd4;
  --accent-color: #ff4081;
  --background-dark: #0f2027;
  --background-medium: #203a43;
  --background-light: #2c5364;
  --text-primary: #ffffff;
  --text-secondary: #bbdefb;
  --error-color: #ff5252;
  --success-color: #69f0ae;
  --warning-color: #ffb74d;
  --info-color: #4fc3f7;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background: linear-gradient(135deg, var(--background-dark), var(--background-medium), var(--background-light));
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--text-primary);
  position: relative;
  overflow-x: hidden;
}

/* Animated background elements */
body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 20%),
    radial-gradient(circle at 90% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 20%);
  z-index: -1;
}

.container {
  width: 100%;
  max-width: 1200px;
  padding: 2rem;
  margin: 0 auto;
}

.auth-container {
  background: rgba(0, 0, 0, 0.7);
  border-radius: 10px;
  padding: 2rem;
  box-shadow: 0 0 20px rgba(0, 150, 255, 0.5);
  backdrop-filter: blur(10px);
  max-width: 400px;
  margin: 0 auto;
}

h1 {
  text-align: center;
  margin-bottom: 1.5rem;
  color: var(--info-color);
  font-size: 1.8rem;
}

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

label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

input[type="text"],
input[type="password"],
input[type="email"],
select {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid var(--primary-light);
  border-radius: 5px;
  background: rgba(0, 30, 60, 0.5);
  color: var(--text-primary);
  font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 10px rgba(33, 150, 243, 0.5);
}

button {
  width: 100%;
  padding: 0.8rem;
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
  border: none;
  border-radius: 5px;
  color: white;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

button:hover:not(:disabled) {
  background: linear-gradient(to right, var(--primary-dark), #00acc1);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(33, 150, 243, 0.4);
}

button:disabled {
  background: #616161;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.switch-form {
  text-align: center;
  margin-top: 1.2rem;
  color: var(--text-secondary);
}

.switch-form a {
  color: var(--info-color);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.3s ease;
}

.switch-form a:hover {
  text-decoration: underline;
  color: var(--primary-light);
}

.error-message {
  color: var(--error-color);
  font-size: 0.9rem;
  margin-top: 0.3rem;
  display: none;
}

.success-message {
  color: var(--success-color);
  font-size: 0.9rem;
  margin-top: 0.3rem;
  display: none;
}

.hidden {
  display: none;
}

.logo {
  text-align: center;
  margin-bottom: 1.5rem;
}

.logo h1 {
  font-size: 2.2rem;
  background: linear-gradient(to right, #4facfe, #00f2fe);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
}

.logo p {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* Navigation styles */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--primary-color);
}

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

.nav-link {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: var(--primary-light);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Game canvas/container styles */
.game-container {
  width: 100%;
  height: 70vh;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

/* Responsive design */
@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }
  
  .auth-container {
    padding: 1.5rem;
  }
  
  .navbar {
    padding: 0.8rem 1rem;
  }
  
  .nav-links {
    gap: 1rem;
  }
}

/* Animations */
.fade-in {
  animation: fadeIn 0.5s ease-in;
}

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

.slide-in {
  animation: slideIn 0.3s ease-out;
}

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

/* Loading spinner */
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Modal styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: var(--background-dark);
  padding: 2rem;
  border-radius: 8px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 0 20px rgba(0, 150, 255, 0.5);
}

.close-modal {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-primary);
}