:root{
    --bg:#0b0f16;
    --panel:#151b26;
    --panel2:#1c2432;
    --line:#2b3547;
    --text:#f5f7fb;
    --muted:#9ba7bb;
    --blue:#4f8cff;
    --green:#37c77f;
    --red:#e15d5d;
    --yellow:#e8b84c;
}

*{
    box-sizing:border-box;
}

body{
    margin:0;
    min-height:100vh;
    background:radial-gradient(circle at top,#182237 0,#0b0f16 45%,#070a0f 100%);
    color:var(--text);
    font-family:Arial,Helvetica,sans-serif;
}

a{
    color:inherit;
}

.app{
    display:flex;
    min-height:100vh;
}

.sidebar{
    width:260px;
    padding:24px;
    background:rgba(15,20,31,.94);
    border-right:1px solid var(--line);
}

.brand{
    display:flex;
    align-items:center;
    gap:12px;
    margin-bottom:32px;
}

.brand-icon{
    width:44px;
    height:44px;
    display:grid;
    place-items:center;
    background:linear-gradient(135deg,var(--blue),#8b5cff);
    border-radius:16px;
}

.brand span{
    display:block;
    color:var(--muted);
    font-size:13px;
    margin-top:4px;
}

.nav a{
    display:block;
    text-decoration:none;
    color:#d8dfef;
    padding:13px 14px;
    margin-bottom:9px;
    border-radius:14px;
    background:rgba(255,255,255,.04);
    border:1px solid transparent;
}

.nav a:hover{
    border-color:var(--line);
    background:rgba(255,255,255,.08);
}

.main{
    flex:1;
    padding:28px;
}

.page-title{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:24px;
}

.page-title h1{
    margin:0;
    font-size:30px;
}

.card{
    background:rgba(21,27,38,.92);
    border:1px solid var(--line);
    border-radius:22px;
    padding:22px;
    box-shadow:0 20px 60px rgba(0,0,0,.24);
}

.grid{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:16px;
    margin-bottom:22px;
}

.grid-2{
    display:grid;
    grid-template-columns:2fr 1fr;
    gap:22px;
}

.stat-title{
    color:var(--muted);
    font-size:13px;
    margin-bottom:9px;
}

.stat-value{
    font-size:26px;
    font-weight:800;
}

.table{
    width:100%;
    border-collapse:collapse;
}

.table th,
.table td{
    padding:14px;
    border-bottom:1px solid var(--line);
    text-align:left;
}

.table th{
    color:var(--muted);
    font-size:13px;
}

.btn{
    display:inline-block;
    border:none;
    padding:11px 15px;
    border-radius:13px;
    background:var(--blue);
    color:white;
    text-decoration:none;
    font-weight:700;
    cursor:pointer;
}

.btn.secondary{
    background:var(--panel2);
}

.btn.green{
    background:var(--green);
}

.btn.red{
    background:var(--red);
}

.form{
    max-width:460px;
    margin:70px auto;
}

input,
select{
    width:100%;
    padding:13px 14px;
    border-radius:13px;
    border:1px solid var(--line);
    background:#101722;
    color:white;
    margin:7px 0 14px;
}

label{
    color:var(--muted);
    font-size:14px;
}

.notice{
    padding:13px 15px;
    border-radius:14px;
    background:rgba(79,140,255,.13);
    border:1px solid rgba(79,140,255,.35);
    margin-bottom:16px;
}

.error{
    padding:13px 15px;
    border-radius:14px;
    background:rgba(225,93,93,.13);
    border:1px solid rgba(225,93,93,.35);
    margin-bottom:16px;
}

.market-up{
    color:var(--green);
    font-weight:700;
}

.market-down{
    color:var(--red);
    font-weight:700;
}

.map{
    display:grid;
    grid-template-columns:repeat(8,1fr);
    gap:8px;
}

.tile{
    min-height:76px;
    border-radius:16px;
    border:1px solid var(--line);
    background:var(--panel2);
    padding:10px;
    font-size:12px;
}

.tile.player{
    background:linear-gradient(135deg,rgba(79,140,255,.75),rgba(79,140,255,.25));
}

.tile.enemy{
    background:linear-gradient(135deg,rgba(225,93,93,.7),rgba(225,93,93,.2));
}

.tile.neutral{
    background:linear-gradient(135deg,rgba(55,199,127,.45),rgba(55,199,127,.12));
}

@media(max-width:900px){
    .app{
        display:block;
    }

    .sidebar{
        width:auto;
    }

    .grid,
    .grid-2{
        grid-template-columns:1fr;
    }
}
