@import url('https://fonts.googleapis.com/css2?family=Lexend:wght@400;800&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: #0d1117;
    color: #ffffff;
    font-family: 'Lexend', sans-serif;
    height: 100dvh; /* Altura dinámica para evitar errores en cel */
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

header {
    background: #161b22;
    padding: 15px;
    text-align: center;
    border-bottom: 2px solid #30363d;
    z-index: 100;
}

.logo-text { font-weight: 800; font-size: 1.3rem; }
.logo-text span { color: #00d2ff; }

#game-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    max-width: 500px;
    margin: 0 auto;
    width: 100%;
}

/* Pantalla Inicial Corregida */
#setup-screen {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 60px 30px;
    text-align: center;
    background: #0d1117;
}

.brain-icon { font-size: 60px; margin-bottom: 20px; }
h1 { font-weight: 800; font-size: 2rem; margin-bottom: 10px; line-height: 1.2; }
p { color: #8b949e; font-size: 1rem; }

.start-btn {
    background: #00d2ff;
    color: #000;
    border: none;
    padding: 20px;
    width: 100%;
    font-size: 1.1rem;
    font-weight: 800;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 210, 255, 0.3);
    margin-bottom: 15px;
}

.author-tag { color: #8b949e; opacity: 0.8; font-size: 0.9rem; }

/* Pantalla de Chat Corregida */
#chat-screen {
    flex: 1;
    display: none; /* Se activa con JS a flex */
    flex-direction: column;
    background: #0d1117;
}

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

.message {
    padding: 14px 18px;
    border-radius: 20px;
    max-width: 85%;
    line-height: 1.5;
    font-size: 1rem;
}

.ia-msg { background: #21262d; align-self: flex-start; border-bottom-left-radius: 2px; }
.user-msg { background: #00d2ff; color: #000; align-self: flex-end; border-bottom-right-radius: 2px; font-weight: 600; }

.chat-footer {
    background: #161b22;
    border-top: 1px solid #30363d;
    padding-bottom: env(safe-area-inset-bottom);
}

.quick-actions {
    display: flex;
    gap: 10px;
    padding: 10px 15px;
}

.action-btn {
    flex: 1;
    background: #0d1117;
    border: 1px solid #30363d;
    color: #f0f6fc;
    padding: 10px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: bold;
}

.input-container {
    display: flex;
    gap: 10px;
    padding: 15px;
}

input {
    flex: 1;
    background: #0d1117;
    border: 1px solid #30363d;
    color: white;
    padding: 15px 20px;
    border-radius: 30px;
    font-size: 1rem;
    outline: none;
}

#send-btn {
    background: #00d2ff;
    color: black;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.3rem;
}
