:root {
  --bg-grad-1: #0b1a2b;
  --bg-grad-2: #16314a;
  --text: #f6f7fb;
  --accent: #e63946;   /* Rot */
  --gold: #ffd166;     /* Gold */
  --green: #2a9d8f;    /* Tannengrün */
  --shadow: rgba(0,0,0,.3);
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: linear-gradient(180deg, var(--bg-grad-1), var(--bg-grad-2));
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, sans-serif;
}

a { 
  text-decoration: none;
  color: antiquewhite;
}

.topbar {
  position: sticky; top: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: .75rem 1rem;
  background: rgba(13, 28, 45, .8);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.brand { display: flex; align-items: center; gap: .5rem; }
.logo { height: 36px; width: auto; filter: drop-shadow(0 1px 2px var(--shadow)); }
.site-name { font-weight: 700; text-decoration: none; }

.nav .nav-list { list-style: none; display: flex; gap: 1rem; margin: 0; padding: 0; }
.nav .nav-item { position: relative; }
.nav a {
  color: var(--text); text-decoration: none;
  padding: .5rem .75rem; border-radius: .5rem;
  transition: background .2s ease;
}
.nav a:hover { background: rgba(255,255,255,.08); }

.dropdown {
  position: absolute; right: 0; top: 100%; min-width: 200px;
  background: rgba(13, 28, 45, .95);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: .5rem;
  box-shadow: 0 8px 24px var(--shadow);
  display: none;
}
.dropdown ul { list-style: none; margin: .25rem; padding: .25rem; }
.dropdown li a { display: block; padding: .5rem .75rem; }
.nav-item:hover .dropdown { display: block; }

.map-section { width: 100%; height: calc(100vh - 140px); }
.map { width: 100%; height: 100%; outline: 2px solid rgba(255,255,255,.06); }

.btn {
  display: inline-block;
  padding: .4rem .8rem;
  margin-top: .5rem;
  background: var(--accent);
  color: var(--text);
  text-decoration: none;
  border-radius: .3rem;
  font-weight: 600;
  transition: background .2s ease;
}
.btn:hover {
  background: var(--gold);
  color: #000;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.house-card {
  background: rgba(255,255,255,.08);
  padding: 1rem;
  border-radius: .5rem;
  box-shadow: 0 2px 6px var(--shadow);
}

.filter-controls {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}
select {
  padding: .5rem;
  border-radius: .25rem;
}

.house-list .house-item {
  background: rgba(255,255,255,.05);
  padding: .75rem;
  margin-bottom: .5rem;
  border-radius: .25rem;
}


.footer {
  padding: 1rem;
  background: rgba(13, 28, 45, .8);
  border-top: 1px solid rgba(255,255,255,.08);
  text-align: center;
}

/* Lichterketten-Dekor */
.topbar:after {
  content: "";
  position: absolute; left: 0; right: 0; top: 0; height: 6px;
  background-image: radial-gradient(var(--gold) 24%, transparent 26%), radial-gradient(var(--accent) 24%, transparent 26%);
  background-size: 16px 6px, 24px 6px;
  background-repeat: repeat-x;
  filter: drop-shadow(0 1px 1px rgba(255, 255, 255, .2));
}

/* Zentrierte Container für Login & Register */
.login-page, .register-page, .profile-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 120px); /* Platz für Header/Footer */
  padding: 2rem;
}

.form-card {
  background: rgba(255,255,255,.08);
  padding: 2rem;
  border-radius: .75rem;
  box-shadow: 0 4px 12px var(--shadow);
  max-width: 400px;
  width: 100%;
  text-align: center;
  position: relative;
}

/* Überschrift */
.form-card h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--gold);
  text-shadow: 0 0 6px rgba(255, 209, 102, .6);
}

/* Eingabefelder */
.form-card input {
  width: 100%;
  padding: .6rem .8rem;
  margin: .5rem 0;
  border: none;
  border-radius: .4rem;
  background: rgba(255,255,255,.15);
  color: var(--text);
  font-size: 1rem;
}

.form-card input:focus {
  outline: 2px solid var(--accent);
  background: rgba(255,255,255,.25);
}

/* Button */
.form-card .btn {
  width: 100%;
  margin-top: 1rem;
  padding: .6rem;
  font-size: 1rem;
}

/* Fehlermeldungen */
.error {
  background: rgba(230,57,70,.8);
  color: #fff;
  padding: .5rem;
  border-radius: .3rem;
  margin-bottom: 1rem;
}

/* Spezifische Stile für die Zustimmung zu den Nutzungsbedingungen */
.terms-check {
  display: flex;
  align-items: flex-start; /* Stellt sicher, dass die Box oben am Text ausgerichtet ist */
  text-align: left;
  margin-top: 1rem;
  gap: 0.5rem; /* Abstand zwischen Checkbox und Text */
}
.terms-check input[type="checkbox"] {
  width: auto; /* Hebt die 100% Breite für die Checkbox auf */
  margin-top: 0.2rem; /* Feinjustierung der vertikalen Position */
}

/* Profilseite Formularfelder */
.profile-form-group {
  text-align: left;
  margin-bottom: 1rem;
}

/* Hausdarstellung */
.house-detail {
  display: flex;
  justify-content: center;
  padding: 2rem;
}

.house-card-detail {
  background: rgba(255,255,255,.08);
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 4px 12px var(--shadow);
  max-width: 800px;
  width: 100%;
}

.house-card-detail h2 {
  color: var(--gold);
  text-align: center;
  text-shadow: 0 0 8px rgba(255, 209, 102, .7);
  margin-bottom: 1rem;
}

.house-figure {
  text-align: center;
  margin-bottom: 1.5rem;
}

.house-image {
  max-width: 100%;
  height: auto;
  border-radius: .5rem;
  box-shadow: 0 4px 12px var(--shadow);
}

.house-info {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: .5rem 1rem;
  margin-bottom: 1.5rem;
}

.house-info dt {
  font-weight: bold;
  color: var(--green);
}

.house-description h3 {
  color: var(--accent);
  margin-bottom: .5rem;
}

.house-map {
  margin-top: 2rem;
}

.house-address {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin: 1.5rem 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--green);
}

.house-address span {
  background: rgba(255,255,255,.08);
  padding: .5rem 1rem;
  border-radius: .5rem;
  box-shadow: 0 2px 6px var(--shadow);
}

.house-map {
  margin: 2rem 0;
}

.house-description {
  margin-top: 2rem;
  line-height: 1.6;
}

.house-description h3 {
  color: var(--accent);
  margin-bottom: .5rem;
  text-align: center;
}

/* Haus-Liste im Profil */
.house-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  padding: 1rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.house-list-item:last-child {
  border-bottom: none;
}
.house-list-item h3 { margin: 0; font-size: 1.1rem; }
.house-list-item p { margin: .25rem 0 0; font-size: .9rem; color: #adb5bd; }

@media (max-width: 600px) {
  .house-info {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav .nav-list { gap: .5rem; }
  .site-name { display: none; }
  .house-info {
    grid-template-columns: 1fr;
  }
}

/* --- Forum Styles --- */
.container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.forum-header {
  text-align: center;
  margin-bottom: 2rem;
}

.forum-header h1 {
  color: var(--gold);
  text-shadow: 0 0 8px rgba(255, 209, 102, .7);
}

.category-list {
  background: rgba(255,255,255,.05);
  border-radius: .5rem;
  box-shadow: 0 2px 8px var(--shadow);
  overflow: hidden;
}

.category-list-header, .category-item {
  display: grid;
  grid-template-columns: 3fr 1fr 1fr;
  gap: 1rem;
  padding: 1rem;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.category-list-header {
  font-weight: bold;
  color: var(--accent);
  background: rgba(0,0,0,.1);
}

.category-item:last-child {
  border-bottom: none;
}

.category-item:hover {
  background: rgba(255,255,255,.08);
}

.category-info h3 {
  margin: 0 0 .25rem 0;
}
.category-info h3 a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}
.category-info h3 a:hover {
  color: var(--gold);
}
.category-info p {
  margin: 0;
  font-size: .9rem;
  color: #adb5bd;
}

.category-stats, .category-last-post {
  text-align: center;
  font-size: .9rem;
}

@media (max-width: 768px) {
  .category-list-header { display: none; }
  .category-item { grid-template-columns: 1fr; text-align: center; }
  .category-stats, .category-last-post { display: none; } /* Vereinfacht für Mobile */
}

/* --- Thread List in Category View --- */
.thread-list {
  background: rgba(255,255,255,.05);
  border-radius: .5rem;
  box-shadow: 0 2px 8px var(--shadow);
  overflow: hidden;
  margin-top: 2rem;
}

.thread-list-header, .thread-item {
  display: grid;
  grid-template-columns: 3fr 1.2fr 0.8fr 1.5fr; /* Angepasste Spaltenbreiten */
  gap: 1rem;
  padding: 1rem;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.thread-list-header {
  font-weight: bold;
  color: var(--accent);
  background: rgba(0,0,0,.1);
  text-transform: uppercase;
  font-size: .9rem;
}

.thread-item:last-child {
  border-bottom: none;
}

.thread-item:hover {
  background: rgba(255,255,255,.08);
}

.thread-info h3 {
  margin: 0;
  font-size: 1.1rem;
}
.thread-info h3 a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}
.thread-info h3 a:hover {
  color: var(--gold);
}
.thread-info p { /* For thread description/meta if added */
  margin: .25rem 0 0 0;
  font-size: .85rem;
  color: #adb5bd;
}

.thread-author, .thread-replies, .thread-last-post {
  text-align: center;
  font-size: .9rem;
}

.thread-last-post .date, .thread-last-post .author {
  display: block;
  font-size: .8rem;
  color: #adb5bd;
}
.thread-last-post .author {
  font-weight: 600;
  color: var(--green);
}

/* Responsive adjustments for thread list */
@media (max-width: 768px) {
  .thread-list-header { display: none; }
  .thread-item { grid-template-columns: 1fr; text-align: center; }
  .thread-author, .thread-replies, .thread-last-post { display: block; margin-top: .5rem; }
}

/* --- Thread/Post Ansicht --- */
.breadcrumb {
  margin-bottom: 1.5rem;
  font-size: .9rem;
}
.breadcrumb a {
  color: var(--green);
}
.breadcrumb a:hover {
  text-decoration: underline;
}
.breadcrumb span {
  color: #adb5bd;
}

.thread-header {
  margin-bottom: 2rem;
}

.thread-header h1 {
  margin: 0;
}

.post-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.post-card {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 1.5rem;
  background: rgba(255,255,255,.05);
  border-radius: .5rem;
  box-shadow: 0 2px 8px var(--shadow);
  overflow: hidden;
}

.post-author {
  background: rgba(0,0,0,.1);
  padding: 1.5rem 1rem;
  text-align: center;
  border-right: 1px solid rgba(255,255,255,.08);
}

.post-author .author-name {
  font-weight: bold;
  font-size: 1.1rem;
  color: var(--gold);
}
.post-author .author-role {
  font-size: .8rem;
  color: var(--gold);
}

.post-author .post-date {
  font-size: .8rem;
  color: #adb5bd;
  margin-top: .5rem;
}

.post-content {
  padding: 1.5rem 1rem;
  line-height: 1.6;
  word-wrap: break-word; /* Lange Wörter umbrechen */
}

.post-actions {
  grid-column: 2; /* Ordnet die Aktionen unter dem Inhalt an */
  padding: 0 1rem .75rem 1rem;
  text-align: right;
}

.btn-action, .btn-action-danger {
  display: inline-block;
  padding: .25rem .6rem;
  border: 1px solid transparent;
  border-radius: .3rem;
  font-size: .8rem;
  font-weight: 600;
  text-decoration: none;
  background: rgba(255,255,255,.1);
  color: #adb5bd;
  cursor: pointer;
  transition: all .2s ease;
}

.btn-action:hover {
  background: var(--green);
  color: var(--text);
}
.btn-action-danger {
  background: transparent;
  color: #adb5bd;
}
.btn-action-danger:hover {
  background: var(--accent);
  color: var(--text);
}

@media (max-width: 768px) {
  .post-card { grid-template-columns: 1fr; }
  .post-author { border-bottom: 1px solid rgba(255,255,255,.08); border-right: none; }
}

/* --- Blog Styles --- */
.blog-container {
  max-width: 1000px; /* Etwas schmaler als Forum für bessere Lesbarkeit */
}

.blog-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Responsive Grid */
  gap: 2rem;
  margin-top: 2rem;
}

.blog-card {
  background: rgba(255,255,255,.05);
  border-radius: .5rem;
  box-shadow: 0 2px 8px var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px var(--shadow);
}

.blog-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.blog-card-content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.blog-card-content h2 {
  margin-top: 0;
  font-size: 1.5rem;
}

.blog-card-content h2 a {
  color: var(--text);
  text-decoration: none;
}

.blog-card-content h2 a:hover {
  color: var(--gold);
}

.blog-meta {
  font-size: .85rem;
  color: #adb5bd;
  margin-bottom: 1rem;
}

.blog-card-content p {
  line-height: 1.6;
  margin-bottom: 1rem;
}

.blog-card-content .btn {
  margin-top: auto; /* Button am unteren Rand ausrichten */
  align-self: flex-start; /* Button linksbündig */
}

/* Single Blog Post View */
.blog-detail-card {
  background: rgba(255,255,255,.08);
  padding: 2rem;
  border-radius: .75rem;
  box-shadow: 0 4px 12px var(--shadow);
  margin-top: 2rem;
}

.blog-image-full {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: .5rem;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 2rem;
}
