:root {
    --bg-color: #0A0A0A;
    --terminal-bg: #000000;
    --text-color: #00E600;
    --text-secondary: #00CC00;
    --accent-color: #00FF41;
    --user-input-color: #ffffff;
    --border-color: #333333;
    --button-hover: #005500;
    --link-color: #00FFAA;
    --link-hover: #00CC88;
    --whatsapp-color: #25D366;
    --typing-color: #00AA00;
}

/* Light mode fallback (opcional) */
@media (prefers-color-scheme: light) {
    :root {
        --bg-color: #ffffff;
        --terminal-bg: #f0f0f0;
        --text-color: #006600;
        --text-secondary: #009900;
        --accent-color: #00cc00;
        --user-input-color: #000000;
        --border-color: #cccccc;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Courier New', monospace;
}

html, body {
    overflow-x: hidden;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: var(--bg-color);
    padding: 20px;
}

.chatbot-container {
    width: 100%;
    max-width: 500px;
    height: 650px;
    background-color: var(--terminal-bg);
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 2px solid var(--border-color);
}

@media (max-height: 700px) {
    .chatbot-container {
        height: 90vh;
    }
}

.chatbot-header {
    background-color: var(--terminal-bg);
    color: var(--text-color);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 2px solid var(--border-color);
    position: relative;
}

.chatbot-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    animation: headerGlow 3s infinite;
}

@keyframes headerGlow {
    0% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; }
}

.chatbot-avatar {
    width: 36px;
    height: 36px;
    background-color: var(--terminal-bg);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-color);
    font-size: 18px;
    border: 1px solid var(--text-color);
}

.chatbot-info h3 {
    font-size: 16px;
    font-weight: 700;
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.3), 0 0 10px rgba(0, 255, 0, 0.1);
}

.chatbot-info p {
    font-size: 12px;
    color: var(--text-secondary);
}

.chatbot-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background-color: var(--terminal-bg);
}

.message {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.4;
    animation: fadeIn 0.3s ease forwards;
    opacity: 0;
    position: relative;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.bot-message {
    background-color: rgba(0, 30, 0, 0.3);
    color: var(--text-color);
    align-self: flex-start;
    border-left: 2px solid var(--text-secondary);
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5), 0 0 8px rgba(0, 255, 0, 0.2);
}

.user-message {
    background-color: rgba(0, 40, 0, 0.5);
    color: var(--user-input-color);
    align-self: flex-end;
    border-right: 2px solid var(--accent-color);
    box-shadow: -2px 2px 5px rgba(0, 0, 0, 0.5), 0 0 8px rgba(0, 255, 170, 0.2);
}

.options-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.option-btn {
    background-color: rgba(0, 40, 0, 0.5);
    color: var(--text-color);
    border: 1px solid var(--text-secondary);
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
    font-family: 'Courier New', monospace;
}

.option-btn:hover {
    background-color: var(--button-hover);
    transform: translateY(-2px);
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.4);
}

.chatbot-input {
    display: flex;
    padding: 12px;
    border-top: 1px solid var(--border-color);
    background-color: var(--terminal-bg);
}

.chatbot-input input {
    flex: 1;
    padding: 12px 16px;
    background-color: rgba(0, 20, 0, 0.3);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    outline: none;
    font-size: 14px;
    font-family: 'Courier New', monospace;
    transition: all 0.3s;
    position: relative;
}

.chatbot-input input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 8px rgba(0, 255, 0, 0.3), 0 0 15px rgba(0, 255, 0, 0.1);
}

.chatbot-input input::after {
    content: '|';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    animation: blink 1s infinite;
    color: var(--text-color);
    pointer-events: none;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.chatbot-input button {
    background-color: rgba(0, 40, 0, 0.7);
    color: var(--text-color);
    border: 1px solid var(--text-secondary);
    width: 48px;
    height: 48px;
    border-radius: 4px;
    margin-left: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.chatbot-input button i {
    font-size: 18px;
}

.chatbot-input button:hover {
    background-color: var(--button-hover);
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.4);
}

.typing-indicator {
    display: flex;
    padding: 10px 14px;
    background-color: rgba(0, 30, 0, 0.3);
    border-radius: 4px;
    align-self: flex-start;
    margin-bottom: 8px;
    width: fit-content;
    border-left: 2px solid var(--typing-color);
}

.typing-indicator span {
    height: 8px;
    width: 8px;
    background-color: var(--typing-color);
    border-radius: 50%;
    display: inline-block;
    margin: 0 2px;
    animation: typing 1s infinite ease-in-out;
}

@keyframes typing {
    0%, 100% {
        transform: translateY(0);
        opacity: 0.5;
    }
    50% {
        transform: translateY(-4px);
        opacity: 1;
    }
}

.portfolio-link {
    display: inline-block;
    margin-top: 12px;
    padding: 8px 16px;
    background-color: rgba(0, 40, 0, 0.5);
    color: var(--link-color);
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    border: 1px solid var(--link-color);
    transition: all 0.2s;
    font-family: 'Courier New', monospace;
}

.portfolio-link:hover {
    background-color: rgba(0, 60, 0, 0.7);
    color: var(--link-hover);
    border-color: var(--link-hover);
    transform: translateY(-2px);
    box-shadow: 0 0 12px rgba(0, 255, 170, 0.5);
}

.whatsapp-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 8px 16px;
    background-color: var(--whatsapp-color);
    color: black;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
    font-family: 'Courier New', monospace;
}

.whatsapp-btn:hover {
    background-color: #128C7E;
    transform: translateY(-2px);
    box-shadow: 0 0 12px rgba(37, 211, 102, 0.6);
}

/* Scrollbar personalizada */
.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: rgba(0, 20, 0, 0.1);
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background-color: var(--text-secondary);
    border-radius: 3px;
}
