/* ==========================================================================
   FORUM-ERWEITERUNG (baut auf forum-theme.css / dem MagicHills-Design auf)
   ========================================================================== */

.forum-topbar {
  padding: 1.25rem 1.5rem;
  backdrop-filter: blur(22px);
  background: rgba(9, 8, 21, 0.55);
  border-bottom: 1px solid rgba(255, 139, 55, 0.14);
}

.forum-topbar-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.forum-crumb {
  color: var(--muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  transition: color 0.2s ease;
}

.forum-crumb:hover {
  color: var(--accent);
}

.forum-shell {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
  position: relative;
  z-index: 1;
}

.forum-page-header {
  margin-bottom: 2rem;
}

.forum-page-header .eyebrow {
  margin: 0 0 0.5rem;
}

.forum-page-header h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin: 0;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.forum-page-header p {
  color: var(--muted);
  margin-top: 0.75rem;
}

.forum-list {
  display: grid;
  gap: 1.1rem;
}

.forum-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  padding: 1.6rem 1.8rem;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(20, 18, 46, 0.9), rgba(18, 16, 42, 0.86));
  border: 1px solid var(--border);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.2);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

a.forum-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 60px rgba(164, 93, 255, 0.22);
  border-color: rgba(255, 139, 55, 0.3);
}

.forum-item h2,
.forum-item h3 {
  margin: 0 0 0.4rem;
  color: #ffffff;
  font-size: 1.2rem;
}

.forum-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.forum-item-meta {
  text-align: right;
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
}

.forum-item-meta .highlight {
  color: var(--accent);
  font-weight: 700;
}

.forum-empty {
  padding: 3rem 1.5rem;
  text-align: center;
  border-radius: 26px;
  border: 1px dashed var(--border);
  color: var(--muted);
  font-style: italic;
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: rgba(164, 93, 255, 0.18);
  border: 1px solid rgba(164, 93, 255, 0.4);
  color: var(--muted-strong);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.icon-pill {
  font-size: 0.9rem;
}

/* Beiträge innerhalb eines Themas */
.post-bubble {
  padding: 1.6rem 1.8rem;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(20, 18, 46, 0.9), rgba(18, 16, 42, 0.86));
  border: 1px solid var(--border);
  margin-bottom: 1.1rem;
}

.post-bubble .post-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
  font-size: 0.8rem;
}

.post-bubble .post-author {
  color: var(--accent);
  font-weight: 700;
}

.post-bubble .post-date {
  color: rgba(255, 255, 255, 0.35);
}

.post-bubble .post-message {
  color: var(--text);
  line-height: 1.75;
  white-space: pre-wrap;
  margin: 0;
}

/* Formulare */
.forum-form {
  padding: 2rem;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(20, 18, 46, 0.95), rgba(18, 16, 42, 0.9));
  border: 1px solid var(--border);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.24);
}

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

.form-field label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.form-field input[type="text"],
.form-field textarea {
  width: 100%;
  padding: 0.9rem 1.1rem;
  border-radius: 16px;
  background: rgba(6, 8, 22, 0.7);
  border: 1px solid var(--border);
  color: var(--text);
  font: inherit;
  resize: vertical;
}

.form-field input[type="text"]:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-error {
  padding: 0.9rem 1.1rem;
  border-radius: 16px;
  background: rgba(255, 70, 70, 0.1);
  border: 1px solid rgba(255, 70, 70, 0.35);
  color: #ff9b9b;
  font-size: 0.88rem;
  margin-bottom: 1.1rem;
}

.forum-locked-note {
  padding: 1.2rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed var(--border);
  color: var(--muted);
  text-align: center;
  font-style: italic;
  font-size: 0.9rem;
}

.button-small {
  padding: 0.55rem 1.1rem;
  font-size: 0.82rem;
  min-width: 0;
}

.button-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ==========================================================================
   TEAM-DASHBOARD (layout_team.php + Ticket-/Bewerbungs-Kacheln)
   ========================================================================== */

.dash-shell {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
  position: relative;
  z-index: 1;
}

.dash-header {
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(20, 18, 46, 0.92), rgba(15, 13, 36, 0.92));
  border: 1px solid var(--border);
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  margin-bottom: 2.5rem;
}

.dash-header-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.75rem 1.75rem 1.1rem;
}

.dash-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.75rem 1.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.dash-nav-divider {
  width: 1px;
  height: 1.4rem;
  background: var(--border);
  margin: 0 0.25rem;
}

.dash-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem;
  align-items: flex-start;
}

.dash-main {
  flex: 1 1 620px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.dash-aside {
  flex: 0 1 340px;
  min-width: 280px;
}

.dash-section-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.4rem;
}

.dash-section-header h2 {
  font-size: 1.25rem;
  margin: 0;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dash-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.1rem;
}

.dash-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.1rem;
}

.dash-card {
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(20, 18, 46, 0.88), rgba(18, 16, 42, 0.85));
  border: 1px solid var(--border);
  padding: 1.1rem 1.2rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

a.dash-card:hover {
  border-color: rgba(255, 139, 55, 0.35);
  transform: translateY(-2px);
}

.dash-card-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
}

.progress-track {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  border: 1px solid var(--border);
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s ease;
}

.roster-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.7rem 1.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.82rem;
}

.roster-row:last-child {
  border-bottom: none;
}

.roster-row.is-me {
  background: rgba(255, 139, 55, 0.08);
}

.dash-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.dash-table th {
  text-align: left;
  padding: 0.6rem 0.9rem;
  color: var(--muted);
  text-transform: uppercase;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border);
}

.dash-table td {
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.dash-table tr:last-child td {
  border-bottom: none;
}

/* MagicHills-Style-Overrides für das Team-Dashboard - werden NUR anstelle der
   Tailwind-Farb-/Rahmen-/Rundungs-Klassen eingesetzt, die Layout-Klassen
   (flex/grid/gap/padding) bleiben unangetastet. */
.mh-panel {
  background: linear-gradient(180deg, rgba(34, 30, 66, 0.97), rgba(26, 23, 54, 0.97)) !important;
  border: 1px solid var(--border) !important;
  border-radius: 22px !important;
}

.mh-panel-soft {
  background: rgba(34, 30, 66, 0.7) !important;
  border: 1px solid var(--border) !important;
  border-radius: 16px !important;
}

.mh-card {
  background: linear-gradient(180deg, rgba(36, 32, 70, 0.96), rgba(28, 25, 58, 0.94)) !important;
  border: 1px solid var(--border) !important;
  border-radius: 18px !important;
}

.mh-card:hover {
  border-color: rgba(255, 139, 55, 0.35) !important;
}

.mh-surface {
  background: rgba(6, 8, 22, 0.6) !important;
  border-color: var(--border) !important;
}

.mh-border { border-color: var(--border) !important; }
.mh-text-accent { color: var(--accent) !important; }
.mh-text-accent-strong { color: #c9a8ff !important; }
.mh-text-muted { color: var(--muted) !important; }
.mh-text-body { color: var(--text) !important; }
.mh-badge {
  background: rgba(164, 93, 255, 0.14) !important;
  border: 1px solid rgba(164, 93, 255, 0.35) !important;
  color: #c9a8ff !important;
}
.mh-btn-primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-strong)) !important;
  border: none !important;
  color: #fff !important;
}
.mh-btn-primary:hover { filter: brightness(1.08); }

@media (max-width: 640px) {
  .forum-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .forum-item-meta {
    text-align: left;
  }

  .dash-columns {
    flex-direction: column;
  }

  .dash-aside {
    flex-basis: auto;
    width: 100%;
  }
}

/* Account-Dropdown (natives <details>/<summary>, kein JavaScript nötig) */
.account-menu {
  position: relative;
  outline: none;
}

.account-menu summary {
  cursor: pointer;
  list-style: none;
}

.account-menu summary::-webkit-details-marker {
  display: none;
}

.account-menu summary::marker {
  content: "";
}

.account-dropdown {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 0.6rem;
  min-width: 190px;
  background: linear-gradient(180deg, rgba(20, 18, 46, 0.98), rgba(15, 13, 36, 0.98));
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
  padding: 0.5rem;
  z-index: 9999;
}

.account-dropdown a {
  display: block;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  color: var(--text);
  font-size: 0.88rem;
  white-space: nowrap;
  transition: background 0.15s ease;
}

.account-dropdown a:hover {
  background: rgba(255, 255, 255, 0.06);
}

.account-dropdown a.danger {
  color: #ff9b9b;
}

.account-menu-simple {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

/* Forum-Hero: Text direkt auf dem Hintergrund statt in einer schwebenden Karte */
.hero-content-plain {
  background: none;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  padding: 2rem 2.5rem;
}

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,500;0,9..144,600;1,9..144,500&display=swap');

.forum-hero {
  position: relative;
  padding: 2.5rem 0 1.5rem;
  margin-bottom: 1.5rem;
}

.forum-hero::before {
  content: "";
  position: absolute;
  top: -3rem;
  left: 50%;
  transform: translateX(-50%);
  width: 520px;
  height: 260px;
  max-width: 90vw;
  background: radial-gradient(ellipse at center, rgba(255, 139, 55, 0.22), rgba(164, 93, 255, 0.14) 55%, transparent 75%);
  filter: blur(10px);
  z-index: -1;
  animation: forum-glow-breathe 7s ease-in-out infinite;
}

@keyframes forum-glow-breathe {
  0%, 100% { opacity: 0.75; transform: translateX(-50%) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.06); }
}

@media (prefers-reduced-motion: reduce) {
  .forum-hero::before { animation: none; }
}

.forum-hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.forum-hero .eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px 2px rgba(255, 139, 55, 0.7);
}

.forum-hero h1 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0.3rem 0 0.9rem;
}

.forum-hero h1 em {
  font-style: italic;
  font-weight: 500;
  background: linear-gradient(120deg, var(--accent), var(--accent-strong));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.forum-hero p.hero-sub {
  max-width: 560px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
  margin: 0 0 1.6rem;
}

/* Schwebende Lichtpartikel im Hero - dezenter Magie-Akzent */
.forum-motes {
  position: absolute;
  inset: -2rem 0 auto 0;
  height: 220px;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.forum-motes span {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px 2px rgba(255, 139, 55, 0.6);
  opacity: 0;
  animation: mote-drift 6s ease-in infinite;
}

.forum-motes span:nth-child(1) { left: 8%;  animation-delay: 0s;   background: var(--accent); box-shadow: 0 0 6px 2px rgba(255,139,55,0.6); }
.forum-motes span:nth-child(2) { left: 22%; animation-delay: 1.4s; background: #a450ff; box-shadow: 0 0 6px 2px rgba(164,80,255,0.6); }
.forum-motes span:nth-child(3) { left: 38%; animation-delay: 2.8s; background: var(--accent); box-shadow: 0 0 6px 2px rgba(255,139,55,0.6); }
.forum-motes span:nth-child(4) { left: 55%; animation-delay: 0.7s; background: #5b9fff; box-shadow: 0 0 6px 2px rgba(91,159,255,0.6); }
.forum-motes span:nth-child(5) { left: 71%; animation-delay: 3.6s; background: #a450ff; box-shadow: 0 0 6px 2px rgba(164,80,255,0.6); }
.forum-motes span:nth-child(6) { left: 86%; animation-delay: 2s;   background: var(--accent); box-shadow: 0 0 6px 2px rgba(255,139,55,0.6); }

@keyframes mote-drift {
  0%   { transform: translateY(40px); opacity: 0; }
  15%  { opacity: 0.9; }
  85%  { opacity: 0.4; }
  100% { transform: translateY(-160px); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .forum-motes span { animation: none; opacity: 0; }
}

/* Aktivitäts-Feed: zeigt, dass im Dorf tatsächlich was los ist */
.activity-feed {
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(20, 18, 46, 0.7), rgba(15, 13, 34, 0.7));
  overflow: hidden;
}

.activity-row {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  padding: 1rem 1.3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  text-decoration: none;
  transition: background 0.2s ease;
}

.activity-row:last-child { border-bottom: none; }
a.activity-row:hover { background: rgba(255, 255, 255, 0.035); }

.activity-dot {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 0.35rem;
  background: var(--dot-color, var(--accent));
  box-shadow: 0 0 8px 1px var(--dot-color, var(--accent));
}

.activity-body {
  flex: 1;
  min-width: 0;
}

.activity-body .activity-title {
  color: #fff;
  font-weight: 600;
  font-size: 0.92rem;
  margin: 0 0 0.2rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-body .activity-meta {
  font-size: 0.76rem;
  color: var(--muted);
}

.activity-body .activity-meta strong {
  color: var(--accent);
  font-weight: 600;
}

.activity-time {
  flex-shrink: 0;
  font-size: 0.7rem;
  color: var(--muted);
  white-space: nowrap;
  padding-top: 0.1rem;
}

.category-section-label {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 2.2rem 0 1.1rem;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
}

.category-section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border), transparent);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.category-card {
  --cat-color: var(--accent);
  position: relative;
  display: flex;
  gap: 1rem;
  padding: 1.4rem 1.5rem;
  border-radius: 20px;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0) 40%),
              linear-gradient(180deg, rgba(20, 18, 46, 0.92), rgba(15, 13, 34, 0.92));
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(.2,.8,.2,1), border-color 0.25s ease, box-shadow 0.25s ease;
}

.category-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--cat-color);
  opacity: 0.85;
}

a.category-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--cat-color) 55%, var(--border));
  box-shadow: 0 20px 45px -18px color-mix(in srgb, var(--cat-color) 60%, transparent);
}

.category-icon {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--cat-color) 45%, transparent), color-mix(in srgb, var(--cat-color) 12%, transparent) 70%);
  border: 1px solid color-mix(in srgb, var(--cat-color) 45%, var(--border));
  box-shadow: 0 0 16px -4px color-mix(in srgb, var(--cat-color) 70%, transparent);
}

.category-card-body {
  flex: 1;
  min-width: 0;
}

.category-card-body h2 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  margin: 0 0 0.3rem;
  font-size: 1.08rem;
  color: #fff;
}

.category-card-body p.category-desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.83rem;
  line-height: 1.5;
}

.category-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.85rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.7rem;
  color: var(--muted);
}

.category-card-footer .highlight {
  color: var(--cat-color);
  font-weight: 700;
}
