/* /public/style.css */
/* --- AUTOMATIC SOCRATIC: OPEN-SOURCE AESTHETIC --- */

:root {
    --bg-color: #050505;
    --text-color: #ffb000; /* Sovereign Amber */
    --sys-color: #3fb950;  /* Open-Source Green */
    --font-family: 'Courier New', Courier, monospace;
}

body {
    background-color: var(--bg-color); /* Dark baseline before Unity boots */
    color: var(--text-color);
    font-family: var(--font-family);
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden; /* Prevents scrollbars from appearing over the 3D world */
}

/* =========================================================
   LOGIN / EDUCATOR AUTH SCREEN
   ========================================================= */
.screen-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 100%;
    position: absolute;
    z-index: 10; /* Keeps login above everything else */
}

.login-box {
    border: 1px solid var(--text-color);
    padding: 30px;
    text-align: center;
    max-width: 400px;
    background: rgba(17, 17, 17, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.login-box h1 {
    margin-top: 0;
}

.login-box input {
    width: 90%;
    padding: 10px;
    margin: 10px 0;
    background: #000;
    border: 1px solid var(--text-color);
    color: var(--text-color);
    font-family: var(--font-family);
    outline: none;
}

.button-row button {
    background: var(--text-color);
    color: #000;
    border: none;
    padding: 10px 15px;
    margin: 5px;
    cursor: pointer;
    font-weight: bold;
    font-family: var(--font-family);
    transition: 0.3s;
}

.button-row button:hover {
    background: #fff;
}

/* =========================================================
   THE TERMINAL HUD (FROSTED GLASS EFFECT)
   ========================================================= */
.terminal-container {
    display: flex;
    flex-direction: column;
    width: 90vw;
    height: 90vh;
    max-width: 800px;
    border: 2px solid var(--sys-color); /* Green Border */
    padding: 20px;
    
    /* The Magic Glass Effect allowing Unity to show through */
    background: rgba(10, 10, 10, 0.65); 
    backdrop-filter: blur(4px); 
    -webkit-backdrop-filter: blur(4px);
    
    border-radius: 8px;
    z-index: 5; /* Sits securely above the Unity Canvas */
}

.terminal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--text-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-weight: bold;
}

/* Chat Box */
#chat-box {
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
    padding-right: 10px;
    font-family: 'Consolas', 'Courier New', Courier, monospace !important;
    font-size: 16px !important;
    line-height: 1.6 !important;
    letter-spacing: 0.5px !important;
}

/* Custom Scrollbar to match the terminal */
#chat-box::-webkit-scrollbar { width: 8px; }
#chat-box::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.2); border-radius: 4px; }
#chat-box::-webkit-scrollbar-thumb { background: var(--text-color); border-radius: 4px; }

.message {
    padding: 12px 14px !important;
    margin-bottom: 15px !important;
    border-radius: 6px !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    max-width: 80%;
}

.ai-message {
    align-self: flex-start;
    border-left: 2px solid var(--text-color);
    background: rgba(0, 0, 0, 0.6); /* Slightly darkens text background so it's readable over the 3D world */
}

.user-message {
    align-self: flex-end;
    background-color: rgba(35, 134, 54, 0.85); 
    color: #ffffff;
    border: 1px solid var(--sys-color);
}

/* Input Area */
.input-area {
    display: flex;
    align-items: center;
    border-top: 1px solid var(--text-color);
    padding-top: 10px;
}

.prompt-arrow {
    margin-right: 10px;
    font-weight: bold;
    color: var(--sys-color);
}

#user-input {
    flex-grow: 1;
    background: transparent;
    border: none;
    color: var(--text-color);
    font-family: var(--font-family);
    font-size: 16px;
    outline: none;
}

#send-btn {
    background: var(--text-color);
    color: #000;
    border: none;
    padding: 8px 15px;
    cursor: pointer;
    font-family: var(--font-family);
    font-weight: bold;
    margin-left: 10px;
}

#tablet-toggle {
    background-color: var(--sys-color);
    color: #121212;
    border: none;
    width: 45px;
    height: 45px;
    font-size: 1.8em;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: 0.3s;
    margin-right: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-bottom: 2px;
}

#tablet-toggle:hover {
    background-color: #2ea043;
}

/* =========================================================
   DASHBOARD BUTTONS (EDUCATOR PORTAL)
   ========================================================= */
.action-btn {
    background-color: rgba(0, 0, 0, 0.5);
    color: var(--sys-color);
    border: 1px solid var(--sys-color);
    padding: 10px 20px;
    font-family: var(--font-family);
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.action-btn:hover {
    background-color: var(--sys-color);
    color: #121212;
    box-shadow: 0 0 10px rgba(63, 185, 80, 0.5);
}