/**
 * KNKYX Registration Modal - Clean & Fixed Size
 * Klares, übersichtliches Registrierungs-Popup
 */

/* Modal Overlay mit Blur */
.register-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  animation: fadeIn 0.3s ease forwards;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

/* Modal Container - FESTE GRÖßE */
.register-modal {
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 100px rgba(220, 38, 38, 0.1);
  width: 1100px;
  height: 700px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(220, 38, 38, 0.2);
  transform: scale(0.9);
  opacity: 0;
  animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.1s forwards;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@keyframes modalSlideIn {
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Schließen Button */
.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: rgba(220, 38, 38, 0.1);
  border: 1px solid rgba(220, 38, 38, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 100;
  color: #dc2626;
  font-size: 20px;
}

.modal-close:hover {
  background: #dc2626;
  color: white;
  transform: rotate(90deg);
}

/* Modal Content - Feste Höhe, kein Scroll */
.modal-content-wrapper {
  display: flex;
  height: 100%;
}

/* Left Side - Logo & Info */
.modal-left {
  width: 380px;
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  padding: 40px 35px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.modal-left::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="50" height="50" patternUnits="userSpaceOnUse"><path d="M 50 0 L 0 0 0 50" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
  opacity: 0.5;
}

.modal-logo {
  position: relative;
  z-index: 1;
  text-align: center;
  margin-bottom: 35px;
}

.modal-logo h1 {
  font-size: 42px;
  font-weight: 900;
  color: white;
  margin: 0 0 8px 0;
  letter-spacing: -1px;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.modal-logo p {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
  font-weight: 500;
}

.modal-features {
  position: relative;
  z-index: 1;
}

.modal-feature {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 22px;
  color: white;
}

.modal-feature-icon {
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  backdrop-filter: blur(10px);
}

.modal-feature-text h3 {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 4px 0;
}

.modal-feature-text p {
  font-size: 13px;
  opacity: 0.9;
  margin: 0;
  line-height: 1.5;
}

/* Right Side - Form - KEIN SCROLL */
.modal-right {
  flex: 1;
  background: #0a0a0a;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* Scrollbarer Content-Bereich */
.modal-right-content {
  flex: 1;
  padding: 35px 45px 80px;
  overflow-y: auto;
  overflow-x: hidden;
}

.modal-right-content::-webkit-scrollbar {
  width: 6px;
}

.modal-right-content::-webkit-scrollbar-track {
  background: #1a1a1a;
}

.modal-right-content::-webkit-scrollbar-thumb {
  background: #262626;
  border-radius: 3px;
}

.modal-right-content::-webkit-scrollbar-thumb:hover {
  background: #dc2626;
}

/* Progress Steps - Kompakt & klar */
.modal-progress {
  display: flex;
  justify-content: space-between;
  margin-bottom: 25px;
  padding: 0 5px;
  position: relative;
}

.modal-step {
  flex: 1;
  text-align: center;
  position: relative;
  z-index: 1;
  cursor: pointer;
}

.modal-step-number {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #1a1a1a;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 5px;
  font-weight: 600;
  font-size: 12px;
  border: 2px solid #262626;
  transition: all 0.2s ease;
}

.modal-step.active .modal-step-number {
  background: #dc2626;
  color: white;
  border-color: #dc2626;
}

.modal-step.completed .modal-step-number {
  background: #10b981;
  color: white;
  border-color: #10b981;
}

.modal-step-label {
  font-size: 10px;
  color: #8a8a8a;
  font-weight: 500;
}

.modal-step.active .modal-step-label {
  color: #ffffff;
  font-weight: 600;
}

/* Step Line */
.modal-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 15px;
  left: 60%;
  width: 80%;
  height: 2px;
  background: #262626;
  z-index: -1;
}

.modal-step.completed:not(:last-child)::after {
  background: #10b981;
}

/* Form Styles */
.modal-step-content {
  display: none;
}

.modal-step-content.active {
  display: block;
}

/* Überschrift mit Trennung */
.modal-step-title {
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 10px 0;
  letter-spacing: -0.3px;
  padding-bottom: 12px;
  border-bottom: 2px solid #262626;
}

.modal-step-description {
  font-size: 14px;
  color: #a0a0a0;
  margin: 12px 0 25px 0;
  line-height: 1.6;
}

/* Form Elements - Klare Lesbarkeit */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  margin-bottom: 7px;
  color: #e8e8e8;
  font-weight: 600;
  font-size: 13px;
}

.form-group label.required::after {
  content: ' *';
  color: #dc2626;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="date"],
.form-group input[type="password"],
.form-group select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid #262626;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.2s ease;
  background: #1a1a1a;
  color: #e8e8e8;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #dc2626;
  background: #111;
}

.checkbox-group {
  display: flex;
  align-items: flex-start;
  margin-bottom: 16px;
  gap: 10px;
}

.checkbox-group input[type="checkbox"] {
  margin-top: 2px;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.checkbox-group label {
  font-size: 13px;
  color: #c0c0c0;
  line-height: 1.5;
  cursor: pointer;
}

.checkbox-group label a {
  color: #dc2626;
  text-decoration: none;
  font-weight: 600;
}

.checkbox-group label a:hover {
  text-decoration: underline;
}

/* Alert Styles */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 18px;
  font-size: 13px;
  display: none;
}

.alert.show {
  display: block;
}

.alert-error {
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
  border: 1px solid #dc2626;
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
  border: 1px solid #10b981;
}

.alert-info {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
  border: 1px solid #3b82f6;
}

/* Module Cards - kompakter */
.module-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 20px;
}

.module-card {
  border: 2px solid #262626;
  background: #1a1a1a;
  border-radius: 10px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.module-card:hover {
  border-color: #dc2626;
  background: #0f0f0f;
}

.module-card.selected {
  border-color: #dc2626;
  background: #0f0f0f;
}

.module-card input[type="checkbox"] {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #dc2626;
}

.module-icon {
  font-size: 32px;
  margin-bottom: 10px;
}

.module-name {
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 6px;
  letter-spacing: -0.2px;
}

.module-description {
  font-size: 13px;
  color: #a0a0a0;
  line-height: 1.5;
}

/* Password Strength - kompakt */
.password-toggle {
  position: relative;
}

.password-toggle-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: #8a8a8a;
  transition: color 0.2s ease;
}

.password-toggle-btn:hover {
  color: #dc2626;
}

.password-strength {
  margin-top: 8px;
}

.strength-bar {
  height: 5px;
  background: #262626;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}

.strength-bar-fill {
  height: 100%;
  width: 0%;
  transition: all 0.2s ease;
}

.strength-bar-fill.weak {
  width: 33%;
  background: #dc2626;
}

.strength-bar-fill.medium {
  width: 66%;
  background: #f59e0b;
}

.strength-bar-fill.strong {
  width: 100%;
  background: #10b981;
}

.password-criteria {
  font-size: 11px;
  color: #666;
}

.password-criteria .criterion {
  display: flex;
  align-items: center;
  margin-bottom: 3px;
}

.password-criteria .criterion::before {
  content: '○';
  margin-right: 6px;
  color: #666;
}

.password-criteria .criterion.valid::before {
  content: '✓';
  color: #10b981;
  font-weight: bold;
}

/* Age Warning */
.age-warning {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  color: white;
  padding: 12px 16px;
  border-radius: 8px;
  margin: 12px 0;
  display: none;
  font-size: 13px;
}

.age-warning.show {
  display: block;
}

/* Avatar Upload - kompakter */
.avatar-upload {
  text-align: center;
  margin-bottom: 25px;
}

.avatar-preview {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: #1a1a1a;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 3px solid #262626;
  transition: all 0.2s ease;
}

.avatar-preview:hover {
  border-color: #dc2626;
}

.avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-placeholder {
  font-size: 50px;
  color: #666;
}

.upload-btn {
  display: inline-block;
  padding: 10px 24px;
  background: #dc2626;
  color: white;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
  font-size: 14px;
}

.upload-btn:hover {
  background: #b91c1c;
}

input[type="file"] {
  display: none;
}

/* Welcome Screen - kompakt */
.welcome-screen {
  text-align: center;
}

.welcome-icon {
  font-size: 60px;
  margin-bottom: 16px;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 20px 0;
  text-align: left;
}

.feature {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.feature-icon {
  font-size: 20px;
  margin-top: 1px;
}

.feature-text h4 {
  font-size: 14px;
  color: #e8e8e8;
  margin-bottom: 3px;
  font-weight: 600;
}

.feature-text p {
  font-size: 12px;
  color: #8a8a8a;
}

/* Bottom Buttons - FEST FIXIERT */
.modal-buttons {
  display: flex;
  gap: 10px;
  padding: 16px 45px;
  background: #0a0a0a;
  border-top: 1px solid #1a1a1a;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
}

.modal-btn {
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-btn-primary {
  flex: 1;
  background: #dc2626;
  color: white;
}

.modal-btn-primary:hover {
  background: #b91c1c;
}

.modal-btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.modal-btn-secondary {
  background: transparent;
  color: #8a8a8a;
  border: 2px solid #262626;
  padding: 10px 18px;
}

.modal-btn-secondary:hover {
  background: #1a1a1a;
  color: #c0c0c0;
  border-color: #8a8a8a;
}

/* Responsive - Kleinere Bildschirme */
@media (max-width: 1150px) {
  .register-modal {
    width: 95%;
    height: 650px;
  }
}

@media (max-width: 968px) {
  .modal-left {
    display: none;
  }

  .register-modal {
    width: 600px;
    height: 650px;
  }

  .modal-right-content {
    padding: 30px 35px 20px;
  }

  .modal-buttons {
    padding: 16px 35px;
  }
}

@media (max-width: 640px) {
  .register-modal {
    width: 100%;
    height: 100vh;
    border-radius: 0;
  }

  .modal-content-wrapper {
    height: 100vh;
  }

  .modal-right-content {
    padding: 25px 20px 20px;
  }

  .modal-buttons {
    padding: 14px 20px;
  }

  .modal-btn {
    padding: 11px 18px;
    font-size: 13px;
  }

  .modal-step-title {
    font-size: 20px;
  }

  .modal-close {
    width: 35px;
    height: 35px;
    top: 12px;
    right: 12px;
  }

  .module-cards {
    grid-template-columns: 1fr;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }
}