:root {
    /* Nex Brand Colors */
    --nex-blue: #008FF9;
    /* Action, Trust, Innovation */
    --nex-red: #FF334C;
    /* Emotional Connection */
    --nex-black: #000000;
    /* Text, Highlights */
    --nex-white: #FFFFFF;
    /* Backgrounds */

    /* Functional Mappings */
    --primary-color: var(--nex-blue);
    --primary-hover: #0077d1;
    /* Slightly darker blue for hover */
    --accent-color: var(--nex-red);
    --bg-color: var(--nex-white);
    --text-color: var(--nex-black);
    --light-gray: #f5f7fa;
    --border-radius: 16px;
    /* More modern, rounded */
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

body {
    font-family: 'Objective', 'Montserrat', sans-serif;
    /* Objective as requested, fallback to Montserrat */
    background-color: #f0f2f5;
    margin: 0;
    padding: 0;
    color: var(--text-color);
}

/* Floating Action Button */
#chat-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 64px;
    height: 64px;
    background-color: transparent;
    color: var(--nex-white);
    border: none;
    border-radius: 50%;
    font-size: 28px;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

#chat-fab:hover {
    transform: scale(1.05);
    background-color: transparent;
}

/* Chat Window */
#chat-window {
    position: fixed;
    bottom: 100px;
    right: 24px;
    width: 380px;
    height: 600px;
    background-color: var(--bg-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 1000;
    transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

#chat-window.hidden {
    display: none;
}

/* Header */
.chat-header {
    background-color: var(--nex-black);
    /* Black for header as per "fundos super destacados" */
    color: var(--nex-white);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 18px;
}

.avatar {
    font-size: 24px;
}

.close-btn {
    background: none;
    border: none;
    color: var(--nex-white);
    font-size: 28px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.close-btn:hover {
    opacity: 1;
}

/* Screens */
.screen {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 24px;
    overflow-y: auto;
}

.screen.hidden {
    display: none;
}

/* Selection Screen */
.welcome-text {
    text-align: center;
    margin-bottom: 32px;
    color: var(--text-color);
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
}

.option-btn {
    padding: 16px;
    margin-bottom: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background-color: var(--nex-white);
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.2s;
    color: var(--text-color);
    font-family: inherit;
}

.option-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background-color: rgba(0, 143, 249, 0.05);
}

.option-btn.primary {
    background-color: var(--primary-color);
    color: var(--nex-white);
    border: none;
    box-shadow: 0 4px 12px rgba(0, 143, 249, 0.3);
}

.option-btn.primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 143, 249, 0.4);
}

/* Support Screen */
.support-content {
    text-align: center;
}

.support-content h3 {
    color: var(--nex-black);
    margin-bottom: 24px;
}

.support-list {
    list-style: none;
    padding: 0;
    text-align: left;
    margin: 24px 0;
    background: var(--light-gray);
    padding: 20px;
    border-radius: 12px;
}

.support-list li {
    margin-bottom: 16px;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.back-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    padding: 10px;
}

/* Chat Screen */
#messages-area {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.message {
    max-width: 85%;
    padding: 14px 18px;
    border-radius: 18px;
    font-size: 15px;
    line-height: 1.5;
    position: relative;
}

.message.bot {
    background-color: var(--light-gray);
    color: var(--nex-black);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.message.user {
    background-color: var(--primary-color);
    color: var(--nex-white);
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 143, 249, 0.2);
}

.input-area {
    display: flex;
    gap: 12px;
    padding: 20px;
    border-top: 1px solid #eee;
    background-color: var(--nex-white);
}

#user-input {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid #eee;
    border-radius: 24px;
    outline: none;
    font-family: inherit;
    font-size: 15px;
    transition: border-color 0.2s;
}

#user-input:focus {
    border-color: var(--primary-color);
}

.input-area button {
    background-color: var(--primary-color);
    color: var(--nex-white);
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.input-area button:hover {
    background-color: var(--primary-hover);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #ccc;
}

/* Suggestion Chips */
#suggestions-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
    padding: 0 10px;
}

.suggestion-chip {
    background-color: var(--nex-white);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    font-weight: 500;
}

.suggestion-chip:hover {
    background-color: var(--primary-color);
    color: var(--nex-white);
}

/* Character Images */
.chat-icon-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.avatar-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    background-color: white;
    padding: 0px;
}