/* ========================= */
/* FONDO GENERAL */
/* ========================= */

body{
background:radial-gradient(circle at top,#0b1224,#000);
color:#e5e7eb;
font-family:'Poppins',sans-serif;
margin:0;
overflow-x:hidden;
}


/* ========================= */
/* CONTENEDOR */
/* ========================= */

.history-container{
max-width:1100px;
margin:80px auto;
padding:40px 20px;
background:rgba(15,23,42,.85);
border-radius:20px;
border:1px solid rgba(255,255,255,.08);
box-shadow:0 20px 60px rgba(0,0,0,.6);
backdrop-filter:blur(10px);
text-align:center;
transition:.3s;
}

.history-container:hover{
box-shadow:0 0 40px rgba(0,255,255,.15);
}

.history-container h2{
font-size:34px;
color:#00ffff;
margin-bottom:40px;
text-shadow:0 0 20px rgba(0,255,255,.4);
}


/* ========================= */
/* GRID */
/* ========================= */

.history-list{
display:grid;
grid-template-columns:repeat(auto-fit,minmax(230px,1fr));
gap:25px;
}


/* ========================= */
/* TARJETAS */
/* ========================= */

.history-card{

background:rgba(2,6,23,.9);
border-radius:16px;
padding:18px;
border:1px solid rgba(255,255,255,.08);
box-shadow:0 10px 35px rgba(0,0,0,.6);
transition:.35s;
cursor:pointer;
position:relative;
overflow:hidden;

opacity:0;
transform:translateY(30px);
animation:cardFade .6s forwards;

}

.history-card a{
text-decoration:none;
color:white;
}

.history-card img{
width:100%;
height:150px;
object-fit:cover;
border-radius:10px;
margin-bottom:10px;
}

.history-card h3{
font-size:16px;
margin-bottom:5px;
}

.history-card p{
color:#00ffff;
font-weight:600;
}


/* ========================= */
/* EFECTO BRILLO */
/* ========================= */

.history-card::before{
content:"";
position:absolute;
top:0;
left:-120%;
width:120%;
height:100%;
background:linear-gradient(
120deg,
transparent,
rgba(0,255,255,.15),
transparent
);
transition:.6s;
}

.history-card:hover::before{
left:120%;
}


/* ========================= */
/* HOVER */
/* ========================= */

.history-card:hover{

transform:translateY(-6px) scale(1.03);
border-color:#00ffff;
box-shadow:0 0 30px rgba(0,255,255,.3);

}


/* ========================= */
/* BOTON LIMPIAR */
/* ========================= */

#clear-history-button{

margin-top:40px;
padding:14px 25px;
background:#ff3b3b;
border:none;
border-radius:10px;
color:white;
font-weight:600;
cursor:pointer;
transition:.3s;

}

#clear-history-button:hover{

background:#ff0000;
box-shadow:0 0 20px rgba(255,0,0,.6);

}


/* ========================= */
/* TEXTO VACIO */
/* ========================= */

#history-list p{
color:#94a3b8;
font-size:15px;
}


/* ========================= */
/* MODAL CYBERXTREME */
/* ========================= */

.cx-modal{

position:fixed;
top:0;
left:0;
width:100%;
height:100%;
background:rgba(0,0,0,.75);
display:flex;
align-items:center;
justify-content:center;
z-index:9999;
animation:fadeIn .25s ease;

}

.cx-modal-box{

background:#0f172a;
padding:35px;
border-radius:18px;
border:1px solid rgba(0,255,255,.2);
box-shadow:0 0 40px rgba(0,255,255,.15);
text-align:center;
max-width:350px;
width:90%;

}

.cx-modal-box h3{
color:#00ffff;
margin-bottom:10px;
font-size:22px;
}

.cx-modal-box p{
color:#cbd5e1;
font-size:14px;
margin-bottom:25px;
}

.cx-modal-buttons{
display:flex;
gap:15px;
justify-content:center;
}

.cx-cancel{
background:#1e293b;
border:none;
color:#fff;
padding:10px 18px;
border-radius:10px;
cursor:pointer;
transition:.25s;
}

.cx-cancel:hover{
background:#334155;
}

.cx-delete{
background:#ff3b3b;
border:none;
color:white;
padding:10px 18px;
border-radius:10px;
cursor:pointer;
transition:.25s;
}

.cx-delete:hover{
background:#ff0000;
box-shadow:0 0 15px rgba(255,0,0,.6);
}


/* ========================= */
/* ANIMACIONES */
/* ========================= */

@keyframes cardFade{

from{
opacity:0;
transform:translateY(30px);
}

to{
opacity:1;
transform:translateY(0);
}

}

.fade-out{
animation:fadeOut .5s forwards;
}

@keyframes fadeOut{

from{
opacity:1;
transform:scale(1);
}

to{
opacity:0;
transform:scale(.8);
}

}

@keyframes fadeIn{

from{opacity:0}
to{opacity:1}

}


/* ========================= */
/* RESPONSIVE */
/* ========================= */

@media(max-width:700px){

.history-container{
padding:25px;
margin:40px 15px;
}

.history-container h2{
font-size:26px;
}

.history-card img{
height:130px;
}

}

/* ========================= */
/* 🌞 MODO CLARO - HISTORY */
/* ========================= */

body.light{
background:linear-gradient(180deg,#f8fbff,#eef6ff);
color:#111;
}

/* CONTENEDOR */
body.light .history-container{
background:#ffffff;
border:1px solid rgba(0,0,0,.08);
box-shadow:0 15px 40px rgba(0,0,0,.08);
}

body.light .history-container:hover{
box-shadow:0 0 25px rgba(0,153,204,.15);
}

body.light .history-container h2{
color:#0099cc;
text-shadow:0 0 10px rgba(0,153,204,.2);
}

/* TARJETAS */
body.light .history-card{
background:#f8fbff;
border:1px solid rgba(0,0,0,.08);
box-shadow:0 10px 25px rgba(0,0,0,.08);
}

body.light .history-card a{
color:#111;
}

body.light .history-card p{
color:#00bcd4;
}

body.light .history-card:hover{
border-color:#00bcd4;
box-shadow:0 0 25px rgba(0,188,212,.2);
}

/* EFECTO BRILLO */
body.light .history-card::before{
background:linear-gradient(
120deg,
transparent,
rgba(0,153,204,.12),
transparent
);
}

/* BOTÓN LIMPIAR */
body.light #clear-history-button{
background:#ff4d4d;
color:#fff;
}

body.light #clear-history-button:hover{
background:#e60000;
box-shadow:0 0 15px rgba(255,0,0,.3);
}

/* TEXTO VACÍO */
body.light #history-list p{
color:#666;
}

/* MODAL */
body.light .cx-modal{
background:rgba(0,0,0,.4);
}

body.light .cx-modal-box{
background:#ffffff;
border:1px solid rgba(0,0,0,.1);
box-shadow:0 10px 30px rgba(0,0,0,.15);
}

body.light .cx-modal-box h3{
color:#0099cc;
}

body.light .cx-modal-box p{
color:#444;
}

/* BOTONES MODAL */
body.light .cx-cancel{
background:#e5e7eb;
color:#111;
}

body.light .cx-cancel:hover{
background:#d1d5db;
}

body.light .cx-delete{
background:#ff4d4d;
color:#fff;
}

body.light .cx-delete:hover{
background:#e60000;
box-shadow:0 0 12px rgba(255,0,0,.3);
}