/* ===========================
   FAMILYHUB — Modern Design
   =========================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
  --bg:          #0f0f14;
  --surface:     #1a1a24;
  --surface2:    #22222f;
  --border:      rgba(255,255,255,0.07);
  --accent:      #6a9e5a;
  --accent2:     #527a45;
  --gold:        #d4ac4a;
  --text:        #f0ede8;
  --text-muted:  #9a9099;
  --text-subtle: #5e5868;
  --radius:      16px;
  --radius-sm:   10px;
  --shadow:      0 8px 32px rgba(0,0,0,0.4);
  --shadow-sm:   0 4px 16px rgba(0,0,0,0.25);
  --nav-height:  68px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse 80% 60% at 10% -10%, rgba(106,158,90,0.07) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 90% 90%, rgba(82,122,69,0.05) 0%, transparent 60%);
}

h1, h2, h3 { font-family: 'Playfair Display', serif; font-weight: 700; letter-spacing: -0.02em; }
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }

.container { max-width: 1160px; margin: 0 auto; padding: 32px 24px; }

/* ── NAVBAR ── */
.navbar {
  position: sticky; top: 0; z-index: 999;
  min-height: var(--nav-height);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap;
  padding: 0 28px;
  background: rgba(15,15,20,0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.navbar .logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem; font-weight: 700;
  color: var(--text); letter-spacing: -0.02em;
  display: flex; align-items: center; gap: 8px;
  padding: 16px 0;
}
.navbar .logo::before {
  content: ''; width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 12px var(--accent); display: inline-block;
}

.navlinks { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }

.navlinks a {
  color: var(--text-muted); text-decoration: none;
  font-size: 0.875rem; font-weight: 500;
  padding: 8px 14px; border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}
.navlinks a:hover { color: var(--text); background: rgba(255,255,255,0.06); }

.navlinks .logout {
  color: var(--accent) !important;
  border: 1px solid rgba(106,158,90,0.25);
  margin-left: 8px;
}
.navlinks .logout:hover { background: rgba(106,158,90,0.12) !important; border-color: var(--accent); }

.lang-switch {
  display: flex; align-items: center; gap: 4px;
  padding: 0 4px 0 12px; border-left: 1px solid var(--border); margin-left: 8px;
}
.flag-btn {
  font-size: 1.35rem !important;
  padding: 4px 5px !important;
  border-radius: 6px !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  opacity: 0.45;
  transition: opacity 0.2s, transform 0.15s, background 0.2s !important;
  line-height: 1;
  display: flex; align-items: center;
}
.flag-btn:hover  { opacity: 0.85 !important; background: rgba(255,255,255,0.07) !important; transform: scale(1.1); }
.flag-btn.active { opacity: 1 !important; background: rgba(255,255,255,0.1) !important; }

/* ── HAMBURGER ── */
.hamburger {
  display: none; align-items: center; justify-content: center;
  width: 42px; height: 42px;
  cursor: pointer; border-radius: 10px;
  border: 2px solid var(--accent);
  background: rgba(106,158,90,0.15);
  color: var(--accent);
  font-size: 1.2rem;
  transition: background 0.2s, border-color 0.2s;
}
.hamburger:hover { background: rgba(106,158,90,0.28); }
.hamburger span { display: block; height: 2px; background: var(--accent); border-radius: 2px; transition: transform 0.3s, opacity 0.3s; }
.hamburger span:nth-child(2) { width: 70%; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── PAGE HEADER ── */
.page-header { padding: 40px 0 8px; margin-bottom: 32px; }
.page-header h1 {
  background: linear-gradient(135deg, var(--text) 0%, var(--gold) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  margin-bottom: 8px;
}
.page-header p { color: var(--text-muted); font-size: 0.95rem; }

/* ── FEED GRID ── */
.feed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.post {
  background: var(--surface); border-radius: var(--radius);
  border: 1px solid var(--border); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform 0.25s cubic-bezier(.25,.46,.45,.94), box-shadow 0.25s;
  cursor: pointer;
}
.post:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: rgba(106,158,90,0.20); }

.post-media { position: relative; overflow: hidden; background: var(--surface2); aspect-ratio: 4/3; }
.post img, .post video { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s cubic-bezier(.25,.46,.45,.94); }
.post:hover img { transform: scale(1.04); }
.post-media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 50%); pointer-events: none; }

.post-info { padding: 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.post-author { font-weight: 600; font-size: 0.9rem; color: var(--text); }
.post-date { font-size: 0.78rem; color: var(--text-subtle); }
.post-title { font-size: 0.88rem; color: var(--text-muted); margin-top: 2px; }

.post-actions { padding: 0 16px 16px; }
.post-actions button {
  width: 100%; padding: 9px; border-radius: var(--radius-sm);
  border: 1px solid rgba(239,68,68,0.3); background: transparent;
  color: #f87171; font-family: 'DM Sans', sans-serif; font-size: 0.82rem;
  font-weight: 500; cursor: pointer; transition: background 0.2s, border-color 0.2s;
}
.post-actions button:hover { background: rgba(239,68,68,0.12); border-color: #f87171; }

/* ── CUSTOM FILE INPUT ── */
.file-input-wrapper {
  position: relative;
  margin-bottom: 14px;
}
.file-input-wrapper input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  z-index: 2;
}
.file-input-label {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
  cursor: pointer;
}
.file-input-wrapper:hover .file-input-label,
.file-input-wrapper:focus-within .file-input-label {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(106,158,90,0.12);
}
.file-input-btn {
  background: var(--accent);
  color: white;
  padding: 12px 18px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  gap: 7px;
}
.file-input-wrapper:hover .file-input-btn { background: var(--accent2); }
.file-input-text {
  padding: 12px 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  color: var(--text-subtle);
  background: var(--surface2);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-input-text.has-files { color: var(--text-muted); }

/* Profile avatar compact variant */
.file-input-label.compact .file-input-btn  { padding: 9px 14px; font-size: 0.82rem; }
.file-input-label.compact .file-input-text { padding: 9px 12px; font-size: 0.82rem; }

/* ── UPLOAD BOX ── */
.upload-box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 36px 40px; max-width: 520px; box-shadow: var(--shadow);
}
.upload-box h2 {
  margin-bottom: 28px;
  background: linear-gradient(135deg, var(--text) 0%, var(--gold) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.upload-box input, .upload-box select {
  width: 100%; padding: 12px 16px; margin-bottom: 14px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  font-family: 'DM Sans', sans-serif; font-size: 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s; outline: none; display: block;
}
.upload-box input::placeholder { color: var(--text-subtle); }
.upload-box input:focus, .upload-box select:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(106,158,90,0.12);
}
.upload-box input[type="file"] { padding: 10px 14px; cursor: pointer; color: var(--text-muted); }
.upload-box input[type="file"]::file-selector-button {
  background: var(--accent); color: white; border: none; padding: 6px 14px;
  border-radius: 6px; font-family: 'DM Sans', sans-serif; font-size: 0.82rem;
  font-weight: 500; cursor: pointer; margin-right: 12px; transition: background 0.2s;
}
.upload-box input[type="file"]::file-selector-button:hover { background: var(--accent2); }

.btn-primary {
  width: 100%; padding: 13px; border: none; border-radius: var(--radius-sm);
  background: var(--accent); color: white; font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem; font-weight: 600; cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(106,158,90,0.30);
}
.btn-primary:hover { background: var(--accent2); transform: translateY(-1px); box-shadow: 0 6px 24px rgba(106,158,90,0.40); }
.btn-primary:active { transform: translateY(0); }

/* ── LOGIN / REGISTER ── */
.login-wrapper {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px;
  background-image: radial-gradient(ellipse 70% 60% at 20% 20%, rgba(106,158,90,0.10) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(82,122,69,0.07) 0%, transparent 60%);
}

.login-container, .register-container {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 24px; padding: 48px 44px; width: 100%; max-width: 420px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
}

.login-brand { text-align: center; margin-bottom: 36px; }
.login-brand .brand-dot {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 20px var(--accent); margin: 0 auto 16px;
}
.login-brand h1 {
  font-size: 2rem;
  background: linear-gradient(135deg, var(--text) 0%, var(--gold) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  margin-bottom: 6px;
}
.login-brand p { color: var(--text-muted); font-size: 0.88rem; }

.login-container h1, .register-container h1 {
  font-size: 1.8rem;
  background: linear-gradient(135deg, var(--text) 0%, var(--gold) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  margin-bottom: 28px; text-align: center;
}

.login-container input, .register-container input {
  width: 100%; display: block; padding: 13px 16px; margin-bottom: 14px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  font-family: 'DM Sans', sans-serif; font-size: 0.92rem;
  outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.login-container input::placeholder, .register-container input::placeholder { color: var(--text-subtle); }
.login-container input:focus, .register-container input:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(106,158,90,0.12);
}

.login-container button, .register-container button {
  width: 100%; padding: 14px; border: none; border-radius: var(--radius-sm);
  background: var(--accent); color: white; font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem; font-weight: 600; cursor: pointer; margin-top: 4px;
  transition: background 0.2s, transform 0.15s; box-shadow: 0 4px 20px rgba(106,158,90,0.30);
}
.login-container button:hover, .register-container button:hover {
  background: var(--accent2); transform: translateY(-1px);
}

.error-msg {
  background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.25);
  border-radius: var(--radius-sm); color: #f87171;
  padding: 11px 14px; font-size: 0.88rem; margin-bottom: 16px; text-align: center;
}
.login-footer { text-align: center; margin-top: 24px; font-size: 0.84rem; color: var(--text-subtle); }
.login-footer a { color: var(--accent); text-decoration: none; }

/* ── PROFILE ── */
.profile-header {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px 36px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; margin-bottom: 40px; flex-wrap: wrap;
}
.profile-info { display: flex; align-items: center; gap: 20px; }
.profile-avatar {
  width: 80px; height: 80px; border-radius: 50%; overflow: hidden;
  background: var(--surface2); border: 2px solid var(--accent);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-avatar i { color: var(--text-muted); font-size: 2rem; }
.profile-name h1 {
  font-size: 1.6rem;
  background: linear-gradient(135deg, var(--text) 0%, var(--gold) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.profile-name p { color: var(--text-muted); font-size: 0.88rem; margin-top: 4px; }
.profile-header form { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.profile-header input[type="file"] {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text-muted);
  padding: 9px 14px; font-family: 'DM Sans', sans-serif; font-size: 0.82rem; cursor: pointer;
}
.profile-header button {
  padding: 10px 20px; background: var(--accent); color: white; border: none;
  border-radius: var(--radius-sm); font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: background 0.2s; white-space: nowrap;
}
.profile-header button:hover { background: var(--accent2); }

/* ── TIMELINE FILTER ── */
.timeline-filter { display: flex; align-items: center; gap: 14px; margin-bottom: 32px; flex-wrap: wrap; }
.timeline-filter label { color: var(--text-muted); font-size: 0.88rem; font-weight: 500; }
.timeline-filter select {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  padding: 9px 16px; font-family: 'DM Sans', sans-serif; font-size: 0.9rem;
  outline: none; cursor: pointer; transition: border-color 0.2s;
}
.timeline-filter select:focus { border-color: var(--accent); }

/* ── LIGHTBOX ── */
.lightbox {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.88); backdrop-filter: blur(8px);
  justify-content: center; align-items: center; z-index: 10000; padding: 24px;
}
.lightbox.active { display: flex; }
.lightbox-content {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; max-width: 90%; max-height: 90vh;
  display: flex; flex-direction: column; align-items: center;
  box-shadow: var(--shadow); animation: lb-in 0.2s ease;
}
@keyframes lb-in { from { opacity:0; transform:scale(0.95); } to { opacity:1; transform:scale(1); } }
.lightbox img { max-width: 100%; max-height: 65vh; border-radius: var(--radius-sm); object-fit: contain; }
.lightbox-info { margin-top: 16px; text-align: center; }
.lightbox-info h3 { color: var(--text); font-size: 1.1rem; }
.lightbox-info p  { color: var(--text-muted); font-size: 0.85rem; margin-top: 4px; }
.lightbox .close {
  position: fixed; top: 20px; right: 24px; font-size: 28px;
  color: var(--text-muted); cursor: pointer; background: none; border: none; transition: color 0.2s;
}
.lightbox .close:hover { color: var(--text); }

/* ── MAP ── */
#map { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); height: 520px; }

/* ── FOOTER ── */
footer {
  margin-top: 80px; padding: 28px 24px;
  border-top: 1px solid var(--border); text-align: center; color: var(--text-subtle); font-size: 0.8rem;
}

/* ── MOBILE ── */
@media (max-width: 768px) {
  .hamburger { display: flex; }

  .navlinks {
    display: none; flex-direction: column; width: 100%; gap: 4px;
    padding: 12px 0 16px; border-top: 1px solid var(--border);
    background: #13131a;
  }
  @keyframes nav-slide { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:translateY(0); } }
  .navlinks.open { display: flex; animation: nav-slide 0.2s ease; }
  .navlinks a { padding: 11px 12px; font-size: 0.95rem; }
  .lang-switch { border-left: none; border-top: 1px solid var(--border); margin-left: 0; padding: 12px 4px 0; margin-top: 8px; }
  .flag-btn { font-size: 1.5rem !important; }
  .navlinks .logout { margin-left: 0; margin-top: 4px; }

  .container { padding: 20px 16px; }
  .feed-grid { grid-template-columns: 1fr; gap: 16px; }
  .upload-box { padding: 24px 20px; }
  .profile-header { flex-direction: column; align-items: flex-start; padding: 24px; }
  .login-container, .register-container { padding: 32px 28px; }
  .page-header { padding: 24px 0 0; margin-bottom: 24px; }
}

/* ── LOCATION AUTOCOMPLETE ── */
.location-wrapper {
  position: relative;
  margin-bottom: 14px;
}
.location-wrapper input {
  margin-bottom: 0;
  width: 100%;
  padding-right: 40px;
}
.location-spinner {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}
.location-wrapper.loading .location-spinner { display: block; }
@keyframes spin { to { transform: translateY(-50%) rotate(360deg); } }

.location-clear {
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-subtle);
  font-size: 1rem;
  cursor: pointer;
  line-height: 1;
  display: none;
  transition: color 0.2s;
  padding: 2px;
}
.location-clear:hover { color: var(--text); }
.location-wrapper.has-selection .location-clear { display: block; }
.location-wrapper.has-selection input { padding-right: 40px; }

.location-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  z-index: 100;
  overflow: hidden;
  display: none;
}
.location-dropdown.open { display: block; }

.location-option {
  padding: 11px 16px;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.location-option:last-child { border-bottom: none; }
.location-option:hover, .location-option.active { background: rgba(106,158,90,0.12); }

.location-option-icon {
  color: var(--accent);
  font-size: 0.85rem;
  margin-top: 2px;
  flex-shrink: 0;
}
.location-option-name {
  font-size: 0.88rem;
  color: var(--text);
  font-weight: 500;
  line-height: 1.3;
}
.location-option-detail {
  font-size: 0.78rem;
  color: var(--text-subtle);
  margin-top: 2px;
}

.location-status {
  padding: 12px 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}

.location-badge {
  display: none;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 7px 12px;
  background: rgba(106,158,90,0.1);
  border: 1px solid rgba(106,158,90,0.3);
  border-radius: 8px;
  font-size: 0.82rem;
  color: var(--accent);
}
.location-badge.visible { display: flex; }
.location-badge i { font-size: 0.8rem; }

/* ══════════════════════════════
   LIKES & KOMMENTARE
══════════════════════════════ */
.post-footer {
  padding: 0 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Like + Kommentar Aktionsleiste */
.post-actions-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 4px;
  border-top: 1px solid var(--border);
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
  line-height: 1;
}
.action-btn:hover { background: rgba(255,255,255,0.06); color: var(--text); }
.action-btn i { font-size: 0.95rem; }

.action-btn.like-btn.liked {
  color: #e05555;
}
.action-btn.like-btn.liked i { animation: heart-pop 0.3s cubic-bezier(.36,.07,.19,.97); }
@keyframes heart-pop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.35); }
  100% { transform: scale(1); }
}

.action-btn.edit-btn  { color: var(--accent); }
.action-btn.edit-btn:hover  { background: rgba(106,158,90,0.1); }

.action-btn.delete-btn { color: #f87171; margin-left: auto; }
.action-btn.delete-btn:hover { background: rgba(239,68,68,0.1); }

/* Kommentar-Bereich */
.comments-section { display: none; flex-direction: column; gap: 0; }
.comments-section.open { display: flex; }

.comment-list { display: flex; flex-direction: column; gap: 1px; margin-bottom: 8px; }

.comment-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  transition: background 0.15s;
}
.comment-item:hover { background: rgba(255,255,255,0.03); }

.comment-avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--surface2);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem; color: var(--text-muted); flex-shrink: 0;
  font-family: 'Playfair Display', serif; font-weight: 700;
}
.comment-content { flex: 1; min-width: 0; }
.comment-author {
  font-size: 0.78rem; font-weight: 600; color: var(--text);
  display: inline; margin-right: 6px;
}
.comment-body { font-size: 0.82rem; color: var(--text-muted); display: inline; }
.comment-meta {
  font-size: 0.72rem; color: var(--text-subtle);
  margin-top: 3px; display: flex; align-items: center; gap: 8px;
}
.comment-delete {
  background: none; border: none; color: var(--text-subtle);
  font-size: 0.72rem; cursor: pointer; padding: 0;
  transition: color 0.2s; display: none;
}
.comment-item:hover .comment-delete { display: inline; }
.comment-delete:hover { color: #f87171; }

/* Kommentar Eingabe */
.comment-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.comment-input-row input {
  flex: 1;
  padding: 9px 13px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.83rem;
  outline: none;
  transition: border-color 0.2s;
}
.comment-input-row input:focus { border-color: var(--accent); }
.comment-input-row input::placeholder { color: var(--text-subtle); }
.comment-send-btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  color: white;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
  transition: background 0.2s, transform 0.15s;
}
.comment-send-btn:hover { background: var(--accent2); transform: scale(1.08); }

/* ══════════════════════════════
   EDIT MODAL
══════════════════════════════ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px);
  z-index: 5000;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-overlay.open { display: flex; }

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  width: 100%;
  max-width: 460px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
  animation: modal-in 0.2s ease;
}
@keyframes modal-in {
  from { opacity:0; transform: scale(0.96) translateY(8px); }
  to   { opacity:1; transform: scale(1)    translateY(0); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.modal-header h2 {
  font-size: 1.2rem;
  background: linear-gradient(135deg, var(--text) 0%, var(--gold) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.modal-close {
  background: none; border: none; color: var(--text-muted);
  font-size: 1.3rem; cursor: pointer; padding: 4px;
  border-radius: 6px; transition: color 0.2s, background 0.2s; line-height: 1;
}
.modal-close:hover { color: var(--text); background: rgba(255,255,255,0.06); }

.modal input[type="text"] {
  width: 100%; padding: 12px 16px; margin-bottom: 14px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  font-family: 'DM Sans', sans-serif; font-size: 0.9rem;
  outline: none; transition: border-color 0.2s, box-shadow 0.2s; display: block;
}
.modal input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(106,158,90,0.12); }
.modal input::placeholder { color: var(--text-subtle); }

.modal-footer {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}
.modal-footer .btn-primary { flex: 1; padding: 11px; }
.btn-secondary {
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem; font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.btn-secondary:hover { background: rgba(255,255,255,0.05); color: var(--text); }

/* ── LOGIN LANG SWITCH ── */
.login-lang-switch {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
  margin-bottom: 20px;
}
.login-lang-switch .flag-btn {
  font-size: 1.4rem !important;
  padding: 5px 6px !important;
  border-radius: 8px;
  opacity: 0.4;
  transition: opacity 0.2s, transform 0.15s, background 0.2s !important;
  text-decoration: none;
  display: inline-flex;
}
.login-lang-switch .flag-btn:hover  { opacity: 0.85 !important; background: rgba(255,255,255,0.07) !important; transform: scale(1.1); }
.login-lang-switch .flag-btn.active { opacity: 1 !important; background: rgba(255,255,255,0.1) !important; }

/* ── CUSTOM FILE INPUT ── */
.file-input-wrapper { position: relative; margin-bottom: 14px; }
.file-input-wrapper input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; margin: 0; padding: 0; z-index: 2; }
.file-input-label { display: flex; align-items: center; gap: 0; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; transition: border-color 0.2s, box-shadow 0.2s; cursor: pointer; }
.file-input-wrapper:hover .file-input-label, .file-input-wrapper:focus-within .file-input-label { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(106,158,90,0.12); }
.file-input-btn { background: var(--accent); color: white; padding: 12px 18px; font-family: 'DM Sans',sans-serif; font-size: 0.85rem; font-weight: 600; white-space: nowrap; flex-shrink: 0; transition: background 0.2s; display: flex; align-items: center; gap: 7px; }
.file-input-wrapper:hover .file-input-btn { background: var(--accent2); }
.file-input-text { padding: 12px 14px; font-family: 'DM Sans',sans-serif; font-size: 0.85rem; color: var(--text-subtle); background: var(--surface2); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-input-text.has-files { color: var(--text-muted); }
.file-input-label.compact .file-input-btn { padding: 9px 14px; font-size: 0.82rem; }
.file-input-label.compact .file-input-text { padding: 9px 12px; font-size: 0.82rem; }

/* ── LOCATION AUTOCOMPLETE ── */
.location-wrapper { position: relative; margin-bottom: 14px; }
.location-wrapper input { margin-bottom: 0; width: 100%; padding-right: 40px; }
.location-spinner { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.7s linear infinite; display: none; }
.location-wrapper.loading .location-spinner { display: block; }
@keyframes spin { to { transform: translateY(-50%) rotate(360deg); } }
.location-clear { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--text-subtle); font-size: 1rem; cursor: pointer; line-height: 1; display: none; transition: color 0.2s; padding: 2px; }
.location-clear:hover { color: var(--text); }
.location-wrapper.has-selection .location-clear { display: block; }
.location-dropdown { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--accent); border-radius: var(--radius-sm); box-shadow: 0 8px 24px rgba(0,0,0,0.4); z-index: 100; overflow: hidden; display: none; }
.location-dropdown.open { display: block; }
.location-option { padding: 11px 16px; cursor: pointer; display: flex; align-items: flex-start; gap: 10px; border-bottom: 1px solid var(--border); transition: background 0.15s; }
.location-option:last-child { border-bottom: none; }
.location-option:hover, .location-option.active { background: rgba(106,158,90,0.12); }
.location-option-icon { color: var(--accent); font-size: 0.85rem; margin-top: 2px; flex-shrink: 0; }
.location-option-name { font-size: 0.88rem; color: var(--text); font-weight: 500; line-height: 1.3; }
.location-option-detail { font-size: 0.78rem; color: var(--text-subtle); margin-top: 2px; }
.location-status { padding: 12px 16px; font-size: 0.85rem; color: var(--text-muted); text-align: center; }
.location-badge { display: none; align-items: center; gap: 6px; margin-top: 8px; padding: 7px 12px; background: rgba(106,158,90,0.1); border: 1px solid rgba(106,158,90,0.3); border-radius: 8px; font-size: 0.82rem; color: var(--accent); }
.location-badge.visible { display: flex; }

/* ── FLAGGEN ── */
.lang-switch { display: flex; align-items: center; gap: 4px; padding: 0 4px 0 12px; border-left: 1px solid var(--border); margin-left: 8px; }
.flag-btn { font-size: 1.35rem !important; padding: 4px 5px !important; border-radius: 6px !important; text-transform: none !important; letter-spacing: 0 !important; opacity: 0.45; transition: opacity 0.2s, transform 0.15s, background 0.2s !important; line-height: 1; display: flex; align-items: center; }
.flag-btn:hover  { opacity: 0.85 !important; background: rgba(255,255,255,0.07) !important; transform: scale(1.1); }
.flag-btn.active { opacity: 1 !important; background: rgba(255,255,255,0.1) !important; }

/* ── LOGIN LANG SWITCH ── */
.login-lang-switch { display: flex; justify-content: flex-end; gap: 4px; margin-bottom: 20px; }
.login-lang-switch .flag-btn { font-size: 1.4rem !important; padding: 5px 6px !important; border-radius: 8px; opacity: 0.4; transition: opacity 0.2s, transform 0.15s, background 0.2s !important; text-decoration: none; display: inline-flex; }
.login-lang-switch .flag-btn:hover  { opacity: 0.85 !important; background: rgba(255,255,255,0.07) !important; transform: scale(1.1); }
.login-lang-switch .flag-btn.active { opacity: 1 !important; background: rgba(255,255,255,0.1) !important; }

/* ── LIKES & KOMMENTARE ── */
.post-footer { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 12px; }
.post-actions-bar { display: flex; align-items: center; gap: 8px; padding-top: 4px; border-top: 1px solid var(--border); }
.action-btn { display: flex; align-items: center; gap: 6px; background: none; border: none; color: var(--text-muted); font-family: 'DM Sans',sans-serif; font-size: 0.82rem; font-weight: 500; cursor: pointer; padding: 6px 10px; border-radius: 8px; transition: background 0.2s, color 0.2s; line-height: 1; }
.action-btn:hover { background: rgba(255,255,255,0.06); color: var(--text); }
.action-btn i { font-size: 0.95rem; }
.action-btn.like-btn.liked { color: #e05555; }
.action-btn.like-btn.liked i { animation: heart-pop 0.3s cubic-bezier(.36,.07,.19,.97); }
@keyframes heart-pop { 0% { transform:scale(1); } 40% { transform:scale(1.35); } 100% { transform:scale(1); } }
.action-btn.edit-btn { color: var(--accent); }
.action-btn.edit-btn:hover { background: rgba(106,158,90,0.1); }
.action-btn.delete-btn { color: #f87171; margin-left: auto; }
.action-btn.delete-btn:hover { background: rgba(239,68,68,0.1); }
.comments-section { display: none; flex-direction: column; gap: 0; }
.comments-section.open { display: flex; }
.comment-list { display: flex; flex-direction: column; gap: 1px; margin-bottom: 8px; }
.comment-item { display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px; border-radius: 8px; transition: background 0.15s; }
.comment-item:hover { background: rgba(255,255,255,0.03); }
.comment-avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--surface2); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 0.65rem; color: var(--text-muted); flex-shrink: 0; font-family: 'Playfair Display',serif; font-weight: 700; }
.comment-content { flex: 1; min-width: 0; }
.comment-author { font-size: 0.78rem; font-weight: 600; color: var(--text); display: inline; margin-right: 6px; }
.comment-body { font-size: 0.82rem; color: var(--text-muted); display: inline; }
.comment-meta { font-size: 0.72rem; color: var(--text-subtle); margin-top: 3px; display: flex; align-items: center; gap: 8px; }
.comment-delete { background: none; border: none; color: var(--text-subtle); font-size: 0.72rem; cursor: pointer; padding: 0; transition: color 0.2s; display: none; }
.comment-item:hover .comment-delete { display: inline; }
.comment-delete:hover { color: #f87171; }
.comment-input-row { display: flex; gap: 8px; align-items: center; }
.comment-input-row input { flex: 1; padding: 9px 13px; background: var(--surface2); border: 1px solid var(--border); border-radius: 20px; color: var(--text); font-family: 'DM Sans',sans-serif; font-size: 0.83rem; outline: none; transition: border-color 0.2s; }
.comment-input-row input:focus { border-color: var(--accent); }
.comment-input-row input::placeholder { color: var(--text-subtle); }
.comment-send-btn { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); border: none; color: white; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; flex-shrink: 0; transition: background 0.2s, transform 0.15s; }
.comment-send-btn:hover { background: var(--accent2); transform: scale(1.08); }

/* ── EDIT MODAL ── */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.75); backdrop-filter: blur(6px); z-index: 5000; align-items: center; justify-content: center; padding: 24px; }
.modal-overlay.open { display: flex; }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; width: 100%; max-width: 460px; box-shadow: 0 24px 60px rgba(0,0,0,0.5); animation: modal-in 0.2s ease; }
@keyframes modal-in { from { opacity:0; transform:scale(0.96) translateY(8px); } to { opacity:1; transform:scale(1) translateY(0); } }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.modal-header h2 { font-size: 1.2rem; background: linear-gradient(135deg, var(--text) 0%, var(--gold) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.modal-close { background: none; border: none; color: var(--text-muted); font-size: 1.3rem; cursor: pointer; padding: 4px; border-radius: 6px; transition: color 0.2s, background 0.2s; line-height: 1; }
.modal-close:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.modal input[type="text"] { width: 100%; padding: 12px 16px; margin-bottom: 14px; background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); font-family: 'DM Sans',sans-serif; font-size: 0.9rem; outline: none; transition: border-color 0.2s, box-shadow 0.2s; display: block; }
.modal input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(106,158,90,0.12); }
.modal input::placeholder { color: var(--text-subtle); }
.modal-footer { display: flex; gap: 10px; margin-top: 8px; }
.modal-footer .btn-primary { flex: 1; padding: 11px; }
.btn-secondary { padding: 11px 20px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: transparent; color: var(--text-muted); font-family: 'DM Sans',sans-serif; font-size: 0.9rem; font-weight: 500; cursor: pointer; transition: background 0.2s, color 0.2s; }
.btn-secondary:hover { background: rgba(255,255,255,0.05); color: var(--text); }

/* ── MOBILE ERGÄNZUNGEN ── */
@media (max-width: 768px) {
  .lang-switch { border-left: none; border-top: 1px solid var(--border); margin-left: 0; padding: 12px 4px 0; margin-top: 8px; }
  .flag-btn { font-size: 1.5rem !important; }
}

/* ══════════════════════════════
   ADMIN DASHBOARD
══════════════════════════════ */

/* Nav Admin-Link */
.nav-admin {
  color: var(--accent) !important;
  border: 1px solid rgba(106,158,90,0.3);
  border-radius: var(--radius-sm);
}
.nav-admin:hover {
  background: rgba(106,158,90,0.12) !important;
  border-color: var(--accent) !important;
}

/* Statistik-Karten */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  transition: border-color 0.2s, transform 0.2s;
}
.stat-card:hover {
  border-color: rgba(106,158,90,0.3);
  transform: translateY(-2px);
}
.stat-icon {
  font-size: 1.6rem;
  color: var(--accent);
  margin-bottom: 12px;
  opacity: 0.85;
}
.stat-value {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  margin-bottom: 6px;
}
.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}

/* Admin Section */
.admin-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.admin-section-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.admin-section-header h2 {
  font-size: 1.1rem;
  color: var(--text);
}

/* Tabelle */
.admin-table-wrap { overflow-x: auto; }
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.admin-table thead th {
  padding: 12px 16px;
  text-align: left;
  color: var(--text-subtle);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.admin-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.admin-table tbody tr:last-child { border-bottom: none; }
.admin-table tbody tr:hover { background: rgba(255,255,255,0.025); }
.admin-table td { padding: 14px 16px; color: var(--text-muted); vertical-align: middle; }

.td-id    { color: var(--text-subtle) !important; font-size: 0.78rem; width: 40px; }
.td-center { text-align: center; }
.td-date  { font-size: 0.8rem; white-space: nowrap; }
.td-email { font-size: 0.82rem; }

/* User Cell */
.user-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}
.user-avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
  overflow: hidden;
}
.user-avatar-sm img { width: 100%; height: 100%; object-fit: cover; }

/* Role Badge */
.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}
.role-admin {
  background: rgba(106,158,90,0.15);
  color: var(--accent);
  border: 1px solid rgba(106,158,90,0.3);
}
.role-user {
  background: rgba(255,255,255,0.05);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

/* Table Action Buttons */
.table-actions { display: flex; gap: 6px; align-items: center; }
.tbl-btn {
  width: 32px; height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.tbl-edit  { color: var(--accent); }
.tbl-edit:hover  { background: rgba(106,158,90,0.12); border-color: var(--accent); }
.tbl-delete { color: #f87171; }
.tbl-delete:hover { background: rgba(239,68,68,0.12); border-color: #f87171; }

/* Modal Select */
.modal-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 6px;
  margin-top: 4px;
}
.modal-select {
  width: 100%;
  padding: 12px 16px;
  margin-bottom: 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s;
  display: block;
}
.modal-select:focus { border-color: var(--accent); }
.modal-select option { background: var(--surface2); }

/* Toast */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 9999;
  white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast-success { border-color: rgba(106,158,90,0.4); color: var(--accent); }
.toast-error   { border-color: rgba(239,68,68,0.4);  color: #f87171; }

@media (max-width: 768px) {
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .td-email, .td-date { display: none; }
}

/* ── STORAGE STAT CARD ── */
.stat-card-storage { text-align: left; }
.stat-card-storage .stat-icon,
.stat-card-storage .stat-value,
.stat-card-storage .stat-label { text-align: center; }

.storage-bar-wrap {
  height: 6px;
  background: var(--surface2);
  border-radius: 3px;
  margin: 12px 0 6px;
  overflow: hidden;
}
.storage-bar {
  height: 100%;
  border-radius: 3px;
  background: var(--accent);
  transition: width 0.6s ease;
  max-width: 100%;
}
.storage-bar[data-pct="100"] { background: #f87171; }
.storage-bar[style*="width:8"] { background: #f59e0b; } /* 80%+ = gelb */
.storage-bar[style*="width:9"] { background: #f87171; } /* 90%+ = rot */

.storage-detail {
  font-size: 0.72rem;
  color: var(--text-subtle);
  text-align: center;
}

/* Speicher-Prozent-Label */
.storage-pct {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: right;
  margin-bottom: 4px;
}

/* ── POST LOCATION ── */
.post-location {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 500;
  margin-top: 2px;
}
.post-location i { font-size: 0.72rem; flex-shrink: 0; }
