/* RESET & BASE */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #eef0ff;
}

/* BACKGROUND */
.bg {
  position: fixed;
  inset: 0;
  background: url("../bilder/chat.jpg") center / cover no-repeat;
  filter: brightness(0.35);
  z-index: -1;
}

/* LAYOUT */
body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px 20px 60px 20px;
  gap: 20px;
}

/* HEADER IMAGE */
.header-image-container {
  width: 100%;
  max-width: 900px;
  height: 150px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(99, 102, 241, 0.3));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.header-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}


/* LOGIN CONTAINER */
.login-container {
  width: 100%;
  max-width: 750px;
  background: rgba(15, 18, 40, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 16px 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  max-height: calc(100vh - 230px);
  overflow-y: auto;
}

.login-container::-webkit-scrollbar {
  width: 8px;
}

.login-container::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.login-container::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.5);
  border-radius: 4px;
}

.login-container::-webkit-scrollbar-thumb:hover {
  background: rgba(139, 92, 246, 0.7);
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* HEADER */
.login-header {
  text-align: center;
  margin-bottom: 10px;
}

.login-icon {
  font-size: 48px;
  margin-bottom: 12px;
  display: inline-block;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.login-header h1 {
  font-size: 24px;
  margin-bottom: 6px;
  background: rgba(20,24,55,0.8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-header p {
  font-size: 12px;
  color: rgba(238, 240, 255, 0.6);
}

/* TABS */
.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  background: rgba(0, 0, 0, 0.3);
  padding: 6px;
  border-radius: 14px;
}

.tab {
  flex: 1;
  padding: 12px 16px;
  background: transparent;
  border: none;
  color: rgba(238, 240, 255, 0.6);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  white-space: nowrap;
}

.tab:hover {
  color: #eef0ff;
  background: rgba(255, 255, 255, 0.05);
}

.tab.active {
  background: rgba(20,24,55,0.8);
  color: white;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

/* ALERT */
.alert {
  display: none;
  padding: 14px 18px;
  border-radius: 12px;
  margin-bottom: 20px;
  font-size: 14px;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.alert.error {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
}

.alert.success {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.alert.info {
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #60a5fa;
}

.alert.warning {
  background: rgba(255, 212, 59, 0.2);
  border: 1px solid rgba(255, 212, 59, 0.4);
  color: #ffd43b;
}

/* INFO BOX */
.info-box {
  padding: 10px;
  background: rgba(16, 185, 129, 0.15);
  border: 2px solid rgba(16, 185, 129, 0.5);
  border-radius: 10px;
  display: flex;
  align-items: start;
  gap: 10px;
  margin-top: 4px;
  animation: infoBlinkGreen 2s ease-in-out infinite;
}

.info-box .info-icon {
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
  animation: iconPulse 2s ease-in-out infinite;
}

.info-box p {
  font-size: 11px;
  line-height: 1.3;
  color: rgba(238, 240, 255, 0.95);
  margin: 0;
}

@keyframes iconPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.15);
  }
}

/* FORM */
.form-content {
  display: none;
  flex-direction: column;
  gap: 6px;
  animation: fadeIn 0.3s ease-out;
}

.form-content.active {
  display: flex;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* FORM GRID LAYOUT */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 6px;
}

.form-column {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-column .form-group {
  gap: 4px;
}

.form-column .form-group label {
  font-size: 13px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-group label {
  font-size: 12px;
  font-weight: 500;
  color: rgba(238, 240, 255, 0.8);
  display: flex;
  align-items: center;
  gap: 6px;
}

.form-group label span {
  font-size: 15px;
}

.form-group small {
  font-size: 12px;
  color: rgba(238, 240, 255, 0.5);
  margin-top: -4px;
}

.input-wrapper {
  position: relative;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 9px 11px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  color: #eef0ff;
  font-size: 13px;
  transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
  background: rgba(0, 0, 0, 0.4);
}

.form-group input::placeholder {
  color: rgba(238, 240, 255, 0.4);
}

/* GENDER SELECTOR */
.gender-selector {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

/* Kompakte Icon-only Version für rechte Spalte */
.form-column .gender-selector {
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.gender-option {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

/* Icon-only Version für rechte Spalte */
.form-column .gender-option {
  flex-direction: column;
  justify-content: center;
  padding: 8px 4px;
  gap: 0;
}

.form-column .gender-option .gender-label {
  display: none;
}

.gender-option:hover {
  background: rgba(139, 92, 246, 0.1);
  border-color: rgba(139, 92, 246, 0.4);
}

.gender-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.gender-option input[type="radio"]:checked ~ .gender-icon,
.gender-option input[type="radio"]:checked ~ .gender-label {
  color: #8b5cf6;
}

.gender-option input[type="radio"]:checked + .gender-icon {
  transform: scale(1.2);
}

.gender-option:has(input[type="radio"]:checked) {
  background: rgba(139, 92, 246, 0.2);
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.gender-icon {
  font-size: 20px;
  transition: all 0.2s;
  flex-shrink: 0;
}

.form-column .gender-icon {
  font-size: 22px;
}

.gender-option input[type="radio"]:checked + .gender-icon {
  transform: scale(1.15);
}

.gender-label {
  font-size: 13px;
  color: rgba(238, 240, 255, 0.7);
  text-align: left;
  transition: all 0.2s;
  flex: 1;
  opacity: 0;
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

.gender-option:hover .gender-label {
  opacity: 1;
  max-width: 100px;
  margin-left: 8px;
}

.toggle-password {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(238, 240, 255, 0.6);
  cursor: pointer;
  font-size: 20px;
  padding: 4px;
  transition: all 0.2s;
}

.toggle-password:hover {
  color: #eef0ff;
}

/* CHECKBOX */
.checkbox-group {
  margin-top: 0;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 11px;
  color: rgba(238, 240, 255, 0.7);
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  margin-top: 2px;
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #8b5cf6;
  flex-shrink: 0;
}

.checkbox-label a {
  color: #8b5cf6;
  text-decoration: none;
  transition: all 0.2s;
}

.checkbox-label a:hover {
  color: #a78bfa;
  text-decoration: underline;
}

/* FORM OPTIONS */
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  margin-top: 0;
}

.link {
  color: #8b5cf6;
  text-decoration: none;
  transition: all 0.2s;
}

.link:hover {
  color: #a78bfa;
  text-decoration: underline;
}

/* CAPTCHA */
.captcha-container {
  margin-top: 0;
}

.captcha-container label {
  font-size: 14px;
  font-weight: 500;
  color: rgba(238, 240, 255, 0.8);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.captcha-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.captcha-question {
  grid-column: 1 / -1;
  padding: 12px;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 10px;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  color: #eef0ff;
  user-select: none;
}

.captcha-box input {
  width: 100%;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  color: #eef0ff;
  font-size: 15px;
}

.btn-captcha-refresh {
  padding: 10px 14px;
  background: rgba(139, 92, 246, 0.2);
  border: 1px solid rgba(139, 92, 246, 0.4);
  color: #eef0ff;
  border-radius: 10px;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-captcha-refresh:hover {
  background: rgba(139, 92, 246, 0.3);
  transform: rotate(180deg);
}

/* GUEST INFO */
.guest-info {
  display: flex;
  gap: 10px;
  padding: 10px;
  background: rgba(16, 185, 129, 0.15);
  border: 2px solid rgba(16, 185, 129, 0.5);
  border-radius: 10px;
  margin-bottom: 6px;
  animation: infoBlinkGreen 2s ease-in-out infinite;
}

.info-icon {
  font-size: 20px;
  flex-shrink: 0;
  animation: iconPulse 2s ease-in-out infinite;
}

.guest-info p {
  font-size: 11px;
  color: rgba(238, 240, 255, 0.95);
  line-height: 1.3;
}

@keyframes infoBlinkGreen {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.6);
    border-color: rgba(16, 185, 129, 0.5);
  }
  50% {
    opacity: 0.75;
    box-shadow: 0 0 35px rgba(16, 185, 129, 1);
    border-color: rgba(16, 185, 129, 1);
  }
}

.guest-note {
  margin-top: 6px;
  padding: 8px;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 8px;
  font-size: 11px;
  color: #fbbf24;
  text-align: center;
}

/* Guest Form Label Override */
#guest .form-group label {
  color: rgba(238, 240, 255, 0.95);
}

/* SUBMIT BUTTON */
.btn-submit {
  width: 100%;
  padding: 11px;
  background: rgba(20,24,55,0.8);
  border: none;
  border-radius: 10px;
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  margin-top: 4px;
  position: relative;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.4);
}

.btn-submit:active {
  transform: translateY(0);
}

.btn-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.spinner {
  display: none;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.btn-submit.loading .btn-text {
  display: none;
}

.btn-submit.loading .spinner {
  display: block;
}

/* MODAL */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.3s;
}

.modal.active {
  display: flex;
}

.modal-content {
  width: 100%;
  max-width: 600px;
  max-height: 80vh;
  background: rgba(15, 18, 40, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  overflow: hidden;
  animation: modalSlideIn 0.4s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(99, 102, 241, 0.2));
}

.modal-header h2 {
  font-size: 24px;
  color: #eef0ff;
}

.modal-close {
  background: none;
  border: none;
  color: rgba(238, 240, 255, 0.6);
  font-size: 32px;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #eef0ff;
}

.modal-body {
  padding: 32px;
  max-height: 60vh;
  overflow-y: auto;
}

.modal-body::-webkit-scrollbar {
  width: 8px;
}

.modal-body::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.5);
  border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(139, 92, 246, 0.7);
}

.rules-section {
  margin-bottom: 28px;
}

.rules-section h3 {
  font-size: 18px;
  color: #eef0ff;
  margin-bottom: 12px;
}

.rules-section p {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(238, 240, 255, 0.8);
}

.modal-footer {
  padding: 20px 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: center;
}

.btn-modal {
  padding: 12px 32px;
  background: rgba(20,24,55,0.8);
  border: none;
  border-radius: 10px;
  color: white;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-modal:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

/* SHAKE ANIMATION */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-10px); }
  20%, 40%, 60%, 80% { transform: translateX(10px); }
}

/* RESPONSIVE */
@media (max-width: 600px) {
  body {
    padding: 10px;
    gap: 10px;
  }
  
  .header-image-container {
    height: 100px;
    border-radius: 12px;
  }
  
  .header-image-container::after {
    font-size: 16px;
  }
  
  .login-container {
    padding: 24px 20px;
    max-height: calc(100vh - 130px);
  }
  
  .form-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .login-header h1 {
    font-size: 20px;
  }
  
  .login-icon {
    font-size: 40px;
  }

  .tabs {
    flex-direction: column;
  }

  .tab {
    text-align: center;
  }

  .form-options {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  .captcha-box {
    grid-template-columns: 1fr;
  }

  .modal-header,
  .modal-body,
  .modal-footer {
    padding: 20px;
  }
}

@media (max-height: 700px) {
  .header-image-container {
    height: 80px;
  }
  
  .login-container {
    padding: 20px 30px;
  }
  
  .login-header {
    margin-bottom: 16px;
  }
  
  .login-icon {
    font-size: 36px;
    margin-bottom: 8px;
  }
  
  .form-content {
    gap: 10px;
  }
}

/* ===== FOOTER ===== */
.login-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(15, 18, 40, 0.98);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px 20px;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-copyright {
  font-size: 10px;
  color: rgba(139, 92, 246, 0.5);
  font-weight: 400;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
}

.footer-links a {
  color: rgba(139, 92, 246, 0.9);
  text-decoration: none;
  transition: all 0.2s;
  padding: 4px 8px;
  border-radius: 6px;
}

.footer-links a:hover {
  color: #a78bfa;
  background: rgba(139, 92, 246, 0.1);
}

.footer-separator {
  color: rgba(238, 240, 255, 0.3);
}

/* Legal Modal */
#legal-modal .modal-body {
  max-height: 60vh;
  overflow-y: auto;
}

#legal-modal .modal-body h3 {
  margin-top: 20px;
  margin-bottom: 10px;
  color: #8b5cf6;
  font-size: 16px;
}

#legal-modal .modal-body h3:first-child {
  margin-top: 0;
}

#legal-modal .modal-body p {
  margin-bottom: 12px;
  line-height: 1.6;
  color: rgba(238, 240, 255, 0.8);
}

#legal-modal .modal-body ul {
  margin-left: 20px;
  margin-bottom: 12px;
}

#legal-modal .modal-body li {
  margin-bottom: 8px;
  line-height: 1.6;
  color: rgba(238, 240, 255, 0.8);
}

/* Responsive Footer */
@media (max-width: 768px) {
  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }
  
  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* ===== COOKIE CONSENT BANNER ===== */
.cookie-consent-banner {
  position: fixed;
  bottom: 50px;
  right: -450px;
  width: 400px;
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
  border: 2px solid rgba(16, 185, 129, 0.4);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 20px rgba(16, 185, 129, 0.2);
  z-index: 10000;
  transition: right 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.cookie-consent-banner.show {
  right: 20px;
}

.cookie-consent-content {
  padding: 20px;
}

.cookie-consent-icon {
  font-size: 32px;
  text-align: center;
  margin-bottom: 12px;
  animation: cookieBounce 1s ease infinite;
}

@keyframes cookieBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.cookie-consent-text h3 {
  color: #10b981;
  font-size: 18px;
  margin: 0 0 10px 0;
  font-weight: 600;
}

.cookie-consent-text p {
  color: #d1d5db;
  font-size: 13px;
  line-height: 1.5;
  margin: 0 0 15px 0;
}

.cookie-consent-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
}

.cookie-accept-btn {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.cookie-accept-btn:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

.cookie-info-link {
  color: #60a5fa;
  text-decoration: none;
  font-size: 12px;
  text-align: center;
  transition: color 0.2s;
}

.cookie-info-link:hover {
  color: #93c5fd;
  text-decoration: underline;
}

@media (max-width: 480px) {
  .cookie-consent-banner {
    right: -100%;
    width: calc(100% - 40px);
    bottom: 10px;
  }
  
  .cookie-consent-banner.show {
    right: 20px;
  }
}


