/* G5Fighters - Obsidian Arena components */

/* ── Nav ── */
.g5-nav-top {
    position: fixed;
    top: 14px;
    left: 0;
    right: 0;
    z-index: var(--g5-z-nav);
    padding: 0 16px;
}

.g5-nav-bottom {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: var(--g5-z-nav);
    padding: 0 12px 12px;
}

.g5-nav-inner {
    max-width: var(--g5-max-wide);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px 10px 18px;
    border-radius: 18px;
    background: rgba(6, 9, 14, 0.82);
    backdrop-filter: blur(24px) saturate(1.6);
    -webkit-backdrop-filter: blur(24px) saturate(1.6);
    border: 1px solid var(--g5-border-bright);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.g5-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--g5-display);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--g5-text);
    text-decoration: none;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}
.g5-logo-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 8px;
    flex-shrink: 0;
}
.g5-logo-text span,
.g5-logo span { color: var(--g5-accent); }
.g5-logo:hover { color: var(--g5-accent-bright); }

.g5-nav-list {
    display: flex;
    list-style: none;
    gap: 4px;
    margin: 0;
    padding: 0;
    align-items: center;
}

.g5-nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 12px;
    color: var(--g5-muted);
    text-decoration: none;
    font-size: 0.84rem;
    font-weight: 500;
    transition: background var(--g5-transition), color var(--g5-transition), transform var(--g5-transition);
}

.g5-nav-link:hover {
    color: var(--g5-text);
    background: rgba(255, 255, 255, 0.05);
}

.g5-nav-link.g5-active {
    color: var(--g5-accent);
    background: var(--g5-accent-dim);
    box-shadow: inset 0 0 0 1px var(--g5-border-accent);
}

.g5-nav-link--shop.g5-active,
.g5-nav-link[href*="sklep"].g5-active {
    color: #1a1200;
    background: linear-gradient(135deg, var(--g5-gold), #d4a017);
    box-shadow: 0 0 24px rgba(245, 197, 66, 0.25);
}

.g5-nav-icon {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.g5-nav-icon svg {
    width: 100%;
    height: 100%;
    overflow: visible;
    display: block;
}

@media (max-width: 768px) {
    .g5-nav-top { display: none; }
    .g5-nav-bottom { display: block; }
    .g5-nav-bottom .g5-nav-inner {
        padding: 8px 6px;
        border-radius: 16px;
        justify-content: center;
    }
    .g5-nav-bottom .g5-logo { display: none; }
    .g5-nav-bottom .g5-nav-list {
        width: 100%;
        justify-content: space-around;
    }
    .g5-nav-bottom .g5-nav-link {
        flex-direction: column;
        gap: 4px;
        padding: 8px 6px;
        font-size: 0.65rem;
        min-width: 56px;
        min-height: 48px;
        justify-content: center;
    }
    .g5-nav-bottom .g5-nav-icon { width: 20px; height: 20px; }
}

/* ── Cards ── */
.g5-card,
.card {
    position: relative;
    background: var(--g5-surface);
    border: 1px solid var(--g5-border);
    border-radius: var(--g5-radius);
    padding: 28px;
    box-shadow: var(--g5-shadow-sm);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.g5-card::before,
.card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.04) 0%, transparent 42%);
}

.g5-glass {
    background: var(--g5-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* ── Buttons ── */
.g5-btn,
.btn,
.btn-primary,
.btn-secondary,
.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: var(--g5-radius-sm);
    font-family: var(--g5-display);
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform var(--g5-transition), box-shadow var(--g5-transition), background var(--g5-transition), color var(--g5-transition);
    white-space: nowrap;
    min-height: 44px;
}

.g5-btn:hover,
.btn:hover,
.btn-primary:hover,
.btn-secondary:hover,
.btn-outline:hover {
    transform: translateY(-2px);
}

.g5-btn:disabled,
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.g5-btn-primary,
.btn-primary {
    background: linear-gradient(180deg, var(--g5-accent-bright) 0%, var(--g5-accent) 100%);
    color: #042a1f;
    border-color: var(--g5-accent-dark);
    box-shadow: 0 8px 28px rgba(61, 255, 181, 0.28);
}
.g5-btn-primary:hover,
.btn-primary:hover {
    box-shadow: 0 12px 36px rgba(61, 255, 181, 0.4);
    color: #042a1f;
}

.g5-btn-secondary,
.btn-secondary {
    background: linear-gradient(180deg, #2a3344 0%, #1a2230 100%);
    color: var(--g5-text);
    border-color: var(--g5-border-bright);
}
.g5-btn-secondary:hover,
.btn-secondary:hover { border-color: var(--g5-accent); color: var(--g5-accent); }

.g5-btn-outline,
.btn-outline {
    background: transparent;
    color: var(--g5-text);
    border: 1.5px solid var(--g5-border-accent);
}
.g5-btn-outline:hover,
.btn-outline:hover {
    background: var(--g5-accent-dim);
    color: var(--g5-accent);
}

.g5-btn-gold {
    background: linear-gradient(180deg, #ffe08a 0%, var(--g5-gold) 100%);
    color: #1a1200;
    border-color: #b8860b;
    box-shadow: 0 8px 28px rgba(245, 197, 66, 0.3);
}
.g5-btn-gold:hover { box-shadow: 0 12px 36px rgba(245, 197, 66, 0.45); color: #1a1200; }

.g5-btn-sm, .btn-sm { padding: 8px 14px; font-size: 0.75rem; min-height: 36px; }
.g5-btn-lg, .btn-lg { padding: 16px 32px; font-size: 0.95rem; min-height: 52px; }
.g5-btn--block, .btn--block { width: 100%; }

/* ── Forms ── */
.g5-form label,
.g5-form-label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--g5-text-secondary);
    margin-bottom: 16px;
}

.g5-form label.g5-checkbox-row,
.g5-form .g5-checkbox-row {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    cursor: pointer;
    font-weight: 500;
}

.g5-form .g5-checkbox-row input {
    width: 18px;
    height: 18px;
    margin: 0;
    flex-shrink: 0;
    accent-color: var(--g5-accent);
}

.g5-form label.g5-checkbox-inline,
.g5-form .g5-checkbox-inline,
.g5-form label.g5-checkbox-row,
.g5-form .g5-checkbox-row {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.86rem;
    color: var(--g5-text-secondary);
}

.g5-form label.g5-checkbox-inline input[type="checkbox"],
.g5-form .g5-checkbox-inline input[type="checkbox"],
.g5-form label.g5-checkbox-row input[type="checkbox"],
.g5-form .g5-checkbox-row input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    margin: 0;
    flex-shrink: 0;
    border: 2px solid var(--g5-border-bright);
    border-radius: 4px;
    background: var(--g5-surface-solid);
    cursor: pointer;
    position: relative;
    transition: border-color var(--g5-transition), background var(--g5-transition), box-shadow var(--g5-transition);
}

.g5-form label.g5-checkbox-inline input[type="checkbox"]:checked,
.g5-form .g5-checkbox-inline input[type="checkbox"]:checked,
.g5-form label.g5-checkbox-row input[type="checkbox"]:checked,
.g5-form .g5-checkbox-row input[type="checkbox"]:checked {
    background: var(--g5-accent);
    border-color: var(--g5-accent);
    box-shadow: 0 0 0 2px var(--g5-accent-dim);
}

.g5-form label.g5-checkbox-inline input[type="checkbox"]:checked::after,
.g5-form .g5-checkbox-inline input[type="checkbox"]:checked::after,
.g5-form label.g5-checkbox-row input[type="checkbox"]:checked::after,
.g5-form .g5-checkbox-row input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 5px;
    height: 9px;
    border: solid var(--g5-bg, #05070c);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.g5-form label.g5-checkbox-inline input[type="checkbox"]:focus-visible,
.g5-form .g5-checkbox-inline input[type="checkbox"]:focus-visible,
.g5-form label.g5-checkbox-row input[type="checkbox"]:focus-visible,
.g5-form .g5-checkbox-row input[type="checkbox"]:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--g5-accent-dim);
}

[hidden] { display: none !important; }

.g5-form input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=submit]):not([type=button]),
.g5-form select,
.g5-form textarea,
.g5-input {
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--g5-radius-xs);
    border: 1px solid var(--g5-border-bright);
    background: var(--g5-surface-solid);
    color: var(--g5-text);
    outline: none;
    transition: border-color var(--g5-transition), box-shadow var(--g5-transition);
}

.g5-form select,
.g5-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 42px;
    cursor: pointer;
    background-color: var(--g5-surface-solid);
    background-image:
        linear-gradient(180deg, rgba(255,255,255,0.03), transparent),
        url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%233dffb5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat, no-repeat;
    background-position: center, right 14px center;
    border-color: var(--g5-border-accent);
}

.g5-form select option,
.g5-select option {
    background: var(--g5-bg-elevated);
    color: var(--g5-text);
}

.g5-form input:focus,
.g5-form select:focus,
.g5-form textarea:focus,
.g5-input:focus {
    border-color: var(--g5-accent);
    box-shadow: 0 0 0 3px var(--g5-accent-dim);
}

.g5-form-hint {
    font-size: 0.78rem;
    font-weight: 400;
    color: var(--g5-muted);
}

.g5-form-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 8px;
}
.g5-form-actions--center { justify-content: center; }

.g5-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    align-items: end;
}

.g5-form-grid .g5-checkbox-row--field {
    margin-bottom: 16px;
    min-height: 48px;
    padding: 12px 14px;
    border-radius: var(--g5-radius-xs);
    border: 1px solid var(--g5-border-bright);
    background: var(--g5-surface-solid);
}

.g5-legal-checks label {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
    font-weight: 400;
    font-size: 0.88rem;
    margin-bottom: 12px;
}
.g5-legal-checks input { margin-top: 4px; flex-shrink: 0; width: auto; }
.g5-legal-checks a { color: var(--g5-accent); }

/* ── Alerts ── */
.g5-alert {
    padding: 14px 18px;
    border-radius: var(--g5-radius-sm);
    border: 1px solid;
    margin-bottom: 20px;
    font-size: 0.92rem;
}
.g5-alert-error { background: var(--g5-coral-dim); border-color: var(--g5-coral); color: #ffb4b4; }
.g5-alert-success { background: var(--g5-accent-dim); border-color: var(--g5-accent); color: #9ff5d8; }
.g5-alert-info { background: var(--g5-sky-dim); border-color: var(--g5-sky); color: #a8ccff; }

/* ── Badges / ranks ── */
.g5-badge,
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: var(--g5-radius-pill);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--g5-border);
    color: var(--g5-text-secondary);
}

.badge-primary,
.badge-success,
.g5-badge-success {
    background: var(--g5-accent-dim);
    border-color: var(--g5-border-accent);
    color: var(--g5-accent);
}

.g5-rank-badge,
.badge-rank-dirt,
.badge-rank-iron,
.badge-rank-gold,
.badge-rank-diamond,
.badge-rank-tworca,
.badge-rank-streamer,
.badge-rank-moderator,
.badge-rank-admin {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: var(--g5-radius-pill);
    font-family: var(--g5-display);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.g5-rank-dirt, .badge-rank-dirt {
    background: linear-gradient(135deg, #a67c2e, #6b4f2a);
    color: #fef3c7;
}
.g5-rank-iron, .badge-rank-iron {
    background: linear-gradient(135deg, #c0c8d4, #64748b);
    color: #0f172a;
}
.g5-rank-gold, .badge-rank-gold {
    background: linear-gradient(135deg, #ffe08a, #d97706);
    color: #1c1917;
}
.g5-rank-diamond, .badge-rank-diamond {
    background: linear-gradient(135deg, #7ec8ff, #0284c7);
    color: #e0f2fe;
}
.g5-rank-tworca, .badge-rank-tworca,
.g5-rank-streamer, .badge-rank-streamer {
    background: linear-gradient(135deg, #e9b3ff, #7c3aed);
    color: #fff;
}
.g5-rank-moderator, .badge-rank-moderator {
    background: linear-gradient(135deg, #86efac, #16a34a);
    color: #052e16;
}
.g5-rank-admin, .badge-rank-admin {
    background: linear-gradient(135deg, #fecaca, #b91c1c);
    color: #fff;
}

/* Admin UX helpers */
.g5-admin-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 14px;
}
.g5-filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.g5-filter-pill {
    border: 1px solid var(--g5-border);
    background: transparent;
    color: inherit;
    border-radius: 999px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 0.82rem;
}
.g5-filter-pill.is-active {
    background: var(--g5-gold, #d97706);
    color: #111;
    border-color: transparent;
}
.g5-coupon-preview {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px dashed var(--g5-border);
    background: rgba(0,0,0,.15);
}
.g5-badge--template { background: #7c3aed; color: #fff; margin-left: 6px; }
.g5-badge--public { background: #15803d; color: #fff; margin-left: 6px; }
.g5-wizard-steps {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.g5-wizard-step {
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--g5-border);
    font-size: 0.8rem;
    opacity: .7;
}
.g5-wizard-step.is-active {
    opacity: 1;
    border-color: var(--g5-gold, #d97706);
}
.g5-mission-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}
.g5-mission-card {
    border: 1px solid var(--g5-border);
    border-radius: 12px;
    padding: 14px;
    background: rgba(0,0,0,.18);
}
.g5-mission-card header {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: start;
}
.g5-mission-card h3 {
    margin: 0;
    font-size: 1.05rem;
}
.g5-mission-meta {
    list-style: none;
    padding: 0;
    margin: 10px 0 14px;
    font-size: 0.88rem;
}
.g5-mission-meta li { margin: 4px 0; }

/* ── Progress bars ── */
.g5-progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 999px;
    overflow: hidden;
}

.g5-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--g5-mint), var(--g5-sky));
    border-radius: 999px;
    transition: width 0.4s ease;
}

.g5-progress-fill--complete {
    background: linear-gradient(90deg, var(--g5-accent), var(--g5-mint));
}

/* ── Tables ── */
.g5-table-wrap {
    overflow-x: auto;
    border-radius: var(--g5-radius-sm);
    border: 1px solid var(--g5-border);
}

.g5-table,
.table,
.table-mc {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.g5-table th,
.g5-table td,
.table th,
.table td,
.table-mc th,
.table-mc td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--g5-border);
}

.g5-table th,
.table th,
.table-mc th {
    font-family: var(--g5-display);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--g5-muted);
    background: rgba(0, 0, 0, 0.25);
}

.g5-table tr:hover td,
.table tr:hover td { background: rgba(255, 255, 255, 0.02); }

.g5-table tr.g5-highlight,
.table-mc-highlight {
    background: var(--g5-accent-dim);
}

.g5-pos-gold { color: #ffd700; text-shadow: 0 0 12px rgba(255, 215, 0, 0.35); }
.g5-pos-silver { color: #c0c0c0; }
.g5-pos-bronze { color: #cd7f32; }

/* ── Toast ── */
.g5-toast-host {
    position: fixed;
    right: 20px;
    bottom: 100px;
    z-index: var(--g5-z-toast);
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.g5-toast {
    padding: 14px 20px;
    border-radius: var(--g5-radius-sm);
    background: rgba(10, 14, 22, 0.95);
    border: 1px solid var(--g5-border-accent);
    color: var(--g5-text);
    box-shadow: var(--g5-shadow);
    font-size: 0.9rem;
    font-weight: 600;
    animation: g5ToastIn 0.3s ease;
}
.g5-toast--success { border-color: var(--g5-accent); color: var(--g5-accent); }
.g5-toast--error { border-color: var(--g5-coral); color: #ffb4b4; }

@keyframes g5ToastIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
}

/* ── Footer ── */
.g5-footer {
    position: relative;
    z-index: var(--g5-z-content);
    border-top: 1px solid var(--g5-border);
    padding: 40px 20px 120px;
    background: rgba(0, 0, 0, 0.25);
}

.g5-footer-inner {
    max-width: var(--g5-max-wide);
    margin: 0 auto;
    display: grid;
    gap: 28px;
}

.g5-footer-brand {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.g5-footer-brand .g5-logo { font-size: 1.2rem; }

.g5-footer-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.g5-footer-ip {
    font-family: var(--g5-mono);
    font-size: 0.85rem;
    color: var(--g5-accent);
    padding: 10px 14px;
    border-radius: var(--g5-radius-xs);
    background: var(--g5-accent-dim);
    border: 1px solid var(--g5-border-accent);
}

.g5-footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 16px;
    padding-top: 24px;
    border-top: 1px solid var(--g5-border);
}

.g5-footer p { font-size: 0.85rem; color: var(--g5-muted); }

.g5-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
}
.g5-footer-links a {
    color: var(--g5-muted);
    font-size: 0.85rem;
    text-decoration: none;
}
.g5-footer-links a:hover { color: var(--g5-accent); }

/* ── Account / Admin shells ── */
.g5-account-layout,
.g5-admin-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 28px;
    align-items: start;
}

.g5-account-sidebar,
.g5-admin-sidebar {
    position: sticky;
    top: 96px;
    padding: 22px;
    border-radius: var(--g5-radius);
    background: var(--g5-surface);
    border: 1px solid var(--g5-border);
}

.g5-account-user {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 18px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--g5-border);
}
.g5-account-user strong { display: block; font-size: 0.95rem; }
.g5-avatar-sm {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 12px;
}

.g5-account-nav,
.g5-admin-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.g5-account-nav-link,
.g5-admin-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--g5-muted);
    text-decoration: none;
    font-size: 0.88rem;
    transition: background var(--g5-transition), color var(--g5-transition);
}
.g5-account-nav-link:hover,
.g5-admin-nav-link:hover,
.g5-account-nav-link.g5-active,
.g5-admin-nav-link.g5-active {
    color: var(--g5-text);
    background: rgba(255, 255, 255, 0.05);
}
.g5-account-nav-link.g5-active,
.g5-admin-nav-link.g5-active {
    color: var(--g5-accent);
    background: var(--g5-accent-dim);
}

.g5-account-nav-icon svg,
.g5-admin-nav-icon svg {
    width: 18px;
    height: 18px;
    display: block;
}

.g5-logout-form { margin-top: 16px; }

.g5-info-box {
    margin-top: 24px;
    padding: 18px;
    border-radius: var(--g5-radius-sm);
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--g5-border);
}
.g5-info-box ol {
    margin-left: 18px;
    list-style: decimal;
    color: var(--g5-text-secondary);
    font-size: 0.88rem;
}
.g5-info-box li { margin-bottom: 8px; }

.g5-auth-card { max-width: 520px; margin: 0 auto; }

.g5-page-header { margin-bottom: 28px; }
.g5-page-header .g5-title { margin-bottom: 8px; }

.g5-legal-body h2 {
    font-family: var(--g5-display);
    font-size: 1.15rem;
    margin: 28px 0 12px;
    text-transform: uppercase;
}
.g5-legal-body p,
.g5-legal-body li {
    color: var(--g5-text-secondary);
    margin-bottom: 10px;
}
.g5-legal-body ul { list-style: disc; margin-left: 20px; }

.g5-bento {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
}
.g5-bento-span-8 { grid-column: span 8; }
.g5-bento-span-4 { grid-column: span 4; }
.g5-bento-span-6 { grid-column: span 6; }
.g5-bento-span-12 { grid-column: span 12; }

@media (max-width: 900px) {
    .g5-account-layout,
    .g5-admin-layout { grid-template-columns: 1fr; }
    .g5-account-sidebar,
    .g5-admin-sidebar { position: static; }
    .g5-bento-span-8,
    .g5-bento-span-4,
    .g5-bento-span-6 { grid-column: span 12; }
}

/* Compatibility aliases from MC redesign */
.text-minecraft { font-family: var(--g5-display); font-weight: 600; letter-spacing: 0.03em; }
.text-emerald, .text-primary { color: var(--g5-accent); }
.text-secondary { color: var(--g5-text-secondary); }
.text-muted { color: var(--g5-muted); }
.text-error { color: #ffb4b4; }
.text-info { color: #a8ccff; }
.text-warning { color: var(--g5-gold); }
.text-glow { text-shadow: 0 0 24px rgba(61, 255, 181, 0.35); }
.mc-lead { color: var(--g5-text-secondary); font-size: 1.05rem; line-height: 1.7; }
.mc-label {
    display: block;
    font-size: 0.7rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--g5-muted);
    font-family: var(--g5-display);
}
.section-header { margin-bottom: 28px; }
.card-inventory {
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid var(--g5-border);
    border-radius: var(--g5-radius-sm);
    padding: 16px;
}
.card-chest {
    background: var(--g5-surface);
    border: 1px solid var(--g5-border);
    border-radius: var(--g5-radius);
    padding: 24px;
}
.hover-lift { transition: transform var(--g5-transition); }
.hover-lift:hover { transform: translateY(-4px); }
.hover-glow:hover { box-shadow: 0 0 40px rgba(61, 255, 181, 0.12); }
.texture-purpur,
.texture-purpur-pillar,
.texture-netherrack,
.texture-obsidian,
.texture-end-stone,
.texture-nether-brick,
.texture-soul-sand {
    background: var(--g5-surface) !important;
}
.particle-container { display: none !important; }
.progress-boss {
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}
.progress-boss-fill {
    height: 100%;
    border-radius: inherit;
    background: var(--g5-accent);
}
.progress-boss-fill--xp,
.progress-boss-fill--health { background: linear-gradient(90deg, var(--g5-accent-dark), var(--g5-accent)); }
.progress-boss-fill--gold { background: linear-gradient(90deg, #d97706, var(--g5-gold)); }

.input-mc,
.g5-form .input-mc {
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--g5-radius-xs);
    border: 1px solid var(--g5-border-bright);
    background: rgba(0, 0, 0, 0.35);
    color: var(--g5-text);
    outline: none;
}
.input-mc:focus {
    border-color: var(--g5-accent);
    box-shadow: 0 0 0 3px var(--g5-accent-dim);
}

.checkbox-mc {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    user-select: none;
    position: relative;
}
.checkbox-mc input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.checkbox-mc-box {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid var(--g5-accent);
    border-radius: 4px;
    position: relative;
}
.checkbox-mc input[type="checkbox"]:checked + .checkbox-mc-box {
    background: var(--g5-accent);
}
.checkbox-mc input[type="checkbox"]:checked + .checkbox-mc-box::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid #042a1f;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.g5-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--g5-border);
}
.g5-summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding-top: 18px;
    margin-top: 8px;
}
.g5-summary-total strong {
    font-family: var(--g5-display);
    font-size: 1.6rem;
    color: var(--g5-accent);
}
.g5-profile-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 28px;
    align-items: center;
}
.g5-profile-avatar {
    width: 104px;
    height: 104px;
    border-radius: 16px;
    overflow: hidden;
    border: 3px solid var(--g5-accent);
    box-shadow: 0 0 30px rgba(61, 255, 181, 0.25);
}
.g5-profile-avatar img {
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
}
.g5-quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
}
.g5-quick-link {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 20px;
    border-radius: var(--g5-radius-sm);
    background: var(--g5-surface);
    border: 1px solid var(--g5-border);
    text-decoration: none;
    color: inherit;
    transition: transform var(--g5-transition), border-color var(--g5-transition);
}
.g5-quick-link:hover {
    transform: translateY(-3px);
    border-color: var(--g5-border-accent);
    color: inherit;
}
.g5-quick-link strong {
    font-family: var(--g5-display);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--g5-accent);
}
.g5-quick-link span { font-size: 0.82rem; color: var(--g5-muted); }
.g5-quick-link--shop {
    border-color: rgba(245, 197, 66, 0.4);
    background: linear-gradient(180deg, rgba(245, 197, 66, 0.1), var(--g5-surface));
}
.g5-quick-link--shop strong { color: var(--g5-gold); }

.g5-podium {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    align-items: end;
    max-width: 900px;
    margin: 0 auto 40px;
}
.g5-podium-item {
    text-align: center;
    padding: 24px 16px;
    border-radius: var(--g5-radius);
    background: var(--g5-surface);
    border: 1px solid var(--g5-border);
}
.g5-podium-item--1 {
    transform: translateY(-12px);
    border-color: rgba(245, 197, 66, 0.5);
    box-shadow: 0 0 40px rgba(245, 197, 66, 0.15);
}
.g5-podium-avatar {
    width: 72px;
    height: 72px;
    margin: 0 auto 12px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--g5-border-bright);
}
.g5-podium-item--1 .g5-podium-avatar {
    width: 88px;
    height: 88px;
    border-color: var(--g5-gold);
}
.g5-podium-avatar img {
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
}

@media (max-width: 768px) {
    .g5-profile-header { grid-template-columns: 1fr; text-align: center; justify-items: center; }
    .g5-podium { grid-template-columns: 1fr; }
    .g5-podium-item--1 { transform: none; order: -1; }
}

/* Inline forms (konto/kody) */
.g5-inline-form {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    margin-bottom: 24px;
}
.g5-inline-form--spaced { margin-bottom: 28px; }
.g5-inline-form .g5-input,
.g5-inline-form input:not([type=hidden]):not([type=submit]):not([type=button]) {
    flex: 1 1 220px;
    min-width: 180px;
    width: auto;
    margin: 0;
}
.g5-inline-form .g5-btn {
    flex: 0 0 auto;
    width: auto;
    margin: 0;
}

/* Quick access tiles with icon squares */
.g5-quick-link {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    text-align: left;
}
.g5-quick-link > div:last-child {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.g5-quick-icon {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 2px solid;
    font-size: 1.35rem;
    line-height: 1;
}
.g5-quick-icon--matches {
    background: rgba(255, 92, 108, 0.12);
    border-color: rgba(255, 92, 108, 0.45);
}
.g5-quick-icon--stats {
    background: rgba(91, 157, 255, 0.12);
    border-color: rgba(91, 157, 255, 0.45);
}
.g5-quick-icon--missions {
    background: rgba(245, 197, 66, 0.12);
    border-color: rgba(245, 197, 66, 0.45);
}
.g5-quick-icon--transactions {
    background: rgba(61, 255, 181, 0.12);
    border-color: rgba(61, 255, 181, 0.4);
}
.g5-quick-icon--shop {
    background: rgba(245, 197, 66, 0.16);
    border-color: rgba(245, 197, 66, 0.55);
}
.g5-quick-icon--coupons {
    background: rgba(192, 132, 252, 0.12);
    border-color: rgba(192, 132, 252, 0.45);
}
.g5-quick-icon--analytics {
    background: rgba(61, 255, 181, 0.14);
    border-color: rgba(61, 255, 181, 0.45);
}
.g5-quick-icon--bans {
    background: rgba(255, 92, 108, 0.12);
    border-color: rgba(255, 92, 108, 0.45);
}
.g5-quick-icon--reports {
    background: rgba(91, 157, 255, 0.12);
    border-color: rgba(91, 157, 255, 0.45);
}
.g5-quick-icon--settings {
    background: rgba(128, 128, 128, 0.14);
    border-color: rgba(160, 160, 160, 0.4);
}

.g5-admin-hint {
    margin: 0 0 16px;
    padding: 12px 14px;
    border-radius: var(--g5-radius-xs);
    background: var(--g5-accent-dim);
    border: 1px solid var(--g5-border-accent);
    color: var(--g5-text-secondary);
    font-size: 0.88rem;
    line-height: 1.5;
}
.g5-coupon-form .g5-form-section,
.g5-mission-form .g5-form-section {
    margin-bottom: 18px;
}
.g5-table-section { margin-top: 32px; }
