/* =========================
   Global / Reset
   ========================= */
:root{
  --bg: #0b1220;
  --panel: #0f1a2e;
  --card: #101d34;
  --card2: #0c172b;
  --text: #37e978;
  --muted: #ffffff;
  --muted2: rgba(232,238,252,.52);
  --border: rgba(255,255,255,.10);
  --border2: rgba(255,255,255,.16);
  --shadow: 3px 4px 9px rgba(161, 34, 40);
  --accent: #7aa2ff;
  --accent2: #37e978;
  --danger: #ff6b6b;
  --warn: #ffcf5a;
  --ok: #4ade80;

  --radius: 14px;
  --radius2: 18px;
  --pad: 12px;
  --pad2: 16px;

  --font: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji","Segoe UI Emoji";

  --chat-font: 20px;
  --chat-name-font: 20px;
}


*{ box-sizing: border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: var(--font);
  color: var(--text);
  overflow: hidden;
}

/* Hintergrund-Layer */
.body-bg{
  position: fixed;
  inset: 0;
  z-index: -2;

  background-image: url("/public/assets/layout/bg.png");
  background-repeat: no-repeat;
  background-position: center center;

  /* 🔑 entscheidend */
  background-size: 100% 100%; 

  /* verhindert GPU-Weichzeichnung */
  image-rendering: auto;
  transform: translateZ(0);
}

/* reines Abdunklungs-Overlay */
.body-bg-overlay{
  position: fixed;
  inset: 0;
  z-index: -1;

  background: rgba(0,0,0,0.55);
}

.body-bg{
    background-color: #000;
}



a{
  color: var(--accent2);
  text-decoration: none;
}
a:hover{ text-decoration: underline; }

hr{
  border:0;
  border-top: 1px solid var(--border);
  margin: 12px 0;
}

h1,h2,h3,h4{
  margin: 0 0 10px 0;
  letter-spacing: .2px;
}
p{ margin: 0 0 10px 0; }

code{
  background: rgba(255,255,255,.08);
  padding: 2px 6px;
  border-radius: 8px;
}

/* =========================
   Layout helpers
   ========================= */
/* Füllt den Bildschirm, bleibt “sauber” mit paddings */
.container{
  width: 100%;
  max-width: none;
  margin: 0;
  padding: clamp(10px, 1.2vw, 18px);
  box-sizing: border-box;

  /* ✅ wichtig: Container ist jetzt Layout-Manager */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 12px;
}




.row{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.grid-2{
  display:grid;
  grid-template-columns: 1fr 320px;
  gap: 12px;
}

@media (max-width: 980px){
  .grid-2{ grid-template-columns: 1fr; }
}

/* ===== FIX: Unter 670px darf NICHTS mehr die Breite erzwingen ===== */
@media (max-width: 670px){

  /* Wichtig: Grid/Flex-Kinder dürfen schrumpfen */
  .chat-shell,
  .chat-shell > .card,
  .chat-shell > .card *{
    min-width: 0;
  }

  /* Online-Name darf nicht mehr "nowrap" erzwingen */
  .online-name{
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: break-word;
    max-width: 100% !important;
  }

  /* Chat-Content darf auch nicht durch lange Wörter/Links breiter werden */
  .msg,
  .msg-content,
  .content,
  #log{
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  /* Sicherheit: Mobile wirklich 1 Spalte (falls irgendwo überschrieben) */
  .chat-shell{
    grid-template-columns: 1fr !important;
  }

  /* Optional: etwas weniger Innenabstand für sehr kleine Screens */
  .container{
    padding: 10px;
  }
}

/* DM Nachrichten sauber umbrechen */
.dm-log .msg,
.dm-log .msg > div {
  white-space: pre-wrap;      /* Zeilenumbrüche erlauben */
  word-wrap: break-word;      /* alte Browser */
  overflow-wrap: anywhere;   /* moderne Browser */
  word-break: break-word;    /* Fallback */
}





/* =========================
   Cards / Panels
   ========================= */
.card{
  /*background: rgba(15, 26, 46, 0.82);   /* 🔥 transparent */


  border: 1px solid #A62E44;
  border-radius: var(--radius2);
  box-shadow: var(--shadow);
  padding: var(--pad2);

  display: flex;
  flex-direction: column;
  min-height: 0;
}



.player-card{
  flex: 0 0 auto;
  height: 90px;              /* ← HIER steuerst du die Höhe */
  padding: 10px;
  border-radius: 14px;
  border: 1px solid #A62E44;
  border-radius: var(--radius2);
  box-shadow: var(--shadow);
  
  
}

.player-card iframe{
  width: 100%;
  height: 100%;
  border: 0;
}

.chat-shell{
  flex: 1 1 auto;
  min-height: 0;            /* ✅ extrem wichtig */

  display: grid;
  grid-template-columns: var(--online-w, 260px) 1fr;
  gap: 12px;
}


.chat-shell > .card:first-child{
  min-height: 0;
  display: flex;
  flex-direction: column;
  /*background: rgba(15, 26, 46, 0.75);*/
}
#log{
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}




.chat-shell > .card:last-child{
  min-height: 0;
  /*background: rgba(15, 26, 46, 0.75);*/
}
.chat-online{
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  
}




.panel{
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--pad);
}

.muted{ color: var(--muted); }
.muted2{ color: var(--muted2); }

.badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border2);
  background: rgba(255,255,255,.06);
  font-size: 12px;
  color: var(--muted);
}

/* =========================
   Buttons
   ========================= */
button, .btn{
  appearance: none;
  border: 1px solid var(--border2);
  background: rgba(255,255,255,.07);
  color: var(--text);
  padding: 10px 12px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .06s ease, background .15s ease, border-color .15s ease, opacity .15s ease;
}


}
button:active, .btn:active{ transform: translateY(1px); }

button:disabled{
  opacity: .55;
  cursor: not-allowed;
}

.btn-primary{
  background: linear-gradient(135deg, rgba(122,162,255,.35), rgba(110,231,255,.22));
  border-color: rgba(122,162,255,.55);
}


.btn-danger{
  border-color: rgba(255,107,107,.55);
  background: rgba(255,107,107,.14);
}
.btn-danger:hover{
  border-color: rgba(255,107,107,.75);
  background: rgba(255,107,107,.20);
}

/* Small buttons (Online + mini actions) */
.btn-sm{
  padding:4px 8px;
  font-size:12px;
  border-radius:8px;
}

/* =========================
   Inputs
   ========================= */
input, select, textarea{
  width: auto;
  max-width: 100%;
  border: 1px solid #A62E44;
  background: rgba(0,0,0,.20);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 12px;
  outline: none;
  transition: border-color .15s ease, background .15s ease;
  font-size: 20px;
}

input::placeholder, textarea::placeholder{ color: rgba(232,238,252,.45); }

input,
select,
textarea{
  background: transparent;
}

input:focus,
select:focus,
textarea:focus{
  border-color: #A62E44;
  background: transparent;
}

/* Select bleibt transparent, aber der “Block” kann sich ändern */
label:focus-within{
  background: transparent !important; /* oder wenn du willst: rgba(0,0,0,.2) */
}



textarea{
  width: 100%;
  min-height: unset;      /* ✅ erlaubt 1 Zeile */
  resize: none;
}


label{
  display:inline-flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

input[type="file"]{ padding: 8px; }

input[type="checkbox"]{
  width: 18px;
  height: 18px;
  accent-color: var(--accent2);
}

/* =========================
   Tables
   ========================= */
table{
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius2);
  overflow: hidden;
  background: rgba(255,255,255,.03);
}

th, td{
  padding: 10px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  font-size: 13px;
}

th{
  text-align:left;
  font-size: 12px;
  letter-spacing: .4px;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(255,255,255,.05);
}

tr:last-child td{ border-bottom: 0; }

tr:hover td{
  background: rgba(255,255,255,.04);
}

/* =========================
   Details / Summary
   ========================= */
details{
  border: 1px dashed rgba(255,255,255,.18);
  border-radius: 14px;
  padding: 8px 10px;
  background: rgba(0,0,0,.18);
}

details > summary{
  cursor: pointer;
  color: var(--accent2);
  font-weight: 700;
  list-style: none;
}

details > summary::-webkit-details-marker{ display:none; }

details[open]{
  border-style: solid;
  border-color: rgba(110,231,255,.25);
  background: rgba(0,0,0,.22);
}

/* =========================
   Chat specific
   ========================= */

.msg-name,
.msg-content {
  display: inline;
  vertical-align: middle;
}

.msg-content img {
  display: inline-block;
  vertical-align: middle;
  margin-left: 4px;
}

.msg-line {
  white-space: normal;
}

.msg-line img {
  display: inline-block;
  vertical-align: middle;
  margin-left: 4px;
  margin-right: 4px;
}





.msg{
  margin: 10px 0;
  
  
}

.msg .name{
  font-weight: 800;
  color: var(--text);
  font-size: var(--chat-name-font);
}

.meta{
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

.deleted{
  opacity: .8;
  font-style: italic;
  color: var(--muted);
}

.files img{
  margin-top: 8px;
  max-width: 240px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 10px 20px rgba(0,0,0,.25);
}

/* Smilie box */
.smilie-box{
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius2);
  padding: 10px;
  background: rgba(0,0,0,.20);
  display: none;
}

.smilie-box .cat-title{
  font-weight: 800;
  margin: 8px 0 6px;
  color: var(--muted);
}

.smilie-box img{
  
  cursor: pointer;
  margin: 2px;
  vertical-align: middle;
  border-radius: 8px;
  padding: 2px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
}
.smilie-box img:hover{
  border-color: rgba(110,231,255,.35);
  background: rgba(255,255,255,.07);
}

/* =========================
   Admin nav styling
   ========================= */
nav{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 0;
}

nav a{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  color: var(--text);
}

nav a:hover{
  background: rgba(255,255,255,.08);
  text-decoration: none;
  border-color: rgba(110,231,255,.30);
}

/* =========================
   Small utilities
   ========================= */
.success{
  border-color: rgba(74,222,128,.35);
  background: rgba(74,222,128,.12);
}
.warning{
  border-color: rgba(255,207,90,.35);
  background: rgba(255,207,90,.12);
}
.danger{
  border-color: rgba(255,107,107,.35);
  background: rgba(255,107,107,.12);
}

/* =========================
   Online list (Profil/PN button + click name)
   ========================= */
.online-row{
	position: relative;
  display:flex;
  align-items:center;
  gap:8px;
  margin-bottom:6px;
}

.online-name{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width: 210px;
}

.online-name:hover{
  text-decoration: underline;
  opacity: 0.95;
}

/* Klickbarer Name im Chatverlauf */
.name:hover{
  text-decoration: underline;
  opacity: 0.95;
}

/* Nur Smilies (wenn sie die typische Smilie-Klasse haben) */
/* Smilies im Chat anklickbar anzeigen */
#log img.smilie {
  cursor: pointer;
  transform: scale(0.85);
}

/* Badge im Chat unten rechts (im Scrollbereich) */
#log {
  position: relative; /* nötig für absolute Position im Inneren */
}

.newMsgBadge{
  position: absolute;
  z-index: 50;
  display: none;

  padding: 8px 10px;
  border: 0;
  border-radius: 999px;

  background: rgba(0,0,0,0.72);
  color: #fff;
  font-weight: 700;
  cursor: pointer;

  box-shadow: 0 8px 22px rgba(0,0,0,0.25);
}

/* ===== Online-Liste ===== */
#online {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Ein User in der Online-Liste */
.online-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
}

/* Avatar/Modpic */
.online-item .online-avatar {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: cover;
  flex: 0 0 auto;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.2);
}

/* Name + meta */
.online-item .online-main {
  min-width: 0;
  flex: 1;
}
.online-item .online-name {
  font-weight: 700;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.online-item .online-meta {
  font-size: 12px;
  opacity: 0.75;
  margin-top: 2px;
}

/* Zustände */
.online-item.is-self {
  outline: 2px solid rgba(55,233,120,0.35);
}

.online-item.is-guest .online-name {
  opacity: 0.9;
}

/* OnAir Badge rechts am Avatar (optional) */
.online-avatar-wrap {
  position: relative;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
}
.online-avatar-wrap .online-avatar {
  width: 38px;
  height: 38px;
}
.online-avatar-wrap .onair-badge {
  position: absolute;
  right: 4px;
  bottom: -4px;
  width: 70px;   /* kann per inline css weg, wenn du feste Größen willst */
  height: 70px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
}

/* Wenn du Moderatoren optisch markieren willst */
.online-item.is-mod {
  background: rgba(255, 200, 0, 0.08);
  border-color: rgba(255, 200, 0, 0.18);
}

.online-frames { margin: 10px 0; }
.online-frames__inner { display: grid; gap: 10px; }
.online-frame { width: 100%; height: 180px; border: 0; border-radius: 12px; }

@media (min-width: 980px){
  .online-frames__inner { grid-template-columns: 1fr 1fr; }
  .online-frame { height: 160px; }
}

.online-frames__inner{
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr; /* ✅ immer untereinander */
}

.online-frame{
  width: 100%;
  height: 100px;            /* anpassen wie du willst */
  border: 0;
  border-radius: 12px;
  background: transparent;
}

.online-count{
  
  border-radius: 10px;
  background: rgba(0,0,0,.04);
}

/* Desktop */
.online-radio__img {
  width: 150px;
  height: 150px;
}

/* Mobile */
@media (max-width: 980px) {
  .online-radio__img {
    width: 100px;
    height: 100px;
  }
}
/* DM Modal als Overlay bleibt, aber der "Kasten" wird beweglich/resizable */
/* Desktop Default */
/* =========================
   DM Modal Styling
   ========================= */

/* DM Box: eigener Hintergrund */
#dmModal .dm-window{
  display: flex;
  flex-direction: column;
  min-height: 0;          /* wichtig */
  overflow: hidden; 
  resize: both;
  pointer-events: auto; /* ✅ Fenster bleibt bedienbar */

  /* eigener Hintergrund */
  background-image: url("/public/assets/layout/bg.png"); /* <- hier eigenes DM-Bild möglich */
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;

  /* optional: falls du lieber nur Farbe willst
  background: rgba(10,12,18,.92);
  */

  position: fixed; /* du nutzt Drag/Center -> passt */
}

/* Kopfzeile: Button rechts oben */
#dmModal .dm-header{
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex: 0 0 auto;

  padding: 10px 12px;

  /* abdunkeln */
  background: rgba(0,0,0,0.72);
    /* ✅ runde Ecken unten */
  border-bottom-left-radius: 14px;
  border-bottom-right-radius: 14px;
    border-top-left-radius: 14px;
  border-top-right-radius: 14px;
}

/* Titel links */
#dmModal .dm-title{
  font-weight: 800;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Close Button rechts oben (auch wenn Header wrappen würde) */
#dmModal #dmClose{
  margin-left: auto;
  align-self: flex-start;
}

/* Log Bereich abdunkeln */
#dmModal .dm-log{
  flex: 1 1 auto;
  min-height: 0;          /* wichtig, sonst wächst es über */
  overflow-y: auto;
  scrollbar-width: none;

  margin-top: 10px;

  padding: 10px 12px;

  background: rgba(0,0,0,0.70);
    /* ✅ runde Ecken unten */
  border-bottom-left-radius: 14px;
  border-bottom-right-radius: 14px;
    border-top-left-radius: 14px;
  border-top-right-radius: 14px;
  
}
#dmModal .dm-log::-webkit-scrollbar {
  display: none;
}

/* Input Bereich leicht abgedunkelt */
#dmModal .dm-input{
  padding: 10px 12px;
  flex: 0 0 auto;
  

}

/* DM Textarea full width */
#dmModal #dmText{
  width: 100%;
  resize: none;
}

/* Actions (Senden) abdunkeln + rechts */
#dmModal .dm-actions{
  padding: 10px 12px;
  display: flex;
  justify-content: flex-end;
  flex: 0 0 auto;

  background: rgba(0,0,0,0.72);

  /* ✅ runde Ecken unten */
  border-bottom-left-radius: 14px;
  border-bottom-right-radius: 14px;
    border-top-left-radius: 14px;
  border-top-right-radius: 14px;
}


/* Mobile */
@media (max-width: 980px){
  #dmModal .dm-window{
    width: calc(100vw - 20px);
    height: min(70vh, 520px);
    max-width: none;
    max-height: none;
    min-width: 0;
    resize: none;
  }

  #dmModal .dm-log{
    height: calc(70vh - 170px); /* grobe Anpassung, falls du willst */
  }
}




#dmLog{
  position: relative;

  /* optional: leicht dunkler Grund */
  background: rgba(0,0,0,0.75);
  height: 400px;
}
.dm-header{
  position: relative;

  /* optional: leicht dunkler Grund */
  background: rgba(0,0,0,0.75);
}


/* Drag-Zone */
.dm-drag-handle {
  cursor: move;
  user-select: none;
  touch-action: none;           /* wichtig auf Mobile */
}

/* DM Textfeld: kein Resize-Griff */
#dmModal #dmText{
  resize: none;
}

/* Mobile Header für Online-Liste */
.online-mobile-header{
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,.15);
  background: inherit;
}

.online-mobile-title{
  font-weight: 700;
}

.online-mobile-close{
  background: none;
  border: none;
  color: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

/* Nur in Mobile sichtbar */
@media (max-width: 980px){
  .online-mobile-header{
    display: flex;
  }
}

/* Online Drawer Header (nur Mobile sichtbar machen) */
.online-mobile-header{
  display:none;
  align-items:center;
  justify-content:space-between;
  padding:10px 12px;
  border-bottom:1px solid rgba(0,0,0,.08);
  position: sticky;
  top: 0;
  background: inherit;
  z-index: 2;
}

.online-mobile-title{ font-weight:700; }

.online-mobile-close{
  border:0;
  background:transparent;
  font-size:22px;
  line-height:1;
  cursor:pointer;
}

@media (max-width: 980px){
  .online-mobile-header{ display:flex; }
}

/* DM Button Slot: immer gleiche Breite -> Name immer gleich eingerückt */
.online-dm-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width: 34px;      /* ggf. an deine Buttonbreite anpassen */
  min-width: 34px;
  height: 30px;     /* ggf. an btn-sm Höhe anpassen */
}

/* Unsichtbarer Platzhalter: kein Hover, kein Cursor, keine Klicks */
.online-dm-placeholder{
  opacity: 0;
  pointer-events: none;
  cursor: default;
}
.online-dm-btn{
  width:34px;
  height:30px;
  padding:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;

  background: transparent;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  }
  
.online-kick-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width: 34px;      /* ggf. an deine Buttonbreite anpassen */
  min-width: 34px;
  height: 30px;     /* ggf. an btn-sm Höhe anpassen */
}

/* Unsichtbarer Platzhalter: kein Hover, kein Cursor, keine Klicks */
.online-kick-placeholder{
  opacity: 0;
  pointer-events: none;
  cursor: default;
}
.online-kick-btn{
  width:34px;
  height:30px;
  padding:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;

  background: transparent;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;

  /* Icon via CSS 
  background-image: url("/assets/icons/dm.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 18px 18px;*/

  cursor: pointer;
}

.online-dm-btn:hover{
  background-color: rgba(255,255,255,.06);
}

.online-name.gender-m { color:#4aa3ff; } /* blau */
.online-name.gender-f { color:#ff6fb1; } /* rosa */
.online-name.gender-d { color:#ffffff; } /* weiß */

/* ====== Modal Base (falls noch nicht vorhanden) ====== */
.modal-overlay{
  position: fixed;
  inset: 0;
  display: none;              /* JS setzt auf flex */
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0,0,0,.55);
  z-index: 9999;
}

.modal-card{
  width: min(980px, 96vw);
  max-height: 85vh;
  overflow: hidden;
  border-radius: 16px;
  background: rgba(10,12,18,.92);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 18px 60px rgba(0,0,0,.55);
}

/* ====== Profile Modal ====== */
.profile-overlay{ /* nur falls du extra willst */ }

.profile-card{
  /* optional extra spacing */
  padding: 12px;
}

.profile-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-title{
  font-weight: 800;
}

.profile-body{
  margin-top: 10px;
}

.profile-frame-wrap{
  height: 72vh;
  max-height: 72vh;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
}

.profile-frame{
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: transparent;
}
/* =========================================
   MODAL (Basis wie DM, wiederverwendbar)
========================================= */

.modal-overlay{
  position: fixed;
  inset: 0;
  display: none;              /* wird per .is-open aktiviert */
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0,0,0,.55);
  z-index: 9999;
}

.modal-overlay.is-open{
  display: flex;
}

.modal-dialog{
  width: 100%;
  max-width: 980px;           /* Default (Profil) */
  max-height: 85vh;
  overflow: hidden;
  border-radius: 16px;
  /* Nutzt deinen .card Look, aber du kannst hier alles überschreiben */
}

.modal-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
}

.modal-title{
  font-weight: 800;
}

.modal-actions{
  display: flex;
  gap: 8px;
  align-items: center;
}

.modal-body{
  padding: 12px 14px 14px;
}

.modal-framewrap{
  height: 72vh;               /* Default (Profil) */
  max-height: 72vh;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
}

.modal-iframe{
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: transparent;
}

#dmLog img.smilie,
#dmLog img.emoji {
  cursor: pointer;
}

/* =========================================
   Profil-Modal (optional Feintuning)
========================================= */
.profile-modal .modal-dialog{
  max-width: 980px;
  max-height: 85vh;
}

.profile-modal .modal-framewrap{
  height: 72vh;
  max-height: 72vh;
}

/* =========================================
   Admin-Modal (eigene Größe + Frame-Hintergrund)
========================================= */
.admin-modal{
  z-index: 10000; /* über Profil */
}

.admin-modal .modal-dialog{
  max-width: 1100px;
  max-height: 88vh;
}

.admin-modal .modal-framewrap{
  height: 78vh;
  max-height: 78vh;
  border: 1px solid rgba(255,255,255,.10);
}

/* Admin iframe Hintergrund (falls du dunkel willst) */
.admin-modal .modal-iframe{
  background: beige;
}

/* Wenn du auch Textfarbe im Admin-Frame willst:
   -> Das muss in den ADMIN-Seiten selbst per CSS passieren,
      weil iframe-Inhalt getrennt ist.
   Beispiel: admin/_header.php oder admin/style.css:
   body { color: rgb(15,248,232); }
*/

/* Desktop: Dropdown aus */
.smilie-cat-selectwrap{ display:none; }

/* Mobile: Tabs aus, Dropdown an */
@media (max-width: 980px){
  .smilie-tabs{ display:none; }
  .smilie-cat-selectwrap{ display:block; margin: 6px 2px 12px 2px; }
  .smilie-cat-select{
    width: 100%;
    padding: 10px 12px;
    border-radius: 6px;
    border: 2px solid #1f3cff;
    background: transparent;
    color: #ffcc00;
    font-weight: 800;
  }
}
















/* ===== LAYOUT FIX: Fullscreen + korrekte Resthoehe + korrekte Breite ===== */

/* Body nicht scrollen – nur #log und #online */
body { overflow: hidden; }

/* Container als Flex-Layout: Header/Player fix, Chat-Shell nimmt den Rest */
.container{
  min-height: 100vh;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Player-Card darf nicht flexen */
.player-card{ flex: 0 0 auto; }

/* chat-shell nimmt den kompletten Rest der Hoehe */
.chat-shell{
  flex: 1 1 auto;
  min-height: 0; /* EXTREM wichtig */
  width: 100%;

  display: grid;

  /* ✅ WICHTIG: Reihenfolge muss zum HTML passen:
     1. Spalte = Chat (1fr), 2. Spalte = Online (fix/var) */
  grid-template-columns: 1fr var(--online-w, 320px);

  gap: 12px;
}

/* Beide Cards muessen in der Grid-Zelle die Hoehe ausnutzen */
.chat-shell > .card{
  min-height: 0;
  height: 100%;
}

/* Chat-Card: innen flex, damit #log den Rest bekommt */
.chat-shell > .card:first-child{
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* Online-Card: innen flex, damit #online scrollen kann */
.chat-shell > .card:last-child{
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* Chatlog muss scrollen */
#log{
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none;     /* Firefox */
  -ms-overflow-style: none;  /* Edge Legacy */
}

#log::-webkit-scrollbar {
  width: 0;
  height: 0;
}

/* Online-Liste muss scrollen */
#online.chat-online,
.chat-online{
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  text-align: center;
  color: #37e978;
  font-size: 17px;

}

/* Mobile: untereinander */
/* =========================
   Mobile: nur #log scrollt
   ========================= */
@media (max-width: 980px){

  html, body{
    height: 100%;
    overflow: hidden;              /* ⛔ Seite wächst nicht */
  }

  /* Gesamter Chat fix im Viewport */
  .container{
    height: 100dvh;                /* 📱 korrekt für Mobile */
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
  }

  /* Chat nimmt exakt den Rest ein */
  .chat-shell{
    flex: 1 1 auto;
    min-height: 0;
    grid-template-columns: 1fr;    /* Online unter Chat */
  }

  /* Chat-Card */
  .chat-shell > .card:first-child{
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1 1 auto;
  }

  /* ✅ NUR HIER scrollen */
  #log{
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Eingabe + Buttons bleiben sichtbar */
  .chat-input,
  .chat-compose,
  .chat-footer,
  #composer{
    flex: 0 0 auto;
  }
}

}
/* ===== Chat Eingabefeld Feintuning ===== */
#text{
  width: 100%;

  font-size: var(--chat-name-font);
  line-height: 1.2;              /* ✅ echte 1 Zeile */

  padding: 6px 12px;             /* symmetrisch */
  height: calc(1.2em + 12px);    /* exakt 1 Zeile */

  max-height: 38vh;              /* für JS-Autogrow */
  overflow-y: auto;

  resize: none;
  box-sizing: border-box;
  border: 1px solid #3354f6;
}




:root{
  --online-w: 320px;
  --splitter-w: 10px;
}

/* chat-shell jetzt 3 Spalten: Chat | Splitter | Online */
.chat-shell{
  grid-template-columns: 1fr var(--splitter-w) var(--online-w);
}

/* Splitter-Handle */
.splitter{
  cursor: col-resize;
  user-select: none;
  touch-action: none;

  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
}
.splitter:hover{
  background: rgba(255,255,255,0.12);
}

/* Mobile: untereinander, Splitter aus */
@media (max-width: 980px){
  .chat-shell{
    grid-template-columns: 1fr;
  }
  .splitter{
    display: none;
  }
}

#text{
  resize: none;
  font-size: 20px;
  margin-top: 2px;
  padding-top: 16px;
}


/* ===== Mobile Online Drawer ===== */

/* Button nur auf Mobile anzeigen */
.btn-online { display: none; }

@media (max-width: 980px){
  .btn-online{ display: inline-flex; }

  /* Splitter auf Mobile aus */
  .splitter{ display:none !important; }

  /* Online-Card als Drawer unten */
  .chat-shell > .card:last-child{
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: 10px;
    z-index: 1000;

    /* Drawer Höhe */
    height: min(80vh, 720px);
    min-height: 0;

    /* start hidden */
    transform: translateY(110%);
    opacity: 0;
    pointer-events: none;

    transition: transform .18s ease, opacity .18s ease;
  }

  /* Overlay */
  .online-overlay{
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(0,0,0,0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease;
  }

  /* geöffnet */
  body.online-open .chat-shell > .card:last-child{
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  body.online-open .online-overlay{
    opacity: 1;
    pointer-events: auto;
  }

  /* Desktop/Grid: Online soll im Layout nicht "Platz wegnehmen" */
  .chat-shell{
    grid-template-columns: 1fr !important;
  }
}

/* =========================
   Login / Register Layout
   ========================= */

.container-login{
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

/* Tablet */
@media (max-width: 900px){
  .container-login{
    max-width: 520px;
  }
}

/* Mobile */
@media (max-width: 640px){
  .container-login{
    max-width: none;   /* volle Breite */
    width: 100%;
    padding-left: 14px;
    padding-right: 14px;
  }
}

.container-login{
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
}

.container-login{
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(0,0,0,0.65);
}
/* =========================
   Login Container FIX
   ========================= */

.container-login{
  height: auto !important;
  min-height: unset !important;
}

/* =========================
   Login Center Wrapper
   ========================= */

.page-login{
  min-height: 100vh;
}

.login-center{
  min-height: 100vh;
  display: flex;
  align-items: center;     /* vertikal */
  justify-content: center; /* horizontal */
  padding: clamp(14px, 3vw, 32px);
  box-sizing: border-box;
}

/* Login Container selbst */
.container-login{
  max-width: 1100px;
  width: 100%;
  height: auto;
  min-height: unset;

  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);

  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.55);
}

select{
  background-color: rgba(0,0,0,0.65) !important;  /* ← HIER */
  background: rgba(0,0,0,0.65) !important;        /* ← HIER */
  color: var(--text);
}
.online-row{ display:flex; align-items:center; gap:8px; }





/* ✅ AFK Badge neben dem Namen (Online-Liste) */
.online-row .afk-badge,
.online-row .onair-badge{
/*  width: 70px;
  height: 70px;  */
  object-fit: contain;
  vertical-align: -3px;
  margin-left: 6px;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.55));
}

/* Raw-Command Message: nur Text, ohne Name/Meta */
.msg-raw {
  padding: 6px 10px;
  border-radius: 10px;
}

.msg-raw-text {
  white-space: pre-wrap;
  word-break: break-word;
  opacity: .95;
}

/* optional: wenn du ein separates Layout für raw willst */
.msg-raw .meta,
.msg-raw .name,
.msg-raw .time {
  display: none !important;
}
/* --- Dice Button (neben Smilies) --- */
#btnDice.btnDice{
  /* komplett frei gestaltbar */
  width: 38px;
  height: 38px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Beispiel: Icon per CSS statt Emoji */
#btnDice.icon-dice{
  background-image: url('/public/assets/igm/wuerfel.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: 32px 32px;
  font-size: 0;          /* 🎲 ausblenden */
  line-height: 0;
    padding: 0;
  border: none;
  background-color: transparent;

  font-size: 0;
  line-height: 0;
}

/* Inline-IGM im Dice-Text */
.igm.igm-dice{
  width: 46px;
  height: 34px;
  vertical-align: middle;
  margin-right: 6px;
}

.content {
	
	font-size: var(--chat-font);
	
}

.icon-smilies {
	
  padding: 0;
  background-color: transparent;
  border: none;

  width: 40px;
  height: 40px;
  background-image: url("/public/assets/igm/smilies.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 40px 40px;
}

.icon-profil {
	
    padding: 0;
  background-color: transparent;
  border: none;

  width: 40px;
  height: 40px;
  background-image: url("/public/assets/igm/profil.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 40px 40px;
}


.icon-afk {
  padding: 0;
  background-color: transparent;
  border: none;

  width: 60px;
  height: 40px;
  background-image: url("/public/assets/igm/afk.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 55px 40px;
}

.icon-admin {
  padding: 0;
  background-color: transparent;
  border: none;

  width: 40px;
  height: 40px;
  background-image: url("/public/assets/igm/admin.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 40px 40px;
}

.icon-logout {
  padding: 0;
  background-color: transparent;
  border: none;

  width: 40px;
  height: 40px;
  background-image: url("/public/assets/igm/logout.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 40px 40px;
}

.icon-send {
  padding: 0;
  background-color: transparent;
  border: none;

  width: 40px;
  height: 40px;
  background-image: url("/public/assets/igm/send.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 40px 40px;
}

.info-card{
	    width: min(550px, 96vw);
	max-height: 43vh;
	background: rgba(10, 12, 18, .92);
}

.icon-info {
  padding: 0;
  background-color: transparent;
  border: none;

  width: 40px;
  height: 40px;
  background-image: url("/public/assets/igm/copyright.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 40px 40px;
}

.online-dm-btn {
	
  padding: 0;
  background-color: transparent;
  border: none;

  width: 20px;
  height: 20px;
  background-image: url("/public/assets/igm/privat.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 20px 20px;
}

.online-kick-btn {
	
  padding: 0;
  background-color: transparent;
  border: none;

  width: 20px;
  height: 20px;
  background-image: url("/public/assets/igm/kicken.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 20px 20px;
}




/* Smilie-Picker Layout (Tabs + Grid) */
.smilie-picker { display:block; }

.smilie-tabs{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  padding:6px 2px 12px 2px;
}

.smilie-tab{
  background:transparent;
  border:2px solid #A62E44;
  color:#37e978;
  padding:10px 14px;
  border-radius:6px;
  font-weight:800;
  cursor:pointer;
  line-height:1;
}

.smilie-tab.active{
  background:#680908;     /* grün wie Screenshot-Active */
  border-color:#1fa64a;
  color:#37e978;
}

.smilie-panels{
  border-top:1px solid #A62E44;
  padding-top:16px;
}

.smilie-panel{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
  gap:26px 22px;
  align-items:center;
}



/* Smilies generell (Chat + Smiliebox) */


@media (max-width: 980px){
  img.smilie,
  .smilie-panel img {
    transform: scale(0.4);
  }
}

/* Mobile */
@media (max-width: 980px){
  :root{
    --chat-font: 14px;
    --chat-name-font: 14px;
  }
  .msg{ line-height: 1.35; }
}

/* Grundlayout Smiliebox */
.smilie-picker{
  display: grid;
  grid-template-rows: auto 1fr;
  height: 100%;
}

/* Kategorien (Tabs) scrollbar */
.smilie-tabs{
  max-height: 150px;          /* kannst du anpassen */
  overflow-y: auto;
  scrollbar-width: thin;
}

/* Smilies scrollbar */
.smilie-panels{
  overflow-y: auto;
  height: 100%;
}


@media (max-width: 980px){

  .smilie-picker{
    display: grid;
    grid-template-rows: auto 1fr;
    height: 100%;
  }

  /* Dropdown bleibt sichtbar */
  .smilie-cat-selectwrap{
    flex-shrink: 0;
  }

  /* Smilies eigener Scroll */
  .smilie-panels{
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* Smiliebox: Overlay klickt nicht "dicht", Card bleibt klickbar */
#smilieModal{
  pointer-events: none;
}

#smilieModal #smilieCard{
  pointer-events: auto;
}
/* =====================================================
   Smiliebox Overlay – Abdunkeln, Chat sichtbar lassen
   ===================================================== */

/* Overlay: dunkelt ab, fängt Klicks ab */
#smilieModal{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 90000;
}

/* Smilie-Card klar sichtbar */
#smilieModal .smilie-card{
  background: #0b0b0b;
  box-shadow: 0 0 40px rgba(0,0,0,0.8);
  z-index: 90010;
}

/* Chat bleibt sichtbar, aber optisch heller als Overlay */
body.smilie-open .content,
body.smilie-open #chat,
body.smilie-open .chat{
  filter: brightness(1.15) contrast(1.05);
}

/* Smiliebox NICHT vom globalen img beeinflussen */
#smilieModal img{
  max-width: none;
  box-shadow: none;
  border: 0;
}

/* Mobile Fix */
@media (max-width: 980px){
  #smilieModal{
    background: rgba(0,0,0,0.75);
  }
}
body.smilie-open{
  overflow: hidden;
}

#smilieModal{
  background: rgba(0,0,0,0.65);
}
/* Overlay abdunkeln */
#smilieModal{
  background: rgba(0,0,0,0.65);
}

/* Chat “heller” während Smiliebox offen ist */
body.smilie-open .content{
  filter: brightness(1.15) contrast(1.05);
}
/* Smiliebox verhält sich wie DM-Modal */
#smilieModal.smilie-modal{
  position: fixed;
  inset: 0;
  pointer-events: none;   /* blockiert den Chat NICHT */
  z-index: 90000;
}

/* Nur die Box selbst ist klickbar */
#smilieModal .smilie-card{
  pointer-events: auto;
  background: #0b0b0b;    /* wie DM */
  box-shadow: 0 0 30px rgba(0,0,0,0.8);
}























































/* =========================
   Profil: mehr Abstand
   ========================= */

/* Abschnitts-Überschriften */
.profile-body h2,
.profile-body h3{
  margin-top: 28px;
  margin-bottom: 14px;
}

/* Beschreibungstexte unter Überschriften */
.profile-body p,
.profile-body .description,
.profile-body .help-text{
  margin-bottom: 14px;
  line-height: 1.5;
}

/* Form-Gruppen (Label + Input + Select) */
.profile-body label{
  display: block;
  margin-bottom: 18px;   /* 🔑 Abstand zwischen Optionen */
}

/* Inputs / Selects selbst */
.profile-body input,
.profile-body select,
.profile-body textarea{
  margin-top: 6px;       /* Abstand zum Label */
}

/* Extra Abstand zwischen logisch getrennten Bereichen */
.profile-body .section,
.profile-body .group,
.profile-body .setting{
  margin-bottom: 24px;
}



/* ===== FORCE: #text exakt 1 Zeile (überschreibt ALLES) ===== */
textarea#text{
  height: 44px !important;       /* ✅ 1 Zeile (stell hier ggf. 40–48px ein) */
  min-height: 44px !important;
  max-height: 44px !important;

  line-height: 1.2 !important;
  padding: 8px 12px !important;  /* ✅ symmetrisch, kein padding-top */
  overflow: hidden !important;   /* ✅ keine zweite "Zeile" durch Scroll/Autoheight */
  resize: none !important;

  box-sizing: border-box !important;
  border-color: #A62E44;
}

/* ============================
   Smiliebox – Mobile Layout
   ============================ */
@media (max-width: 980px){

  /* Tabs auf Mobile komplett ausblenden */
  .smilie-tabs{
    display: none !important;
  }

  /* Dropdown auf Mobile anzeigen */
  .smilie-cat-selectwrap{
    display: block !important;
    margin: 8px 4px 12px 4px;
  }

  .smilie-cat-select{
    width: 100%;
    padding: 10px 12px;
    border-radius: 6px;
    border: 2px solid #1f3cff;
    background: transparent;
    color: #ffcc00;
    font-weight: 800;
  }
}

/* Desktop: Dropdown aus */
@media (min-width: 981px){
  .smilie-cat-selectwrap{
    display: none !important;
  }
}

/* Smiliebox – gleicher Scrollbar Look */
#smilieModalBody{
  overflow: auto;
  scrollbar-width: thin;                 /* Firefox */
  scrollbar-color: #2a2a2a #0b0b0b;       /* thumb / track */
}

#smilieModalBody::-webkit-scrollbar{
  width: 10px;
}

#smilieModalBody::-webkit-scrollbar-track{
  background: #0b0b0b;
}

#smilieModalBody::-webkit-scrollbar-thumb{
  background: #2a2a2a;
  border-radius: 10px;
  border: 2px solid #0b0b0b;
}

#smilieModalBody::-webkit-scrollbar-thumb:hover{
  background: #3a3a3a;
}


/* Smiliebox: Smilies sauber nebeneinander (Originalgröße bleibt) */
/* =========================
   Smiliebox – Auto Grid pro Kategorie
   ========================= */

/* Jede Kategorie (= smilie-panel) bekommt ihr eigenes Grid */
.smilie-panel{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(max-content, 1fr));
  gap: 14px;
  align-items: start;
}

/* Smilies selbst: Originalgröße, nichts verzerren */
.smilie-panel img{
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: none;
}
.smiley-panel {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;

    align-items: start;
    justify-items: center;

    padding: 10px;
}

/* =====================================================
   SMILIEBOX – ISOLIERT & SAUBER
   ===================================================== */

.smilie-picker--isolated .smilie-panel-clean{
  display: flex;              /* passt jetzt perfekt, weil JS auch flex setzt */
  flex-wrap: wrap;
  gap: 12px;

  align-items: center;
  justify-content: flex-start;
  align-content: flex-start;

  padding: 12px;

  /* Schutz gegen vererbte Styles */
  line-height: normal;
  font-size: 0;
}

/* NUR Smilies in der Smiliebox */
.smilie-picker--isolated .smilie-panel-clean img{
  /* reset gegen störende globale Regeln */
  position: static !important;
  float: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;

  display: block;
  cursor: pointer;

  /* saubere Reihen */
  height: auto;
  width: auto;

  /* große Banner begrenzen */
  max-height: 80%;
  max-width: 320px;
  object-fit: contain;
}

.smilie-picker--isolated .smilie-panel-clean {
  max-height: 70vh;   /* Smiliebox-Höhe */
}


/* NUR Smilies optisch skalieren */
.smilie-picker--isolated .smilie-panel-clean img {
  display: inline-block;

  transform: scale(0.8);
  transform-origin: center center;

  /* wichtig: nichts erzwingen */
  width: auto;
  height: auto;

  /* Schutz */
  max-width: none;
  max-height: none;
}






/* Optional: leichtes Hover */
.smilie-picker--isolated .smilie-panel-clean img:hover{
  filter: brightness(1.08);
}

/* Responsive */
@media (max-width: 900px){
  .smilie-picker--isolated .smilie-panel-clean img{
    height: 60px;
    max-width: 260px;
  }
}




@media (max-width: 980px){
  .smilie-panel{
    grid-template-columns: repeat(auto-fill, minmax(clamp(56px, 16vw, 90px), 1fr));
    grid-auto-rows: clamp(56px, 16vw, 90px);
  }

  /* Mobile: 40% */
  .smilie-panel img{
    transform: scale(0.4);
  }
}


/* =====================================================
   FINAL: Smiliebox wie DM (kein Vollbild-Overlay)
   ===================================================== */

/* SmilieModal darf NICHT als Overlay den Screen blockieren */
#smilieModal{
  position: static !important;
  inset: auto !important;
  background: none !important;
  pointer-events: none !important; /* Chat bleibt klickbar */
}

/* Keine Chat-Filter/Abdunklung durch smilie-open */
body.smilie-open .content,
body.smilie-open #chat,
body.smilie-open .chat{
  filter: none !important;
}

/* Smiliebox-Card ist das "Fenster" (klickbar, draggable/resizable via JS) */
#smilieModal .smilie-card,
#smilieModal #smilieCard{
  pointer-events: auto !important;
  position: fixed !important;
  z-index: 10001 !important;
  background: rgba(10,12,18,.95) !important;
  border: 1px solid rgba(255,255,255,.08) !important;
  border-radius: 16px !important;
  box-shadow: 0 18px 60px rgba(0,0,0,.55) !important;
}



/* =====================================================
   PATCH: Multi-DM Modals (layout-sicher)
   Erlaubt mehrere DM-Overlays mit IDs wie dmModal_user_123,
   ohne bestehendes Layout/CSS zu zerstören.
   ===================================================== */

/* Statt nur #dmModal gelten die Styles für jedes Overlay, dessen ID mit dmModal beginnt */
[id^="dmModal"] .dm-window{
  height: 600px;
  max-height: 1200px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  resize: both;
  pointer-events: auto;

  background-image: url("/public/assets/layout/bg.png");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;

  position: fixed;
}

[id^="dmModal"] .dm-header{
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex: 0 0 auto;
  padding: 10px 12px;
  background: rgba(0,0,0,0.72);
  border-bottom-left-radius: 14px;
  border-bottom-right-radius: 14px;
  border-top-left-radius: 14px;
  border-top-right-radius: 14px;
}

[id^="dmModal"] .dm-title{
  font-weight: 800;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

[id^="dmModal"] [id^="dmClose"]{
  margin-left: auto;
  align-self: flex-start;
}

[id^="dmModal"] .dm-log{
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none;
  margin-top: 10px;
  padding: 10px 12px;
  background: rgba(0,0,0,0.70);
  border-bottom-left-radius: 14px;
  border-bottom-right-radius: 14px;
  border-top-left-radius: 14px;
  border-top-right-radius: 14px;
}
[id^="dmModal"] .dm-log::-webkit-scrollbar{ display:none; }

[id^="dmModal"] .dm-input{
  padding: 10px 12px;
  flex: 0 0 auto;
}

[id^="dmModal"] [id^="dmText"]{
  width: 100%;
  resize: none;
}

[id^="dmModal"] .dm-actions{
  padding: 10px 12px;
  display: flex;
  justify-content: flex-end;
  flex: 0 0 auto;
  background: rgba(0,0,0,0.72);
  border-bottom-left-radius: 14px;
  border-bottom-right-radius: 14px;
  border-top-left-radius: 14px;
  border-top-right-radius: 14px;
}

/* Mobile */
@media (max-width: 980px){
  [id^="dmModal"] .dm-window{
    width: calc(100vw - 20px);
    height: min(70vh, 520px);
    max-width: none;
    max-height: none;
    min-width: 0;
    resize: none;
  }
}
