/* --- Global Styles --- */
body, html {
    height: 100%;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #121212;
    color: #e0e0e0;
    overflow: hidden;
}

/* --- Main Layout --- */
.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

.panel {
    display: flex;
    flex-direction: column;
    border-right: 1px solid #333;
    overflow: hidden;
}

/* --- Panel Sizing --- */
#chat-panel { flex-basis: 25%; }
#terminal-panel { flex-basis: 45%; }
#browser-panel { flex-basis: 30%; border-right: none; }

/* --- Panel Headers --- */
/* --- FIX FOR BROWSER FORCE DARK MODE --- */

.panel-header {
    display: flex;
    align-items: center;
    padding: 10px;
    background-color: #1e1e1e !important; /* Forces the background to be dark */
    border-bottom: 1px solid #333;
    color: #e0e0e0 !important; /* Forces the text to be light */
}

.panel-header h3, .panel-header h4 {
    margin: 0;
    margin-left: 10px;
    color: #e0e0e0 !important; /* Forces the text to be light */
}

/* --- END OF FIX --- */
#logo {
    width: 30px;
    height: 30px;
}

/* --- Panel Content (Logs) --- */
.panel-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 10px;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* --- Chat Specific --- */
#chat-log {
    display: flex;
    flex-direction: column;
}
.chat-message {
    padding: 8px 12px;
    border-radius: 10px;
    margin-bottom: 10px;
    max-width: 80%;
    word-wrap: break-word;
}
.user-message {
    background-color: #3b5998; /* A nice user blue */
    color: white;
    align-self: flex-end;
}
.kevin-message {
    background-color: #3a3a3a;
    align-self: flex-start;
}

/* --- Terminal Specific --- */
#terminal-log {
    font-family: "SF Mono", "Consolas", "Courier New", monospace;
    color: #00ff00; /* Classic green terminal */
    background: #000;
}
.terminal-line {
    margin: 0;
}
.terminal-error {
    color: #ff4136; /* Bright red error */
}

/* --- Browser Specific --- */
#browser-content {
    padding: 0;
    background: white;
}
#browser-frame {
    width: 100%;
    height: 100%;
    border: none;
}

/* --- Input Area --- */
.panel-input {
    display: flex;
    padding: 10px;
    border-top: 1px solid #333;
    background-color: #1e1e1e;
}
#user-input {
    flex-grow: 1;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #444;
    background-color: #2b2b2b;
    color: white;
}
#submit-button {
    padding: 10px 15px;
    margin-left: 10px;
    border: none;
    border-radius: 5px;
    background-color: #007bff;
    color: white;
    cursor: pointer;
    font-weight: bold;
}
#submit-button:hover {
    background-color: #0056b3;
}
/* --- Loader Overlay Styles --- */
#loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
}

#loader-box {
    background: #1e1e1e;
    padding: 30px;
    border-radius: 10px;
    border: 1px solid #333;
    text-align: center;
    width: 400px;
    color: #e0e0e0;
}

#loader-box h3 {
    color: #007bff;
}

#loader-text {
    font-family: "SF Mono", "Consolas", "Courier New", monospace;
    color: #00ff00; /* Terminal green */
    margin: 20px 0;
}

#loader-bar-container {
    background: #333;
    border-radius: 5px;
    padding: 3px;
}

#loader-bar {
    height: 10px;
    width: 100%; /* Will be set by JS */
    background: #007bff;
    border-radius: 3px;
    transition: width 0.3s ease-in-out;
}