/* --- Grunddesign --- */ 
body, html {
    height: 100%;
    margin: 0;
    font-family: 'Verdana', sans-serif;
    background-color: #1a1a1a;
    color: #ecf0f1;
    overflow: hidden;
}

header {
    height: 50px;
    background: #2c3e50;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    border-bottom: 2px solid #000;
}

#status {
    order: 1;
}

#admin-button-container {
    order: 2;
    margin-left: auto;
    margin-right: 20px;
}

#clock {
    order: 3;
    font-weight: bold;
    color: #f1c40f;
    min-width: 80px;
    text-align: right;
}

/* --- Hauptbereich --- */
main {
    display: flex;
    height: calc(100% - 170px); 
}

#chat-window {
    flex: 1;
    background: #2d3436;
    overflow-y: auto;
    padding: 15px;
    background-image: url('../img/pictures/bk-chat.jpg');
    background-size: cover;
}

#messages {
    word-wrap: break-word;
}

.message-item {
    line-height: 1.45;
}

#user-sidebar {
    width: 200px;
    background: #2c3e50;
    border-left: 2px solid #1e272e;
    overflow-y: auto;
}

/* --- Aktueller Modi in der User-Sidebar --- */
#current-modi-card {
    margin: 12px;
    padding: 12px;
    text-align: center;
    background: linear-gradient(145deg, rgba(52, 152, 219, 0.18), rgba(155, 89, 182, 0.14));
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.28);
}

.modi-title {
    font-size: 12px;
    font-weight: bold;
    color: #f1c40f;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

#current-modi-image {
    width: 120px !important;
    height: 120px !important;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.28);
    background: #1e272e;
    box-shadow: 0 8px 22px rgba(0,0,0,0.45);
}

#current-modi-name {
    margin-top: 9px;
    font-size: 13px;
    font-weight: bold;
    color: #ecf0f1;
    word-break: break-word;
}

.sidebar-header {
    padding: 10px 12px;
    font-weight: bold;
    color: #ecf0f1;
    border-top: 1px solid rgba(255,255,255,0.08);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

#user-list {
    list-style: none;
    margin: 0;
    padding: 8px 12px;
}

#user-list li {
    padding: 5px 0;
    cursor: pointer;
}

/* --- Footer --- */
footer {
    height: 120px;
    background: #2c3e50;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 2px solid #000;
    position: relative;
    z-index: 100;
}

/* Eingabebereich */
#chat-form {
    display: flex;
    gap: 10px;
    width: 40%;
}

#m {
    flex: 1;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.12);
    font-size: 14px;
    outline: none;
    background: #ecf0f1;
    color: #111;
}

#m:focus {
    box-shadow: 0 0 0 3px rgba(52,152,219,0.35);
}

#chat-form button,
.send-btn {
    padding: 10px 18px;
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    border: none;
    color: white;
    border-radius: 14px;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 8px 18px rgba(46,204,113,0.22);
    transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

#chat-form button:hover,
.send-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
}

/* Funktionsbuttons */
#function-buttons {
    display: flex;
    flex-direction: row;
    gap: 8px;
    margin: 0 15px;
}

.f-btn {
    border: none;
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 8px 18px rgba(0,0,0,0.24);
}

.f-btn:hover {
    transform: translateY(-3px) scale(1.04);
    filter: brightness(1.12);
}

.btn-clear {
    background: linear-gradient(135deg, #ff7675, #d63031);
}

.btn-logout {
    background: linear-gradient(135deg, #fd9644, #e17055);
}

.btn-smile {
    background: linear-gradient(135deg, #feca57, #f39c12);
}

.btn-zoom {
    background: linear-gradient(135deg, #45aaf2, #0984e3);
}

.btn-color {
    background: linear-gradient(135deg, #a29bfe, #6c5ce7, #fd79a8);
}

.btn-help {
    background: linear-gradient(135deg, #55efc4, #00b894);
}

/* Rechte Buttons */
#right-side-buttons {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 120px;
}

.side-link-btn,
.radio-btn {
    background: linear-gradient(135deg, #273c75, #40739e);
    color: white;
    text-decoration: none;
    font-size: 12px;
    padding: 7px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.12);
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.15s ease, filter 0.15s ease;
}

.radio-btn {
    background: linear-gradient(135deg, #f1c40f, #e67e22);
    border: none;
}

.side-link-btn:hover,
.radio-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
}

/* --- Popups & Login --- */
#login-overlay {
    position: fixed;
    top:0; left:0; width:100%; height:100%;
    background: rgba(0,0,0,0.95);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

#login-box {
    background: #2c3e50;
    padding: 30px;
    border-radius: 15px;
    border: 3px solid #3498db;
    text-align: center;
}

.popup-window {
    display: none;
    position: fixed;
    bottom: 130px;
    right: 20px;
    background: #2c3e50;
    border: 2px solid #3498db;
    border-radius: 14px;
    z-index: 2000;
    width: 300px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.45);
    overflow: hidden;
}

.popup-header {
    background: linear-gradient(135deg, #34495e, #2c3e50);
    color: #ecf0f1;
    padding: 10px 12px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.popup-header button {
    background: transparent;
    color: #ecf0f1;
    border: none;
    font-size: 22px;
    cursor: pointer;
}

/* --- Farbpalette --- */
.color-palette-content {
    padding: 14px;
}

#current-color-preview {
    padding: 10px;
    border-radius: 12px;
    background: rgba(0,0,0,0.22);
    border: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    font-weight: bold;
    margin-bottom: 12px;
}

#color-palette-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 9px;
}

.color-swatch {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    border: 2px solid rgba(255,255,255,0.35);
    cursor: pointer;
    box-shadow: 0 8px 16px rgba(0,0,0,0.28);
    transition: transform 0.15s ease, border 0.15s ease;
}

.color-swatch:hover {
    transform: translateY(-3px) scale(1.06);
    border-color: #ffffff;
}

.color-swatch.active {
    border: 3px solid #ffffff;
    box-shadow: 0 0 0 3px rgba(241,196,15,0.35), 0 8px 16px rgba(0,0,0,0.28);
}

.custom-color-label {
    display: block;
    margin-top: 14px;
    margin-bottom: 6px;
    color: #ecf0f1;
    font-size: 12px;
    font-weight: bold;
}

#custom-color-input {
    width: 100%;
    height: 42px;
    border: none;
    background: transparent;
    cursor: pointer;
}

/* Smileys */
#smiley-picker {
    position: absolute;
    bottom: 70px;
    right: 20px;
    width: 620px;         /* Startbreite leicht erhöht */
    height: 600px;        /* Starthöhe */
    min-width: 260px;     /* Verhindert, dass es zu klein geschoben wird */
    min-height: 200px;    /* Verhindert extremes Verkleinern nach unten */
    max-width: 700px;     /* Optionale maximale Breite */
    
    /* HIERMIT WIRD ES ZIEHBAR: */
    resize: both;         
    overflow: auto;  
    
    background: #34495e;
    border: 2px solid #000;
    border-radius: 8px;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
}


#smiley-content {
    padding: 32px;
    overflow-y: auto;     /* Nur die Smileys drinnen dürfen scrollen */
    flex: 1;              /* Füllt den restlichen Platz beim Ziehen dynamisch aus */
}

.chat-smiley {
    height: 80px !important;  /* Erhöhe diesen Wert, wenn sie noch größer sein sollen */
    width: auto;
    vertical-align: middle;
    object-fit: contain;
    margin: 0 2px;
}


/* Zoom Stufen */
.zoom-normal  { font-size: 14px; }
.zoom-large   { font-size: 18px; }
.zoom-xlarge  { font-size: 24px; }


