:root {
    /* The Aura System */
    --aura-color: #FFD700; /* Gold (CoS Default) */
    --aura-glow: 0 0 15px rgba(255, 215, 0, 0.3);
    
    /* Sovereign Dark Theme */
    --bg-color: #0F0F0F;
    --chat-bg: #1A1A1A;
    --input-bg: #252525;
    --text-primary: #ECECEC;
    --text-secondary: #A0A0A0;
    --accent-blue: #4A90E2;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    height: 100dvh; /* Dynamic Viewport Height for Mobile */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* The Aura Indicator */
    border-top: 4px solid var(--aura-color);
    box-shadow: inset 0 4px 15px -5px var(--aura-color);
    transition: border-color 0.5s ease, box-shadow 0.5s ease;
}

/* Header */
.header {
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
    background: var(--bg-color);
}
.header h1 {
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 1px;
}
.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--aura-color);
    box-shadow: var(--aura-glow);
    transition: background-color 0.5s, box-shadow 0.5s;
}

/* Chat Area */
.chat-container {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    scroll-behavior: smooth;
}

.message {
    max-width: 85%;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    line-height: 1.5;
    position: relative;
    /* Animation for new messages */
    animation: fadeIn 0.3s ease-out;
}

.msg-agent {
    align-self: flex-start;
    background-color: var(--chat-bg);
    border-left: 3px solid var(--aura-color);
    border-top-left-radius: 2px;
}

.msg-user {
    align-self: flex-end;
    background-color: #2A3B4D; /* Subtle Blue Tint */
    border-bottom-right-radius: 2px;
}

/* Input Area */
.input-area {
    padding: 0.8rem;
    background: var(--bg-color);
    border-top: 1px solid #333;
    display: flex;
    gap: 0.5rem;
    align-items: flex-end; /* Align to bottom if text expands */
}

.input-wrapper {
    flex: 1;
    background: var(--input-bg);
    border-radius: 24px;
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border: 1px solid transparent;
    transition: border-color 0.2s;
}

.input-wrapper:focus-within {
    border-color: var(--aura-color);
}

textarea {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    outline: none;
    resize: none;
    max-height: 150px;
    font-size: 1rem;
}

.action-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: color 0.2s, background 0.2s;
}

.action-btn:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.1);
}

.send-btn {
    background: var(--aura-color);
    color: #000;
    font-weight: bold;
}
.send-btn:hover {
    filter: brightness(1.1);
}

/* PWA Install Prompt (Hidden by default) */
#install-prompt {
    display: none;
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--chat-bg);
    padding: 0.8rem 1.5rem;
    border-radius: 24px;
    border: 1px solid var(--aura-color);
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    z-index: 100;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}
