/* Datei: css/style.css */
:root {
  --color-anthrazit: #2f2f33;
  --color-dunkelgrau: #707070;
  --color-mittelgrau: #c4c4c6;
  --color-hellgrau: #e7e7e4;
  --color-apricot: #ffe6d9;
  --color-sand: #e8d1ae;
  --color-hellblau: #ccd7e0;
  --color-lindgruen: #c5cdbd;
  --color-gelb: #eeebd1;
  --color-tuerkis: #e2f0ee;

  --font-primary: 'Inter', 'Montserrat', sans-serif;
  --text-main: var(--color-anthrazit);
  --bg-main: #f8f9fa;
}

* {
  box-sizing: border-box;
}

body {
  font-family: var(--font-primary);
  color: var(--text-main);
  background-color: var(--bg-main);
  margin: 0;
  padding: 0;
  -webkit-text-size-adjust: 100%;
}

/* =========================================
   FORMULARFELDER & IPHONE AUTO-ZOOM VERHINDERUNG
   ========================================= */
/* iOS Safari auto-zooms, wenn font-size < 16px ist. Mindestens 16px erzwingen! */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea,
.formatted-number-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--color-mittelgrau);
  border-radius: 4px;
  font-size: 16px !important; /* Verhindert Safari-Zoom auf iPhones */
  font-family: var(--font-primary);
  background-color: #ffffff;
}

.login-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.login-card, .register-card, .forgot-card, .reset-card, .verify-card, .card-form {
  background: #ffffff;
  padding: 2.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  width: 100%;
  max-width: 440px;
  margin: 2rem auto;
}

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

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

button.btn-primary {
  width: 100%;
  padding: 0.75rem;
  background-color: var(--color-anthrazit);
  color: #ffffff;
  border: none;
  border-radius: 4px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

button.btn-primary:hover {
  background-color: var(--color-dunkelgrau);
}

.alert-error {
  background-color: var(--color-apricot);
  color: #a94442;
  padding: 0.75rem;
  border-radius: 4px;
  margin-bottom: 1rem;
  display: none;
}

.alert-success {
  background-color: var(--color-lindgruen);
  color: #2e4d25;
  padding: 0.75rem;
  border-radius: 4px;
  margin-bottom: 1rem;
  display: none;
}

/* =========================================
   TOPBAR NAVIGATION (Modernes Web-Design)
   ========================================= */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 70px;
  background-color: #ffffff;
  border-bottom: 1px solid var(--color-mittelgrau);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.brand-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-container a.brand-logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--color-anthrazit);
}

.logo-fallback {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-f {
  font-size: 26px;
  font-weight: 900;
  font-family: var(--font-primary);
  line-height: 1;
}

.logo-text-box {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.brand-sub {
  font-size: 0.6rem;
  color: var(--color-dunkelgrau);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.portal-badge {
  background-color: var(--color-sand);
  color: var(--color-anthrazit);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Desktop Menü-Links */
.desktop-nav {
  display: flex;
  align-items: center;
}

.nav-links {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 18px;
}

.nav-links a {
  text-decoration: none;
  color: var(--color-anthrazit);
  font-weight: 600;
  font-size: 0.9rem;
  transition: color 0.2s, border-bottom 0.2s;
  padding: 8px 4px;
  position: relative;
  white-space: nowrap;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--color-anthrazit);
  border-bottom: 3px solid var(--color-anthrazit);
}

.nav-links .nav-disabled {
  color: var(--color-dunkelgrau);
  opacity: 0.5;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 8px 4px;
  cursor: not-allowed;
  user-select: none;
  white-space: nowrap;
}

/* User Action Area (Rechts) */
.user-action-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-website-switch {
  text-decoration: none;
  font-size: 0.8rem;
  color: var(--color-dunkelgrau);
  background-color: var(--color-hellgrau);
  padding: 6px 10px;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
  font-weight: 500;
  white-space: nowrap;
}

.btn-website-switch:hover {
  background-color: var(--color-mittelgrau);
  color: var(--color-anthrazit);
}

/* Profil Avatar Button */
.profile-avatar-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--color-anthrazit);
  color: #ffffff;
  border: 2px solid var(--color-sand);
  font-weight: bold;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, background-color 0.2s;
}

.profile-avatar-btn:hover {
  background-color: var(--color-dunkelgrau);
  transform: scale(1.05);
}

.profile-dropdown {
  position: relative;
}

.dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  top: 48px;
  background-color: #ffffff;
  min-width: 220px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  border-radius: 8px;
  padding: 12px 0;
  z-index: 1001;
  border: 1px solid var(--color-hellgrau);
}

.dropdown-content.show {
  display: block;
}

.dropdown-info {
  padding: 10px 18px;
  border-bottom: 1px solid var(--color-hellgrau);
}

.dropdown-user-email {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-anthrazit);
  word-break: break-all;
}

.dropdown-content a, .dropdown-content button {
  display: block;
  padding: 10px 18px;
  text-decoration: none;
  color: var(--color-anthrazit);
  font-size: 0.9rem;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-primary);
}

.dropdown-content a:hover, .dropdown-content button:hover {
  background-color: var(--bg-main);
}

.dropdown-content button.logout-btn {
  color: #a94442;
  font-weight: 600;
  border-top: 1px solid var(--color-hellgrau);
  margin-top: 5px;
}

.hamburger-btn {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--color-anthrazit);
  padding: 5px;
}

.mobile-nav {
  display: none;
  position: fixed;
  top: 70px;
  left: 0;
  width: 100%;
  background-color: #ffffff;
  border-bottom: 1px solid var(--color-mittelgrau);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  z-index: 999;
}

.mobile-nav.open {
  display: block;
}

.mobile-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-nav li a {
  display: block;
  padding: 15px 25px;
  text-decoration: none;
  color: var(--color-anthrazit);
  font-weight: 500;
  border-bottom: 1px solid var(--color-hellgrau);
}

.mobile-nav li a.active {
  font-weight: 700;
  background-color: var(--color-hellgrau);
}

.mobile-nav .nav-disabled-mobile {
  display: block;
  padding: 15px 25px;
  color: var(--color-dunkelgrau);
  opacity: 0.5;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--color-hellgrau);
  cursor: not-allowed;
  user-select: none;
}

.content-area {
  margin-top: 70px;
  padding: 40px 30px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 1024px) {
  .desktop-nav {
    display: none;
  }
  .hamburger-btn {
    display: block;
  }
  .btn-website-switch {
    display: none;
  }
}

.profile-card {
  background: #ffffff;
  padding: 25px;
  border-radius: 8px;
  border: 1px solid var(--color-mittelgrau);
  margin-top: 20px;
}

.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  background: var(--color-lindgruen);
  color: var(--color-anthrazit);
  font-weight: bold;
  font-size: 0.8rem;
}

.status-badge.gast {
  background: var(--color-apricot);
}

.wizard-container {
    background: var(--color-hellgrau);
    padding: 20px;
    border-radius: 8px;
    max-width: 500px;
    margin: 0 auto;
}

.wizard-step {
    display: none;
}

.wizard-step.active {
    display: block;
}

.wizard-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 25px;
}

button.btn-secondary {
    padding: 0.75rem;
    background-color: var(--color-mittelgrau);
    color: var(--color-anthrazit);
    border: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

button.btn-secondary:hover {
    background-color: var(--color-dunkelgrau);
    color: white;
}

.todo-item {
    background: #ffffff;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 4px;
    border: 1px solid var(--color-mittelgrau);
}

/* ERINNERUNGS-CHECKBOX OPTIMIERUNG FÜR MOBILE */
.reminder-consent-card {
    background: #ffffff;
    padding: 14px 16px;
    border-radius: 6px;
    border: 1px solid var(--color-mittelgrau);
    margin-bottom: 20px;
}

.reminder-consent-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--color-anthrazit);
    margin: 0;
}

.reminder-consent-checkbox {
    margin-top: 3px;
    width: 20px !important;
    height: 20px !important;
    min-width: 20px;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: var(--color-anthrazit);
}

.success-screen {
    background-color: var(--color-lindgruen);
    padding: 40px 20px;
    text-align: center;
    border-radius: 8px;
    color: var(--color-anthrazit);
}

/* Gamification Badges oben rechts auf den Spielkarten */
.card-header-relative {
  position: relative;
}

.badge-fin-freiheit {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  border-radius: 16px;
  font-size: 0.8rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.08);
}

/* 1x Finanzielle Freiheit: Gelb / CI-Sand */
.badge-level-1 {
  background-color: var(--color-gelb);
  color: var(--color-anthrazit);
  border: 1px solid var(--color-sand);
}

/* 2x Finanzielle Freiheit: Sand-Akzent */
.badge-level-2 {
  background-color: var(--color-sand);
  color: var(--color-anthrazit);
  border: 1px solid #d4b88f;
}

/* 10x+ Finanzielle Freiheit: Gold-Highlighting */
.badge-level-10 {
  background-color: #fff3c4;
  color: #8a6d0b;
  border: 1px solid #ffd700;
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
}

/* =========================================
   SPIEL-EINSTELLUNGEN (KARTEN-DESIGN)
========================================= */
.settings-section {
  background-color: var(--color-hellgrau);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}

.settings-card {
  background-color: #ffffff;
  border: 1px solid var(--color-mittelgrau);
  border-radius: 8px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.settings-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--color-hellgrau);
  padding-bottom: 0.6rem;
}

.settings-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.settings-card label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-dunkelgrau);
  display: block;
  margin-bottom: 0.2rem;
}

.card-footer {
  margin-top: auto;
  padding-top: 0.5rem;
  display: flex;
  justify-content: flex-end;
}

.btn-danger {
  background-color: #c62828;
  color: #ffffff;
  border: none;
  padding: 0.6rem 0.9rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background-color 0.2s;
}

.btn-danger:hover:not(:disabled) {
  background-color: #b71c1c;
}

.btn-danger:disabled {
  background-color: var(--color-hellgrau);
  color: var(--color-dunkelgrau);
  border: 1px solid var(--color-mittelgrau);
  cursor: not-allowed;
  opacity: 0.7;
}

/* =========================================
   MODERATIONS-ZUGANGS-KARTE (SIGNALFARBE)
========================================= */
.card-moderation-access {
  background-color: var(--color-tuerkis);
  border: 2px solid var(--color-sand);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 3px 8px rgba(0,0,0,0.06);
}

.card-moderation-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 0.75rem;
}

.qr-container {
  display: none;
  text-align: center;
  background: #ffffff;
  padding: 1rem;
  border-radius: 8px;
  margin-top: 1rem;
  border: 1px solid var(--color-mittelgrau);
}

.qr-container.show {
  display: block;
}

/* =========================================
   BADGES & ROLLEN
========================================= */
.badge-role {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 700;
}

.role-host { background-color: var(--color-apricot); color: var(--color-anthrazit); }
.role-cohost { background-color: var(--color-sand); color: var(--color-anthrazit); }
.role-moderator { background-color: var(--color-tuerkis); color: var(--color-anthrazit); border: 1px solid var(--color-mittelgrau); }
.role-teilnehmer { background-color: var(--color-hellblau); color: var(--color-anthrazit); }

.player-count-badge {
  display: inline-block;
  background-color: var(--color-hellblau);
  color: var(--color-anthrazit);
  padding: 0.2rem 0.5rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
}

.legend-box {
  background-color: var(--color-tuerkis);
  border-left: 4px solid var(--color-dunkelgrau);
  padding: 1rem 1.25rem;
  border-radius: 6px;
  margin-top: 1.5rem;
  font-size: 0.88rem;
  line-height: 1.5;
}

.legend-box h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  color: var(--color-anthrazit);
}

.legend-list {
  margin: 0;
  padding-left: 1.2rem;
}

.legend-list li {
  margin-bottom: 0.3rem;
}

/* =========================================
   TOAST-BENACHRICHTIGUNGEN (OHNE ALERT)
========================================= */
#toast-container {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 90%;
  max-width: 400px;
  pointer-events: none;
}

.toast {
  padding: 0.85rem 1.2rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-anthrazit);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  justify-content: space-between;
  animation: slideDown 0.3s ease-out forwards;
  pointer-events: auto;
}

.toast-success { background-color: var(--color-lindgruen); border-left: 5px solid #2e4d25; }
.toast-error { background-color: var(--color-apricot); border-left: 5px solid #a94442; }
.toast-info { background-color: var(--color-sand); border-left: 5px solid var(--color-anthrazit); }

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


/* ========================================== */
/* GAMIFICATION & SUCCESS ANIMATIONS          */
/* ========================================== */
@keyframes partyPop {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

.party-pop {
    animation: partyPop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}





.btn-disabled {
  background-color: #d1d5db !important; /* Grauer Hintergrund */
  color: #6b7280 !important;           /* Dezent grauer Text */
  border-color: #d1d5db !important;
  cursor: not-allowed !important;      /* Sperr-Icon beim Drüberfahren */
  opacity: 0.65;
  pointer-events: none;                /* Verhindert Klick-Events */
}

/* ==========================================
   TOAST BENACHRICHTIGUNGEN (Zentrales System)
   ========================================== */
.toast-notification {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    font-size: 0.9rem;
    font-weight: bold;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    pointer-events: none; /* Stört nicht beim Tippen oder Scrollen */
}

/* Erfolgsmeldung (Lindgrün mit dunklem Text) */
.toast-notification.toast-success {
    background-color: var(--color-lindgruen, #c5cdbd);
    color: #1b5e20;
}

/* Fehlermeldung (Apricot mit Anthrazit-Text) */
.toast-notification.toast-error {
    background-color: var(--color-apricot, #ffe6d9);
    color: var(--color-anthrazit, #2f2f33);
    border: 1px solid var(--color-dunkelgrau, #707070);
}

/* Sichtbarer Zustand */
.toast-notification.toast-show {
    opacity: 1;
}


/* In css/style.css */

/* Erfolgs-Zustand für Karten & Container */
.profile-card.card-success {
  border-left-color: var(--color-lindgruen) !important;
  background-color: var(--color-tuerkis) !important; /* Oder dezenter CI-Ton */
}

/* Erfolgs-Text innerhalb von Meldungen */
.text-success {
  color: #1b5e20; /* Dunkles Grün für Barrierefreiheit/Lesbarkeit */
  font-weight: 600;
}