:root{
  --asr-blue:#040085;
  --asr-yellow:#ffeb3b;
  --asr-panel:rgba(4,0,133,.92);
}

*{
  box-sizing:border-box;
}

html,body{
  margin:0;
  padding:0;
  width:100%;
  height:100%;
  font-family:Arial, Helvetica, sans-serif;
  background:#000;
  color:#fff;
}

/* LOGIN */
.login-bg{
  width:100%;
  height:100%;
  background-size:cover;
  background-position:center center;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
}

.loginbox{
  width:520px;
  max-width:100%;
  background:var(--asr-panel);
  border-radius:20px;
  padding:28px;
  box-shadow:0 0 18px rgba(255,235,59,.35),0 0 50px rgba(0,0,0,.55);
}

.asr-logo-text{
  text-align:center;
  font-size:28px;
  font-weight:bold;
  margin-bottom:26px;
  color:var(--asr-yellow);
  text-shadow:0 0 8px rgba(255,235,59,.85);
}

.loginbox label{
  display:block;
  margin-bottom:8px;
  font-size:17px;
  font-weight:bold;
}

.loginbox input[type=text],
.loginbox input[type=password],
.loginbox select{
  width:100%;
  padding:12px;
  border-radius:10px;
  border:0;
  margin-bottom:18px;
  font-size:16px;
  background:#dfe6ef;
}

.loginbox button{
  width:100%;
  padding:14px;
  border:0;
  border-radius:12px;
  cursor:pointer;
  font-size:18px;
  font-weight:bold;
  background:linear-gradient(to bottom,#ffe56a,#e6b800);
  color:#000;
}

.rules{
  display:flex !important;
  align-items:center;
  gap:10px;
  margin-top:18px;
}

.loginbox hr{
  border:0;
  border-top:1px solid rgba(255,255,255,.25);
  margin:20px 0;
}

.online-title,
.online-list,
.footer{
  text-align:center;
}

.login-error{
  background:#aa0000;
  color:#fff;
  padding:10px;
  border-radius:10px;
  margin-bottom:20px;
  text-align:center;
}

/* CHAT */
.chat-page{
  background:#02024f;
}

.chat-wrap{
  width:100%;
  height:100%;
  display:flex;
  flex-direction:column;
}

/* TOPBAR */
.topbar{
  height:42px;
  min-height:42px;
  background:var(--asr-blue);
  color:var(--asr-yellow);
  display:grid;
  grid-template-columns:220px 1fr 300px;
  align-items:center;
  gap:10px;
  padding:0 12px;
  font-weight:bold;
  overflow:hidden;
}

.top-left{
  white-space:nowrap;
  text-shadow:0 0 8px rgba(255,235,59,.7);
}

.top-user{
  text-align:right;
  white-space:nowrap;
}

.logout{
  color:#fff;
  text-decoration:none;
  margin-left:12px;
}

.top-marquee{
  overflow:hidden;
  white-space:nowrap;
  height:26px;
  display:flex;
  align-items:center;
}

.top-marquee-track{
  display:inline-block;
  padding-left:100%;
  animation:asrTopMarquee 26s linear infinite;
  color:#f2f2f2;
  font-size:14px;
  font-weight:normal;
}

@keyframes asrTopMarquee{
  0%{ transform:translateX(0); }
  100%{ transform:translateX(-100%); }
}

/* MAIN */
.chat-main{
  flex:1;
  display:grid;
  grid-template-columns:1fr 330px;
  overflow:hidden;
  min-height:0;
}

.messages{
  padding:12px;
  overflow-y:auto;
  background:#0606a8;
  min-width:0;
}

/* RECHTS */
.right-panel{
  display:flex;
  flex-direction:column;
  min-height:0;
  background:#101060;
  border-left:2px solid rgba(255,255,255,.12);
}

.player-box{
  height:140px;
  min-height:130px;
  padding:8px;
  background:#040085;
  border-bottom:2px solid rgba(255,255,255,.12);
}

.player-box iframe{
  width:100%;
  height:100%;
  border:0;
  display:block;
  background:transparent;
}

.backup-player{
  padding:2px 6px;
  background:#040085;
  border-bottom:1px solid rgba(255,255,255,.12);
}

.backup-player audio{
  width:100%;
  height:24px;
}

.users{
  flex:1;
  min-height:0;
  overflow-y:auto;
  padding:10px;
}

.users-title{
  font-weight:bold;
  margin-bottom:10px;
  color:var(--asr-yellow);
}

/* CHATZEILEN */
.chat-line{
  display:flex;
  align-items:center;
  background:#f5f5f5;
  color:#000;

  padding:7px 14px;

  border-radius:16px;

  margin-bottom:8px;

  width:fit-content;
  max-width:85%;

  min-height:36px;

  box-shadow:0 0 5px rgba(0,0,0,.18);

  line-height:1.3;

  font-size:15px;

  gap:6px;
}

.chat-avatar{
  display:inline-flex;
  width:24px;
  height:24px;
  border-radius:50%;
  align-items:center;
  justify-content:center;
  background:#fff;
  color:#000;
  font-size:14px;
  flex-shrink:0;
}

.chat-time{
  color:#000;
  font-size:12px;
  font-weight:bold;
  margin-right:6px;
  opacity:.65;
  flex-shrink:0;
}

.chat-user{
  font-weight:bold;
  margin-right:2px;
  white-space:nowrap;
}

.chat-text{
  color:#111;
  word-break:break-word;

  font-size:15px;

  line-height:1.3;

  font-weight:normal;
}

/* SYSTEM */
.chat-system-message{
  display:block;
  width:fit-content;
  max-width:95%;
  background:#ffe082;
  color:#000;
  padding:8px 14px;
  border-radius:16px;
  margin-bottom:10px;
  border:2px solid #ffb300;
  box-shadow:0 0 8px rgba(255,193,7,.35);
  font-size:14px;
  min-height:38px;
}

.chat-system-time{
  color:#444;
  margin-right:6px;
  font-size:12px;
  font-weight:bold;
}

/* USERLISTE */
.online-user{
  display:flex;
  align-items:center;
  gap:5px;
  color:#fff;
  padding:3px 6px;
  margin-bottom:3px;
  border-radius:10px;
  font-weight:bold;
  font-size:13px;
  transition:transform .2s ease, box-shadow .2s ease;
}

.online-user:hover{
  transform:scale(1.02);
}

.online-user-icon{
  width:18px;
  height:18px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#fff;
  color:#000;
  font-size:11px;
  flex-shrink:0;
}

.online-user-name{
  color:#fff;
  font-size:13px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.user-guest{
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.25);
}

.user-listener{
  background:linear-gradient(to right, rgba(160,255,160,.32), rgba(60,255,60,.18)) !important;
  border:1px solid rgba(160,255,160,1) !important;
  box-shadow:0 0 14px rgba(160,255,160,1),0 0 32px rgba(80,255,80,.85),0 0 52px rgba(0,255,0,.45) !important;
}

.user-modi{
  background:linear-gradient(to right, rgba(140,215,255,.34), rgba(50,160,255,.18)) !important;
  border:1px solid rgba(150,220,255,1) !important;
  box-shadow:0 0 14px rgba(150,220,255,1),0 0 34px rgba(60,170,255,.90),0 0 54px rgba(0,120,255,.50) !important;
}

.user-admin{
  background:linear-gradient(to right, rgba(255,190,120,.35), rgba(255,110,30,.20)) !important;
  border:1px solid rgba(255,190,120,1) !important;
  box-shadow:0 0 14px rgba(255,190,120,1),0 0 36px rgba(255,130,40,.90),0 0 56px rgba(255,90,0,.55) !important;
} 

.user-superadmin{
  background:linear-gradient(to right, rgba(255,235,130,.38), rgba(255,160,20,.22)) !important;
  border:1px solid rgba(255,235,130,1) !important;
  box-shadow:0 0 16px rgba(255,235,130,1),0 0 38px rgba(255,180,40,.95),0 0 62px rgba(255,120,0,.60) !important;
}

/* SENDBAR */
.sendbar{
  height:64px;
  min-height:64px;
  background:#2D5B9E;
  display:flex;
  align-items:center;
  gap:8px;
  padding:8px;
}

.sendbar input{
  flex:1;
  border-radius:10px;
  border:0;
  padding:10px 14px;
  font-size:18px;
  height:40px;
}

.sendbar button{
  width:48px;
  height:44px;

  display:flex;
  align-items:center;
  justify-content:center;

  border:0;
  border-radius:8px;
  cursor:pointer;
  transition:.2s;
  padding:0;
}
.sendbar button img{
  width:40px;
  height:40px;
  display:block;

}

.sendbar button:hover{

    transform:scale(1.12);

    box-shadow:
        0 0 8px #ffeb3b,
        0 0 18px #ffd700,
        0 0 30px rgba(255,235,59,.75);

}

.sendbar button[type=submit]{
  background:linear-gradient(to bottom,#8fd4ff,#4aa8e8);
  color:#003366;
  border:1px solid #2c7fba;
}
.tool-btn{
  background:linear-gradient(to bottom,#dfe8f5,#bfcde0) !important;
  border:1px solid #7f95b3;
  padding:0;
}

.send-btn{
  background:linear-gradient(to bottom,#dfe8f5,#bfcde0) !important;
  border:1px solid #7f95b3;
  padding:0;
}
/* POPUPS */
.modal-bg{
  position:fixed;
  left:0;
  top:0;
  width:100%;
  height:100%;
  background:rgba(0,0,0,.35);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:9999;
}

.settings-box{
  width:420px;
  max-width:92%;
  background:#fff;
  color:#000;
  border:2px solid #333;
  border-radius:4px;
  box-shadow:0 0 18px rgba(0,0,0,.55);
}

.settings-box.small{
  width:430px;
}

.admin-box{
  width:720px;
  max-width:95%;
}

.settings-title{
  background:#e5e5e5;
  color:#000;
  font-weight:bold;
  padding:8px 10px;
  border-bottom:1px solid #999;
  display:flex;
  justify-content:space-between;
  align-items:center;
}

.settings-title button{
  background:#b00000;
  color:#fff;
  border:1px solid #600;
  border-radius:3px;
  font-weight:bold;
  cursor:pointer;
  padding:2px 8px;
}

.settings-content{
  padding:14px;
  color:#000;
}

.settings-content a{
  display:block;
  color:#000;
  text-decoration:none;
  padding:7px 4px;
  border-bottom:1px solid #ddd;
}

.settings-content a:hover{
  background:#f0f0f0;
}

.settings-content input[type=password]{
  width:100%;
  padding:8px;
  margin:6px 0 12px;
  border:1px solid #999;
}

.modal-actions{
  text-align:right;
  margin-top:10px;
}

.modal-actions button{
  padding:6px 12px;
  margin-left:6px;
  border:1px solid #777;
  background:#eee;
  color:#000;
  cursor:pointer;
}

.settings-section{
  margin-top:12px;
  padding-top:10px;
  border-top:1px solid #ccc;
}

.settings-section label{
  display:block;
  margin-top:8px;
  margin-bottom:4px;
  color:#000;
  font-weight:bold;
}

.settings-section input[type=color],
.settings-section select{
  width:100%;
  padding:8px;
  border:1px solid #999;
  background:#fff;
  color:#000;
  margin-bottom:12px;
}

#saveStyleBtn{
  padding:7px 14px;
  border:1px solid #777;
  background:#eee;
  color:#000;
  cursor:pointer;
}

#styleMsg,
#protectMsg{
  margin-top:10px;
  font-weight:bold;
}

/* ADMIN */
.admin-users-table{
  width:100%;
  border:1px solid #aaa;
  background:#fff;
  color:#000;
  font-size:14px;
}

.admin-row{
  display:grid;
  grid-template-columns:1.4fr 1fr 1.2fr .8fr;
  border-bottom:1px solid #ddd;
}

.admin-row > div{
  padding:8px;
}

.admin-head{
  background:#e5e5e5;
  font-weight:bold;
}

.admin-row:nth-child(even){
  background:#f7f7f7;
}

.admin-role-select{
  width:100%;
  padding:5px;
  border:1px solid #999;
  background:#fff;
  color:#000;
}

.admin-save-role{
  padding:5px 8px;
  border:1px solid #777;
  background:#eee;
  color:#000;
  cursor:pointer;
}

/* HINTERGRUND GALERIE */
.background-box{

    width:900px;
    max-width:95%;

    max-height:90vh;

    display:flex;
    flex-direction:column;

}

.background-card{
  border:2px solid #ccc;
  background:#fff;
  cursor:pointer;
  padding:6px;
  border-radius:8px;
  transition:.2s;
}

.background-card:hover{
  transform:scale(1.03);
  border-color:#0078d7;
}

.background-card.active{
  border:3px solid #00aa00;
  box-shadow:0 0 12px rgba(0,170,0,.5);
}

.background-card img{
  width:100%;
  height:120px;
  object-fit:cover;
  border-radius:4px;
  display:block;
}

.background-card span{
  display:block;
  margin-top:6px;
  text-align:center;
  font-weight:bold;
  color:#000;
}

/* MOBIL */
@media (max-width:800px){
  .topbar{
    grid-template-columns:1fr;
    height:auto;
    gap:4px;
    padding:6px 10px;
  }

  .top-user{
    text-align:left;
  }

  .chat-main{
    grid-template-columns:1fr;
  }

  .right-panel{
    display:none;
  }

  .chat-line{
    max-width:96%;
  }
}
/* 3-Sekunden Hinweis */
.asr-toast{
  position:fixed;
  top:58px;
  right:360px;
  z-index:99999;
  background:#ffe082;
  color:#000;
  border:2px solid #ffb300;
  border-radius:14px;
  padding:10px 16px;
  font-weight:bold;
  box-shadow:0 0 14px rgba(0,0,0,.45);
}
/* SMILEY BOX */

.smiley-box{
  position:fixed;
  bottom:90px;
  left:12px;

  width:650px;
  max-width:90vw;
max-height:420px;
overflow-y:auto;

  background:#ffffff;
  color:#000;

  border:2px solid #4aa8e8;
  border-radius:12px;

  padding:12px;

  box-shadow:0 0 18px rgba(0,0,0,.35);

  z-index:99999;

  font-size:24px;
  line-height:1.8;

  cursor:pointer;

  user-select:none;
}
.smiley-item{
  display:inline-block;
width:40px;
height:40px;
line-height:40px;
  text-align:center;
  border-radius:8px;
  cursor:pointer;
}

.smiley-item:hover{
  background:#dff3ff;
}
.smiley-category{
  font-size:16px;
  font-weight:bold;
  color:#003366;
  margin:8px 0 4px;
  border-bottom:1px solid #b5dfff;
}
.chat-dice-message{
  display:flex;
  align-items:center;
  gap:6px;

  clear:both;

  width:fit-content;
  max-width:85%;

  background:#ffecec;
  color:#660000;

  border:1px solid #ffb8b8;
  border-left:4px solid #d9534f;

  border-radius:14px;

  padding:4px 10px;
  margin:3px 0;

  font-size:14px;
  font-weight:bold;
}

.dice-icon{
  width:18px;
  height:18px;
  flex:none;
}

.dice-number{
  display:inline-block;
  width:24px;
  height:24px;
  line-height:24px;
  text-align:center;
  color:#cc0000;
  background:#fff5f5;
  border:1px solid #cc0000;
  border-radius:50%;
  font-size:17px;
  font-weight:bold;
  margin:0 4px;
}
.private-separator{
  height:1px;
  background:#999;
  margin:15px 0 15px 0;
}

.private-input-row{
  margin-top:0;
  padding-top:0;
  display:flex;
  align-items:center;
  gap:6px;
}

#privateInput{
  flex:1;
  width:100%;
  height:32px;
  padding:4px 8px;
  font-size:14px;
  border:1px solid #b0b0b0;
  border-radius:4px;
}

#privateSend{
  width:32px;
  height:32px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:transparent;
  border:0;
  cursor:pointer;
  padding:0;
  flex:none;
}

#privateSend img{
  width:26px;
  height:26px;
  display:block;
}
#privateEnd{
  height:32px;
  padding:0 10px;
  background:#b00000;
  color:#fff;
  border:1px solid #600;
  border-radius:5px;
  font-weight:bold;
  cursor:pointer;
  flex:none;
}

#privateEnd:hover{
  background:#d00000;
}
.asr-login-logos{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:80px;
  margin-bottom:10px;
}

.asr-login-logos img{
  width:50px;
  height:50px;
  border-radius:50%;
}
.asr-welcome-line{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  margin-bottom:15px;
}

.asr-welcome-line h2{
  margin:0;
  color:#fff;
  text-align:center;
  font-size:20px;
}

.asr-welcome-line img{
  width:75px;
  height:75px;
  border-radius:50%;
}

.password-wrap{
  position:relative;
  width:100%;
  margin-bottom:18px;
}

.password-wrap input{
  width:100%;
  padding-right:45px !important;
  margin-bottom:0 !important;
}

.password-eye{
  position:absolute;
  right:14px;
  top:50%;
  transform:translateY(-50%);
  cursor:pointer;
  font-size:20px;
  user-select:none;
  opacity:.75;
  z-index:5;
}

.password-eye:hover{
  opacity:1;
}
.admin-tabs{
  display:flex;
  gap:6px;
  margin-bottom:12px;
}

.admin-tab{
  padding:7px 12px;
  border:1px solid #999;
  background:#e5e5e5;
  color:#000;
  cursor:pointer;
  font-weight:bold;
  border-radius:5px;
}

.admin-tab.active{
  background:#2D5B9E;
  color:#fff;
  border-color:#1b3f73;
}

#broadcastMessage{
  width:100%;
  min-height:90px;
  resize:vertical;
  box-sizing:border-box;
  padding:8px;
}

.broadcast-buttons{
  margin-top:10px;
  display:flex;
  gap:8px;
}

.admin-footer{
  margin-top:14px;
  padding-top:10px;
  border-top:1px solid #ccc;
  text-align:right;
}

#adminCloseBottom{
  padding:7px 16px;
  border:1px solid #777;
  background:#eee;
  color:#000;
  cursor:pointer;
  font-weight:bold;
}
.chat-broadcast-message{
  display:flex;
  align-items:center;
  gap:8px;
  width:fit-content;
  max-width:95%;
  background:#dfffd8;
  border:2px solid #55aa55;
  border-radius:16px;
  padding:8px 14px;
  margin-bottom:10px;
  color:#003300;
  font-size:14px;
}

.broadcast-content{
  display:flex;
  align-items:center;
  gap:6px;
  flex:1;
  flex-wrap:wrap;
}

.broadcast-header{
  display:flex;
  align-items:center;
  gap:6px;
  font-weight:bold;
  color:#006600;
  margin-bottom:0;
  white-space:nowrap;
}

.broadcast-text{
  color:#003300;
  font-size:14px;
  line-height:1.4;
  white-space:normal;
  word-break:break-word;
}

.broadcast-icon-left,
.broadcast-icon-right{
    font-size:22px;
    line-height:1;
    flex:none;
}

.broadcast-icon-left{
    animation:asrBroadcastLeft 2.5s ease-in-out infinite;
}

.broadcast-icon-right{
    transform:scaleX(-1);
    animation:asrBroadcastRight 2.5s ease-in-out infinite;
}

@keyframes asrBroadcastLeft{
    0%,100%{
        transform:scale(1) rotate(0deg);
    }
    50%{
        transform:scale(1.18) rotate(-8deg);
    }
}

@keyframes asrBroadcastRight{
    0%,100%{
        transform:scaleX(-1) scale(1) rotate(0deg);
    }
    50%{
        transform:scaleX(-1) scale(1.18) rotate(8deg);
    }
}

.chat-broadcast-message{

    animation:broadcastGlow 1.2s ease-out;

}

@keyframes broadcastGlow{

    0%{
        box-shadow:
        0 0 35px #00ff66,
        0 0 70px #66ff99;
        transform:scale(1.02);
    }

    100%{
        box-shadow:none;
        transform:scale(1);
    }

}

.wishbox-btn{

    width:48px;
    height:44px;

    display:flex;
    justify-content:center;
    align-items:center;

    background:linear-gradient(to bottom,#dfe8f5,#bfcde0);
    border:1px solid #7f95b3;
    border-radius:8px;

    cursor:pointer;
    transition:.25s ease;
    padding:0;

}

.wishbox-btn img{

    width:55px;
    height:55px;

    transition:all .25s ease;

    filter:drop-shadow(0 0 0px rgba(255,235,59,.0));

}

.wishbox-btn:hover img{

    transform:
        scale(1.12)
        rotate(-6deg);

    filter:
        drop-shadow(0 0 8px #ffeb3b)
        drop-shadow(0 0 18px #ffd700);

}

.wishbox-btn:active img{

    transform:
        scale(.92);

}

@keyframes wishboxFloat{

    0%,100%{
        transform:translateY(0px);
    }

    50%{
        transform:translateY(-2px);
    }

}

.wishbox-btn img{

    animation:wishboxFloat 2.8s ease-in-out infinite;

}

/* ===========================
   ASR PROFIL
=========================== */

.profile-box{
  width:520px;
  max-width:95%;
}

.profile-content{
  display:flex;
  gap:18px;
  align-items:flex-start;
}

.profile-left{
  width:170px;
  text-align:center;
}

.profile-small-btn{
  margin-top:14px;
  width:100%;
}

.profile-right{
  flex:1;
}

.profile-row span{
  width:145px;
  flex:none;
  color:#0059A6;
  font-weight:700;
  text-align:left;
}

.profile-row strong{
  color:#111;
  font-weight:700;
  text-align:left;
}



.profile-row span{
    color:#0059A6;
    font-weight:700;
    text-align:left;
}

.profile-row strong{
    text-align:right;
    color:#111;
}
.profile-action-btn{
  width:100%;
  margin-top:10px;
  min-height:30px;
}

/* ASR Profilbild Rahmen */

.avatar-frame{
  position:relative;
  width:145px;
  height:145px;
  margin:0 auto 14px auto;
  border-radius:50%;
  padding:5px;
  background:linear-gradient(to bottom,#ffeb3b,#d6a900);
  box-shadow:
    0 0 14px rgba(255,235,59,.9),
    0 0 28px rgba(255,235,59,.45);
}

.avatar-image{
  width:100%;
  height:100%;
  object-fit:cover;
  border-radius:50%;
  display:block;
  background:#040085;
  border:3px solid #040085;
}

.avatar-asr-logo{
  position:absolute;
  left:50%;
  bottom:-12px;
  transform:translateX(-50%);
  width:50px;
  height:50px;
  border-radius:50%;
  background:#fff;
  border:2px solid #ffeb3b;
  box-shadow:0 0 10px rgba(0,0,0,.45);
}

.profile-image-hint{
  margin-top:8px;
  font-size:12px;
  line-height:1.3;
  color:#333;
  opacity:.75;
  text-align:center;
}

.profile-preview-box{
  margin:12px auto;
  text-align:center;
}

#profilePreview{
  width:170px;
  height:170px;
  object-fit:cover;
  border-radius:50%;
  border:4px solid #0059a6;
  background:#fff;
}

.profile-help-text{
  margin:8px 0 10px;
  font-size:13px;
  color:#444;
  text-align:center;
  line-height:1.35;
}

.guest-register-hint{
  margin:10px 4px 12px;
  padding:10px;
  background:#fff8d8;
  border:1px solid #ffd84d;
  border-radius:8px;
  color:#333;
  font-size:13px;
  line-height:1.35;
}

.color-picker-row{
  display:flex;
  align-items:center;
  gap:8px;
  margin-bottom:12px;
}

.color-preview-btn{
  display:flex;
  align-items:center;
  gap:10px;
  width:100%;
  padding:8px 10px;
  border:1px solid #999;
  background:#eee;
  color:#000;
  cursor:pointer;
  font-size:15px;
}

#colorPreviewBox{
  width:34px;
  height:22px;
  border:1px solid #555;
  display:inline-block;
}

#userColor{
  display:none;
}