:root{
  --rp-red: #c00000;
  --bg: #ffffff;
  --text: #111111;
  --card: #ffffff;
  --border: rgba(0,0,0,0.12);
}

html[data-theme="dark"]{
  --bg: #1f1f1f;
  --text: #f1f1f1;
  --card: #2a2a2a;
  --border: rgba(255,255,255,0.14);
}

body{ background: var(--bg); color: var(--text); }

.app-navbar{ background: var(--rp-red) !important; }
.app-banner{ background: var(--rp-red); color: white; }

.card, .tile{
  background: var(--card) !important;
  border: 1px solid var(--border) !important;
}

.grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.tile{ transition: transform .12s ease, box-shadow .12s ease; }
.tile:hover{ transform: translateY(-2px); box-shadow: 0 10px 22px rgba(0,0,0,0.10); }

/* Versteckter Button */
.secret-link{
  display:inline-block;
  width: 12px;
  height: 12px;
  background: transparent;
  opacity: 0.02;        /* quasi unsichtbar */
  border-radius: 2px;
}
.secret-link:hover{
  opacity: 0.25;        /* beim Drüberfahren leicht sichtbar */
  background: rgba(0,0,0,0.15);
}
html[data-theme="dark"] .secret-link:hover{
  background: rgba(255,255,255,0.15);
}

html[data-theme="dark"] body,
html[data-theme="dark"] .card
html[data-theme="dark"] .table,
html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select {
    color: var(--text) !important;
}

html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select {
    background: var(--card) !important;
    border-color: var(--border) !important;
}

html[data-theme="dark"] a {
    color:#ffffff !important;
    opacity: 0.9;
}

html[data-theme="dark"] .table {
    --bs-table-color: var(--text);
}

/* --- Dark Mode: Lesbarkeit überall --- */
html[data-theme="dark"] body,
html[data-theme="dark"] .card,
html[data-theme="dark"] .tile,
html[data-theme="dark"] .modal-content {
  color: var(--text) !important;
}

html[data-theme="dark"] .text-muted,
html[data-theme="dark"] .opacity-75,
html[data-theme="dark"] .opacity-50 {
  color: rgba(255,255,255,0.7) !important;
  opacity: 1 !important;
}

html[data-theme="dark"] .card,
html[data-theme="dark"] .tile,
html[data-theme="dark"] .navbar,
html[data-theme="dark"] .dropdown-menu {
  background: var(--card) !important;
}

html[data-theme="dark"] .table {
  color: var(--text) !important;
  --bs-table-color: var(--text);
}

html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select {
  background: var(--card) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}

html[data-theme="dark"] .btn-outline-secondary {
  color: var(--text) !important;
  border-color: rgba(255,255,255,0.25) !important;
}

.hero{
  border-radius: 18px;
  padding: 28px;
  background: linear-gradient(135deg, var(--rp-red), #7a0000);
  color: #fff;
  box-shadow: 0 16px 34px rgba(0,0,0,0.16);
}

.hero .hero-inner{
  display:flex;
  align-items:center;
  gap:16px;
  justify-content:space-between;
  flex-wrap:wrap;
}

.hero .brand{
  display:flex;
  align-items:center;
  gap:14px;
}

.hero .logo{
  width:58px;height:58px;
  border-radius:16px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.22);
  display:flex;align-items:center;justify-content:center;
  overflow:hidden;
}

.hero .logo img{ width:100%; height:100%; object-fit:cover; }

.hero .tagline{
  opacity:0.9;
  margin-top:2px;
}

.tile.card{
  border-radius: 16px;
}

.tile .badge-soft{
  display:inline-block;
  padding:6px 10px;
  border-radius: 999px;
  background: rgba(192,0,0,0.10);
  border: 1px solid rgba(192,0,0,0.20);
  color: var(--text);
  font-size: 12px;
}

html[data-theme="dark"] .tile .badge-soft{
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.14);
}

/* Navbar Buttons (immer lesbar) */
.navbtn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;

  padding: 6px 10px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;

  background: rgba(255,255,255,0.14);
  color: #fff !important;
  border: 1px solid rgba(255,255,255,0.22);
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}

.navbtn:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,0.20);
  border-color: rgba(255,255,255,0.30);
}

.navbtn:active{
  transform: translateY(0px);
}

.navbtn-outline{
  background: transparent;
}

html[data-theme="light"] .navbtn{
  background: rgba(255,255,255,0.85);
  color: #111 !important;
  border-color: rgba(0,0,0,0.12);
}

html[data-theme="light"] .navbtn:hover{
  background: rgba(255,255,255,0.95);
  border-color: rgba(0,0,0,0.18);
}

.mention{
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px dotted rgba(192,0,0,0.45);
}
.mention:hover{
  border-bottom-style: solid;
}

.comment{
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 8px;
  background: rgba(0,0,0,0.02);
}
html[data-theme="dark"] .comment{
  background: rgba(255,255,255,0.04);
}

.mention{
  font-weight: 800;
  text-decoration: none;
  border-bottom: 1px dotted rgba(192,0,0,0.55);
}
.mention:hover{ border-bottom-style: solid; }

.comment{
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 8px;
  background: rgba(0,0,0,0.02);
}
html[data-theme="dark"] .comment{
  background: rgba(255,255,255,0.04);
}

.post .loadMoreBtn{
  white-space: nowrap;
}
