:root {
    --bg-color: #181818;
    --bar-bg: #101010;
    --text-color: #f5f5f5;
    --accent-yellow: #ffdd33;
    --border-color: #333;
    --log-green: #00ff00;
}

* { box-sizing: border-box; }

body, html {
    margin: 0; padding: 0;
    width: 100%;
    height: 100dvh; /* Mobile fix */
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 16px;
    overflow: hidden;
}

a { color: var(--accent-yellow); text-decoration: none; border-bottom: 1px dotted var(--accent-yellow); }

.login-wrapper {
    display: flex; flex-direction: column;
    justify-content: center; align-items: center;
    height: 100dvh; text-align: center;
}
.login-wrapper input {
    background: #101010; border: 1px solid #333;
    color: white; padding: 15px; font-size: 18px;
    margin-bottom: 10px; width: 80%; text-align: center;
}
.login-wrapper button {
    width: 80%; padding: 15px; font-size: 18px;
    background: var(--accent-yellow); border: none; font-weight: bold; cursor: pointer;
}

.container {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    width: 100%;
}

.tabs {
    flex-shrink: 0;
    display: flex;
    flex-direction: row;
    height: 50px;
    background: var(--bar-bg);
    border-bottom: 2px solid var(--accent-yellow);
}

.tabs button {
    flex: 1;
    background: transparent;
    border: none;
    border-right: 1px solid #333;
    color: #666;
    font-family: inherit;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    text-transform: uppercase;
}

.tabs button.active {
    background: var(--accent-yellow);
    color: black;
}

.view {
    flex-grow: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

.hidden-view {
    display: none !important;
}

#messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
}

.message {
    max-width: 100%;
    word-wrap: break-word;
    text-align: right;
    line-height: 1.4;
}

.message strong {
    color: var(--accent-yellow);
    font-weight: bold;
    text-transform: uppercase;
    margin-right: 5px;
}

#server-logs {
    flex-grow: 1;
    overflow-y: auto;
    padding: 15px;
    font-size: 14px;
    color: var(--log-green);
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
}

.log-entry {
    border-bottom: 1px solid #222;
    padding-bottom: 2px;
}

.controls {
    flex-shrink: 0;
    height: 60px;
    background: var(--bar-bg);
    border-top: 1px solid var(--accent-yellow);
    display: flex;
    align-items: center;
    padding-bottom: env(safe-area-inset-bottom);
}

input[type="text"] {
    flex-grow: 1; height: 100%;
    background: transparent; border: none;
    color: white; font-size: 16px; padding: 0 15px;
    text-align: left;
}
input[type="text"]:focus { outline: none; }

button.send-btn, .file-btn {
    height: 100%;
    background: var(--accent-yellow);
    color: black;
    border: none; border-left: 1px solid #000;
    cursor: pointer; font-weight: bold; padding: 0 20px;
}
.file-btn { font-size: 20px; display: flex; align-items: center; }
#file-input { display: none; }