/* Web panels for Profile, Max. Score, Shop and Settings (retro 8-bit, like the game). */
.wa-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: stretch;
    padding: 12px;
    background: rgba(0, 0, 0, 0.82);
    font-family: "Press Start 2P", monospace;
    color: #e8f5d8;
}

.wa-overlay.hidden {
    display: none;
}

.wa-panel {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 680px;
    max-height: 100%;
    background: #080b08;
    border: 4px solid #55a82d;
    box-shadow: 6px 6px 0 #000, inset 3px 3px 0 rgba(255, 255, 255, 0.1);
}

.wa-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px 10px;
    border-bottom: 3px solid #347b27;
}

.wa-title {
    margin: 0;
    flex: 1 1 auto;
    color: #a4e74b;
    font-size: 13px;
    line-height: 1.5;
    text-shadow: 2px 2px 0 #000;
}

.wa-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding: 10px 16px;
    border-bottom: 3px solid #347b27;
}

.wa-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 40px;
    padding: 6px 4px;
    background: #0c4319;
    border: 2px solid #347b27;
    color: #ffe34a;
    font: inherit;
    font-size: 8px;
    cursor: pointer;
    box-shadow: 3px 3px 0 #000;
}

.wa-tab img {
    width: 20px;
    height: 20px;
    image-rendering: pixelated;
}

.wa-tab[aria-selected="true"] {
    background: #176c26;
    border-color: #a4e74b;
}

.wa-tab:hover,
.wa-tab:focus-visible {
    border-color: #a4e74b;
    outline: none;
}

.wa-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px;
    overflow-y: auto;
    font-size: 10px;
    line-height: 1.7;
}

.wa-body p {
    margin: 0;
}

.wa-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    background: #0d1a0d;
    border: 3px solid #347b27;
    box-shadow: 4px 4px 0 #000, inset 2px 2px 0 rgba(255, 255, 255, 0.08);
}

.wa-h {
    margin: 0;
    font-size: 11px;
    line-height: 1.6;
    color: #e8f5d8;
}

.wa-gold { color: #ffe34a; }
.wa-green { color: #a4e74b; }
.wa-bold { font-weight: bold; }
.wa-tiny { font-size: 8px; }
.wa-ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.wa-small {
    font-size: 8px;
    line-height: 1.8;
    color: #b8cfa8;
}

.wa-msg { color: #a4e74b; }
.wa-error { color: #ff6b5e; }

.wa-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 8px 12px;
    background: #2f8f2f;
    border: 3px solid #a4e74b;
    color: #fff;
    font: inherit;
    font-size: 9px;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 3px 3px 0 #000, inset 2px 2px 0 rgba(255, 255, 255, 0.2);
}

.wa-btn:hover:not(:disabled),
.wa-btn:focus-visible {
    filter: brightness(1.15);
    outline: none;
}

.wa-btn:disabled {
    cursor: not-allowed;
    filter: grayscale(1) brightness(0.55);
    box-shadow: none;
}

.wa-primary {
    background: #1f6fd1;
    border-color: #8fd0ff;
}

.wa-outline {
    background: #0c4319;
    border-color: #55a82d;
    color: #ffe34a;
}

.wa-outline.wa-active {
    background: #176c26;
    border-color: #ffe34a;
}

.wa-link {
    min-height: 32px;
    padding: 4px 6px;
    background: none;
    border: none;
    box-shadow: none;
    color: #8fd0ff;
    text-decoration: underline;
    justify-content: flex-start;
}

.wa-danger { color: #ff6b5e; }

.wa-danger-btn {
    background: #a3261d;
    border-color: #ff8a7a;
}

.wa-wide { width: 100%; }

.wa-close {
    flex: 0 0 auto;
    font-size: 8px;
}

.wa-row,
.wa-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.wa-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wa-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 9px;
    color: #a4e74b;
}

.wa-field small {
    font-size: 7px;
    color: #b8cfa8;
}

.wa-field input,
.wa-select {
    width: 100%;
    box-sizing: border-box;
    min-height: 40px;
    padding: 8px 10px;
    background: #000;
    border: 3px solid #347b27;
    color: #ffe34a;
    font: inherit;
    font-size: 10px;
}

.wa-field input:focus,
.wa-select:focus {
    border-color: #a4e74b;
    outline: none;
}

.wa-confirm {
    border-color: #ff6b5e;
}

.wa-balance,
.wa-booster {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wa-balance img {
    width: 36px;
    height: 36px;
    image-rendering: pixelated;
}

.wa-balance div,
.wa-booster div {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wa-coins {
    font-size: 22px;
}

.wa-booster img {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    image-rendering: pixelated;
}

.wa-btn-icon {
    width: 16px;
    height: 16px;
    image-rendering: pixelated;
}

.wa-promo {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    color: inherit;
    text-decoration: none;
    background: linear-gradient(135deg, #0c4319, #080b08);
}

.wa-promo img {
    width: 88px;
    height: 88px;
    object-fit: contain;
    flex: 0 0 88px;
}

.wa-promo div {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.wa-promo-title { font-size: 14px; }
.wa-promo-head { font-size: 9px; }

.wa-table-wrap {
    overflow-x: auto;
}

.wa-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 8px;
}

.wa-table th,
.wa-table td {
    padding: 6px 4px;
    text-align: left;
    border-bottom: 2px solid #1b3a1b;
}

.wa-table th { color: #a4e74b; }
.wa-table .wa-me td { color: #ffe34a; font-weight: bold; }

@media (max-width: 560px), (max-height: 500px) {
    .wa-overlay { padding: 0; }
    .wa-panel { border-width: 3px; }
    .wa-tab span { display: none; }
    .wa-title { font-size: 10px; }
}
