/* =========================================
   LastHub – Dashboard Styles (Hero & Base)
   ========================================= */

/* ===========================
   Hero Section
   =========================== */

.hero {
    margin-top: 20px;
    margin-bottom: 22px;
    padding: 22px 18px 20px;
    border-radius: var(--radius-lg);
    background:
        linear-gradient(135deg,
            rgba(15, 23, 42, 0.9),
            rgba(8, 47, 35, 0.9)),
        radial-gradient(circle at 0% 0%, rgba(22, 163, 74, 0.18), transparent 65%);
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-soft);
    display: grid;
    grid-template-columns: minmax(0, 2.1fr) minmax(260px, 1.2fr);
    gap: 20px;
}

.hero-content h2 {
    font-size: 24px;
    margin-bottom: 8px;
}

.hero-content p {
    margin: 0;
    color: var(--text-soft);
    max-width: 520px;
}

/* Ressourcen-Leiste im Hero */

.resource-bar {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.resource-item {
    flex: 1 1 150px;
    min-width: 140px;
    padding: 8px 10px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid var(--border-soft);
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.55);
    position: relative;
    overflow: hidden;
}

.resource-item::before {
    content: "";
    position: absolute;
    inset: -40%;
    background:
        radial-gradient(circle at 0% 0%, rgba(95, 191, 127, 0.09) 0, transparent 60%),
        radial-gradient(circle at 120% 20%, rgba(56, 189, 248, 0.06) 0, transparent 60%);
    opacity: 0.7;
    pointer-events: none;
}

.resource-item > * {
    position: relative;
}

.resource-icon {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: #020617;
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.resource-icon-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* leichte farbliche Akzente pro Ressource */

.resource-workers {
    border-color: rgba(96, 165, 250, 0.45);
}

.resource-food {
    border-color: rgba(52, 211, 153, 0.45);
}

.resource-water {
    border-color: rgba(56, 189, 248, 0.45);
}

.resource-energy {
    border-color: rgba(250, 204, 21, 0.45);
}

.resource-metal {
    border-color: rgba(148, 163, 184, 0.6);
}

.resource-gold {
    border-color: rgba(251, 191, 36, 0.7);
}

.resource-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.resource-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.resource-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
}

.resource-cap {
    font-size: 11px;
    color: var(--text-muted);
    opacity: 0.9;
}

/* Aktionen im Hero */

.hero-actions {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* ===========================
   Hero Side / Base Card
   =========================== */

.hero-side {
    display: flex;
    align-items: stretch;
    justify-content: flex-end;
}

.hero-card {
    width: 100%;
    max-width: 320px;
    border-radius: var(--radius-md);
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.88));
    border: 1px solid var(--border-soft);
    padding: 14px 14px 12px;
    position: relative;
    overflow: hidden;
}

.hero-card::before {
    content: "";
    position: absolute;
    inset: -40%;
    background:
        radial-gradient(circle at 0% 0%, rgba(74, 222, 128, 0.08) 0, transparent 60%),
        radial-gradient(circle at 120% 20%, rgba(56, 189, 248, 0.06) 0, transparent 60%);
    opacity: 0.9;
    pointer-events: none;
}

.hero-card h3 {
    position: relative;
    margin: 0 0 10px;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

/* Basis-spezifische Hero Card */

.base-card-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.base-level-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: rgba(34, 197, 94, 0.16);
    border: 1px solid rgba(34, 197, 94, 0.7);
    color: #bbf7d0;
    box-shadow: 0 8px 18px rgba(34, 197, 94, 0.45);
}

.base-card-body {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
}

.base-card-image {
    border-radius: 12px;
    background: radial-gradient(circle at 30% 0%, rgba(34, 197, 94, 0.16), transparent 60%);
    border: 1px solid var(--border-soft);
    overflow: hidden;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.base-card-image-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.base-card-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Meta-Zeile unter dem Bild (Hub-Status o.ä.) */

.base-card-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    font-size: 12px;
    color: var(--text-soft);
}

.base-meta-label {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    font-size: 11px;
    color: var(--text-muted);
}

.base-meta-value {
    font-weight: 500;
    color: var(--text-main);
}

/* Basis-Stats (optional) */

.base-card-stats {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 13px;
}

.base-card-stats li {
    display: flex;
    justify-content: space-between;
    gap: 6px;
    padding: 2px 0;
    color: var(--text-soft);
}

.base-card-stats li span {
    opacity: 0.85;
}

.base-card-stats li strong {
    color: var(--text-main);
}

/* ===========================
   Basis-Upgrade-Bereich
   =========================== */

.base-upgrade {
    margin-top: 4px;
    padding-top: 6px;
    border-top: 1px solid rgba(148, 163, 184, 0.25);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.base-upgrade-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 12px;
    color: var(--text-muted);
}

.base-upgrade-label {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}

.base-upgrade-target {
    font-weight: 600;
    color: var(--accent-hover);
}

/* Upgrade-Kosten als Chips */

.base-upgrade-costs {
    list-style: none;
    padding: 0;
    margin: 4px 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.base-upgrade-cost-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid rgba(148, 163, 184, 0.6);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.55);
    position: relative;
    overflow: hidden;
    min-width: 0;
    transition:
        border-color var(--transition-fast),
        background-color var(--transition-fast),
        transform var(--transition-fast),
        box-shadow var(--transition-fast);
}

.base-upgrade-cost-chip::before {
    content: "";
    position: absolute;
    inset: -40%;
    background:
        radial-gradient(circle at 0% 0%, rgba(95, 191, 127, 0.08) 0, transparent 60%),
        radial-gradient(circle at 140% 10%, rgba(56, 189, 248, 0.06) 0, transparent 60%);
    opacity: 0.85;
    pointer-events: none;
}

.base-upgrade-cost-chip > * {
    position: relative;
}

.base-upgrade-cost-chip:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.7);
    border-color: var(--accent-outline);
}

.base-upgrade-cost-icon {
    width: 20px;
    height: 20px;
    border-radius: 999px;
    background: #020617;
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.base-upgrade-cost-icon-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.base-upgrade-cost-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.base-upgrade-cost-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--text-muted);
}

.base-upgrade-cost-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
}

/* Zustände: genug / zu wenig Ressourcen */

.base-upgrade-cost-chip.is-affordable {
    border-color: rgba(34, 197, 94, 0.8);
    background: radial-gradient(circle at 0% 0%, rgba(34, 197, 94, 0.16) 0, rgba(15, 23, 42, 0.96) 55%);
}

.base-upgrade-cost-chip.is-insufficient {
    border-color: rgba(248, 113, 113, 0.9);
    background:
        radial-gradient(circle at 0% 0%, rgba(248, 113, 113, 0.25) 0, rgba(15, 23, 42, 0.97) 60%);
}

.base-upgrade-cost-chip.is-insufficient .base-upgrade-cost-label {
    color: #fecaca;
}

.base-upgrade-cost-chip.is-insufficient .base-upgrade-cost-value {
    color: #fee2e2;
}

/* Schildstatus-Zeile */

.base-shield-row {
    margin-top: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
}

.base-shield-label {
    color: var(--text-soft);
}

.shield-status-pill {
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    cursor: pointer;
    transition:
        background-color var(--transition-fast),
        border-color var(--transition-fast),
        color var(--transition-fast),
        transform var(--transition-fast);
}

/* Statusfarben */

.shield-status-online {
    background: rgba(34, 197, 94, 0.18);
    border-color: rgba(34, 197, 94, 0.7);
    color: #bbf7d0;
}

.shield-status-online:hover {
    background: rgba(34, 197, 94, 0.28);
    transform: translateY(-1px);
}

.shield-status-offline {
    background: rgba(248, 113, 113, 0.14);
    border-color: rgba(248, 113, 113, 0.8);
    color: #fecaca;
}

.shield-status-offline:hover {
    background: rgba(248, 113, 113, 0.2);
    transform: translateY(-1px);
}

.shield-status-none {
    background: rgba(234, 179, 8, 0.16);
    border-color: rgba(234, 179, 8, 0.7);
    color: #fef3c7;
}

.shield-status-none:hover {
    background: rgba(234, 179, 8, 0.24);
    transform: translateY(-1px);
}

/* Upgrade-Button & Progress */

.base-upgrade-btn {
    margin-top: 6px;
}

.base-upgrade-btn:disabled {
    opacity: 0.7;
    cursor: default;
    box-shadow: none;
    transform: none;
}

/* Progress-Bar für laufende Upgrades */

.base-upgrade-progress {
    margin-top: 6px;
    padding: 6px 8px;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.4);
    position: relative;
    overflow: hidden;
}

.base-upgrade-progress-bar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0%;
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.4), rgba(56, 189, 248, 0.55));
    box-shadow: 0 0 18px rgba(34, 197, 94, 0.6);
    transition: width 0.3s linear;
}

.base-upgrade-progress-label {
    position: relative;
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ===========================
   Hero Status-Liste (optional)
   =========================== */

.hero-status-list {
    position: relative;
    list-style: none;
    padding: 0;
    margin: 0;
}

.hero-status-list li {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 13px;
    color: var(--text-soft);
}

.hero-status-list li span {
    opacity: 0.85;
}

.hero-status-list li strong {
    font-weight: 600;
    color: var(--text-main);
}

/* ===========================
   Responsive – Hero / Base
   =========================== */

@media (max-width: 900px) {
    .hero {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero-side {
        justify-content: flex-start;
        margin-top: 10px;
    }

    .hero-card {
        max-width: none;
    }

    .base-card-body {
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    .hero {
        padding: 18px 14px 16px;
    }

    .resource-item {
        flex: 1 1 100%;
    }
}
