:root {
    --bg-dark: #121214;
    --bg-sidebar: #1a1a1e;
    --bg-chat: #1e1e24;
    --bg-input: #2a2a32;
    --accent: #5865F2;
    --accent-hover: #4752c4;
    --text-main: #e3e5e8;
    --text-muted: #949ba4;
    --border: #2d2d34;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
}

.container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* SIDEBAR - GUÍA */
.sidebar {
    width: 320px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.sidebar-header h2 {
    font-size: 1.2rem;
    color: var(--text-main);
}

.sidebar-content {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
}

.guide-section {
    margin-bottom: 25px;
}

.guide-section h3 {
    font-size: 0.95rem;
    color: var(--accent);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.guide-section ul {
    list-style: none;
}

.guide-section li {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    line-height: 1.4;
}

.guide-section li strong {
    color: var(--text-main);
    display: block;
}

.credits {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 40px;
}

/* AREA DE CHAT */
.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-chat);
}

.chat-header {
    padding: 15px 20px;
    background-color: var(--bg-sidebar);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ia-status {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-dot {
    width: 10px;
    height: 10px;
    background-color: #23a55a;
    border-radius: 50%;
}

.ia-status h1 {
    font-size: 1rem;
}

.ia-status p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.api-key-container {
    display: flex;
    gap: 5px;
}

.api-key-container input {
    background-color: var(--bg-input);
    border: 1px solid var(--border);
    color: white;
    padding: 8px 12px;
    border-radius: 5px;
    outline: none;
    font-size: 0.85rem;
    width: 220px;
}

.api-key-container button {
    background-color: var(--accent);
    border: none;
    color: white;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
}

.api-key-container button:hover {
    background-color: var(--accent-hover);
}

/* MENSAJES */
.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    padding: 12px 16px;
    border-radius: 8px;
    max-width: 85%;
    line-height: 1.5;
    font-size: 0.95rem;
}

.system-message {
    background-color: rgba(88, 101, 242, 0.1);
    border: 1px solid var(--accent);
    align-self: center;
    max-width: 90%;
}

.user-message {
    background-color: var(--accent);
    color: white;
    align-self: flex-end;
}

.ia-message {
    background-color: var(--bg-input);
    color: var(--text-main);
    align-self: flex-start;
    border: 1px solid var(--border);
    white-space: pre-wrap;
}

/* IMPUT */
.chat-input-container {
    padding: 20px;
    background-color: var(--bg-chat);
}

.input-wrapper {
    display: flex;
    background-color: var(--bg-input);
    border-radius: 8px;
    padding: 10px 15px;
    align-items: center;
    border: 1px solid var(--border);
}

.input-wrapper textarea {
    flex: 1;
    background: none;
    border: none;
    color: white;
    outline: none;
    resize: none;
    font-size: 0.95rem;
    max-height: 150px;
}

.input-wrapper button {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding-left: 10px;
}

.input-wrapper button:hover {
    color: var(--text-main);
}