/* =========================
   VARIABLES
========================= */
:root{
    --verde-oscuro:#0B3D2E;
    --verde-medio:#2E7D32;
    --verde-brillante:#4CAF50;
    --verde-claro:#A5D6A7;
    --blanco:#FFFFFF;
    --gris:#F5F5F5;
    --texto:#0f172a;
    --borde:#E2E8E4;
}

/* =========================
   RESET
========================= */
*,
*::before,
*::after{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:'Poppins', sans-serif;
}

/* =========================
   BODY
========================= */
body{
    background:linear-gradient(to bottom, #ffffff, #f3fff5);
    color:var(--texto);
    overflow:hidden;
    position:relative;
}

/* =========================
   EFECTOS FONDO
========================= */
.bg-effect{
    position:absolute;
    border-radius:50%;
    filter:blur(120px);
    z-index:-1;
}
.effect-1{
    width:400px;
    height:400px;
    background:rgba(76,175,80,0.18);
    top:-120px;
    left:-120px;
}
.effect-2{
    width:350px;
    height:350px;
    background:rgba(165,214,167,0.20);
    bottom:-120px;
    right:-120px;
}

/* =========================
   HEADER
========================= */
header{
    width:100%;
    height:82px;
    background:rgba(255,255,255,0.82);
    backdrop-filter:blur(14px);
    border-bottom:1px solid rgba(255,255,255,0.4);
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:0 35px;
    position:sticky;
    top:0;
    z-index:1000;
    box-shadow:0 5px 25px rgba(0,0,0,0.05);
}

/* =========================
   LOGO
========================= */
.logo{
    display:flex;
    align-items:center;
}
.logo-img{
    height:70px;
    transition:0.35s ease;
}
.logo-img:hover{
    transform:scale(1.04) rotate(-1deg);
    filter:drop-shadow(0 10px 20px rgba(76,175,80,0.18));
}

/* =========================
   NAV
========================= */
nav{
    display:flex;
    gap:10px;
}
nav a{
    text-decoration:none;
    color:#475569;
    padding:10px 18px;
    border-radius:14px;
    font-size:14px;
    font-weight:500;
    transition:0.3s ease;
}
nav a:hover,
nav a.active{
    background:rgba(76,175,80,0.10);
    color:var(--verde-medio);
    backdrop-filter:blur(10px);
    box-shadow:0 5px 18px rgba(76,175,80,0.10);
}

/* =========================
   LAYOUT
========================= */
.layout{
    display:flex;
    height:calc(100vh - 82px);
}

/* =========================
   SIDEBAR
========================= */
.sidebar{
    width:300px;
    background:rgba(255,255,255,0.70);
    backdrop-filter:blur(18px);
    border-right:1px solid rgba(255,255,255,0.35);
    padding:22px;
    display:flex;
    flex-direction:column;
    gap:10px;
    overflow-y:auto;
    box-shadow:5px 0 30px rgba(0,0,0,0.03);
}

/* =========================
   BOTÓN NUEVA CONVERSACIÓN
========================= */
.new-chat-btn{
    width:100%;
    padding:15px;
    border:none;
    border-radius:18px;
    background:linear-gradient(135deg, var(--verde-medio), var(--verde-brillante));
    color:white;
    font-size:14px;
    font-weight:600;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:10px;
    cursor:pointer;
    transition:0.35s ease;
    box-shadow:0 12px 25px rgba(76,175,80,0.20);
}
.new-chat-btn:hover{
    transform:translateY(-4px);
    box-shadow:0 20px 35px rgba(76,175,80,0.30);
}

/* =========================
   STATS
========================= */
.mentor-stats{
    margin-top:15px;
    padding:15px;
    border-radius:18px;
    background:white;
    box-shadow:0 10px 20px rgba(0,0,0,.05);
}
.stat{
    display:flex;
    align-items:center;
    gap:12px;
    margin-bottom:12px;
}
.stat:last-child{
    margin-bottom:0;
}
.stat i{
    color:#4CAF50;
    font-size:18px;
}

/* =========================
   LABEL SIDEBAR
========================= */
.sidebar-label{
    margin-top:18px;
    margin-left:5px;
    font-size:11px;
    letter-spacing:1px;
    text-transform:uppercase;
    color:#94a3b8;
    font-weight:600;
}

/* =========================
   HISTORIAL
========================= */
.hist-item{
    padding:14px 16px;
    border-radius:16px;
    color:#475569;
    font-size:14px;
    cursor:pointer;
    transition:0.3s ease;
}
.hist-item:hover{
    background:rgba(76,175,80,0.10);
    color:var(--verde-medio);
    transform:translateX(4px);
}
.hist-item.active{
    background:linear-gradient(135deg, rgba(76,175,80,0.18), rgba(165,214,167,0.22));
    color:#166534;
    font-weight:600;
    box-shadow:0 10px 20px rgba(76,175,80,0.10);
}

/* =========================
   DIVIDER
========================= */
.sidebar-divider{
    width:100%;
    height:1px;
    background:#edf2f4;
    margin:10px 0;
}

/* =========================
   GAME LINK
========================= */
.game-link{
    text-decoration:none;
    color:#475569;
    border-radius:16px;
    padding:15px;
    border:1px solid #e2e8e4;
    transition:0.3s ease;
    background:white;
}
.game-link:hover{
    background:rgba(76,175,80,0.10);
    color:var(--verde-medio);
    border-color:#bbf7d0;
    transform:translateY(-3px);
}

/* =========================
   MAIN
========================= */
.main{
    flex:1;
    display:flex;
    flex-direction:column;
    gap:8px;
    padding:6px;
    overflow:hidden;
}

/* =========================
   CHAT STATUS
========================= */
.chat-status{
    display:flex;
    align-items:center;
    gap:8px;
    padding-left:6px;
}
.chat-status p{
    color:#64748b;
    font-size:14px;
}

/* =========================
   STATUS DOT
========================= */
.status-dot{
    width:10px;
    height:10px;
    border-radius:50%;
    background:#4CAF50;
    animation:pulse 2s infinite;
}
@keyframes pulse{
    0%{ box-shadow:0 0 0 0 rgba(76,175,80,0.4); }
    70%{ box-shadow:0 0 0 10px rgba(76,175,80,0); }
    100%{ box-shadow:0 0 0 0 rgba(76,175,80,0); }
}

/* =========================
   CHAT BOX
========================= */
.chat-box{
    flex:1;
    background:rgba(255,255,255,0.78);
    backdrop-filter:blur(18px);
    border-radius:28px;
    border:1px solid rgba(255,255,255,0.35);
    padding:28px;
    overflow-y:auto;
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:20px;
    box-shadow:0 10px 35px rgba(0,0,0,0.05);
}

/* =========================
   MENSAJES
========================= */
.bot-avatar{
    display:flex;
    align-items:flex-start;
    gap:14px;
    width:100%;
    max-width:1000px;
}
.avatar{
    width:55px;
    height:55px;
    min-width:55px;
    border-radius:18px;
    background:linear-gradient(135deg, #16a34a, #4CAF50);
    color:white;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:24px;
    box-shadow:0 15px 25px rgba(76,175,80,.25);
    animation:floatBot 4s ease-in-out infinite;
}
@keyframes floatBot{
    0%,100%{ transform:translateY(0); }
    50%{ transform:translateY(-5px); }
}
.message{
    max-width:72%;
    padding:18px 22px;
    border-radius:24px;
    line-height:1.8;
    animation:msg-in 0.3s ease;
}
@keyframes msg-in{
    from{ opacity:0; transform:translateY(10px); }
    to{ opacity:1; transform:translateY(0); }
}
.message.bot{
    max-width:900px;
    margin-bottom:20px;
    background:linear-gradient(135deg, rgba(255,255,255,0.95), rgba(240,255,244,0.92));
    border:1px solid rgba(220,252,231,0.9);
    color:#334155;
    box-shadow:0 10px 25px rgba(0,0,0,0.04);
}
.message.bot h3{
    color:var(--verde-medio);
    margin-bottom:10px;
    font-size:18px;
}
.message.bot p{
    margin-bottom:10px;
    font-size:14px;
}

/* =========================
   AI BADGE
========================= */
.ai-badge{
    display:inline-flex;
    align-items:center;
    gap:8px;
    padding:8px 14px;
    border-radius:999px;
    background:#dcfce7;
    color:#166534;
    font-size:12px;
    font-weight:600;
    margin-bottom:15px;
}

/* =========================
   CHIPS
========================= */
.suggestion-chips{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
}
.chip{
    padding:12px 18px;
    border-radius:999px;
    border:1px solid #d1fae5;
    background:rgba(255,255,255,0.8);
    backdrop-filter:blur(10px);
    color:#166534;
    font-size:13px;
    cursor:pointer;
    transition:0.3s ease;
}
.chip:hover{
    background:rgba(76,175,80,0.10);
    border-color:#86efac;
    transform:translateY(-3px) scale(1.02);
    box-shadow:0 10px 20px rgba(76,175,80,0.10);
}

/* =========================
   INPUT AREA
========================= */
.input-area{
    display:flex;
    align-items:center;
    gap:14px;
}
.input-wrap{
    flex:1;
    display:flex;
    align-items:center;
    gap:12px;
    background:rgba(255,255,255,0.78);
    backdrop-filter:blur(14px);
    border:1px solid rgba(255,255,255,0.35);
    border-radius:22px;
    padding:16px 20px;
    transition:0.3s ease;
    box-shadow:0 8px 25px rgba(0,0,0,.04);
}
.input-wrap:focus-within{
    border-color:#86efac;
    box-shadow:0 0 0 5px rgba(76,175,80,0.10);
}
.input-wrap input{
    width:100%;
    border:none;
    outline:none;
    background:transparent;
    font-size:14px;
    color:#334155;
}
.input-wrap input::placeholder{
    color:#94a3b8;
}

/* =========================
   ATTACH BTN
========================= */
.attach-btn{
    border:none;
    background:none;
    color:var(--verde-medio);
    font-size:20px;
    cursor:pointer;
    transition:.3s;
}
.attach-btn:hover{
    transform:scale(1.1);
    color:var(--verde-brillante);
}

/* =========================
   SEND BTN
========================= */
.send-btn{
    width:58px;
    height:58px;
    border:none;
    border-radius:20px;
    background:linear-gradient(135deg, var(--verde-medio), var(--verde-brillante));
    color:white;
    cursor:pointer;
    display:flex;
    align-items:center;
    justify-content:center;
    transition:0.35s ease;
    box-shadow:0 12px 25px rgba(76,175,80,0.22);
}
.send-btn:hover{
    transform:translateY(-3px) scale(1.05);
    box-shadow:0 20px 35px rgba(76,175,80,0.28);
}
.send-btn:active{
    transform:scale(0.96);
}

/* =========================
   RESPONSIVE
========================= */
@media(max-width:992px){
    .sidebar{ display:none; }
    nav{ display:none; }
    header{ justify-content:center; }
    .message{ max-width:90%; }
}
@media(max-width:768px){
    .main{ padding:14px; }
    .chat-box{ padding:18px; }
    .message{ max-width:100%; }
    .message.bot h3{ font-size:16px; }
    .chip{
        width:100%;
        text-align:center;
        display:flex;
        align-items:center;
        gap:8px;
    }
    .send-btn{
        width:52px;
        height:52px;
    }
}
.nav-auth{

    display:flex;

    gap:15px;

    align-items:center;
}
.btn-login{

    text-decoration:none;

    color:black;

    font-weight:600;

    transition:0.3s;
}

.btn-login:hover{

    color:var(--verde-medio);
}

.btn-register{

    text-decoration:none;

    background:var(--verde-brillante);

    color:white;

    padding:12px 24px;

    border-radius:16px;

    font-weight:600;

    transition:0.35s ease;

    box-shadow:
    0 10px 25px rgba(0,0,0,0.12);
}

.btn-register:hover{

    background:var(--verde-medio);

    transform:translateY(-3px);
}
.btn-perfil,
.btn-logout{
    text-decoration:none;
    padding:10px 18px;
    border-radius:10px;
    font-weight:600;
    transition:.3s;
    display:flex;
    align-items:center;
    gap:8px;
}

.btn-perfil{
    background:#2E7D32;
    color:white;
}

.btn-perfil:hover{
    background:#1b5e20;
}

.btn-logout{
    background:white;
    color:black;
}

.btn-logout:hover{
    background:#b91c1c;
}