/* Power Plants, Research and Upgrades screens. */

.screenHeader {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin: 4px 0 16px;
}

.screenHeader h1 {
    margin: 0 0 2px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.screenHeader p {
    margin: 0;
    color: var(--muted);
}

.screenHeader .note {
    font-size: 12px;
    color: var(--dim);
}

.wallet {
    padding: 10px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    white-space: nowrap;
    color: var(--muted);
}

.wallet b {
    font-family: var(--mono);
    font-size: 16px;
}

.screenActions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* ---- Power plants -------------------------------------------------------------------------- */

.plantGrid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 12px;
}

.plantCard {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    overflow: hidden;
    transition: transform 0.12s, border-color 0.12s, box-shadow 0.12s;
}

.plantCard:hover {
    transform: translateY(-2px);
    border-color: var(--line-hi);
    box-shadow: var(--shadow);
}

.plantCard.owned {
    border-color: rgba(46, 230, 166, 0.45);
}

.plantPreview {
    display: block;
    width: 100%;
    height: 96px;
    background: var(--inset);
    image-rendering: pixelated;
    border-bottom: 1px solid var(--line);
}

.plantBody {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    padding: 10px 10px 12px;
}

.plantName {
    font-weight: 700;
    line-height: 1.2;
}

.plantStats {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2px 8px;
    font-size: 11px;
    color: var(--dim);
}

.plantStats b {
    text-align: right;
    font-family: var(--mono);
    font-size: 12px;
}

.plantBody .button {
    margin-top: auto;
    width: 100%;
    padding: 6px 8px;
    font-size: 12px;
}

.challengeChip {
    padding: 5px 7px;
    border-radius: var(--radius-sm);
    background: rgba(255, 196, 77, 0.08);
    border: 1px solid rgba(255, 196, 77, 0.25);
    color: var(--money);
    font-size: 11px;
    line-height: 1.35;
}

.challengeChip .reward {
    color: var(--ok);
}

.challengeChip.done {
    background: rgba(112, 224, 112, 0.08);
    border-color: rgba(112, 224, 112, 0.3);
    color: var(--ok);
    font-weight: 600;
}

/* ---- Research & upgrades ------------------------------------------------------------------- */

.itemGrid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.gridBreak {
    grid-column: 1 / -1;
    height: 1px;
    margin: 6px 0;
    background: var(--line);
}

.itemCard {
    display: grid;
    grid-template-columns: 40px 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
}

.itemCard:hover {
    border-color: var(--line-hi);
}

.itemIcon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--inset);
    border: 1px solid var(--line);
}

.itemTitle {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
}

.itemCard .description {
    color: var(--muted);
    font-size: 12px;
}

.itemPrice {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.itemButtons {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.itemButtons .buyButton,
.itemButtons .sellButton,
.itemCard > .buyButton {
    min-width: 62px;
    padding: 6px 10px;
    font-size: 12px;
}

.itemCard.complete {
    border-color: rgba(112, 224, 112, 0.25);
}

.itemCard.complete .itemTitle::after {
    content: "\2713  Done";
    margin-left: auto;
    color: var(--ok);
    font-size: 11px;
    font-weight: 700;
}
