@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@700&family=Roboto&display=swap');

body {
    background-color: #0d1117;
    color: #c9d1d9;
    font-family: 'Segoe UI', 'Meiryo', sans-serif;
    margin: 0;
    padding: 0;
    height: 100vh;
    display: block;
    /* Remove flex centering */
    overflow: hidden;
    /* Prevent scrolling on body */
}

/* --- App Container (Layout Wrapper) --- */
#app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* --- Sidebar Styles --- */
#sidebar {
    width: 250px;
    background-color: #0d1117;
    border-right: 1px solid #30363d;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: width 0.3s ease;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #30363d;
}

.sidebar-header h2 {
    margin: 0;
    font-size: 1.2em;
    color: #58a6ff;
    font-family: 'Orbitron', sans-serif;
}

.nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: #c9d1d9;
    text-decoration: none;
    transition: background-color 0.2s;
    font-weight: 500;
}

.nav-item:hover {
    background-color: #161b22;
    color: #58a6ff;
}

.nav-item.active {
    background-color: #1f242c;
    border-left: 4px solid #f78166;
    /* Orange accent */
    color: #f78166;
}

.nav-item .icon {
    font-size: 1.2em;
    margin-right: 15px;
    width: 24px;
    text-align: center;
}

/* --- Console Container Adjustments --- */
#console-container {
    flex-grow: 1;
    width: auto;
    /* Allow grow */
    max-width: none;
    /* Remove limit */
    height: 100%;
    border: none;
    /* Remove border (handled by sidebar) */
    border-radius: 0;
    margin: 0;
    box-shadow: none;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
    #sidebar {
        width: 60px;
        /* Collapsed width */
    }

    .sidebar-header h2,
    .nav-item .text {
        display: none;
        /* Hide text */
    }

    .sidebar-header {
        padding: 15px 10px;
        text-align: center;
    }

    .sidebar-header::after {
        content: "G";
        /* Mobile Logo */
        color: #58a6ff;
        font-weight: bold;
        font-family: 'Orbitron', sans-serif;
    }

    .nav-item {
        justify-content: center;
        padding: 15px 0;
    }

    .nav-item .icon {
        margin-right: 0;
    }
}

/* #console-container styles moved/adjusted above */

#console-header {
    padding: 15px 25px;
    background-color: #1f242c;
    border-bottom: 1px solid #30363d;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#console-header h1 {
    margin: 0;
    font-size: 1.5em;
    color: #58a6ff;
    text-shadow: 0 0 5px rgba(88, 166, 255, 0.7);
}

#status-indicator {
    width: 15px;
    height: 15px;
    background-color: #28a745;
    /* Green for 'online' */
    border-radius: 50%;
    box-shadow: 0 0 10px #28a745;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 5px rgba(40, 167, 69, 0.5);
    }

    50% {
        box-shadow: 0 0 15px rgba(40, 167, 69, 1);
    }

    100% {
        box-shadow: 0 0 5px rgba(40, 167, 69, 0.5);
    }
}

#chat-log {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    border-bottom: 1px solid #30363d;
}

#input-area {
    display: flex;
    flex-direction: column;
    /* 縦に並べる */
    padding: 15px;
    background-color: #1f242c;
}

#recipient-selection {
    margin-bottom: 10px;
    display: flex;
    gap: 15px;
    align-items: center;
}

#recipient-selection label {
    font-weight: bold;
    color: #eee;
}

#recipient-selection input[type="radio"] {
    transform: scale(1.2);
    margin-right: 5px;
}

#message-input {
    flex-grow: 1;
    background-color: #0d1117;
    border: 1px solid #30363d;
    color: #c9d1d9;
    padding: 10px;
    border-radius: 5px;
    resize: none;
    font-size: 1em;
}

#message-input:focus {
    outline: none;
    border-color: #58a6ff;
    box-shadow: 0 0 5px rgba(88, 166, 255, 0.5);
}

#send-button {
    background-color: #238636;
    color: white;
    border: none;
    padding: 10px 20px;
    margin-left: 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease;
}

#send-button:hover {
    background-color: #2ea043;
}

/* Scrollbar styling */
#chat-log::-webkit-scrollbar {
    width: 8px;
}

#chat-log::-webkit-scrollbar-track {
    background: #161b22;
}

#chat-log::-webkit-scrollbar-thumb {
    background-color: #30363d;
    border-radius: 4px;
}

#chat-log::-webkit-scrollbar-thumb:hover {
    background-color: #58a6ff;
}

/* --- Magedo Commander's Suggestions --- */
body {
    font-family: 'Roboto', 'Meiryo', sans-serif;
}

#console-header {
    border-bottom-width: 2px;
}

#console-header h1 {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
}

#console-container {
    box-shadow: 0 0 30px rgba(41, 121, 255, 0.5);
}

#status-indicator {
    animation: pulse 3s infinite;
}

#message-input:focus {
    box-shadow: 0 0 12px rgba(88, 166, 255, 0.7);
}

#send-button {
    background-color: #2ea043;
    transition: background-color 0.4s ease, transform 0.2s ease;
}

#send-button:hover {
    background-color: #238636;
    transform: translateY(-3px);
}

/* --- New Message Styles --- */
.chat-message {
    padding: 10px 15px;
    margin-bottom: 10px;
    max-width: 70%;
    word-wrap: break-word;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.user-message {
    text-align: right;
    background-color: #dcf8c6;
    /* Light green for user */
    color: #333;
    border-radius: 10px 10px 0 10px;
    margin-left: auto;
    /* Push to right */
}

.magedo-message {
    text-align: left;
    background-color: #e0e0e0;
    /* Light gray for Magedo */
    color: #333;
    border-radius: 10px 10px 10px 0;
    margin-right: auto;
    /* Push to left */
}

.arma-message {
    text-align: left;
    background-color: #c6e8f8;
    /* Light blue for Arma */
    color: #333;
    border-radius: 10px 10px 10px 0;
    margin-right: auto;
    /* Push to left */
}

.system-message {
    text-align: center;
    font-style: italic;
    color: #aaa;
    font-size: 0.9em;
    margin: 5px auto;
    background: none;
    box-shadow: none;
}