/* ==========================================================================
   1. GLOBALE STYLES & LAYOUT
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
}

body {
  background-color: #eff1f2;
  color: #242629;
  padding-bottom: 50px;
}

.container {
  max-width: 950px;
  margin: 25px auto;
  padding: 0 15px;
}

/* ==========================================================================
   2. HEADER & NAVIGATION (ZENTRAL)
   ========================================================================== */
header {
  background-color: #ffffff;
  border-bottom: 1px solid #e3e5e6;
  padding: 12px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: "Arial Black", "Impact", "Arial Bold", sans-serif;
  font-size: 24px;
  font-weight: 900;
  color: #0c1d33;
  text-decoration: none;
  text-transform: lowercase;
  letter-spacing: -1px;
}

.logo-area span {
  color: #319f1a;
  margin-left: -5px;
}

.logo-area img {
  height: 32px;
  width: auto;
  object-fit: contain;
}

.menu-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid #d1d5db;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.search-bar {
  flex-grow: 1;
  max-width: 500px;
  position: relative;
  display: flex;
  align-items: center;
}

.search-bar input {
  width: 100%;
  padding: 10px 16px 10px 40px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background-color: #f6f7f8;
  font-size: 15px;
  outline: none;
}

.search-bar::before {
  content: "🔍";
  position: absolute;
  left: 15px;
  font-size: 14px;
  color: #7a7e85;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 25px;
  font-size: 14px;
  font-weight: 600;
  color: #18191c;
}

.header-icon-link {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.beitrag-btn {
  background-color: #ffffff;
  color: #2da01c;
  border: 2px solid #2da01c;
  padding: 8px 18px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.1s ease;
}

.beitrag-btn:hover {
  background-color: #f3faf2;
}

.sub-nav {
  background-color: #ffffff;
  border-bottom: 1px solid #e3e5e6;
  padding: 10px 40px;
  display: flex;
  gap: 20px;
  font-size: 14px;
  font-weight: 600;
  color: #55585d;
}

.sub-nav span {
  cursor: pointer;
}

.sub-nav span:hover {
  color: #2da01c;
}

/* ==========================================================================
   3. STARTSEITE: FILTER & DEAL-KARTEN
   ========================================================================== */
.filter-bar {
  background-color: #ffffff;
  padding: 15px 40px 0 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e3e5e6;
}

.filter-tabs {
  display: flex;
  gap: 25px;
  font-size: 14px;
  font-weight: 700;
  color: #7a7e85;
}

.filter-tabs .active {
  color: #2da01c;
  border-bottom: 3px solid #2da01c;
  padding-bottom: 12px;
}

.filter-btn {
  border: 1px solid #d1d5db;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  margin-bottom: 8px;

  /* NEU: Verhindert typische Link-Formtierungen */
  text-decoration: none;
  color: #18191c;
}

.filter-btn:hover {
  background-color: #f6f7f8;
  border-color: #b9bec5;
}

.deal-card {
  background: white;
  border: 1px solid #e3e5e6;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 14px;
  display: flex;
  gap: 20px;
}

.deal-card.highlight {
  border-left: 4px solid #2da01c;
}

.deal-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 140px;
}

.deal-image {
  width: 130px;
  height: 130px;
  background-color: #ffffff;
  border: 1px solid #e3e5e6;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  overflow: hidden;
}

.temp-box {
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 15px;
  border-radius: 15px;
  padding: 3px 12px;
}

.temp-hot {
  color: #ff5050;
  background-color: #fff1f1;
}

.temp-cold {
  color: #0076df;
  background-color: #f0f7ff;
}

.deal-main {
  flex-grow: 1;
}

.deal-title {
  font-size: 19px;
  font-weight: 700;
  color: #18191c;
  margin-bottom: 6px;
  text-decoration: none;
  display: block;
  line-height: 1.3;
}

.deal-title:hover {
  color: #2da01c;
}

.deal-meta {
  font-size: 12px;
  color: #7a7e85;
  margin-bottom: 12px;
}

.deal-meta b {
  color: #3e4147;
}

.deal-description {
  font-size: 14px;
  line-height: 1.5;
  color: #5d6168;
}

.deal-right {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  min-width: 170px;
  border-left: 1px solid #f0f1f2;
  padding-left: 20px;
}

.price-container {
  text-align: right;
  width: 100%;
}

.current-price {
  font-size: 24px;
  font-weight: 800;
  color: #2da01c;
}

.old-price {
  font-size: 13px;
  color: #7a7e85;
  text-decoration: line-through;
  display: block;
}

.deal-btn {
  background-color: #2da01c;
  color: white;
  padding: 12px 16px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  text-align: center;
  width: 100%;
}

.deal-btn:hover {
  transform: scale(1.02);
}

/* ==========================================================================
   4. DETAILSEITE (REVEAL BOX & KOMMENTARE)
   ========================================================================== */
.back-link {
  display: inline-block;
  margin-bottom: 15px;
  color: #0076df;
  text-decoration: none;
  font-size: 14px;
  font-weight: bold;
}

.reveal-box {
  background: white;
  border: 1px solid #ff5050;
  border-radius: 8px;
  padding: 40px 30px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(255, 80, 80, 0.08);
  margin-bottom: 25px;
}

.badge {
  background-color: #ff5050;
  color: white;
  font-weight: bold;
  text-transform: uppercase;
  font-size: 12px;
  padding: 5px 14px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 20px;
}

.reveal-box h1 {
  font-size: 26px;
  color: #18191c;
  margin-bottom: 20px;
}

.divider {
  height: 1px;
  background: #e3e5e6;
  margin: 25px 0;
}

.gift-text {
  font-size: 17px;
  line-height: 1.7;
  color: #3e4147;
}

.comment-section {
  background: white;
  border: 1px solid #e3e5e6;
  border-radius: 8px;
  padding: 24px;
}

.comment-section h3 {
  font-size: 18px;
  margin-bottom: 20px;
  border-bottom: 2px solid #eff1f2;
  padding-bottom: 12px;
}

.comment {
  display: flex;
  gap: 15px;
  padding: 16px 0;
}

.avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background-color: #f1f3f5;
  color: #7a7e85;
  flex-shrink: 0;
  overflow: hidden; /* Schneidet überstehende Ränder von quadratischen Bildern rund ab */
}

/* Sorgt dafür, dass echte Avatar-Bilder perfekt in den Kreis passen */
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sub-comment .avatar {
  width: 60px;
  height: 60px;
  font-size: 16px;
}

.comment-content {
  flex-grow: 1;
}
.comment-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 13px;
}
.user-name {
  font-weight: 700;
  color: #0076df;
}
.comment-time {
  color: #7a7e85;
}
.comment-text {
  font-size: 14px;
  line-height: 1.5;
}

/* ==========================================================================
   5. RESPONSIVE DESIGN (RESPONSIVE BREAKPOINTS)
   ========================================================================== */
@media (max-width: 768px) {
  header {
    padding: 10px 15px;
  }
  .search-bar,
  .header-right,
  .sub-nav,
  .filter-bar {
    display: none;
  }
  .deal-card {
    flex-direction: column;
  }
  .deal-left {
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
  }
  .deal-image {
    width: 70px;
    height: 70px;
  }
  .deal-right {
    width: 100%;
    border-left: none;
    border-top: 1px solid #f0f1f2;
    padding-left: 0;
    padding-top: 15px;
    flex-direction: row;
  }
  .deal-btn {
    width: auto;
    min-width: 120px;
  }
}

/* ==========================================================================
   6. SUBCOMMENTS (ANTWORT-THREADS)
   ========================================================================== */
.replies-container {
  margin-left: 55px; /* Rückt die Antworten nach rechts ein */
  border-left: 2px solid #e3e5e6; /* Graue Linie links für die Thread-Optik */
  padding-left: 15px;
  margin-top: 5px;
}

.sub-comment {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  background-color: #f8f9fa; /* Leicht grauer Hintergrund für Antworten */
  border-radius: 6px;
  padding: 10px;
  margin-bottom: 8px;
}

.sub-comment .avatar {
  width: 32px;
  height: 32px;
  font-size: 16px;
  background-color: #e2e8f0;
}

/* ==========================================================================
   7. BILDER IN KOMMENTAREN
   ========================================================================== */
.comment-image-container {
  margin-top: 10px;
  max-width: 450px; /* Begrenzt die Breite des Bildes im Kommentar */
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #e3e5e6;
  display: block;
}

.comment-image-container img {
  width: 100%;
  height: auto;
  display: block;
  cursor: pointer;
  transition: transform 0.1s ease;
}

/* Kleiner Hover-Effekt für die Bilder */
.comment-image-container img:hover {
  transform: scale(1.02);
}

/* ==========================================================================
   8. USER-PROFIL POP-UP (MODAL)
   ========================================================================== */
.profile-modal {
  display: none; /* Standardmäßig unsichtbar */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5); /* Dunkler Hintergrund-Schleier */
  z-index: 9999; /* Ganz oben auf der Seite */
  justify-content: center;
  align-items: center;
}

.profile-modal-content {
  background: white;
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  max-width: 400px;
  width: 90%;
  position: relative;
}

.profile-modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 20px;
  cursor: pointer;
  color: #7a7e85;
}

.profile-modal-close:hover {
  color: #18191c;
}

.profile-modal-avatar {
  width: 300px;
  height: 300px;
  border-radius: 10%;
  margin: 0 auto 15px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 50px;
  background-color: #f1f3f5;
  overflow: hidden;
  border: 2px solid #e3e5e6;
}

.profile-modal-avatar img {
  width: 300px;
  height: 300px;
  object-fit: contain;
}

.profile-modal-username {
  font-size: 20px;
  font-weight: 800;
  color: #0076df;
  margin-bottom: 5px;
}

/* Cursor-Zeiger für klickbare Elemente */
.avatar,
.user-name {
  cursor: pointer;
}
