/*
 * Archivo: mi-portafolio/ahorcado/public/css/game.css
 */
:root{
    --bg:#0f1724;
    --card:#0b1220;
    --accent:#7c3aed;
    --accent-2:#2563eb;
    --muted:#94a3b8;
    --danger:#ef4444;
    --success:#16a34a;
    --glass: rgba(255,255,255,0.03);
}
*{box-sizing:border-box}
body{
    margin:0;
    min-height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
    background: linear-gradient(180deg, #071022 0%, #0b1020 50%);
    color:#e6eef8;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
    padding:24px;
}
.card{
    width:100%;
    max-width:820px;
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.015));
    border:1px solid rgba(255,255,255,0.04);
    border-radius:12px;
    padding:28px;
    box-shadow: 0 10px 30px rgba(2,6,23,0.7);
}
header{ display:flex; align-items:center; justify-content:space-between; gap:16px; }
header h1{ margin:0; font-size:20px; letter-spacing:0.6px; display:flex; align-items:center; gap:10px;}
.subtitle{ color:var(--muted); font-size:13px; margin-top:6px;}
.main{
    display:grid;
    grid-template-columns: 1fr 320px;
    gap:20px;
    margin-top:20px;
}
/* estado palabra */
.word {
    background: var(--glass);
    padding:18px;
    border-radius:10px;
    display:flex;
    flex-direction:column;
    gap:14px;
    min-height:180px;
    justify-content:center;
}
.letters {
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    justify-content:center;
}
.letter {
    width:48px;
    height:64px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    font-weight:700;
    font-size:28px;
    border-radius:8px;
    background:rgba(255,255,255,0.02);
    border:1px solid rgba(255,255,255,0.03);
    box-shadow: inset 0 -6px 12px rgba(0,0,0,0.25);
    color:#e6eef8;
}
.underscore { opacity:0.45; font-size:18px; }
/* barra intentos */
.panel {
    background: rgba(255,255,255,0.02);
    padding:16px;
    border-radius:10px;
    border:1px solid rgba(255,255,255,0.03);
    display:flex;
    flex-direction:column;
    gap:12px;
    align-items:center;
}
.dots { display:flex; gap:8px; }
.dot{
    width:18px;height:18px;border-radius:50%;
    border:2px solid rgba(255,255,255,0.08);
    background:transparent;
}
.dot.used{ background: var(--danger); border-color:var(--danger); box-shadow:0 0 6px rgba(239,68,68,0.3); }
.used-letters { font-size:14px; color:var(--muted); text-align:center; }
.mensaje { padding:10px 12px; border-radius:8px; font-weight:600; }
.mensaje.penalty { background: rgba(239,68,68,0.08); color:var(--danger); border:1px solid rgba(239,68,68,0.06); }
.mensaje.ok { background: rgba(34,197,94,0.06); color:var(--success); border:1px solid rgba(34,197,94,0.06); }
.controls{ display:flex; gap:10px; align-items:center; justify-content:center; margin-top:14px; flex-wrap:wrap; }
input[type="text"]{
    padding:10px 12px;
    border-radius:8px;
    border:1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.02);
    color: #e6eef8;
    width:120px;
    font-size:16px;
    text-align:center;
}
button{
    padding:10px 14px;
    border-radius:10px;
    border: none;
    background: linear-gradient(90deg, var(--accent-2), var(--accent));
    color:white;
    cursor:pointer;
    font-weight:700;
}
.reset {
    background: transparent;
    border:1px solid rgba(255,255,255,0.06);
    color:var(--muted);
    padding:8px 12px;
    border-radius:8px;
    cursor:pointer;
}
.final { text-align:center; font-weight:700; margin-top:12px; }
@media (max-width:800px){
    .main{ grid-template-columns: 1fr; }
    .panel{ flex-direction:row; padding:12px; gap:10px; justify-content:space-between; }
}

/* Estilo para el botón de volver */
.back-btn {
    text-decoration: none;
    color: var(--muted);
    font-size: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
    padding: 8px 12px;
    border-radius: 8px;
    transition: background 0.3s ease, color 0.3s ease;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}