:root {
    --color-bg: #0f172a;
    --color-surface: #1e293b;
    --color-accent: #3b82f6;
    --color-text: #f8fafc;
    --color-muted: #a5b3c8;

    /* Player Colors */
    --p1-color: #f87171;
    --p1-bg: #7f1d1d;
    --p2-color: #60a5fa;
    --p2-bg: #1e3a8a;
    --p3-color: #4ade80;
    --p3-bg: #14532d;
    --p4-color: #facc15;
    --p4-bg: #713f12;
    --p5-color: #c084fc;
    --p5-bg: #581c87;
    --p6-color: #fb923c;
    --p6-bg: #7c2d12;
    /* Orange */

    /* Glass Theme */
    /* --glass-bg: rgba(15, 23, 42, 0.2); */
    --glass-bg: rgba(43, 103, 140, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-blur: blur(24px);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--color-bg);
    color: var(--color-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.hidden {
    display: none !important;
}

#game-ui {
    height: 100%;
    display: flex;
    flex-direction: column;
    pointer-events: none;
    /* Allow clicks to pass through to canvas */
    position: relative;
    z-index: 10;
}

/* Setup Screen */
.setup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%); */
    background: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.setup-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    padding: 3rem;
    border-radius: 32px;
    border: 1px solid var(--glass-border);
    width: 90%;
    max-width: 500px;
    text-align: center;
    box-shadow: var(--glass-shadow);
}

.setup-card h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
}

.setup-card p {
    color: var(--color-muted);
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--color-muted);
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.player-count-select {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
}

.player-count-select button {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 1rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 700;
}

.player-count-select button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.player-count-select button.active {
    background: var(--color-accent);
    border-color: var(--color-accent);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

.primary-btn.wide {
    width: 100%;
    justify-content: center;
    padding: 1.2rem;
    font-size: 1.1rem;
    margin-top: 1rem;
}

header {
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--glass-bg);
    /* More transparent */
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 100;
    pointer-events: auto;
    /* Re-enable clicks */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
}

.header-center h1 {
    font-size: 1.5rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 800;
}

.back-link {
    color: var(--color-muted);
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s;
}

.back-link:hover {
    color: var(--color-text);
}

.glass-btn {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    color: var(--color-text);
    font-weight: 600;
    transition: all 0.3s ease;
}

.glass-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.primary-btn {
    background: var(--color-accent);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-muted);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-text);
}

.header-right {
    display: flex;
    gap: 1rem;
}

.game-container {
    flex: 1;
    display: flex;
    overflow: hidden;
    position: relative;
    min-height: 0;
    /* Crucial for scrolling inside flex items */
}

.map-view {
    flex: 1;
    position: relative;
    overflow: hidden;
    cursor: grab;
}

.map-view:active {
    cursor: grabbing;
}

#game-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.sidebar {
    width: 350px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-left: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    padding: 1rem;
    gap: 1rem;
    overflow-y: auto;
    min-width: 300px;
    z-index: 10;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.2);
    position: fixed;
    right: 0;
    top: 80px;
    /* Header height */
    bottom: 0;
    pointer-events: auto;
    /* Re-enable clicks */
}

.sidebar-section {
    flex-shrink: 0;
    /* Prevent squashing of critical sections */
}

.sidebar-section h3 {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--color-muted);
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.player-1 {
    color: var(--p1-color);
}

.player-2 {
    color: var(--p2-color);
}

.player-3 {
    color: var(--p3-color);
}

.player-4 {
    color: var(--p4-color);
}

.player-5 {
    color: var(--p5-color);
}

.player-6 {
    color: var(--p6-color);
}

/* --- Leaderboard Panel --- */
.players-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.player-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.player-row.active-turn {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}

.player-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    /* background-color: #333; */
    /* Fallback */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* border: 2px solid rgba(255, 255, 255, 0.3); */
    color: white;
    text-shadow: 0 0 4px black, 0 0 2px black;
    font-size: 1rem;
}

/* Wealth Bar */
.wealth-bar-container {
    flex: 1;
    height: 10px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 5px;
    overflow: hidden;
    position: relative;
}

.wealth-bar {
    height: 100%;
    background: var(--player-color);
    width: 0%;
    transition: width 0.5s ease-out;
    border-radius: 5px;
}

#player-indicator {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid currentColor;
    padding-bottom: 0.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Special single-line layout for Sidebar Stats */
.territory-info .stats-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.4rem;
}

.territory-info .stat-item {
    padding: 0.5rem;
    align-items: center;
    text-align: center;
}

.territory-info .stat-item .label {
    font-size: 0.6rem;
    letter-spacing: 0;
}

.territory-info .stat-item .value {
    font-size: 1rem;
}

.stat-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-item .label {
    font-size: 0.7rem;
    color: var(--color-muted);
    text-transform: uppercase;
}

.stat-item .value {
    font-size: 1.2rem;
    font-weight: 700;
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
}

.shop-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.5rem;
    color: var(--color-text);
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.shop-item span {
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
}

.shop-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--color-accent);
    transform: translateY(-2px);
}

.shop-item i {
    font-size: 1.1rem;
    color: var(--color-accent);
}

.event-log {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 0.8rem;
    font-size: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    overflow-y: auto;
    flex: 1;
    /* Take remaining height */
    min-height: 100px;
}

.sidebar-section.history {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 150px;
    overflow: hidden;
}

.log-entry {
    padding: 0.3rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.log-entry.system {
    color: var(--color-muted);
    font-style: italic;
}

/* Modal Styling */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    /* Dimmer backing */
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    pointer-events: auto;
    /* Re-enable clicks inside disabled parent */
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    padding: 2.5rem;
    border-radius: 24px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    position: relative;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    display: flex;
    flex-direction: column;
}

.close-modal {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 2rem;
    color: var(--color-muted);
    cursor: pointer;
}

.help-scroll {
    overflow-y: auto;
    padding-right: 1rem;
    margin-top: 1.5rem;
}

.help-scroll h3 {
    margin: 1.5rem 0 0.5rem;
    color: var(--color-accent);
    font-size: 0.9rem;
    text-transform: uppercase;
}

.help-scroll p,
.help-scroll li {
    color: var(--color-muted);
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.help-scroll ul {
    padding-left: 1.5rem;
}

/* Custom Scrollbar */
.help-scroll::-webkit-scrollbar,
.event-log::-webkit-scrollbar {
    width: 6px;
}

/* Toggle Buttons */
.toggle-group {
    display: flex;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.25rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.toggle-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: 0.5rem;
    border-radius: 6px;
    color: var(--color-muted);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.toggle-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-text);
}

.toggle-btn.active {
    background: var(--color-accent);
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* .icon-sm was missing or overwritten */
.icon-sm {
    width: 64px;
    height: 64px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.help-scroll::-webkit-scrollbar-thumb,
.event-log::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

/* Game Over Modal Specifics */
.game-over-content {
    text-align: center;
    align-items: center;
    gap: 2rem;
    max-width: 400px;
}

#winner-announce {
    font-size: 3rem;
    color: var(--color-accent);
    text-shadow: 0 0 20px currentColor;
    margin-bottom: 1rem;
}

#game-over-stats {
    width: 100%;
    margin-bottom: 1rem;
}

.shop-item.selected {
    background: var(--color-accent);
    color: #fff;
    border-color: var(--color-accent);
    box-shadow: 0 0 10px var(--color-accent);
}

.shop-item.selected i {
    color: #fff;
}

.shop-ibutton:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.text-btn {
    background: none;
    border: none;
    color: var(--color-muted);
    cursor: pointer;
    text-decoration: underline;
    transition: all 0.2s;
    padding: 0.5rem;
}

.text-btn:hover {
    color: var(--color-text);
}

.text-btn.discrete {
    text-decoration: none;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
}

.text-btn.discrete:hover {
    color: #ef4444;
    /* Red on hover */
    opacity: 1 !important;
}

.shop-item.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    filter: grayscale(1);
}

#cursor-follower {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    display: none;
    /* hidden by default */
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

/* Modal Tabs */
.modal-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--color-muted);
    font-size: 1rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    border-radius: 4px;
}

.tab-btn.active {
    color: var(--color-text);
    background: rgba(255, 255, 255, 0.1);
}

.tab-content {
    display: none;
}

/* Setup Tabs */
.setup-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.setup-tab {
    background: transparent;
    border: none;
    color: var(--color-muted);
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 2px solid transparent;
}

.setup-tab:hover {
    color: var(--color-text);
}

.setup-tab.active {
    border-radius: 12px 12px 0px 0px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    border-bottom-color: white;
}

.setup-tab .fas {
    margin-right: 4px;
}

.setup-panel {
    display: none;
    animation: fadeIn 0.3s ease;
}

.setup-panel.active {
    display: block;
}

/* Inline Map Grid */
.map-grid-inline {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.8rem;
    max-height: 200px;
    overflow-y: auto;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
}

.map-card-inline {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    padding: 0.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
}

.map-card-inline:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.map-card-inline.active {
    background: rgba(var(--color-accent-rgb), 0.2);
    border-color: var(--color-accent);
    box-shadow: 0 0 10px rgba(var(--color-accent-rgb), 0.3);
}

.map-card-inline i {
    font-size: 1.2rem;
    color: var(--color-accent);
}

.map-card-inline span {
    font-size: 0.8rem;
    color: var(--color-text);
}

/* Adjust Campaign Grid for Setup Panel */
.setup-panel .campaign-grid {
    max-height: 50vh;
    /* Limit height inside setup card */
    overflow-y: auto;
    padding: 0.5rem;
}

/* Campaign Grid */
.campaign-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.8rem;
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.level-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
    text-align: center;
}

.level-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.level-card.completed {
    border-color: #10B981;
    /* Green border for completed */
    background: rgba(16, 185, 129, 0.1);
}

.level-card.active {
    border-color: var(--color-accent);
    background: var(--color-accent);
    transform: scale(1.05);
}

.level-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.3));
}

.level-name {
    font-size: 0.7rem;
    color: var(--color-muted);
    /* Allow wrapping for 2 lines */
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.2em;
    /* Ensure consistent height for 2 lines */
    line-height: 1.1;
    width: 100%;
    margin-top: 5px;
    text-align: center;
    /* Remove conflicting flex display */
}

@keyframes pulse-green {
    0% {
        box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(74, 222, 128, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(74, 222, 128, 0);
    }
}

.suggest-end-turn {
    animation: pulse-green 2s infinite;
    border-color: var(--p4-color) !important;
    background: var(--p4-color);
}

/* Map Selection */
.map-modal-content {
    max-width: 800px;
    width: 90%;
}

.map-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
    padding: 0.5rem;
}

.map-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.map-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    border-color: var(--color-accent);
}

.map-card.active {
    background: rgba(74, 222, 128, 0.1);
    border-color: #4ade80;
    box-shadow: 0 4px 20px rgba(74, 222, 128, 0.2);
}

.map-card i {
    font-size: 2.5rem;
    color: rgba(255, 255, 255, 0.7);
}

.map-card.active i {
    color: #4ade80;
}

.map-card h4 {
    margin: 0;
    font-size: 1.1rem;
}

.map-card p {
    margin: 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

.text-danger {
    color: #ef4444 !important;
    text-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
    font-weight: 800;
}

/* Coin Textures */
.coin-icon {
    width: 14px;
    height: 14px;
    vertical-align: middle;
    margin-left: 4px;
    margin-bottom: 2px;
}

/* Shop Unit Icons */
.shop-unit-icon {
    width: 32px;
    height: auto;
    margin-bottom: 4px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Territory Stat Icons */
.stat-icon {
    width: 14px;
    height: 14px;
    vertical-align: middle;
    margin-left: 4px;
    margin-bottom: 2px;
}

/* Shop Tooltip */
.shop-tooltip {
    position: fixed;
    z-index: 10000;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    padding: 12px;
    border-radius: 8px;
    min-width: 200px;
    /* Allow expansion */
    max-width: 300px;
    pointer-events: none;
    color: var(--text-primary);
    box-shadow: var(--glass-shadow);
    transform: translate(15px, 15px);
}

.shop-tooltip h4 {
    margin: 0 0 4px 0;
    color: var(--color-accent);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.shop-tooltip p {
    font-size: 0.8rem;
    color: #cbd5e1;
    line-height: 1.3;
    margin-bottom: 8px;
}

.shop-tooltip .stats {
    display: flex;
    flex-direction: column;
    /* Stack stats vertically */
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 6px;
}

.shop-tooltip .stat-row {
    display: flex;
    align-items: center;
    gap: 4px;
}

.shop-tooltip .cost {
    color: #fbbf24;
}

.shop-tooltip .wage {
    color: #f87171;
}

/* Toast Notification */
.toast {
    position: fixed;
    top: 80px;
    /* Below the header */
    left: 50%;
    transform: translateX(-50%);
    background: rgba(20, 20, 30, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    color: #fff;
    padding: 12px 24px;
    border-radius: 999px;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    pointer-events: none;
    /* Don't block clicks */
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    z-index: 2000;
    transform: translateX(-50%) translateY(-20px);
}

.toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}