﻿:root {
    --black-deep: #0a0a0a;
    --gray-dark: #1a1a1a;
    --white: #ffffff;
    --neon-green: #39ff14;
    --neon-purple: #bc13fe;
    --neon-blue: #1e90ff;
    --neon-cyan: #38fdfd;
    --neon-soft: #c5c9ff;
    --whatsapp: #25D366;
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Segoe UI", system-ui, sans-serif;
}

body {
    background: var(--black-deep);
    color: var(--white);
    height: 100vh;
    overflow: hidden;
}

/* app layout */
.chat-app {
    display: flex;
    height: 100vh;
}

/* sidebar */
.chat-sidebar {
    width: 280px;
    background: linear-gradient(180deg, #0b0f1a, #06080f);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* top */
.sidebar-top {
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.new-chat-btn {
    background: linear-gradient(45deg, var(--neon-blue), var(--neon-purple));
    border: none;
    color: white;
    padding: 0.7rem;
    border-radius: 12px;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    box-shadow: 0 0 20px rgba(30, 144, 255, 0.6);
    transition: transform 0.25s ease;
}

.new-chat-btn:hover {
    transform: scale(1.05);
}

.chat-search {
    background: var(--gray-dark);
    padding: 0.6rem 0.8rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chat-search input {
    background: transparent;
    border: none;
    color: white;
    outline: none;
    width: 100%;
}

/* History */
.chat-history {
    padding: 0.5rem;
    flex: 1;
    overflow-y: auto;
}

/* css menu lateral */
.chat-item {
    position: relative;
    display: flex;
    justify-content: space-between;
    padding: 0.7rem 0.8rem;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--neon-soft);
    transition: background 0.2s ease;
}

    .chat-item:hover {
        background: rgba(30,144,255,.12);
    }

    .chat-item.active {
        background: rgba(56,253,253,.18);
        color: var(--white);
    }

.chat-left {
    display: flex;
    gap: .6rem;
    align-items: center;
}

.chat-menu-btn {
    cursor: pointer;
    padding: 0 6px;
    font-size: 18px;
    opacity: .7;
}

    .chat-menu-btn:hover {
        opacity: 1;
    }

.chat-menu {
    position: absolute;
    right: 10px;
    top: 40px;
    background: #121212;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 10px;
    min-width: 180px;
    display: none;
    flex-direction: column;
    z-index: 50;
    box-shadow: 0 10px 30px rgba(0,0,0,.6);
}

    .chat-menu.open {
        display: flex;
    }

.menu-item {
    padding: .65rem .8rem;
    display: flex;
    gap: .6rem;
    align-items: center;
    cursor: pointer;
    transition: background .2s;
}

    .menu-item:hover {
        background: rgba(56,253,253,.08);
    }

    .menu-item.delete {
        color: rgb(255,60,60);
    }

    .menu-item.delete:hover {
        background: rgba(255,60,60,.15);
    }

    /* User */

    .sidebar-user {
        padding: 1rem;
        border-top: 1px solid rgba(56, 253, 253, 0.15);
        text-align: center;
    }

    .user-box {
        display: flex;
        justify-content: center;
        border: 1px solid var(--neon-cyan);
        width: 60%;
        border-radius: 0.5rem;
        padding: 0.6rem;
        gap: 0.6rem;
        align-items: center;
        margin-inline: auto;
        margin-bottom: 0.4rem;
        color: var(--neon-cyan);
        cursor: pointer;
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

        .user-box:hover {
            transform: translateY(-1.2px);
            box-shadow: 0 0 20px rgba(56,253,253,.25);
        }

    /* chat main */
.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: radial-gradient(circle at top, #0f172a, #05070d);
}

/* HEADER */

.chat-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 20px;
    background: #0a0a0a;
    border-bottom: 1px solid rgba(56,253,253,.2);
}

.chat-menu-toggle {
    position: absolute;
    right: 18px;
    background: none;
    border: none;
    color: #38fdfd;
    font-size: 1.8rem;
    cursor: pointer;
    transition: transform .3s ease;
}

    .chat-menu-toggle:hover {
        transform: scale(1.15);
    }

/* Dropdown */

.chat-dropdown {
    position: absolute;
    top: 65px;
    right: 14px;
    background: rgba(10,10,10,.96);
    border: 1px solid rgba(56,253,253,.35);
    border-radius: 14px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 180px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px) scale(.95);
    box-shadow: 0 0 30px rgba(56,253,253,.3);
    backdrop-filter: blur(10px);
    z-index: 200;
}

    .chat-dropdown a {
        display: flex;
        align-items: center;
        color: white;
        text-decoration: none;
        padding: 10px 12px;
        border-radius: 10px;
        font-weight: 500;
        transition: background .3s, color .3s;
    }

        .chat-dropdown a:hover {
            background: rgba(56,253,253,.15);
            color: #38fdfd;
        }

    .chat-dropdown.active {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0) scale(1);
    }

    .chat-dropdown i {
        color: var(--neon-green);
        margin-right: 10px;
        font-size: 1.1rem;
        transition: transform .3s ease, filter .3s ease;
    }

    /* Glow elegante en hover del item */

    .chat-dropdown a:hover i {
        filter: drop-shadow(0 0 6px var(--neon-green));
        transform: scale(1.15);
    }

    .chat-header h2 {
        font-weight: 600;
        color: var(--neon-cyan);
    }

    .chat-header span {
        color: var(--neon-purple);
    }

/* MESSAGES */

.chat-messages {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    max-width: 70%;
    padding: .9rem 1.1rem;
    border-radius: 14px;
    line-height: 1.4;
    font-size: .95rem;
}

    .message.ai {
        background: rgba(30,144,255,.15);
        border: 1px solid rgba(56,253,253,.3);
        color: var(--white);
        box-shadow: 0 0 20px rgba(56,253,253,.25);
    }

    .message.user {
        background: linear-gradient(45deg, var(--neon-purple), var(--neon-blue));
        align-self: flex-end;
        box-shadow: 0 0 20px rgba(168,85,247,.6);
    }

/* INPUT */

.chat-input {
    position: relative;
    padding: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: .8rem;
    border-top: 1px solid rgba(56,253,253,.15);
    background: rgba(10,10,10,.9);
}

    .chat-input input {
        flex: 1;
        background: var(--gray-dark);
        border: 1px solid rgba(56,253,253,.15);
        padding: .85rem 1rem;
        border-radius: 14px;
        color: white;
        outline: none;
        transition: border .3s ease, box-shadow .3s ease;
    }

        .chat-input input:focus {
            border-color: #38fdfd;
            box-shadow: 0 0 12px rgba(56,253,253,.45);
        }

    .chat-input button {
        background: linear-gradient(45deg, var(--neon-blue), var(--neon-purple));
        border: none;
        color: white;
        padding: .85rem 1.1rem;
        border-radius: 14px;
        cursor: pointer;
        box-shadow: 0 0 20px rgba(30,144,255,.6);
        transition: transform .2s ease, box-shadow .2s ease;
    }

        .chat-input button:hover {
            transform: scale(1.1);
            box-shadow: 0 0 28px rgba(30,144,255,.9);
        }

        .chat-input button:active {
            transform: scale(.95);
        }

.legal {
    text-align: center;
    width: 100%;
    margin-top: 0;
    font-size: .6rem;
    color: #aaa;
    opacity: .75;
}

    .legal a {
        color: #38fdfd;
        text-decoration: none;
    }

        .legal a:hover {
            text-decoration: underline;
        }

/* =====================
   SCROLLBAR CYBER
===================== */

.chat-history::-webkit-scrollbar,
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-history::-webkit-scrollbar-thumb,
.chat-messages::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--neon-blue), var(--neon-purple));
    border-radius: 10px;
}

.auth-modal {
    position: fixed;
    inset: 0;
    background: rgba(2,5,15,.92);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: .4s;
    z-index: 9999;
}

    .auth-modal.active {
        opacity: 1;
        pointer-events: auto;
    }

.auth-box {
    width: 360px;
    background: #05080f;
    border-radius: 18px;
    padding: 30px;
    border: 2px solid rgba(56,253,253,.4);
    box-shadow: 0 0 40px rgba(56,253,253,.6);
    position: relative;
}

.auth-tabs {
    display: flex;
    margin-bottom: 20px;
}

.auth-tab {
    flex: 1;
    background: transparent;
    color: #c5c9ff;
    border: none;
    font-size: 1rem;
    padding: 10px;
    cursor: pointer;
}

    .auth-tab.active {
        color: #38fdfd;
        border-bottom: 2px solid #38fdfd;
    }

.auth-content {
    display: none;
    flex-direction: column;
    gap: 15px;
}

    .auth-content.active {
        display: flex;
    }

    .auth-content input {
        background: transparent;
        border: 2px solid rgba(56,253,253,.3);
        padding: 12px;
        border-radius: 10px;
        color: white;
    }

.auth-btn {
    margin-top: 10px;
    background: transparent;
    border: 2px solid #38fdfd;
    color: #38fdfd;
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
}

.auth-socials {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

    .auth-socials button {
        flex: 1;
        padding: 10px;
        border-radius: 10px;
        border: none;
        cursor: pointer;
        color: white;
    }

    .auth-socials .google {
        background: #f44336;
    }

    .auth-socials .facebook {
        background: #1877f2;
    }

.auth-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.6rem;
    cursor: pointer;
    color: #38fdfd;
}

/* Modal de accion */
.ledger-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
    backdrop-filter: blur(8px);
}

    .ledger-modal.active {
        display: flex;
    }

.modal-box {
    background: linear-gradient(160deg,#0b0f1f,#05080f);
    border: 1px solid rgba(56,253,253,.3);
    border-radius: 16px;
    padding: 2rem;
    width: 320px;
    box-shadow: 0 0 40px rgba(56,253,253,.25);
    text-align: center;
}

    .modal-box h3 {
        color: #38fdfd;
        margin-bottom: 1rem;
    }

    .modal-box input {
        width: 100%;
        padding: .7rem;
        border-radius: 8px;
        background: #0f1325;
        border: 1px solid rgba(255,255,255,.15);
        color: white;
        margin-bottom: 1rem;
    }

    .modal-box p {
        color: #c5c9ff;
        margin-bottom: 1.5rem;
    }

.modal-actions {
    display: flex;
    gap: .8rem;
}

    .modal-actions button {
        flex: 1;
        padding: .6rem;
        border-radius: 8px;
        border: none;
        cursor: pointer;
    }

.modal-cancel {
    background: #222;
    color: white;
}

.modal-confirm {
    background: linear-gradient(90deg,#38fdfd,#1e90ff);
    color: black;
    font-weight: 600;
}

.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(10,10,10,.95);
    border: 1px solid rgba(56,253,253,.35);
    padding: 14px 20px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 0 25px rgba(56,253,253,.35);
    z-index: 999;
}

    .cookie-banner p {
        color: white;
        font-size: .85rem;
    }

    .cookie-banner button {
        background: var(--neon-green);
        border: none;
        color: black;
        font-weight: 600;
        padding: 6px 12px;
        border-radius: 10px;
        cursor: pointer;
        box-shadow: 0 0 12px var(--neon-green);
    }

