/* Genel Stil ve Temel Ayarlar */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #1a1a1a;
    color: #fff;
    padding: 20px;
    display: flex;
    justify-content: center;
}

.container {
    max-width: 800px;
    width: 100%;
}

.login-box, .control-panel {
    background: #2a2a2a;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.4);
    transition: all 0.3s ease;
}

h1 {
    margin-bottom: 30px;
    color: #4CAF50;
    text-align: center;
    border-bottom: 2px solid #4CAF50;
    padding-bottom: 10px;
}

h3 {
    margin-top: 20px;
    margin-bottom: 15px;
    color: #ccc;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #aaa;
    font-weight: 500;
}

input[type="text"],
input[type="password"],
input[type="number"],
textarea {
    width: 100%;
    padding: 12px;
    background: #1a1a1a;
    border: 1px solid #444;
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    transition: border-color 0.3s;
}

input:focus, textarea:focus {
    outline: none;
    border-color: #4CAF50;
}

button {
    padding: 12px 24px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    font-weight: bold;
    transition: background 0.3s, transform 0.1s;
}

button:hover {
    background: #45a049;
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    background: #555;
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
}

.btn-danger {
    background: #f44336;
}

.btn-danger:hover {
    background: #da190b;
}

/* Durum Kutusu */
.status {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
}

.status.connected {
    background: #1b5e20;
    border-left: 5px solid #4CAF50;
}

.status.disconnected {
    background: #b71c1c;
    border-left: 5px solid #f44336;
}

.status-icon {
    font-size: 1.2em;
}

.controls {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.timeout-warning {
    color: #ff9800;
    font-style: italic;
    padding: 5px 0;
}

.hidden {
    display: none;
}

.logout-btn {
    float: right;
    background: #444;
    padding: 8px 16px;
    font-size: 12px;
    margin-top: -10px;
}

.logout-btn:hover {
    background: #555;
}

.settings {
    background: #333;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #444;
}

.settings-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

.settings-row input[type="number"] {
    width: 120px;
    text-align: center;
}

/* Hızlı Komutlar */
.quick-commands {
    background: #333;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #444;
}

.command-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.quick-btn {
    background: #2196F3;
    padding: 10px 16px;
    font-size: 14px;
    border-radius: 6px;
    min-width: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.quick-btn:hover {
    background: #1976D2;
}

.quick-btn:disabled {
    background: #555;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Chat Alanı */
#chatContainer {
    background: #111;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 15px;
    height: 400px; /* Daha iyi bir yükseklik */
    overflow-y: auto;
    margin-top: 15px;
    display: flex;
    flex-direction: column-reverse; /* Yeni mesajlar aşağıda */
}

.chat-item {
    padding: 5px 0;
    border-top: 1px solid #333; /* Ters sıralama için border-top */
    font-size: 14px;
    line-height: 1.4;
    flex-shrink: 0; /* Küçülmeyi engelle */
}

.chat-item:first-child {
    border-top: none;
}

.chat-username {
    font-weight: bold;
    color: #4CAF50; /* Genel Chat */
}

.chat-message {
    word-wrap: break-word;
    word-break: break-all;
}

/* ÖZEL STİLLER */
/* Sunucu Logu (Journal'dan gelenler) */
.chat-item.server-log-msg {
    color: #b3e5fc; /* Açık mavi metin */
    background: #303030;
    padding: 5px;
    border-radius: 4px;
    margin: 5px 0;
}
.chat-item.server-log-msg .chat-username {
    color: #1e88e5; /* Mavi Başlık */
    font-style: normal;
}

/* Özel Mesaj (Whisper) */
.private-msg .chat-username {
    color: #fdd835; /* Sarı */
}

/* Sunucu Mesajı (Bot eventleri, Komut yanıtları) */
.server-msg .chat-username {
    color: #7986cb; /* Mor/Mavi */
}

/* Kullanıcının gönderdiği komut */
.chat-item.user-command-sent {
     color: #ff9800; /* Turuncu Metin */
     font-style: italic;
}

@media (max-width: 600px) {
    .controls {
        flex-direction: column;
    }
    .settings-row {
        flex-direction: column;
        align-items: stretch;
    }
    .settings-row input[type="number"] {
        width: 100%;
        text-align: left;
    }
    body {
        padding: 10px;
    }
}