@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;600;700&display=swap');

html, body {
    margin: 0;
    height: 100%;
    overflow: hidden;
}
body {
    font-family: 'Space Grotesk', sans-serif;
    background: radial-gradient(circle at 10% 20%, #0f172a 0%, #111827 40%, #05060c 100%);
    color: #e5e7eb;
    position: relative;
}
canvas{
    display:block;
    position:absolute;
    top:50%;
    left:50%;
    transform: translate(-50%, -50%);
}
menu{
    position:fixed;
    top:0;
    right:10%;
}
menu .shopText{
    color:white;
    font-size: 25px;
    text-align: center;
    width:88px;
}
menu #shop .shopChest{
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    margin-top:15px;
    margin-right:10%;
    background-image:url(images/chest.png);
    width:88px;
    height:77px;
    background-size:contain;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.35));
}
menu #shop .shopChest:hover{
    background-image:url(images/lightchest.png);
}
img{
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}
#popmenu{
    visibility:hidden;
    position:fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width:70%;
    margin:auto;
    max-width: 760px;
    background:rgba(30, 41, 59, 0.9);
    padding:14px;
    box-sizing:border-box;
    color:#e5e7eb;
    font-size:18px;
    border:1px solid rgba(148,163,184,0.35);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.45);
    backdrop-filter: blur(6px);
}
#popmenu .choices{
    display: flex;
    flex-flow: wrap;
    gap: 12px;
}
#popmenu .display{
    width:100%;
    text-align: center;
}
#popmenu .choice,.display{
    background:linear-gradient(135deg, #1f2937, #0f172a);
    margin:10px 0;
    width: 30%;
    min-width:200px;
    text-align: center;
    border-radius: 12px;
    border:1px solid rgba(148,163,184,0.25);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

#popmenu img{
    margin:10px;
    height: fit-content;
    width: 50px;
}
#popmenu .bbutton{
    background: linear-gradient(135deg, #0ea5e9, #6366f1);
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    color: white;
    padding: 15px;
    cursor:pointer;
    border-radius: 0 0 12px 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}
#popmenu .bbutton:hover{
    color:#0b1324;
}
#popmenu .wrapper{
    display: flex;
    flex-wrap: wrap;
    height:75%;
}
#popmenu .wrapper .detail{
    flex:1;
    padding: 15px;
    font-size:12px;
    overflow: hidden;
    color: #cbd5e1;
}
#xp{
    position:fixed;
    bottom:30px;
    left:10%;
    width:80%;
    background:rgba(255,255,255,0.08);
    height:20px;
    visibility:hidden;
    border-radius: 8px;
    overflow:hidden;
    border:1px solid rgba(255,255,255,0.1);
}
#xp #bar{
    width:80%;
    background:linear-gradient(135deg, #facc15, #f97316);
    height:20px;
}
#signinBackground{
    width:100vw;
    height:100vh;
    background:
        linear-gradient(135deg, rgba(10, 12, 24, 0.8), rgba(8, 47, 73, 0.55)),
        url('/images/screen.jpg') center center / cover no-repeat;
    position:fixed;
    top:0;
    left:0;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:24px;
    box-sizing:border-box;
    position:relative;
}
#signin{
    background: rgba(8, 15, 26, 0.9);
    width: min(900px, 100%);
    padding:24px;
    border-radius: 18px;
    border:1px solid rgba(148,163,184,0.35);
    box-shadow: 0 24px 50px rgba(0,0,0,0.55);
}
#signin .branding{
    margin-bottom: 14px;
}
#signin .logo{
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 0.04em;
}
#signin .tagline{
    color:#94a3b8;
    margin-top:4px;
    line-height:1.4;
}
#signin .form{
    margin-top: 18px;
}
#signin label{
    display:block;
    color:#cbd5e1;
    font-weight:600;
    margin-bottom:6px;
}
#signin input{
    display:block;
    padding: 12px;
    outline: 0;
    border: 1px solid rgba(148,163,184,0.35);
    margin:10px 0 18px 0;
    width: 100%;
    box-sizing: border-box;
    font-size: 18px;
    font-weight: 600;
    color: #e2e8f0;
    background: rgba(30,41,59,0.9);
    border-radius: 10px;
}
#signin .classes{
    display:grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap:12px;
    margin-top:8px;
}
#signin .class-card{
    background: linear-gradient(135deg, #111827, #0b1324);
    border:1px solid rgba(148,163,184,0.35);
    padding:14px;
    border-radius:12px;
    cursor:pointer;
    transition: all 0.2s ease;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
#signin .class-card.active{
    border-color:#22d3ee;
    box-shadow: 0 8px 24px rgba(34,211,238,0.2);
}
#signin .class-title{
    font-size:18px;
    font-weight:700;
    margin-bottom:6px;
}
#signin .class-body{
    color:#cbd5e1;
    font-size:14px;
    line-height:1.4;
}
#signin .actions{
    margin-top:18px;
    display:flex;
    flex-direction:column;
    gap:8px;
}
#signin .actions input[type="button"]{
    background: linear-gradient(135deg, #22d3ee, #6366f1);
    border:0;
    color:#0b1120;
    font-weight:700;
    letter-spacing:0.05em;
    padding:14px;
    border-radius:12px;
    cursor:pointer;
    font-size:16px;
    text-transform: uppercase;
}
#signin .actions .help{
    color:#94a3b8;
    font-size:14px;
}

#restartOverlay{
    position:fixed;
    inset:0;
    display:none;
    align-items:center;
    justify-content:center;
    background:rgba(0,0,0,0.45);
    backdrop-filter: blur(4px);
}
#restartOverlay .restart-card{
    background:rgba(15,23,42,0.96);
    border:1px solid rgba(148,163,184,0.35);
    padding:18px;
    border-radius:12px;
    width:320px;
    text-align:center;
    box-shadow:0 20px 40px rgba(0,0,0,0.55);
}
#restartOverlay .restart-title{
    font-size:22px;
    font-weight:700;
    margin-bottom:8px;
}
#restartOverlay .restart-body{
    color:#cbd5e1;
    margin-bottom:16px;
}
#restartOverlay .restart-actions{
    display:flex;
    gap:10px;
    justify-content:center;
}
#restartOverlay .restart-actions button{
    flex:1;
    padding:12px;
    border-radius:10px;
    border:0;
    font-weight:700;
    cursor:pointer;
}
#restartOverlay .restart-primary{
    background:linear-gradient(135deg, #22d3ee, #6366f1);
    color:#0b1120;
}
#restartOverlay .restart-cancel{
    background:rgba(148,163,184,0.25);
    color:#e2e8f0;
}

#players{
    background: rgba(17, 24, 39, 0.75);
    margin-top: 20px;
    padding: 20px;
    color: white;
    border-radius: 16px;
    border:1px solid rgba(148,163,184,0.25);
    box-shadow: 0 10px 25px rgba(0,0,0,0.35);
}
