/**
 * App-Builder Login Stylesheet
 * 
 * Ein modernes, responsives Design für die Login-Seite des App-Builders.
 */

/* Reset und Grundeinstellungen */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  line-height: 1.6;
  color: #333;
}

/* Container für Login-Box */
.login-container {
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  width: 100%;
  max-width: 400px;
  padding: 30px;
  transition: transform 0.3s ease;
}

.login-container:hover {
  transform: translateY(-5px);
}

/* Header */
.login-container h1 {
  text-align: center;
  color: #2c3e50;
  margin-bottom: 25px;
  font-weight: 600;
  font-size: 24px;
  position: relative;
  padding-bottom: 10px;
}

.login-container h1::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(to right, #3498db, #2980b9);
  border-radius: 2px;
}

/* Logo im Header */
.app-logo {
  display: block;
  margin: 0 auto 20px;
  max-width: 80px;
  height: auto;
}

/* Fehlermeldungen */
.error-message {
  background-color: #ffebee;
  color: #d32f2f;
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-size: 14px;
  border-left: 4px solid #f44336;
  animation: fadeIn 0.3s ease;
}

/* Erfolgsmeldungen */
.success-message {
  background-color: #e8f5e9;
  color: #2e7d32;
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-size: 14px;
  border-left: 4px solid #4caf50;
  animation: fadeIn 0.3s ease;
}

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

/* Formularelemente */
.form-group {
  margin-bottom: 20px;
  position: relative;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #546e7a;
  font-size: 14px;
}

.form-group input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  font-size: 15px;
  transition: all 0.3s ease;
}

.form-group input:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

/* Button Styling */
button {
  background: linear-gradient(to right, #3498db, #2980b9);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 12px 20px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  width: 100%;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

button:hover {
  background: linear-gradient(to right, #2980b9, #3498db);
  box-shadow: 0 5px 15px rgba(52, 152, 219, 0.2);
}

button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Links */
.form-links {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
}

.form-links a {
  color: #3498db;
  text-decoration: none;
  transition: color 0.3s ease;
}

.form-links a:hover {
  color: #2980b9;
  text-decoration: underline;
}

/* Passwort anzeigen Button */
.show-password-toggle {
  position: absolute;
  right: 12px;
  top: 38px;
  background: none;
  border: none;
  color: #546e7a;
  font-size: 13px;
  cursor: pointer;
  padding: 0;
  width: auto;
}

.show-password-toggle:hover {
  color: #3498db;
  background: none;
  box-shadow: none;
}

/* Spinner Animation */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
  margin-right: 8px;
}

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

/* Remember Me Checkbox */
.remember-me {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.remember-me input[type="checkbox"] {
  width: auto;
  margin-right: 10px;
}

.remember-me label {
  margin-bottom: 0;
  cursor: pointer;
}

/* Footer */
.login-footer {
  margin-top: 30px;
  text-align: center;
  font-size: 12px;
  color: #78909c;
}

/* Responsive Anpassungen */
@media (max-width: 480px) {
  .login-container {
    padding: 20px;
  }
  
  .login-container h1 {
    font-size: 20px;
  }
  
  .form-group input {
    padding: 10px 12px;
  }
  
  button {
    padding: 10px 16px;
  }
}

/* Tablet und Desktop Verbesserungen */
@media (min-width: 768px) {
  .login-container {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }
  
  .login-container:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  }
  
  .login-container h1 {
    font-size: 28px;
  }
}

/* Dark Mode (optional) */
@media (prefers-color-scheme: dark) {
  body {
    background: linear-gradient(135deg, #2c3e50 0%, #1a1a2e 100%);
    color: #e0e0e0;
  }
  
  .login-container {
    background-color: #263238;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
  }
  
  .login-container h1 {
    color: #ecf0f1;
  }
  
  .form-group label {
    color: #b0bec5;
  }
  
  .form-group input {
    background-color: #37474f;
    border-color: #455a64;
    color: #ecf0f1;
  }
  
  .form-group input:focus {
    border-color: #3498db;
  }
  
  .error-message {
    background-color: rgba(244, 67, 54, 0.1);
  }
  
  .success-message {
    background-color: rgba(76, 175, 80, 0.1);
  }
  
  .form-links a {
    color: #64b5f6;
  }
  
  .login-footer {
    color: #78909c;
  }
}