:root {
    --bg: #08111f;
    --panel: rgba(255, 255, 255, 0.08);
    --panel-border: rgba(255, 255, 255, 0.12);
    --text: #ffffff;
    --muted: rgba(255, 255, 255, 0.65);
    --blue: #2d7dff;
    --danger: #ef4444;
    --green: #22c55e;
    --yellow: #f59e0b;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #08111f;
    color: var(--text);
    min-height: 100vh;
}

a {
    color: #fff;
    text-decoration: none;
}

.page-center {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
}

.login-card,
.panel {
    background: #142033;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 28px;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
}

.login-card {
    width: 100%;
    max-width: 420px;
    padding: 32px;
}

.badge {
    display: inline-flex;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(45, 125, 255, 0.18);
    border: 1px solid rgba(45, 125, 255, 0.25);
    color: #cde1ff;
    font-size: 13px;
    margin-bottom: 14px;
}

h1 {
    margin: 0 0 10px;
    font-size: 34px;
    letter-spacing: -0.03em;
}

h2 {
    margin: 0 0 16px;
}

.muted {
    color: var(--muted);
}

.form {
    margin-top: 24px;
    display: grid;
    gap: 12px;
}

label {
    color: rgba(255, 255, 255, 0.82);
    font-size: 14px;
}

input,
select {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.10);
    color: #fff;
    border-radius: 14px;
    padding: 14px 14px;
    outline: none;
    font-size: 15px;
}

input:disabled {
    opacity: 0.65;
}

select option {
    color: #111;
}

button,
.button-link {
    border: 0;
    border-radius: 16px;
    padding: 14px 18px;
    font-weight: 700;
    cursor: pointer;
    background: var(--blue);
    color: #fff;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.primary {
    background: var(--blue);
}

.danger {
    background: var(--danger);
}

.secondary {
    background: rgba(255, 255, 255, 0.16);
}

.alert,
.message {
    margin: 16px 0;
    padding: 12px 14px;
    border-radius: 14px;
}

.error {
    background: rgba(239, 68, 68, 0.18);
    border: 1px solid rgba(239, 68, 68, 0.28);
}

.info {
    background: rgba(45, 125, 255, 0.16);
    border: 1px solid rgba(45, 125, 255, 0.25);
}

.hidden {
    display: none;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
    background: #08111f;
    position: sticky;
    top: 0;
    z-index: 10;
}

.shop-name {
    margin-left: 12px;
    color: #cde1ff;
    font-weight: 400;
}

.game-layout {
    width: min(1180px, calc(100% - 32px));
    margin: 26px auto;
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 20px;
}

.panel {
    padding: 26px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin: 22px 0;
}

.game-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin: 18px 0;
}

.time-box {
    border-radius: 24px;
    padding: 26px 16px;
    text-align: center;
}

.time-box.dark {
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.10);
}

.time-box.light {
    background: #ffffff;
    color: #08111f;
}

.time-label {
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.16em;
    opacity: 0.65;
    margin-bottom: 10px;
}

.time-value {
    font-size: clamp(42px, 8vw, 72px);
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.06em;
    line-height: 1;
    transform: translateZ(0);
    will-change: contents;
}

.result-box {
    border-radius: 24px;
    padding: 20px;
    margin: 18px 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.result-box h2 {
    margin-bottom: 6px;
}

.result-box p {
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
}

.neutral {
    background: rgba(255, 255, 255, 0.07);
}

.win {
    background: rgba(34, 197, 94, 0.18);
    border-color: rgba(34, 197, 94, 0.35);
}

.near {
    background: rgba(245, 158, 11, 0.18);
    border-color: rgba(245, 158, 11, 0.35);
}

.lose {
    background: rgba(239, 68, 68, 0.16);
    border-color: rgba(239, 68, 68, 0.30);
}

.actions {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}

.rules {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 28px;
}

.rules td {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

.rules td:last-child {
    text-align: right;
    font-weight: 800;
}

.attempts-list {
    display: grid;
    gap: 10px;
}

.attempt-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.07);
}

.attempt-row span,
.attempt-row small {
    display: block;
    color: rgba(255, 255, 255, 0.55);
    margin-top: 3px;
}

.attempt-score {
    text-align: right;
}

.admin-layout {
    width: min(1400px, calc(100% - 32px));
    margin: 26px auto;
}

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

.stat {
    background: #142033;
    border: 1px solid var(--panel-border);
    border-radius: 24px;
    padding: 20px;
}

.stat span {
    display: block;
    color: var(--muted);
    margin-bottom: 8px;
}

.stat strong {
    font-size: 34px;
}

.filters {
    display: grid;
    grid-template-columns: 180px 150px 150px 1fr auto auto auto;
    gap: 10px;
    align-items: center;
    margin: 20px 0;
}

.checkbox {
    display: flex;
    gap: 8px;
    align-items: center;
    white-space: nowrap;
}

.checkbox input {
    width: auto;
}

.table-wrap {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 980px;
}

.admin-table th,
.admin-table td {
    text-align: left;
    padding: 12px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
    font-size: 14px;
}

.admin-table th {
    color: rgba(255, 255, 255, 0.62);
    font-weight: 600;
}

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

    .form-grid,
    .game-card,
    .actions,
    .stats-grid,
    .filters {
        grid-template-columns: 1fr;
    }
}


.single-action {
    grid-template-columns: 1fr;
}

.main-game-button {
    min-height: 72px;
    font-size: 24px;
    border-radius: 22px;
}

