.infra-page {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    flex-shrink: 0;
    height: 100%;
    min-height: 0;
    overflow-y: scroll;
    padding-bottom: 14px;
    pointer-events: all;
}

.infra-page .home-section {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    background-color: #121214;
    border: 1px solid #27272a;
    border-radius: 16px;
    padding: 14px 18px;
}

.infra-page .home-stat-card {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background-color: #18181b;
    border-radius: 12px;
    border: 1px solid #27272a;
    padding: 12px 13px;
}

.infra-page .hs-label {
    font-size: 12px;
    font-weight: 600;
    line-height: 16px;
    color: #71717a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.infra-page .hs-value {
    font-size: 17px;
    font-weight: 800;
    line-height: 22px;
    color: #f9fafb;
    display: flex;
    gap: 6px;
    align-items: baseline;
}

.infra-page .hs-hint {
    font-size: 11px;
    line-height: 16px;
    color: #9ca3af;
}

.infra-page .hs-good {
    color: #10b981;
}

.infra-hero {
    padding: 14px 18px;
    gap: 12px;
    pointer-events: all;
}

.infra-hero-main {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.infra-hero-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.infra-hero-title-left {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    min-width: 0;
    flex: 1;
}

.infra-hero-icon {
    line-height: 32px;
    font-size: 28px;
    color: #e2e8f0;
}

.infra-hero-title-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.infra-title-container {
    display: flex;
    align-items: center;
    gap: 10px; // Tightened gap between pills
}

.infra-hero-title {
    font-size: 18px;
    line-height: 24px;
    font-weight: 900;
    color: #f8fafc;
    margin-bottom: 0;
}

/* BASE PILL STYLE */
.infra-offline-pill,
.infra-vip-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 2px 10px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* OFFLINE PILL - AMBER */
.infra-offline-pill {
    background-color: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: #fbbf24;
}

/* VIP PILL - EMERALD/GOLD */
.infra-vip-pill {
    background: linear-gradient(135deg, rgba(6, 78, 59, 0.2), rgba(4, 120, 87, 0.3));
    border: 1px solid rgba(252, 211, 77, 0.5); // Gold border
    color: #fcd34d; // Gold text
    box-shadow: 0 0 10px rgba(52, 211, 153, 0.15);
    animation: vip-glow-pulse 3s infinite ease-in-out;
}

.infra-vip-pill .ui-icon {
    font-size: 12px;
    color: #fcd34d;
}

.infra-hero-subtitle {
    font-size: 12px;
    line-height: 16px;
    color: #64748b;
}

@keyframes vip-glow-pulse {
    0% { border-color: rgba(252, 211, 77, 0.4); box-shadow: 0 0 8px rgba(52, 211, 153, 0.1); }
    50% { border-color: rgba(252, 211, 77, 0.8); box-shadow: 0 0 16px rgba(52, 211, 153, 0.3); }
    100% { border-color: rgba(252, 211, 77, 0.4); box-shadow: 0 0 8px rgba(52, 211, 153, 0.1); }
}

.infra-buy-toggle {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    pointer-events: all;
}

.infra-multi-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 92px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid #334155;
    padding: 0 12px;
    background-color: #18181b;
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 800;
    line-height: 16px;
    text-align: center;
    cursor: pointer;
    pointer-events: all;
    transition: transform 0.12s, border-color 0.12s, color 0.12s;
}

.infra-multi-btn:hover {
    transform: translateY(-1px);
    border-color: #64748b;
    color: #f8fafc;
}

.infra-multi-btn.active {
    border-color: #3b82f6;
    background-color: #1b1f27;
    color: #bfdbfe;
}

.infra-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    pointer-events: all;
}

.infra-summary-card {
    flex: 1 1 210px;
    min-width: 180px;
    min-height: 64px;
}

.infra-summary-card .hs-label {
    font-size: 16px;
    line-height: 20px;
    font-weight: 800;
    color: #f9fafb;
    text-transform: none;
    letter-spacing: 0;
}

.infra-machines-section {
    padding: 18px 18px;
    pointer-events: all;
}

.infra-machines-list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 14px;
    pointer-events: all;
}

.infra-machine-card {
    flex: 1 1 440px;
    min-width: 300px;
    gap: 4px;
    padding: 10px 10px;
    pointer-events: all;
}

.infra-machine-card.locked {
    border-color: #27272a;
}

.infra-machine-card.owned {
    border-color: #334155;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.26);
}

.infra-machine-card.is-running,
.infra-machine-card.is-processing {
    border-color: rgba(56, 189, 248, 0.72);
    background-color: #1a1d27;
    box-shadow: 
        0 0 0 1px rgba(56, 189, 248, 0.08),
        0 0 18px rgba(56, 189, 248, 0.14);
    z-index: 2;
    animation: infra-card-heartbeat 1.2s ease-in-out infinite;
}

.infra-machine-card.payout-pop {
    animation: infra-payout-pop 0.15s ease-out;
}

@keyframes infra-card-heartbeat {
    0% {
        border-color: rgba(56, 189, 248, 0.42);
        box-shadow: 
            0 0 0 1px rgba(56, 189, 248, 0.03),
            0 0 10px rgba(56, 189, 248, 0.08);
    }
    35% {
        border-color: rgba(103, 232, 249, 0.98);
        box-shadow: 
            0 0 0 1px rgba(103, 232, 249, 0.14),
            0 0 24px rgba(34, 211, 238, 0.22);
    }
    70% {
        border-color: rgba(56, 189, 248, 0.72);
        box-shadow: 
            0 0 0 1px rgba(56, 189, 248, 0.08),
            0 0 16px rgba(56, 189, 248, 0.14);
    }
    100% {
        border-color: rgba(56, 189, 248, 0.42);
        box-shadow: 
            0 0 0 1px rgba(56, 189, 248, 0.03),
            0 0 10px rgba(56, 189, 248, 0.08);
    }
}

.infra-machine-card.is-running .infra-machine-name,
.infra-machine-card.is-processing .infra-machine-name {
    color: #fff;
    text-shadow: 0 0 10px rgba(56, 189, 248, 0.24);
}

.infra-machine-card.is-processing .infra-progress-track {
    border-color: rgba(103, 232, 249, 0.7);
    box-shadow: 0 0 10px rgba(34, 211, 238, 0.12);
}

.infra-machine-icon.is-processing {
    color: #67e8f9;
    text-shadow: 
        0 0 10px rgba(103, 232, 249, 0.3),
        0 0 18px rgba(34, 211, 238, 0.16);
    animation: infra-processing-heartbeat 0.95s ease-in-out infinite;
}

.infra-line {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.infra-line-top {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.infra-machine-title-wrap {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
}

.infra-machine-icon {
    font-size: 18px;
    line-height: 20px;
}

.infra-machine-title-text {
    display: flex;
    flex-direction: column;
    gap: 0px;
    min-width: 0;
}

.infra-machine-name {
    font-size: 14px;
    line-height: 16px;
    font-weight: 800;
    color: #f9fafb;
}

.infra-machine-desc {
    font-size: 11px;
    line-height: 14px;
    color: #9ca3af;
}

.infra-machine-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.infra-top-chips {
    display: flex;
    align-items: center;
    gap: 6px;
}

.infra-chip {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid #334155;
    background-color: #111827;
    color: #cbd5e1;
    font-size: 11px;
    line-height: 14px;
    font-weight: 800;
    padding: 3px 10px;
}

.infra-chip.income {
    border-color: rgba(16, 185, 129, 0.45);
    color: #86efac;
    padding: 2px 8px;
}

.infra-line-progress {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-top: 2px;
    margin-bottom: 3px;
}

.infra-progress-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-size: 10px;
    line-height: 14px;
    font-weight: 700;
    color: #94a3b8;
}

.infra-progress-track {
    position: relative;
    width: 100%;
    height: 12px;
    min-height: 12px;
    padding: 3px 4px;
    border-radius: 10px;
    border: 1px solid #334155;
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.96), rgba(11, 19, 35, 1));
    overflow: hidden;
}

.infra-progress-fill {
    width: 0%;
    height: 100%;
    border-radius: 999px;
    background-color: #3dffbf;
    box-shadow: 0 0 10px rgba(61, 255, 191, 0.6);
}

.infra-float {
    position: absolute;
    top: -15px;
    font-size: 11px;
    line-height: 14px;
    font-weight: 900;
    color: #86efac;
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.45);
    animation: infra-float-up 1.05s ease-out forwards;
    pointer-events: none;
}

.infra-line-actions {
    gap: 8px;
    margin-top: 2px;
}

.infra-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    pointer-events: all;
}

.infra-action-row.single .infra-action-btn.primary {
    flex: 1 1 100%;
}

.infra-action-row.upgrades .infra-action-btn {
    flex: 1 1 140px;
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(148, 163, 184, 0.35);
}

.infra-action-row.upgrades .infra-action-btn:hover:not(.disabled) {
    background-color: rgba(255, 255, 255, 0.09);
    border-color: rgba(148, 163, 184, 0.65);
}

.infra-action-row.upgrades .infra-action-btn.can-afford {
    border-color: rgba(59, 130, 246, 0.50);
    background-color: rgba(59, 130, 246, 0.10);
    color: #bfdbfe;
}

.infra-action-row.upgrades .infra-action-btn.cant-afford {
    border-color: #3f3f46;
    background-color: rgba(148, 163, 184, 0.08);
    color: #94a3b8;
}

.infra-action-btn {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 140px;
    min-height: 28px;
    border-radius: 8px;
    padding: 4px 8px;
    background-color: #1b1f27;
    color: #e2e8f0;
    font-size: 11px;
    line-height: 14px;
    font-weight: 800;
    text-align: center;
    cursor: pointer;
    pointer-events: all;
    transition: transform 0.12s, border-color 0.12s, opacity 0.12s;
}

.infra-action-btn:hover {
    transform: translateY(-1px);
    border-color: #64748b;
}

.infra-action-btn.primary {
    border-color: rgba(59, 130, 246, 0.55);
    color: #bfdbfe;
    font-weight: 900;
}

.infra-action-btn.can-afford {
    border-color: rgba(59, 130, 246, 0.55);
    background-color: rgba(59, 130, 246, 0.12);
    color: #bfdbfe;
}

.infra-action-btn.can-afford:hover {
    background-color: rgba(59, 130, 246, 0.18);
}

.infra-action-btn.cant-afford {
    border-color: #3f3f46;
    background-color: rgba(148, 163, 184, 0.08);
    color: #94a3b8;
}

.infra-action-btn.primary.cant-afford {
    border-color: #3f3f46;
    background-color: rgba(148, 163, 184, 0.08);
    color: #94a3b8;
}

.infra-action-btn.running {
    border-color: rgba(245, 158, 11, 0.55);
    color: #fcd34d;
}

.infra-action-btn.manual-run {
    border-color: rgba(56, 189, 248, 0.45);
    background: linear-gradient(180deg, rgba(8, 47, 73, 0.94), rgba(7, 25, 48, 0.98));
    color: #bae6fd;
}

.infra-action-btn.manual-run.ready {
    border-color: rgba(103, 232, 249, 0.9);
    color: #f0f9ff;
    box-shadow: 0 0 18px rgba(56, 189, 248, 0.3);
    animation: infra-manual-callout 1.15s ease-in-out infinite;
}

.infra-action-btn.manual-run.ready:hover {
    background: linear-gradient(180deg, rgba(12, 74, 110, 0.96), rgba(8, 51, 68, 0.98));
    box-shadow: 0 0 24px rgba(56, 189, 248, 0.4);
}

.infra-action-btn.auto,
.infra-action-btn.active {
    border-color: rgba(16, 185, 129, 0.55);
    color: #86efac;
}

.infra-machine-card.is-running .infra-action-btn.auto.active {
    animation: infra-auto-breathe 1s ease-in-out infinite;
    box-shadow: 0 0 14px rgba(16, 185, 129, 0.16);
}

.infra-action-btn.disabled {
    opacity: 0.6;
    pointer-events: none;
    transform: none;
}

@keyframes infra-float-up {
    0% {
        opacity: 0.0;
        transform: translate(-50%, 0px) scale(0.95);
    }
    20% {
        opacity: 1.0;
    }
    100% {
        opacity: 0.0;
        transform: translate(-50%, -30px) scale(1.02);
    }
}

@keyframes infra-manual-callout {
    0% {
        box-shadow: 0 0 10px rgba(56, 189, 248, 0.18);
        border-color: rgba(103, 232, 249, 0.4);
    }
    50% {
        box-shadow: 0 0 22px rgba(56, 189, 248, 0.45);
        border-color: rgba(103, 232, 249, 1.0);
    }
    100% {
        box-shadow: 0 0 10px rgba(56, 189, 248, 0.18);
        border-color: rgba(103, 232, 249, 0.4);
    }
}

@keyframes infra-payout-pop {
    0% {
        transform: scale(1);
        box-shadow: 
            0 0 0 rgba(61, 255, 191, 0),
            0 10px 22px rgba(15, 23, 42, 0.26);
    }
    100% {
        transform: scale(1.02);
        box-shadow: 
            0 0 20px rgba(61, 255, 191, 0.8),
            0 14px 28px rgba(15, 23, 42, 0.32);
    }
}

@keyframes infra-auto-breathe {
    0% {
        opacity: 0.62;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0.62;
    }
}

@keyframes infra-processing-heartbeat {
    0% {
        opacity: 0.68;
        transform: scale(1);
        filter: brightness(0.95);
    }
    30% {
        opacity: 1;
        transform: scale(1.08);
        filter: brightness(1.2);
    }
    55% {
        opacity: 0.82;
        transform: scale(1.03);
        filter: brightness(1.05);
    }
    100% {
        opacity: 0.68;
        transform: scale(1);
        filter: brightness(0.95);
    }
}
