*{box-sizing:border-box}
body{margin:0;font-family:Inter,Arial,sans-serif;background:#0f172a;color:#e5e7eb}
a{color:inherit;text-decoration:none}

/* LOGIN */
.auth-page{min-height:100vh;display:grid;place-items:center;background:radial-gradient(circle at top,#2563eb33,#0f172a 45%)}
.auth-card,.panel{background:#111827;border:1px solid #334155;border-radius:22px;padding:28px;box-shadow:0 18px 50px #0006}
.auth-card{width:min(420px,92vw)}

h1{margin-top:0;font-size:34px}

/* INPUTY */
input,select,textarea,button{
    width:100%;
    padding:12px 14px;
    border-radius:12px;
    border:1px solid #334155;
    background:#0b1220;
    color:#e5e7eb;
    margin:7px 0 14px
}
textarea{min-height:110px}

button{
    background:#2563eb;
    border:0;
    font-weight:700;
    cursor:pointer;
    transition:0.25s
}
button:hover{
    opacity:0.85;
    transform:scale(1.03)
}

/* ALERTY */
.alert{padding:12px;border-radius:12px;background:#7f1d1d;margin:12px 0}
.ok{background:#14532d}

/* NAVBAR */
.topbar{
    position:sticky;
    top:0;
    z-index:5;
    background:#020617dd;
    backdrop-filter:blur(12px);
    border-bottom:1px solid #334155;
    padding:14px 24px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:18px
}

/* LOGÁ + NÁZOV */
.brand{
    display:flex;
    align-items:center;
    gap:12px
}

.brand img{
    width:40px;
    height:40px;
    object-fit:contain;
    background:#fff;
    border-radius:8px;
    padding:4px
}

.brand div{
    display:flex;
    flex-direction:column
}

.brand span{
    color:#94a3b8;
    font-size:13px
}

/* MENU */
nav{
    display:flex;
    flex-wrap:wrap;
    gap:10px
}

nav a{
    background:#1e293b;
    padding:9px 12px;
    border-radius:999px
}

nav a:hover{
    background:#334155
}

.danger{background:#7f1d1d!important}

/* CONTAINER */
.container{width:min(1180px,94vw);margin:28px auto}

/* HERO */
.hero{
    background:linear-gradient(135deg,#1d4ed8,#7c3aed);
    padding:34px;
    border-radius:26px;
    margin-bottom:22px
}

/* GRID */
.grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(160px,1fr));
    gap:16px
}

/* INVENTÁR LAYOUT (POD SEBOU) */
.inventory-layout{
    display:grid;
    grid-template-columns:1fr;
    gap:24px
}

/* KARTY */
.card{
    background:#111827;
    border:1px solid #334155;
    border-radius:20px;
    padding:22px;
    transition:0.25s
}

.card:hover{
    transform:translateY(-5px);
    border-color:#2563eb
}

.card span{
    display:flex;
    align-items:center;
    gap:10px;
    font-size:18px;
    color:#94a3b8
}

.card i{
    font-size:20px;
    color:#2563eb
}

.card strong{font-size:32px}

/* TABUĽKY */
.table-wrap{
    overflow:auto;
    border-radius:18px;
    border:1px solid #334155
}

table{
    width:100%;
    border-collapse:collapse;
    background:#111827
}

th,td{
    padding:12px 14px;
    border-bottom:1px solid #334155;
    text-align:left
}

th{
    background:#1e293b;
    color:#fff
}

tr:hover td{
    background:#0b1220
}

/* TRIEDENIE */
.sortable-table th{
    cursor:pointer;
    user-select:none
}

.sortable-table th:hover{
    background:#334155
}

/* INVENTÁR TABUĽKA */
.wide-table table{
    min-width:850px
}

.wide-table td:nth-child(4){
    max-width:400px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    color:#94a3b8
}

/* POPULÁRNE HRY */
.popular-games{
    display:grid;
    gap:18px;
    margin-top:18px
}

.game-panel{
    background:#111827;
    border:1px solid #334155;
    border-radius:22px;
    padding:22px
}

.game-header{
    display:flex;
    justify-content:space-between;
    margin-bottom:18px
}

.players-row{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:14px
}

.player-card{
    display:flex;
    align-items:center;
    gap:12px;
    background:#0f172a;
    border:1px solid #334155;
    border-radius:18px;
    padding:16px
}

.player-card i{
    font-size:28px;
    color:#60a5fa
}

.rank{
    font-size:22px;
    font-weight:800;
    color:#2563eb
}

/* GLOBAL PLAYERS */
.stats-cards{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:16px;
    margin-top:16px
}

.stat-small-card{
    background:#0f172a;
    border:1px solid #334155;
    border-radius:18px;
    padding:18px
}

.stat-small-card strong{
    display:block;
    font-size:18px;
    margin-top:8px
}

/* OBCHOD */
.shop-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
    gap:16px;
    margin-top:16px
}

.shop-card{
    background:#0f172a;
    border:1px solid #334155;
    border-radius:18px;
    padding:18px;
    text-align:center;
    transition:0.25s
}

.shop-card:hover{
    transform:translateY(-5px);
    border-color:#2563eb
}

.shop-card i{
    font-size:28px;
    color:#60a5fa;
    margin-bottom:10px
}

.shop-card p{
    color:#94a3b8;
    margin-bottom:10px
}

/* RESPONSIVE */
@media(max-width:900px){
    .players-row{grid-template-columns:1fr}
}

@media(max-width:720px){
    .topbar{flex-direction:column}
    .brand img{width:32px;height:32px}
}

.game-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
    margin-top: 18px;
}

.game-stat-card {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 18px;
    padding: 18px;
}

.game-stat-card h3 {
    margin: 0 0 14px;
    font-size: 18px;
}

.top-player-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.top-player-row {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #111827;
    border: 1px solid #334155;
    border-radius: 14px;
    padding: 12px;
}

.top-player-row .rank {
    min-width: 42px;
}

.top-player-row strong {
    display: block;
}

.top-player-row p {
    margin: 4px 0 0;
    color: #94a3b8;
}

.dashboard-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 22px;
}

.dashboard-stats {
    margin-bottom: 22px;
}

.user-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 360px;
    overflow: auto;
}

.user-list a {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #0f172a;
    border: 1px solid #334155;
    padding: 12px;
    border-radius: 14px;
}

.user-list a:hover {
    border-color: #2563eb;
    background: #0b1220;
}

.achievement-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.achievement-card {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 18px;
    padding: 18px;
}

.achievement-card i {
    color: #facc15;
    font-size: 26px;
    margin-bottom: 10px;
}

.achievement-card strong {
    display: block;
    font-size: 18px;
}

.achievement-card p {
    color: #94a3b8;
}

@media(max-width:900px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
    }
}

.manual-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}

.manual-card {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 18px;
    padding: 18px;
}

.manual-card h3 {
    margin-top: 0;
}

.profile-hero {
    min-height: 320px;
    display: flex;
    align-items: center;
}

.profile-hero-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.profile-avatar {
    width: 128px;
    height: 128px;
    border-radius: 22px;
    object-fit: cover;
    border: 2px solid #ffffff88;
    background: #0f172a;
}

.placeholder-avatar {
    display: grid;
    place-items: center;
    font-size: 42px;
    color: #60a5fa;
}

.profile-edit-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.profile-edit-form textarea,
.profile-edit-form button {
    grid-column: 1 / -1;
}

.profile-edit-form label {
    color: #94a3b8;
    font-weight: 700;
}