/* ===========================================
   DOPE WARS 2026 - Windows XP Dark Theme
   =========================================== */

/* CSS Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Using system fonts - Tahoma is available on Windows */

:root {
    /* Dark XP Color Palette */
    --bg-dark: #1a1a2e;
    --bg-darker: #0f0f1a;
    --bg-panel: #16213e;
    --bg-window: #1f1f3a;

    /* XP Blue accents (muted for dark mode) */
    --xp-blue: #1e3a5f;
    --xp-blue-light: #2d5a87;
    --xp-blue-dark: #0d2137;
    --xp-title-gradient-1: #1e3a5f;
    --xp-title-gradient-2: #0d2137;

    /* Text colors */
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0a0;
    --text-muted: #606060;

    /* Status colors */
    --color-cash: #4ade80;
    --color-debt: #f87171;
    --color-health: #60a5fa;
    --color-warning: #fbbf24;

    /* Borders */
    --border-light: #3a3a5a;
    --border-dark: #0a0a15;

    /* XP Button colors */
    --btn-bg: #2a2a4a;
    --btn-hover: #3a3a6a;
    --btn-active: #1a1a3a;
    --btn-border-light: #4a4a7a;
    --btn-border-dark: #1a1a2a;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-darker);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===========================================
   XP Window Styles
   =========================================== */

.xp-window {
    background: var(--bg-window);
    border: 1px solid var(--border-light);
    border-radius: 8px 8px 4px 4px;
    box-shadow:
        0 0 0 1px var(--border-dark),
        2px 2px 10px rgba(0, 0, 0, 0.5),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.xp-title-bar {
    background: linear-gradient(180deg, var(--xp-title-gradient-1) 0%, var(--xp-title-gradient-2) 100%);
    padding: 6px 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-dark);
    user-select: none;
}

.xp-title {
    color: #fff;
    font-size: 13px;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.xp-controls {
    display: flex;
    gap: 2px;
}

.xp-btn {
    width: 21px;
    height: 21px;
    border: 1px solid var(--border-light);
    background: linear-gradient(180deg, #3a3a5a 0%, #2a2a4a 100%);
    color: var(--text-primary);
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.xp-btn:hover {
    background: linear-gradient(180deg, #4a4a6a 0%, #3a3a5a 100%);
}

.xp-btn.close:hover {
    background: linear-gradient(180deg, #8b3a3a 0%, #6b2a2a 100%);
}

.xp-content {
    padding: 15px;
}

/* ===========================================
   XP Buttons
   =========================================== */

.xp-button {
    background: linear-gradient(180deg, var(--btn-bg) 0%, var(--btn-active) 100%);
    border: 1px solid var(--btn-border-dark);
    border-top-color: var(--btn-border-light);
    border-left-color: var(--btn-border-light);
    color: var(--text-primary);
    padding: 8px 20px;
    font-size: 13px;
    cursor: pointer;
    border-radius: 3px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 1px 3px rgba(0, 0, 0, 0.3);
    transition: all 0.1s ease;
}

.xp-button:hover {
    background: linear-gradient(180deg, var(--btn-hover) 0%, var(--btn-bg) 100%);
}

.xp-button:active {
    background: linear-gradient(180deg, var(--btn-active) 0%, var(--btn-bg) 100%);
    border-top-color: var(--btn-border-dark);
    border-left-color: var(--btn-border-dark);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.xp-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Small action buttons */
.btn-small {
    padding: 4px 10px;
    font-size: 11px;
}

.btn-buy {
    background: linear-gradient(180deg, #2a4a2a 0%, #1a3a1a 100%);
    border-color: #1a2a1a;
}

.btn-buy:hover {
    background: linear-gradient(180deg, #3a5a3a 0%, #2a4a2a 100%);
}

.btn-sell {
    background: linear-gradient(180deg, #4a2a2a 0%, #3a1a1a 100%);
    border-color: #2a1a1a;
}

.btn-sell:hover {
    background: linear-gradient(180deg, #5a3a3a 0%, #4a2a2a 100%);
}

/* ===========================================
   Screen Management
   =========================================== */

.screen {
    display: none;
    min-height: 100vh;
    padding: 20px;
}

.screen.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

#game-screen.active {
    display: block;
    align-items: stretch;
}

/* ===========================================
   Main Menu
   =========================================== */

.main-menu-window {
    width: 400px;
}

.menu-content {
    text-align: center;
}

.game-title {
    font-size: 48px;
    font-weight: bold;
    color: var(--text-primary);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 5px;
    letter-spacing: 4px;
}

.game-subtitle {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 30px;
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.menu-buttons .xp-button {
    width: 100%;
    padding: 12px;
    font-size: 14px;
}

/* ===========================================
   New Game Screen
   =========================================== */

#newgame-screen .xp-window {
    width: 600px;
    max-width: 95vw;
}

#newgame-screen h2 {
    text-align: center;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.difficulty-options {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.difficulty-card {
    flex: 1;
    background: var(--bg-panel);
    border: 2px solid var(--border-light);
    border-radius: 5px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.difficulty-card:hover {
    border-color: var(--xp-blue-light);
    background: var(--xp-blue-dark);
}

.difficulty-card h3 {
    text-align: center;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.difficulty-card ul {
    list-style: none;
    font-size: 12px;
    color: var(--text-secondary);
}

.difficulty-card li {
    padding: 3px 0;
}

.difficulty-card li::before {
    content: "• ";
    color: var(--xp-blue-light);
}

.endless-option {
    margin-bottom: 15px;
}

.endless-btn {
    width: 100%;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.endless-desc {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 5px;
}

.back-btn {
    width: 100%;
}

/* ===========================================
   Load Game Screen
   =========================================== */

#load-screen .xp-window {
    width: 500px;
    max-width: 95vw;
}

.save-slots {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.save-slot {
    background: var(--bg-panel);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.save-slot:hover {
    border-color: var(--xp-blue-light);
}

.save-slot.empty {
    opacity: 0.5;
    cursor: default;
}

.save-slot.empty:hover {
    border-color: var(--border-light);
}

.save-info {
    display: flex;
    flex-direction: column;
}

.save-name {
    font-weight: bold;
    color: var(--text-primary);
}

.save-details {
    font-size: 11px;
    color: var(--text-secondary);
}

.save-actions {
    display: flex;
    gap: 5px;
}

/* ===========================================
   Leaderboards
   =========================================== */

#leaderboard-screen .xp-window {
    width: 500px;
    max-width: 95vw;
}

.leaderboard-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 15px;
}

.tab-btn {
    flex: 1;
    background: var(--bg-panel);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    padding: 8px;
    cursor: pointer;
    border-radius: 4px 4px 0 0;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    background: var(--btn-hover);
}

.tab-btn.active {
    background: var(--xp-blue);
    color: var(--text-primary);
    border-color: var(--xp-blue-light);
}

.leaderboard-content {
    background: var(--bg-panel);
    border: 1px solid var(--border-light);
    border-radius: 0 0 4px 4px;
    padding: 15px;
    margin-bottom: 15px;
    min-height: 200px;
}

.leaderboard-entry {
    display: flex;
    justify-content: space-between;
    padding: 8px 10px;
    border-bottom: 1px solid var(--border-dark);
}

.leaderboard-entry:last-child {
    border-bottom: none;
}

.leaderboard-entry.top-3 {
    background: rgba(30, 58, 95, 0.3);
}

.lb-rank {
    width: 30px;
    font-weight: bold;
    color: var(--xp-blue-light);
}

.lb-name {
    flex: 1;
    color: var(--text-primary);
}

.lb-score {
    color: var(--color-cash);
    font-weight: bold;
}

.no-entries {
    text-align: center;
    color: var(--text-muted);
    padding: 40px;
}

/* ===========================================
   Help Screen
   =========================================== */

#help-screen .xp-window {
    width: 550px;
    max-width: 95vw;
    max-height: 80vh;
}

.help-content {
    max-height: 60vh;
    overflow-y: auto;
}

.help-content h2 {
    color: var(--text-primary);
    margin-bottom: 10px;
}

.help-content h3 {
    color: var(--xp-blue-light);
    margin-top: 15px;
    margin-bottom: 8px;
}

.help-content p {
    color: var(--text-secondary);
    margin-bottom: 10px;
    line-height: 1.5;
}

.help-content ul {
    margin-left: 20px;
    margin-bottom: 10px;
}

.help-content li {
    color: var(--text-secondary);
    margin-bottom: 5px;
    line-height: 1.4;
}

/* ===========================================
   Game Screen Layout
   =========================================== */

.game-layout {
    display: grid;
    grid-template-columns: 200px 1fr 220px;
    grid-template-rows: 1fr;
    gap: 15px;
    padding: 15px;
    height: calc(100vh - 30px);
    overflow: hidden;
}

/* Left Column: Stats + Inventory */
.left-column {
    display: flex;
    flex-direction: column;
    gap: 15px;
    height: 100%;
    overflow: hidden;
}

/* Stats Window */
.stats-window {
    height: fit-content;
}

.stats-content {
    padding: 10px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid var(--border-dark);
}

.stat-row:last-child {
    border-bottom: none;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 12px;
}

.stat-value {
    font-weight: bold;
    font-size: 12px;
}

.stat-value.cash {
    color: var(--color-cash);
}

.stat-value.debt {
    color: var(--color-debt);
}

.stat-value.health {
    color: var(--color-health);
}

/* Main Game Area (Center) */
.main-game-area {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.market-window {
    flex: 1;
}

.market-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.market-table th {
    background: var(--bg-panel);
    color: var(--text-secondary);
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
    font-weight: normal;
}

.market-table td {
    padding: 8px;
    border-bottom: 1px solid var(--border-dark);
    color: var(--text-primary);
}

.market-table tr:hover {
    background: rgba(30, 58, 95, 0.2);
}

.price-up {
    color: #4ade80;
}

.price-down {
    color: #f87171;
}

.price-neutral {
    color: #fbbf24;
}

.trend-indicator {
    font-size: 12px;
    font-weight: bold;
}

/* Travel Window */
.travel-window {
    flex: 1;
}

.travel-window .xp-content {
    padding: 10px;
}

.travel-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.travel-btn {
    padding: 12px 8px;
    font-size: 11px;
}

.travel-btn.current {
    background: var(--xp-blue);
    cursor: default;
}

/* Event Log */
.log-window {
    max-height: 150px;
}

.event-log {
    max-height: 100px;
    overflow-y: auto;
    font-size: 12px;
}

.log-entry {
    padding: 4px 0;
    border-bottom: 1px solid var(--border-dark);
    color: var(--text-secondary);
}

.log-entry:last-child {
    border-bottom: none;
}

.log-entry.important {
    color: var(--color-warning);
}

.log-entry.danger {
    color: var(--color-debt);
}

.log-entry.success {
    color: var(--color-cash);
}

/* Right Column: Actions + Travel */
.right-column {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Inventory Window (now in left column) */
.inventory-window {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.inventory-window .xp-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow-y: auto;
    padding: 10px;
}

.inventory-list {
    flex: 1;
}

.inventory-item {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid var(--border-dark);
    font-size: 12px;
}

.inventory-item:last-child {
    border-bottom: none;
}

.inv-name {
    color: var(--text-primary);
}

.inv-qty {
    color: var(--text-secondary);
}

.actions-window .xp-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.action-btn {
    width: 100%;
    padding: 8px;
    font-size: 12px;
}

/* ===========================================
   Modal
   =========================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-overlay.hidden {
    display: none;
}

.modal-window {
    min-width: 350px;
    max-width: 90vw;
    max-height: 80vh;
    animation: modalSlide 0.2s ease;
}

@keyframes modalSlide {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-content {
    max-height: 60vh;
    overflow-y: auto;
}

/* Modal specific styles */
.modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    justify-content: flex-end;
}

.modal-input {
    width: 100%;
    padding: 8px;
    margin: 10px 0;
    background: var(--bg-darker);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    border-radius: 3px;
    font-size: 14px;
}

.modal-input:focus {
    outline: none;
    border-color: var(--xp-blue-light);
}

/* Bank modal */
.bank-balance {
    background: var(--bg-panel);
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 15px;
    text-align: center;
}

.bank-amount {
    font-size: 24px;
    font-weight: bold;
    color: var(--color-cash);
}

.bank-actions {
    display: flex;
    gap: 10px;
}

.bank-actions .xp-button {
    flex: 1;
}

/* Combat modal */
.combat-info {
    background: var(--bg-panel);
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.enemy-name {
    font-size: 18px;
    font-weight: bold;
    color: var(--color-debt);
    margin-bottom: 10px;
}

.combat-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Shop modal */
.shop-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.shop-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-panel);
    padding: 10px;
    border-radius: 4px;
    border: 1px solid var(--border-dark);
}

.shop-item-info h4 {
    color: var(--text-primary);
    margin-bottom: 3px;
}

.shop-item-info p {
    font-size: 11px;
    color: var(--text-secondary);
}

.shop-item-price {
    color: var(--color-warning);
    font-weight: bold;
}

/* Price history chart */
.price-chart {
    background: var(--bg-panel);
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.chart-container {
    height: 150px;
    display: flex;
    align-items: flex-end;
    gap: 2px;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 5px;
    position: relative;
}

.chart-bar {
    flex: 1;
    background: var(--xp-blue);
    min-height: 5px;
    border-radius: 2px 2px 0 0;
    transition: height 0.3s ease;
}

.chart-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    font-size: 10px;
    color: var(--text-muted);
}

.product-select {
    width: 100%;
    padding: 8px;
    background: var(--bg-darker);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    border-radius: 3px;
    margin-bottom: 15px;
}

/* Line chart (Computer upgrade) */
.line-chart-container {
    height: 180px;
    position: relative;
    border: 1px solid var(--border-dark);
    border-radius: 4px;
    background: var(--bg-darker);
    padding: 10px;
    margin-bottom: 10px;
}

.line-chart-svg {
    width: 100%;
    height: 100%;
}

.chart-line {
    fill: none;
    stroke: #4ade80;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.chart-area {
    fill: url(#chartGradient);
    opacity: 0.3;
}

.chart-point {
    fill: #4ade80;
    stroke: var(--bg-darker);
    stroke-width: 2;
}

.chart-point:hover {
    r: 6;
    cursor: pointer;
}

.chart-grid-line {
    stroke: var(--border-dark);
    stroke-width: 1;
    stroke-dasharray: 4, 4;
}

.chart-axis-label {
    fill: var(--text-muted);
    font-size: 10px;
}

.chart-tooltip {
    position: absolute;
    background: var(--bg-window);
    border: 1px solid var(--border-light);
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 11px;
    pointer-events: none;
    z-index: 10;
}

.no-computer-message {
    text-align: center;
    padding: 30px;
    color: var(--text-muted);
}

.no-computer-message p {
    margin-bottom: 10px;
}

/* Pager message styles */
.pager-tip {
    background: linear-gradient(135deg, #1a2a1a 0%, #0d1a0d 100%);
    border: 1px solid #2a4a2a;
    border-left: 4px solid #4ade80;
    padding: 12px 15px;
    border-radius: 4px;
    margin: 10px 0;
}

.pager-tip.tip-high {
    background: linear-gradient(135deg, #2a1a1a 0%, #1a0d0d 100%);
    border-color: #4a2a2a;
    border-left-color: #f87171;
}

.pager-tip-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
    font-weight: bold;
    color: #4ade80;
}

.pager-tip.tip-high .pager-tip-header {
    color: #f87171;
}

/* Game Over screen */
.game-over-content {
    text-align: center;
}

.game-over-title {
    font-size: 32px;
    margin-bottom: 10px;
}

.game-over-title.win {
    color: var(--color-cash);
}

.game-over-title.lose {
    color: var(--color-debt);
}

.final-stats {
    background: var(--bg-panel);
    padding: 15px;
    border-radius: 4px;
    margin: 20px 0;
    text-align: left;
}

.final-stat {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
}

.name-input-section {
    margin: 20px 0;
}

/* ===========================================
   Scrollbar Styling
   =========================================== */

::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
    background: var(--btn-bg);
    border-radius: 3px;
    border: 2px solid var(--bg-darker);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--btn-hover);
}

/* ===========================================
   Responsive Design
   =========================================== */

@media (max-width: 900px) {
    .game-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .left-column,
    .right-column {
        display: contents;
    }

    .stats-content {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }

    .stat-row {
        flex-direction: column;
        text-align: center;
        border-bottom: none;
    }

    .travel-buttons {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .travel-buttons .travel-btn {
        flex: 1 1 30%;
    }

    .difficulty-options {
        flex-direction: column;
    }
}

/* ===========================================
   Loan Shark Selection
   =========================================== */

.loan-shark-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    max-height: 60vh;
    overflow-y: auto;
    padding: 5px;
}

.loan-shark-card {
    background: var(--bg-panel);
    border: 2px solid var(--border-light);
    border-radius: 6px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.loan-shark-card:hover {
    border-color: var(--xp-blue-light);
    transform: translateY(-2px);
}

.loan-shark-card.recommended {
    border-color: #4ade80;
}

.recommended-badge {
    position: absolute;
    top: -8px;
    right: 10px;
    background: #4ade80;
    color: #000;
    font-size: 9px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 3px;
}

.shark-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.shark-portrait {
    font-size: 28px;
}

.shark-portrait-large {
    font-size: 48px;
    margin-right: 15px;
}

.shark-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 14px;
}

.shark-desc {
    font-size: 11px;
    color: var(--text-secondary);
    margin: 0;
}

.shark-rate {
    display: flex;
    justify-content: space-between;
    padding: 8px;
    background: var(--bg-darker);
    border-radius: 4px;
    margin-bottom: 10px;
    font-size: 12px;
}

.shark-rate .rate-high {
    color: #f87171;
}

.shark-rate .rate-low {
    color: #4ade80;
}

.shark-details ul {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 11px;
}

.shark-details li {
    padding: 2px 0;
}

.shark-details li.perk {
    color: #4ade80;
}

.shark-details li.drawback {
    color: #f87171;
}

/* Loan Shark Modal */
.shark-info-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.shark-warning {
    background: rgba(248, 113, 113, 0.2);
    border: 1px solid #f87171;
    border-radius: 4px;
    padding: 8px 12px;
    color: #f87171;
    font-size: 12px;
    margin-bottom: 15px;
}

.loan-shark-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.loan-action-section {
    background: var(--bg-panel);
    border-radius: 4px;
    padding: 12px;
}

.loan-action-section h4 {
    margin: 0 0 8px 0;
    color: var(--text-primary);
    font-size: 13px;
}

.loan-action-section p {
    margin: 0 0 8px 0;
    font-size: 12px;
    color: var(--text-secondary);
}

.input-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.input-row .modal-input {
    flex: 1;
    margin: 0;
}

/* ===========================================
   Hover Chart (Computer Feature)
   =========================================== */

.hover-chart {
    position: fixed;
    z-index: 2000;
    background: var(--bg-window);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    width: 220px;
    pointer-events: none;
}

.hover-chart.hidden {
    display: none;
}

.hover-chart-header {
    background: linear-gradient(180deg, var(--xp-title-gradient-1) 0%, var(--xp-title-gradient-2) 100%);
    padding: 6px 10px;
    border-radius: 5px 5px 0 0;
}

#hover-chart-title {
    color: #fff;
    font-size: 12px;
    font-weight: bold;
}

.hover-chart-body {
    padding: 10px;
}

#hover-chart-svg {
    width: 100%;
    height: 80px;
    display: block;
    margin-bottom: 8px;
}

#hover-chart-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    font-size: 11px;
}

.hover-stat {
    display: flex;
    justify-content: space-between;
}

.hover-stat span {
    color: var(--text-secondary);
}

/* Market table hover indicator */
.market-table tr.has-chart {
    cursor: pointer;
}

.market-table tr.has-chart:hover {
    background: rgba(30, 58, 95, 0.3);
}

.chart-icon {
    font-size: 10px;
    opacity: 0.6;
    margin-left: 4px;
}

/* ===========================================
   Additional Utility Classes
   =========================================== */

.hidden {
    display: none !important;
}

/* ===========================================
   Settings Screen
   =========================================== */

.settings-content {
    max-height: 70vh;
    overflow-y: auto;
}

.settings-section {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 15px;
}

.settings-section h3 {
    color: var(--xp-blue-light);
    margin-bottom: 12px;
    font-size: 14px;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 8px;
}

.setting-item {
    margin-bottom: 10px;
}

.setting-item label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 13px;
}

.setting-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

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

.stats-grid .stat-item {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid var(--border-dark);
}

.stats-grid .stat-label {
    color: var(--text-secondary);
    font-size: 12px;
}

.stats-grid .stat-value {
    color: var(--text-primary);
    font-weight: bold;
    font-size: 12px;
}

.settings-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.settings-buttons .xp-button {
    flex: 1;
    min-width: 100px;
}

/* ===========================================
   Cheat Menu
   =========================================== */

.cheat-menu {
    max-height: 60vh;
    overflow-y: auto;
}

.cheat-header {
    background: linear-gradient(180deg, rgba(74, 222, 128, 0.2) 0%, rgba(74, 222, 128, 0.05) 100%);
    border: 1px solid #4ade80;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 15px;
}

.cheat-section {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 10px;
}

.cheat-section h4 {
    color: var(--color-warning);
    margin-bottom: 10px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cheat-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.cheat-buttons .xp-button {
    font-size: 11px;
    padding: 4px 8px;
}

/* God Mode Indicator */
.god-mode-active {
    color: #fbbf24 !important;
    text-shadow: 0 0 10px #fbbf24;
}
