:root {
    /* Colores principales */
    --primary-color: #f59e0b;
    --hover-color: #d97706;
    --accent-light: #fbbf24;

    /* Fondos */
    --bg-gradient-start: #1e293b;
    --bg-gradient-end: #0f172a;
    --chat-bg: rgba(255, 255, 255, 0.03);
    --bot-bubble: rgba(255, 255, 255, 0.08);
    --user-bubble: linear-gradient(90deg, #f59e0b, #fbbf24);

    /* Texto */
    --text-color: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.8);
    --text-muted: rgba(255, 255, 255, 0.6);

    /* Efectos */
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow-main: 0 40px 100px -20px rgba(0, 0, 0, 0.6);
    --error-color: #ef4444;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-image: url('/images/fondo.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-color);
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    min-height: 100vh;
}

.chat-container {
    width: 90%;
    max-width: 500px;
    height: 80vh;
    background: rgba(15, 23, 42, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border-radius: 2.5rem;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.input-area {
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    gap: 10px;
    border-top: 1px solid var(--glass-border);
    align-items: center;
}

input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-color);
    padding: 12px;
    border-radius: 10px;
    outline: none;
    transition: all 0.3s;
    min-width: 0;
}

input::placeholder {
    color: var(--text-muted);
}

input:focus {
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.2);
}

.header {
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    gap: 12px;
}

.header h1 {
    font-size: 1.2rem;
    margin: 0;
    color: var(--primary-color);
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Bot image inside index.html header */
.header img.bot-anim {
    position: static;
    height: 70px;
    width: auto;
    flex-shrink: 0;
}

/* Generic logo inside header (fallback) */
.header img:not(.bot-anim) {
    position: static;
    height: 50px;
    width: auto;
    flex-shrink: 0;
}

/* ---- mac.html / test.html logo section ---- */
.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 20px 0 10px;
    width: 100%;
}

.logo-container h1 {
    font-size: 1.2rem;
    margin: 0;
    color: var(--primary-color);
    font-weight: 700;
    text-align: center;
}

/* Bot image in mac.html */
.bot-animado {
    height: 70px;
    width: auto;
    flex-shrink: 0;
    animation: floating 4s ease-in-out infinite, pulse-bot 3s ease-in-out infinite;
}

#messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 15px;
    font-size: 0.95rem;
    line-height: 1.4;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bot {
    align-self: flex-start;
    background: var(--bot-bubble);
    color: var(--text-color);
    border-bottom-left-radius: 2px;
    border: 1px solid var(--glass-border);
}

.user {
    align-self: flex-end;
    background: var(--user-bubble);
    color: #1e293b;
    font-weight: 600;
    border-bottom-right-radius: 2px;
}

@keyframes floating {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

@keyframes pulse-bot {

    0%,
    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.3));
    }

    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 25px rgba(245, 158, 11, 0.5));
    }
}

.bot-anim {
    animation: floating 4s ease-in-out infinite, pulse-bot 3s ease-in-out infinite;
}

button {
    background: linear-gradient(90deg, var(--primary-color), var(--accent-light));
    color: #1e293b;
    border: none;
    padding: 0 20px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(245, 158, 11, 0.4);
    filter: brightness(1.1);
}

button:active {
    transform: translateY(0);
}

#auth-modal {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.modal-content {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    padding: 30px;
    border-radius: 1.5rem;
    text-align: center;
    width: 300px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-main);
}

.modal-content input {
    width: 80%;
    margin: 15px 0;
}

.chat-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--primary-color);
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 25px;
    margin: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    text-align: center;
    min-width: 120px;
}

.chat-btn:hover {
    background: var(--primary-color);
    color: #0f172a;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
}

.button-container {
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    animation: fadeIn 0.5s ease-out;
}

@media (max-width: 480px) {
    .input-area {
        padding: 15px 25px 15px 15px;
        gap: 15px;
    }

    input {
        padding: 10px;
    }

    button {
        padding: 0 16px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}