/* 小树林尸潮 Grove Horde */

#main_bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(1200px 700px at 80% -10%, rgba(38, 168, 132, 0.16), transparent 55%),
        radial-gradient(900px 600px at 10% 100%, rgba(255, 107, 74, 0.08), transparent 50%),
        linear-gradient(160deg, #0a1a16 0%, #071411 45%, #050e0c 100%);
}

.gr-panel {
    padding: 0 !important;
    overflow: hidden !important;
    background: rgba(8, 18, 16, 0.94) !important;
    border: 1px solid rgba(38, 168, 132, 0.22) !important;
}

.gr-shell {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 520px;
    border-radius: inherit;
    overflow: hidden;
    background: #071411;
    color: var(--app-text-inverse, #e2e8f0);
    font-family: var(--app-font-serif);
    -webkit-user-select: none;
    user-select: none;
    touch-action: none;
    overscroll-behavior: none;
    -webkit-user-drag: none;
}

#grCanvas {
    display: block;
    width: 100%;
    height: 100%;
    touch-action: none;
    outline: none;
    cursor: crosshair;
    -webkit-user-select: none;
    user-select: none;
}

.gr-overlay {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(5, 14, 12, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.gr-overlay[hidden] {
    display: none !important;
}

.gr-card {
    width: min(440px, 100%);
    padding: 28px 26px 22px;
    border-radius: 18px;
    background: rgba(248, 252, 251, 0.94);
    color: var(--app-text, #17242b);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
    text-align: left;
}

.gr-card-wide {
    width: min(520px, 100%);
    max-height: min(80vh, 640px);
    overflow: auto;
}

.gr-kicker {
    margin: 0 0 8px;
    font-family: var(--app-font-mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    color: var(--app-accent-strong, #147a63);
    text-transform: uppercase;
}

.gr-card h1,
.gr-card h2 {
    margin: 0 0 10px;
    color: var(--app-text-heading, #11221e);
    font-size: 28px;
    line-height: 1.2;
}

.gr-card h2 {
    font-size: 24px;
}

.gr-lead {
    margin: 0 0 16px;
    color: var(--app-muted, #5f7078);
    font-size: 14px;
    line-height: 1.55;
}

.gr-controls {
    margin: 0 0 18px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(38, 168, 132, 0.08);
    border: 1px solid rgba(38, 168, 132, 0.14);
    list-style: none;
    display: grid;
    gap: 8px;
    font-size: 13px;
    color: var(--app-text, #17242b);
}

.gr-controls kbd {
    display: inline-block;
    min-width: 22px;
    padding: 1px 6px;
    margin-right: 2px;
    border-radius: 6px;
    background: #fff;
    border: 1px solid rgba(20, 122, 99, 0.2);
    box-shadow: 0 1px 0 rgba(20, 122, 99, 0.12);
    font-family: var(--app-font-mono);
    font-size: 11px;
    text-align: center;
}

.gr-menu-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.gr-btn {
    appearance: none;
    border: 1px solid rgba(55, 177, 140, 0.35);
    background: rgba(255, 255, 255, 0.9);
    color: var(--app-text, #17242b);
    border-radius: 12px;
    padding: 10px 16px;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    transition: transform .18s var(--app-ease-spring, cubic-bezier(0.34, 1.56, 0.64, 1)), background .18s ease, box-shadow .18s ease;
}

.gr-btn:hover {
    background: #fff;
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(20, 122, 99, 0.14);
}

.gr-btn:active {
    transform: translateY(0);
}

.gr-btn-primary {
    background: linear-gradient(135deg, #26a884, #147a63);
    border-color: transparent;
    color: #f3fffb;
    font-weight: 650;
}

.gr-btn-primary:hover {
    background: linear-gradient(135deg, #2dbb94, #168872);
    box-shadow: 0 10px 22px rgba(38, 168, 128, 0.28);
}

.gr-btn-ghost {
    background: transparent;
    border-color: rgba(95, 112, 120, 0.28);
}

.gr-note {
    margin: 14px 0 0;
    font-size: 12px;
    color: var(--app-muted, #5f7078);
}

.gr-name-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 14px 0 16px;
    font-size: 13px;
    color: var(--app-muted, #5f7078);
}

.gr-name-row input {
    flex: 1;
    height: 38px;
    border-radius: 10px;
    border: 1px solid rgba(55, 177, 140, 0.3);
    padding: 0 12px;
    font-size: 14px;
    font-family: inherit;
    color: var(--app-text, #17242b);
    background: rgba(255, 255, 255, 0.95);
    outline: none;
}

.gr-name-row input:focus {
    border-color: var(--app-accent-strong, #147a63);
    box-shadow: 0 0 0 3px rgba(38, 168, 132, 0.15);
}

.gr-report {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 8px;
}

.gr-report-item {
    padding: 12px;
    border-radius: 12px;
    background: rgba(38, 168, 132, 0.08);
    border: 1px solid rgba(38, 168, 132, 0.12);
}

.gr-report-item span {
    display: block;
    font-size: 12px;
    color: var(--app-muted, #5f7078);
    margin-bottom: 4px;
}

.gr-report-item b {
    font-family: var(--app-font-mono);
    font-size: 18px;
    color: var(--app-text-heading, #11221e);
}

.gr-rank-list {
    margin: 0 0 18px;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 8px;
}

.gr-rank-list li {
    display: grid;
    grid-template-columns: 36px 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(38, 168, 132, 0.1);
    font-size: 13px;
}

.gr-rank-list li.is-me {
    border-color: rgba(38, 168, 132, 0.45);
    background: rgba(38, 168, 132, 0.12);
}

.gr-rank-list .rank {
    font-family: var(--app-font-mono);
    font-weight: 700;
    color: var(--app-accent-strong, #147a63);
}

.gr-rank-list .meta {
    color: var(--app-muted, #5f7078);
    font-size: 12px;
}

.gr-rank-list .pts {
    font-family: var(--app-font-mono);
    font-weight: 700;
}

/* HUD */
.gr-hud {
    position: absolute;
    inset: 0;
    z-index: 10;
    pointer-events: none;
    color: #e8fff8;
    font-family: var(--app-font-mono);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}

.gr-hud[hidden] {
    display: none !important;
}

.gr-hud-top {
    position: absolute;
    top: 14px;
    left: 14px;
    right: 14px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.gr-stat {
    min-width: 78px;
    padding: 8px 12px;
    border-radius: 12px;
    background: rgba(6, 18, 16, 0.55);
    border: 1px solid rgba(38, 168, 132, 0.28);
    backdrop-filter: blur(6px);
}

.gr-stat-score {
    margin-left: auto;
}

.gr-label {
    display: block;
    font-size: 10px;
    letter-spacing: 0.08em;
    color: rgba(226, 255, 247, 0.7);
    text-transform: uppercase;
}

.gr-value {
    display: block;
    margin-top: 2px;
    font-size: 20px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.gr-combo {
    color: #7dffd2;
}

.gr-combo.is-hot {
    color: #ffb36b;
    animation: grPulse .45s ease;
}

.gr-crosshair {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 28px;
    height: 28px;
    transform: translate(-50%, -50%);
    transition: transform .08s ease;
}

.gr-crosshair.is-spread {
    transform: translate(-50%, -50%) scale(1.35);
}

.gr-cross-h,
.gr-cross-v,
.gr-cross-dot {
    position: absolute;
    background: rgba(232, 255, 248, 0.92);
    box-shadow: 0 0 4px rgba(38, 168, 132, 0.55);
}

.gr-cross-h {
    left: 2px;
    right: 2px;
    top: 50%;
    height: 2px;
    margin-top: -1px;
}

.gr-cross-v {
    top: 2px;
    bottom: 2px;
    left: 50%;
    width: 2px;
    margin-left: -1px;
}

.gr-cross-dot {
    width: 3px;
    height: 3px;
    left: 50%;
    top: 50%;
    margin: -1.5px 0 0 -1.5px;
    border-radius: 50%;
    background: #26a884;
}

.gr-hitmarker {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 22px;
    height: 22px;
    margin: -11px 0 0 -11px;
    border: 2px solid transparent;
    border-top-color: #fff;
    border-bottom-color: #fff;
    transform: rotate(45deg) scale(1.2);
    opacity: 0;
}

.gr-hitmarker.is-show {
    animation: grHit .18s ease;
}

.gr-hitmarker.is-kill {
    border-top-color: #ff6b4a;
    border-bottom-color: #ff6b4a;
}

.gr-damage-flash {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 40%, rgba(220, 38, 38, 0.35) 100%);
    opacity: 0;
    transition: opacity .15s ease;
}

.gr-damage-flash.is-on {
    opacity: 1;
}

.gr-hud-bottom {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 14px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
}

.gr-vitals {
    display: grid;
    gap: 8px;
    min-width: 220px;
}

.gr-bar-wrap {
    display: grid;
    gap: 4px;
}

.gr-bar {
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.gr-bar i {
    display: block;
    height: 100%;
    width: 100%;
    transform-origin: left center;
    transition: transform .12s ease;
}

.gr-bar-hp i {
    background: linear-gradient(90deg, #16a34a, #7dffd2);
}

.gr-bar-ammo i {
    background: linear-gradient(90deg, #26a884, #9be7ff);
}

.gr-feedback {
    font-family: var(--app-font-serif);
    font-size: 15px;
    text-align: right;
    min-height: 24px;
    opacity: 0.95;
}

.gr-toast {
    position: absolute;
    left: 50%;
    top: 18%;
    transform: translateX(-50%);
    padding: 10px 18px;
    border-radius: 999px;
    background: rgba(6, 18, 16, 0.7);
    border: 1px solid rgba(38, 168, 132, 0.4);
    font-family: var(--app-font-serif);
    font-size: 16px;
    letter-spacing: 0.04em;
    animation: grToastIn .25s var(--app-ease-spring, cubic-bezier(0.34, 1.56, 0.64, 1));
}

.gr-toast[hidden] {
    display: none !important;
}

@keyframes grHit {
    0% { opacity: 1; transform: rotate(45deg) scale(1.35); }
    100% { opacity: 0; transform: rotate(45deg) scale(0.9); }
}

@keyframes grPulse {
    0% { transform: scale(1); }
    40% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

@keyframes grToastIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-8px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@media (max-width: 720px) {
    .gr-hud-top {
        gap: 6px;
    }

    .gr-stat {
        min-width: 64px;
        padding: 6px 8px;
    }

    .gr-value {
        font-size: 16px;
    }

    .gr-report {
        grid-template-columns: 1fr;
    }
}
