:root {
    --bg: #060914;
    --panel: rgba(20, 24, 34, .92);
    --panel-2: rgba(26, 35, 52, .94);
    --panel-3: rgba(8, 13, 24, .72);
    --text: #f8fafc;
    --muted: #b8c2d8;
    --line: rgba(255,255,255,.12);
    --blue: #20b7ff;
    --blue-2: #0477d7;
    --gold: #ffd238;
    --green: #36df50;
    --green-2: #11952a;
    --red: #ff4867;
    --purple: #a56bff;
    --shadow: 0 22px 50px rgba(0,0,0,.38);
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 22% 6%, rgba(32, 183, 255, .18), transparent 30%),
        radial-gradient(circle at 88% 12%, rgba(255, 210, 56, .11), transparent 26%),
        linear-gradient(180deg, #08101d, #03050a 72%);
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }

.auth-body {
    background:
        linear-gradient(rgba(0,0,0,.42), rgba(0,0,0,.82)),
        radial-gradient(circle at top, rgba(37, 99, 235, .28), transparent 38%),
        #050816;
}
.auth-page { width: min(460px, 100%); margin: 0 auto; padding: 28px 16px; }
.auth-card {
    margin: 8vh auto;
    padding: 26px;
    border-radius: 28px;
    background: rgba(14, 20, 33, .88);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.game-stage {
    width: 100%;
    min-height: 100vh;
    display: grid;
    place-items: start center;
}
.game-screen {
    position: relative;
    width: min(430px, 100%);
    min-height: 100vh;
    overflow: hidden;
    background:
        linear-gradient(rgba(5, 9, 17, .34), rgba(5, 9, 17, .82) 45%, #070910 72%),
        radial-gradient(circle at 45% 8%, rgba(32, 183, 255, .2), transparent 26%),
        linear-gradient(130deg, #0d1b2d, #07101c 48%, #05070c);
    box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 24px 70px rgba(0,0,0,.55);
}
.game-screen::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: .24;
    background:
        linear-gradient(90deg, transparent 0 28%, rgba(255,255,255,.08) 28% 29%, transparent 29% 40%, rgba(255,255,255,.06) 40% 41%, transparent 41%),
        linear-gradient(0deg, rgba(255,255,255,.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
    background-size: 100% 100%, 22px 22px, 22px 22px;
    mask-image: linear-gradient(to bottom, transparent, black 16%, black 60%, transparent 94%);
}
.game-content {
    position: relative;
    z-index: 2;
    padding: 80px 14px 92px;
}

.hud {
    position: fixed;
    z-index: 10;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(430px, 100%);
    height: 72px;
    display: grid;
    grid-template-columns: 1fr 1fr 58px 1fr 1fr;
    align-items: center;
    gap: 4px;
    padding: 8px 10px 7px;
    background: linear-gradient(180deg, rgba(0,0,0,.82), rgba(0,0,0,.34), transparent);
    text-align: center;
}
.hud-item { min-width: 0; text-shadow: 0 2px 0 #000, 0 0 8px rgba(0,0,0,.65); }
.hud-icon { display: block; font-size: 24px; filter: drop-shadow(0 4px 2px rgba(0,0,0,.65)); }
.hud-item strong { display: block; color: #fff31f; font-size: 14px; line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud-item small { display: block; color: #adff42; font-size: 9px; font-weight: 900; text-transform: uppercase; }
.hud-logo {
    justify-self: center;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: radial-gradient(circle at 34% 28%, #fff6ad, #d39c19 35%, #5c3507 68%, #111 69%);
    border: 2px solid rgba(255,255,255,.22);
    box-shadow: 0 8px 24px rgba(0,0,0,.44), inset 0 0 14px rgba(255,255,255,.18);
}
.hud-logo span { color: #150d03; font-weight: 1000; font-size: 16px; text-shadow: 0 1px rgba(255,255,255,.3); }

.alert {
    position: relative;
    z-index: 6;
    margin: 0 14px 12px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(0,0,0,.25);
    font-weight: 800;
}
.alert.success { background: rgba(18, 160, 59, .85); color: #effff3; }
.alert.error { background: rgba(210, 36, 67, .88); color: #fff4f6; }

.hero-card {
    min-height: 194px;
    padding: 16px;
    border-radius: 28px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255,255,255,.12);
    background:
        linear-gradient(95deg, rgba(0,0,0,.82), rgba(4,25,47,.46), rgba(0,0,0,.74)),
        radial-gradient(circle at 20% 35%, rgba(32,183,255,.28), transparent 24%),
        linear-gradient(145deg, #132a44, #09101b 62%);
    box-shadow: var(--shadow);
}
.hero-card::after {
    content: "";
    position: absolute;
    right: -42px;
    bottom: -40px;
    width: 190px;
    height: 170px;
    opacity: .34;
    background:
        linear-gradient(90deg, transparent 0 16%, rgba(255,255,255,.2) 16% 18%, transparent 18% 34%, rgba(255,255,255,.16) 34% 37%, transparent 37%),
        linear-gradient(#162b48, #0c1627);
    clip-path: polygon(10% 100%, 22% 34%, 35% 34%, 42% 10%, 58% 10%, 63% 45%, 78% 45%, 92% 100%);
}
.location { color: #bdf6ff; font-weight: 900; text-align: center; font-size: 13px; margin-bottom: 10px; text-shadow: 0 2px 0 #000; }
.hero-row { display: grid; grid-template-columns: 98px 1fr; gap: 14px; align-items: center; position: relative; z-index: 1; }
.avatar {
    width: 96px;
    height: 96px;
    border-radius: 24px;
    display: grid;
    place-items: center;
    font-size: 56px;
    background: linear-gradient(145deg, #283043, #0b101c);
    border: 2px solid rgba(255,255,255,.18);
    box-shadow: inset 0 0 30px rgba(255,255,255,.06), 0 12px 26px rgba(0,0,0,.34);
}
.hero-info h1 { margin: 0 0 4px; font-size: 24px; text-shadow: 0 3px 0 #061020, 0 0 14px rgba(32,183,255,.6); }
.hero-info p { margin: 0 0 10px; font-size: 13px; color: #e7eefc; font-weight: 800; }
.level-bar { height: 13px; border-radius: 999px; background: rgba(255,255,255,.22); overflow: hidden; border: 1px solid rgba(0,0,0,.35); }
.level-bar span { display: block; height: 100%; background: linear-gradient(90deg, #ffd338, #36df50); box-shadow: 0 0 18px rgba(54,223,80,.55); }
.hero-meta { display: flex; gap: 8px; align-items: center; justify-content: space-between; margin-top: 9px; font-size: 12px; color: #fff; font-weight: 900; }

.company-card {
    margin-top: 12px;
    padding: 14px;
    border-radius: 24px;
    border: 1px solid rgba(255,255,255,.12);
    background: linear-gradient(180deg, rgba(12,16,26,.9), rgba(10,11,16,.88));
    box-shadow: var(--shadow);
}
.section-title {
    display: block;
    margin: 2px auto 14px;
    width: fit-content;
    min-width: 72%;
    padding: 6px 18px;
    text-align: center;
    font-size: 20px;
    font-weight: 1000;
    color: #ebfdff;
    background: linear-gradient(90deg, transparent, rgba(0,91,179,.72), transparent);
    text-shadow: 0 2px 0 #001629;
}
.company-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.company-photo {
    min-height: 96px;
    border-radius: 18px;
    padding: 10px;
    display: grid;
    align-items: end;
    border: 1px solid rgba(255,255,255,.16);
    background:
        linear-gradient(rgba(255,255,255,.06), rgba(0,0,0,.38)),
        linear-gradient(145deg, #1f8fca, #dbeafe 48%, #102033 49%);
    position: relative;
    overflow: hidden;
}
.company-photo::before {
    content: "";
    position: absolute;
    left: 22%;
    bottom: 0;
    width: 56%;
    height: 78%;
    opacity: .7;
    background: linear-gradient(90deg, rgba(0,0,0,.42) 0 12%, rgba(255,255,255,.5) 12% 15%, rgba(0,0,0,.25) 15% 28%, rgba(255,255,255,.44) 28% 30%, rgba(0,0,0,.35) 30% 100%);
    clip-path: polygon(0 100%, 15% 18%, 58% 0, 100% 100%);
}
.company-stats { padding: 4px 0; }
.company-stats strong { display: block; color: #fff72b; font-size: 15px; text-shadow: 0 2px 0 #000; }
.company-stats b { display: block; margin: 4px 0 10px; font-size: 24px; }

.quick-list { display: grid; gap: 10px; margin: 12px 0; }
.quick-row {
    display: grid;
    grid-template-columns: 42px 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 18px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.08);
}
.quick-row span:first-child { font-size: 24px; text-align: center; }
.quick-row p { margin: 0; color: #ecf8ff; font-weight: 800; font-size: 13px; }

.feature-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 12px; }
.feature-card, .asset-card, .admin-row, .stat-card, .card, .empty-state {
    border: 1px solid rgba(255,255,255,.12);
    background: linear-gradient(180deg, rgba(31,33,42,.92), rgba(15,17,23,.95));
    border-radius: 22px;
    box-shadow: 0 16px 36px rgba(0,0,0,.28);
}
.feature-card { min-height: 172px; padding: 14px 10px; display: grid; place-items: center; text-align: center; }
.feature-icon {
    width: 82px;
    height: 82px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    margin: 0 auto 8px;
    font-size: 40px;
    background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.28), rgba(32,183,255,.2) 32%, rgba(0,0,0,.34));
    border: 2px solid rgba(255,255,255,.16);
    box-shadow: inset 0 0 18px rgba(255,255,255,.08), 0 12px 18px rgba(0,0,0,.32);
}
.feature-card h3 { margin: 0 0 10px; font-size: 13px; font-weight: 1000; color: #edfeff; text-shadow: 0 2px 0 #00121f; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 0;
    min-height: 40px;
    padding: 10px 14px;
    border-radius: 12px;
    color: #fff;
    font-weight: 1000;
    text-shadow: 0 2px 0 rgba(0,0,0,.35);
    background: linear-gradient(#283448, #151b27);
    box-shadow: inset 0 2px rgba(255,255,255,.16), 0 6px 0 rgba(0,0,0,.25), 0 12px 22px rgba(0,0,0,.25);
}
.btn.primary, .btn.green { background: linear-gradient(#4fff64, #1caa32); }
.btn.blue { background: linear-gradient(#39d5ff, #0d82d8); }
.btn.gold { background: linear-gradient(#ffe95e, #e1a90e); color: #2b1b00; text-shadow: 0 1px rgba(255,255,255,.38); }
.btn.danger { background: linear-gradient(#ff6480, #d92348); }
.btn.small { min-height: 32px; padding: 8px 10px; font-size: 12px; border-radius: 10px; }
.full-btn { width: 100%; }

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 2px 0 14px; }
.page-head h1 { margin: 0; font-size: 23px; text-shadow: 0 3px 0 #00182d; }
.muted { color: var(--muted); }
.filters { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 12px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.chip {
    white-space: nowrap;
    padding: 9px 13px;
    border-radius: 999px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
    color: #dce6fa;
    font-weight: 900;
}
.chip.active { background: linear-gradient(#ffe95e, #e1a90e); color: #2b1b00; }

.stats-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.stat-card { padding: 14px; }
.stat-card span { display: block; color: var(--muted); font-size: 12px; font-weight: 800; }
.stat-card strong { display: block; margin-top: 5px; font-size: 20px; color: #fff72b; text-shadow: 0 2px 0 #000; }
.card { padding: 14px; }
.card h2 { font-size: 18px; margin-bottom: 10px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid rgba(255,255,255,.1); }
.positive { color: #8eff9d; font-weight: 900; }
.negative { color: #ff9aa9; font-weight: 900; }

.cards-grid { display: grid; gap: 14px; }
.asset-card { overflow: hidden; }
.asset-card.sold { opacity: .56; }
.asset-image-wrap { position: relative; height: 172px; background: rgba(0,0,0,.24); overflow: hidden; }
.asset-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.asset-type-bubble {
    position: absolute;
    top: 10px;
    left: 10px;
    min-width: 42px;
    min-height: 42px;
    display: grid;
    place-items: center;
    padding: 6px;
    border-radius: 50%;
    font-size: 24px;
    background: rgba(0,0,0,.58);
    border: 1px solid rgba(255,255,255,.22);
    backdrop-filter: blur(6px);
}
.asset-body { padding: 14px; }
.badge { display: inline-block; padding: 6px 9px; border-radius: 999px; color: #2b1b00; background: linear-gradient(#fff06d, #e5b31b); margin-bottom: 9px; font-size: 11px; font-weight: 1000; }
.asset-body h3 { margin: 0 0 7px; font-size: 18px; }
.desc { min-height: 36px; color: #cbd5e1; font-size: 13px; }
.mini-stats { display: grid; gap: 7px; margin: 12px 0; }
.mini-stats span { display: flex; justify-content: space-between; gap: 10px; color: #b8c2d8; font-size: 13px; }
.mini-stats strong { color: #fff; }

.empty-state { padding: 28px 18px; text-align: center; }
.empty-state p { color: var(--muted); }

.form { display: grid; gap: 13px; }
.grid-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-form .full { grid-column: 1 / -1; }
.form label { display: grid; gap: 7px; color: #fff; font-size: 13px; font-weight: 1000; }
.form small { color: var(--muted); font-weight: 700; }
input, select, textarea {
    width: 100%;
    padding: 12px 13px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,.14);
    background: rgba(0,0,0,.36);
    color: var(--text);
    outline: none;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: rgba(32,183,255,.74); box-shadow: 0 0 0 3px rgba(32,183,255,.12); }
.checkbox { display: flex !important; align-items: center; gap: 10px !important; }
.checkbox input { width: auto; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.current-image img { width: 100%; max-height: 180px; object-fit: cover; border-radius: 16px; border: 1px solid var(--line); }

.asset-table { display: grid; gap: 12px; }
.admin-row { display: grid; grid-template-columns: 76px 1fr; gap: 12px; align-items: center; padding: 10px; }
.admin-row img { width: 76px; height: 76px; object-fit: cover; border-radius: 18px; background: rgba(255,255,255,.08); }
.admin-row span { display: block; }
.admin-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 8px; font-size: 12px; }
.row-actions { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
.status { display: inline-flex; padding: 6px 9px; border-radius: 999px; font-size: 11px; font-weight: 1000; }
.status.on { background: rgba(54, 223, 80, .18); color: #a9ffb4; }
.status.off { background: rgba(255, 72, 103, .18); color: #ffadb9; }

.bottom-nav {
    position: fixed;
    z-index: 20;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: min(430px, 100%);
    height: 76px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2px;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    background: linear-gradient(180deg, rgba(0,0,0,.18), rgba(0,0,0,.9) 25%, #05060a);
    border-top: 1px solid rgba(255,255,255,.1);
}
.bottom-nav a, .bottom-nav button {
    width: 100%;
    border: 0;
    background: transparent;
    color: #dbeafe;
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 2px;
    font-weight: 1000;
    font-size: 10px;
    text-shadow: 0 2px 0 #000;
}
.bottom-nav span { font-size: 24px; line-height: 1; filter: drop-shadow(0 4px 1px rgba(0,0,0,.55)); }
.bottom-nav .active { color: #fff72b; }
.bottom-nav form { margin: 0; }

@media (min-width: 700px) {
    .game-stage { padding: 16px 0; }
    .game-screen { min-height: calc(100vh - 32px); border-radius: 30px; }
    .hud, .bottom-nav { position: absolute; }
    .game-screen::before { position: absolute; }
}
@media (max-width: 420px) {
    .game-content { padding-left: 10px; padding-right: 10px; }
    .feature-grid { gap: 10px; }
    .feature-card { min-height: 156px; }
    .grid-form { grid-template-columns: 1fr; }
    .hero-row { grid-template-columns: 84px 1fr; }
    .avatar { width: 82px; height: 82px; font-size: 48px; }
    .hero-info h1 { font-size: 21px; }
}
