/* MeetYou - Modernes, mobiles PWA-Stylesheet */

:root {
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-light: rgba(99, 102, 241, 0.15);
  --secondary: #ec4899;
  --bg-main: #0b0f19;
  --bg-card: #151c2e;
  --bg-card-hover: #1e2842;
  --bg-input: #0e1424;
  --border: #263352;
  --border-focus: #6366f1;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --bubble-me: #4f46e5;
  --bubble-other: #1e293b;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  --bottom-nav-height: 64px;
  --header-height: 60px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font);
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* App Container */
#app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  position: relative;
}

#mainContainer {
  max-width: 850px;
  margin: 0 auto;
  width: 100%;
}

/* Header */
.app-header {
  position: sticky;
  top: 0;
  height: var(--header-height);
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 40;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.header-title-box {
  display: flex;
  flex-direction: column;
}

.header-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.header-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Icons & Buttons */
.btn-icon {
  background: transparent;
  border: none;
  color: var(--text-main);
  padding: 8px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-icon:hover {
  background: var(--bg-card-hover);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

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

.btn-secondary {
  background: var(--bg-card-hover);
  color: var(--text-main);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--border);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.3);
}

.btn-sm {
  padding: 6px 10px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

.btn-full {
  width: 100%;
}

/* Tabs & Bottom Navigation */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav-height);
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  max-width: 850px;
  margin: 0 auto;
  z-index: 50;
  padding-bottom: env(safe-area-inset-bottom);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  height: 100%;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 11px;
  font-weight: 500;
  gap: 4px;
  cursor: pointer;
  transition: color 0.15s;
  position: relative;
}

.nav-item.active {
  color: var(--primary);
}

.nav-item svg {
  width: 22px;
  height: 22px;
}

.nav-badge {
  position: absolute;
  top: 6px;
  right: calc(50% - 16px);
  background: var(--secondary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 10px;
}

/* Main View Area */
.view-container {
  flex: 1;
  padding: 16px;
  padding-bottom: calc(var(--bottom-nav-height) + 24px);
}

/* View: Groups List */
.groups-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.groups-title {
  font-size: 24px;
  font-weight: 800;
}

.group-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s, background 0.15s;
  display: flex;
  align-items: center;
  gap: 16px;
}

.group-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.group-avatar {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
}

.group-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.group-info {
  flex: 1;
  min-width: 0;
}

.group-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.group-snippet {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.group-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.group-members-badge {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

/* View: Chat */
.chat-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--header-height) - var(--bottom-nav-height));
  margin: -16px;
}

.chat-channels-bar {
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.6);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}
.chat-channels-bar::-webkit-scrollbar {
  display: none;
}

.channel-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}
.channel-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-main);
}
.channel-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}
.channel-pill-count {
  background: rgba(255, 255, 255, 0.25);
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 10px;
  font-weight: 700;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-bubble-row {
  display: flex;
  gap: 10px;
  max-width: 82%;
  position: relative;
}

.chat-bubble-row.me {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.chat-bubble-row.other {
  align-self: flex-start;
}

.sender-avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  background: #334155;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}

.sender-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-bubble {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 14px;
  line-height: 1.45;
  position: relative;
  word-break: break-word;
}

.chat-bubble-row.me .chat-bubble {
  background: var(--bubble-me);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chat-bubble-row.other .chat-bubble {
  background: var(--bubble-other);
  color: var(--text-main);
  border-bottom-left-radius: 4px;
  border: 1px solid var(--border);
}

.chat-sender-name {
  font-size: 11px;
  font-weight: 700;
  color: #a5b4fc;
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.chat-sender-note {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 400;
}

.chat-text {
  margin-bottom: 4px;
}

.chat-media-preview {
  margin-top: 6px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  max-width: 280px;
  cursor: pointer;
}

.chat-media-preview img {
  width: 100%;
  display: block;
  object-fit: cover;
  max-height: 250px;
  border-radius: var(--radius-sm);
}

.chat-bubble-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  font-size: 10px;
  opacity: 0.8;
  margin-top: 2px;
}

.chat-edited-tag {
  font-style: italic;
  font-size: 9px;
  opacity: 0.75;
}

.chat-actions-menu {
  display: none;
  position: absolute;
  top: -12px;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 2px 6px;
  gap: 4px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.chat-bubble-row.me:hover .chat-actions-menu {
  display: flex;
}

.chat-action-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  cursor: pointer;
  padding: 3px;
  border-radius: 4px;
}

.chat-action-btn:hover {
  color: #fff;
}

/* Chat Input Bar */
.chat-input-bar {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

.chat-input-bar input[type="text"] {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 10px 16px;
  color: #fff;
  font-size: 14px;
  outline: none;
}

.chat-input-bar input[type="text"]:focus {
  border-color: var(--primary);
}

.upload-btn-label {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  padding: 6px;
  border-radius: var(--radius-full);
  transition: color 0.15s;
}

.upload-btn-label:hover {
  color: var(--primary);
}

/* View: Termine & Abstimmungen */
.polls-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.poll-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.poll-cover {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: #1e293b;
  display: block;
}

.poll-content {
  padding: 20px;
}

.poll-badge-status {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-open {
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.4);
}

.status-decided {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.poll-title {
  font-size: 19px;
  font-weight: 800;
  margin-bottom: 6px;
}

.poll-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 18px;
}

.poll-option-row {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 12px;
}

.poll-option-row.is-winner {
  border-color: var(--success);
  background: rgba(16, 185, 129, 0.08);
}

.option-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.option-title {
  font-size: 15px;
  font-weight: 700;
}

.option-location {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.vote-counts {
  display: flex;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
}

.count-yes { color: var(--success); }
.count-maybe { color: var(--warning); }
.count-no { color: var(--danger); }

.vote-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}

.vote-btn-group {
  display: flex;
  gap: 6px;
}

.btn-vote {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-vote.active-yes {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
}

.btn-vote.active-maybe {
  background: var(--warning);
  color: #000;
  border-color: var(--warning);
}

.btn-vote.active-no {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}

.plus-one-selector {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.plus-one-selector select {
  background: var(--bg-card);
  color: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 12px;
}

.voters-preview {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-muted);
}

/* View: Fotogalerie */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
}

.gallery-item {
  aspect-ratio: 1/1;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 6px 8px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  font-size: 11px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* View: Mitglieder & Stammbaum */
.members-stat-bar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.member-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.member-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.member-details {
  display: flex;
  flex-direction: column;
}

.member-name {
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.member-sub {
  font-size: 12px;
  color: #a5b4fc;
}

.member-tree {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 2px;
}

/* Modals */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 99999;
  justify-content: center;
  align-items: center;
  padding: 16px;
}

.modal-overlay.active {
  display: flex !important;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
}

.form-group {
  margin-bottom: 16px;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

input[type="text"], input[type="email"], input[type="password"], textarea, select {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--primary);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-main);
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

/* Lightbox Modal */
.lightbox-modal {
  max-width: 90vw;
  max-height: 90vh;
  background: transparent;
  border: none;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.lightbox-modal img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: var(--radius-md);
  object-fit: contain;
}

/* Toast Notifications */
#toastContainer {
  position: fixed;
  bottom: 75px;
  left: 50%;
  transform: translateX(-50%);
  /* MUSS ueber den Fenstern liegen (.modal-overlay hat 99999). Sonst
     erscheinen Fehlermeldungen dahinter und der Nutzer sieht nichts -
     genau so blieb "Zu viele fehlerhafte Anmeldeversuche" unsichtbar. */
  z-index: 100000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: #1e293b;
  border: 1px solid var(--border);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  animation: fadeInOut 3s forwards;
}

@keyframes fadeInOut {
  0% { opacity: 0; transform: translateY(10px); }
  15% { opacity: 1; transform: translateY(0); }
  85% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-10px); }
}

/* Utilities */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}
.empty-state svg {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  color: var(--text-dim);
}

/* ==================== LANDING PAGE STYLES ==================== */
.landing-wrapper {
  width: 100%;
  padding: 0 16px 60px;
  position: relative;
  background: 
    radial-gradient(circle at 10% 8%, rgba(99, 102, 241, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 90% 20%, rgba(236, 72, 153, 0.1) 0%, transparent 35%),
    radial-gradient(circle at 50% 60%, rgba(16, 185, 129, 0.07) 0%, transparent 50%);
}

.landing-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 36px;
  flex-wrap: wrap;
  gap: 16px;
}

.landing-logo-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.landing-logo-img {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
}

.landing-logo-text {
  font-size: 22px;
  font-weight: 800;
  background: linear-gradient(135deg, #6366f1, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.landing-logo-badge {
  font-size: 11px;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-weight: 700;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.landing-hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
  margin-bottom: 60px;
}

@media (max-width: 880px) {
  .landing-hero {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-actions, .hero-checklist {
    justify-content: center;
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid var(--primary);
  color: #c7d2fe;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 18px;
}

.hero-title {
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.15;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 18px;
  letter-spacing: -0.02em;
}

.hero-gradient {
  background: linear-gradient(135deg, #818cf8 0%, #f472b6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.hero-checklist {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 13px;
  color: #94a3b8;
}
.hero-checklist-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hero-img-box {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 25px 60px -10px rgba(0,0,0,0.7);
  background: #111827;
}

.hero-img-box img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.hero-img-box:hover img {
  transform: scale(1.02);
}

.floating-chip {
  position: absolute;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 10px 16px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Auth Card Wrapper */
.auth-card-anchor {
  scroll-margin-top: 40px;
  max-width: 480px;
  margin: 0 auto 70px;
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px 26px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  position: relative;
}

.auth-tab-bar {
  display: flex;
  background: var(--bg-input);
  padding: 4px;
  border-radius: var(--radius-md);
  margin-bottom: 22px;
  gap: 4px;
}

.auth-tab-btn {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 13px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}
.auth-tab-btn.active {
  background: var(--primary);
  color: #fff;
}

/* Features Grid */
.features-section {
  margin-bottom: 70px;
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 8px;
}

.section-sub {
  font-size: 15px;
  color: var(--text-muted);
}

.feature-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: transform 0.2s, border-color 0.2s;
}
.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
}

.feature-icon {
  font-size: 34px;
  margin-bottom: 14px;
}

.feature-heading {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-main);
}

.feature-text {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
}

/* 3-Schritte Grid */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 70px;
}

.step-card {
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
}

.step-number {
  display: inline-flex;
  width: 38px;
  height: 38px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  margin-bottom: 14px;
}

/* Vergleichstabelle */
.compare-table-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin-bottom: 70px;
}

table.compare-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}
table.compare-table th {
  background: rgba(21, 28, 46, 0.9);
  padding: 14px 16px;
  font-weight: 700;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
table.compare-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(38, 51, 82, 0.5);
  vertical-align: middle;
}
table.compare-table tr:last-child td {
  border-bottom: none;
}

.check-yes { color: #34d399; font-weight: 700; }
.check-no { color: #f87171; font-weight: 700; }

.landing-footer {
  border-top: 1px solid var(--border);
  padding: 36px 0 20px;
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.8;
}

/* ==================== LANDING SHOWCASE, USECASES & FAQ ==================== */
.landing-showcase-section {
  margin-bottom: 70px;
}
.mockup-container {
  max-width: 680px;
  margin: 0 auto;
}
.mockup-frame {
  background: var(--bg-card);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 20px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6), 0 0 35px rgba(99, 102, 241, 0.15);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.mockup-header {
  background: rgba(15, 23, 42, 0.9);
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.mockup-tabs-bar {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  background: var(--bg-input);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}
.mockup-tab-pill {
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.mockup-tab-pill:hover {
  color: #fff;
  border-color: var(--primary);
}
.mockup-tab-pill.active {
  background: rgba(99, 102, 241, 0.25);
  color: #c7d2fe;
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}
.mockup-screen-content {
  padding: 20px;
  min-height: 180px;
  background: rgba(11, 15, 25, 0.6);
}
.mockup-poll-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
}

/* Use Cases Grid */
.usecases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.usecase-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.usecase-card:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.5);
}
.usecase-tag {
  font-size: 12px;
  font-weight: 700;
  color: #a5b4fc;
  margin-bottom: 10px;
  display: inline-block;
}
.usecase-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 10px;
  line-height: 1.4;
}
.usecase-text {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* FAQ Accordion */
.faq-container {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.2s ease;
}
.faq-item[open] {
  border-color: var(--primary);
}
.faq-question {
  padding: 16px 20px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}
.faq-question::-webkit-details-marker {
  display: none;
}
.faq-question::after {
  content: "＋";
  font-size: 16px;
  color: var(--primary);
  font-weight: bold;
  transition: transform 0.2s ease;
}
.faq-item[open] .faq-question::after {
  content: "－";
  transform: rotate(180deg);
}
.faq-answer {
  padding: 0 20px 18px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.65;
  border-top: 1px solid rgba(38, 51, 82, 0.4);
  padding-top: 12px;
}

/* ==================== OPTION A: CHAT KANÄLE & SPEICHER-SYSTEM ==================== */
.chat-channels-bar {
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}
.chat-channels-bar::-webkit-scrollbar {
  display: none;
}

.channel-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-input);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.channel-pill:hover {
  color: #fff;
  border-color: var(--primary);
}
.channel-pill.active {
  background: rgba(99, 102, 241, 0.2);
  color: #c7d2fe;
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.25);
}
.channel-pill-count {
  background: rgba(0, 0, 0, 0.35);
  padding: 1px 6px;
  border-radius: var(--radius-full);
  font-size: 10px;
}

/* Speicherbalken & Galerie-Management */
.storage-bar-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
}
.storage-progress-track {
  width: 100%;
  height: 8px;
  background: var(--bg-input);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}
.storage-progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, #10b981, #6366f1);
  transition: width 0.3s ease, background 0.3s ease;
}
.storage-progress-fill.warning {
  background: linear-gradient(90deg, #f59e0b, #ef4444);
}

.gallery-delete-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.85);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  cursor: pointer;
  opacity: 0.9;
  transition: all 0.15s ease;
  z-index: 5;
}
.gallery-delete-btn:hover {
  opacity: 1;
  transform: scale(1.1);
  background: #ef4444;
}

.gallery-source-tag {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  color: #cbd5e1;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 4;
}

/* Vergangener Termin Box & Badges */
.status-past {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.poll-past-box {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ==================== LEGAL & PRIVACY MODALS ==================== */
.modal.legal-modal {
  max-width: 680px;
}
.legal-content h4 {
  color: var(--text-main);
  font-size: 14px;
  font-weight: 700;
  margin: 16px 0 6px;
}
.legal-content p, .legal-content li {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 8px;
}
.legal-content ul {
  padding-left: 20px;
  margin-bottom: 10px;
}

/* ==================== MITBRINGLISTE & PARTY-MANAGER ==================== */
.potluck-section {
  margin-top: 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.potluck-header {
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  background: rgba(30, 41, 59, 0.4);
  transition: background 0.15s;
  user-select: none;
}
.potluck-header:hover {
  background: rgba(30, 41, 59, 0.7);
}
.potluck-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
}
.potluck-badge.all-done {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}
.potluck-arrow {
  font-size: 11px;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}
.potluck-arrow.open {
  transform: rotate(180deg);
}
.potluck-body {
  padding: 14px;
  border-top: 1px solid var(--border);
}
.potluck-item-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  gap: 12px;
  flex-wrap: wrap;
}
.potluck-item-row.is-complete {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.05);
}
.potluck-item-title {
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-main);
}
.potluck-claims-list {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.45;
}
.potluck-claims-list strong {
  color: #cbd5e1;
}
.potluck-claim-chip {
  display: inline-block;
  background: rgba(99, 102, 241, 0.15);
  color: #c7d2fe;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  margin-right: 4px;
  margin-top: 2px;
}
.potluck-add-form {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  flex-wrap: wrap;
}
.potluck-add-form input {
  flex: 1;
  min-width: 140px;
}
.potluck-add-form select {
  width: 75px;
}
.potluck-status-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}
.potluck-status-tag.complete {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}
.potluck-status-tag.partial {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}
.potluck-status-tag.needed {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

/* Mitbringliste: Fortschrittsanzeige & Filter */
.potluck-progress-box {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin-bottom: 12px;
}
.potluck-progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  margin-bottom: 4px;
  color: var(--text-muted);
}
.potluck-progress-labels strong {
  color: var(--text-main);
}
.potluck-progress-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}
.potluck-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #10b981);
  border-radius: 999px;
  transition: width 0.3s ease;
}
.potluck-filter-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
}
.potluck-filter-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.potluck-filter-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}
.potluck-filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

/* Event-Countdown & Kalender (.ics) */
.poll-countdown-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
  margin-left: 6px;
  vertical-align: middle;
}
.poll-countdown-badge.today {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.4);
  animation: pulse 2s infinite;
}
.poll-countdown-badge.past {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-dim);
  border-color: var(--border);
}
.opt-ics-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: var(--primary);
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 4px;
  padding: 2px 7px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
}
.opt-ics-btn:hover {
  background: rgba(99, 102, 241, 0.25);
  color: #c7d2fe;
}


/* ==================== DEMO-HINWEIS ====================
   Gehoert zum Demo-Modus. Wird nur sichtbar, wenn js/demo.js das Attribut
   hidden entfernt - und das tut es nur, wenn der Server den Demo-Modus
   meldet. Abschalten in config/config.php ('demo' => 'aktiv' => false).
   Diese Regeln koennen dann folgenlos stehen bleiben. */
.demo-banner {
  /* BEWUSST NICHT sticky: Die App-Kopfzeile klebt selbst oben (top: 0).
     Zwei klebende Leisten an derselben Stelle wuerden sich ueberdecken.
     Der Balken steht darum ganz oben und scrollt weg - drinnen in der App
     uebernimmt das kleine Zeichen in der Kopfzeile (.demo-chip). */
  position: relative;
  z-index: 9000; /* ueber der Seite, aber unter den Fenstern (99999) */
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  padding: 9px 16px;
  background: linear-gradient(90deg, #b45309 0%, #92400e 100%);
  color: #fff7ed;
  font-size: 13px;
  line-height: 1.45;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.demo-banner strong {
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 12px;
  white-space: nowrap;
}

/* Der pulsierende Punkt macht klar: hier ist etwas anders als sonst. */
.demo-banner-punkt {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #fde68a;
  flex-shrink: 0;
  animation: demoPuls 2s ease-in-out infinite;
}

@keyframes demoPuls {
  0%, 100% { opacity: 1;   transform: scale(1); }
  50%      { opacity: 0.4; transform: scale(0.75); }
}

/* Wer Bewegung nicht mag oder braucht, bekommt sie nicht. */
@media (prefers-reduced-motion: reduce) {
  .demo-banner-punkt { animation: none; }
}

@media (max-width: 560px) {
  .demo-banner { font-size: 12px; padding: 8px 12px; gap: 7px; }
}

/* Kleines Zeichen in der App-Kopfzeile, damit der Demo-Zustand auch dann
   sichtbar bleibt, wenn der Balken nach oben weggescrollt ist. */
.demo-chip {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: #b45309;
  color: #fff7ed;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  vertical-align: middle;
}
