:root {
    --bg-color: #050505;
    --grid-color: #1a1a1a;
    --primary-neon: #00ff41;
    --secondary-neon: #d600ff;
    --text-color: #e0e0e0;
    --card-bg: rgba(20, 20, 20, 0.8);
    --header-bg: rgba(5, 5, 5, 0.9);
    --warning: #ff6b6b;
    --success: #4ade80;
    --gold: #ffd700;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Roboto Mono', monospace;
    min-height: 100vh;
}

/* Header */
header {
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--grid-color);
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    color: var(--primary-neon);
    text-shadow: 0 0 10px var(--primary-neon);
    text-decoration: none;
}

.header-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.header-btn {
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid var(--primary-neon);
    color: var(--primary-neon);
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
}

.header-btn:hover {
    background: var(--primary-neon);
    color: #000;
}

/* Main Game Container */
.game-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem;
}

/* Business Banner */
.business-banner {
    background: linear-gradient(135deg, rgba(0,255,65,0.1), rgba(0,212,255,0.1));
    border: 2px solid var(--primary-neon);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    margin-bottom: 1rem;
}

.business-name {
    font-size: 1.8rem;
    font-family: 'Orbitron', sans-serif;
    color: var(--primary-neon);
    text-shadow: 0 0 10px var(--primary-neon);
}

.business-info {
    color: #888;
    font-size: 0.9rem;
    margin-top: 0.3rem;
}

/* HUD Stats */
.game-hud {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.stat-box {
    background: var(--card-bg);
    border: 1px solid var(--grid-color);
    border-radius: 8px;
    padding: 0.75rem;
    text-align: center;
}

.stat-value {
    font-size: 1.4rem;
    font-family: 'Orbitron', sans-serif;
    color: var(--primary-neon);
}

.stat-label {
    font-size: 0.7rem;
    color: #888;
    text-transform: uppercase;
    margin-top: 0.25rem;
}

.stat-sub {
    font-size: 0.65rem;
    color: #666;
    margin-top: 0.2rem;
}

/* Time Controls */
.time-controls {
    display: flex;
    gap: 0.3rem;
    justify-content: center;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.speed-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
    background: #333;
    color: #fff;
    border: 1px solid #555;
    border-radius: 3px;
    cursor: pointer;
    font-family: 'Orbitron', sans-serif;
    transition: all 0.2s;
}

.speed-btn.active {
    background: var(--primary-neon);
    color: #000;
    border-color: var(--primary-neon);
}

.speed-btn:hover {
    border-color: #fff;
}

/* Quality Tier Selection */
.quality-container {
    background: rgba(0,0,0,0.8);
    border: 2px solid var(--gold);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.quality-title {
    text-align: center;
    color: var(--gold);
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.quality-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.quality-btn {
    flex: 1;
    max-width: 150px;
    padding: 0.5rem;
    border: 2px solid;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    text-align: center;
    transition: all 0.3s;
    background: transparent;
}

.quality-btn[data-quality="cheap"] {
    border-color: var(--warning);
    color: var(--warning);
}

.quality-btn[data-quality="motr"] {
    border-color: var(--gold);
    color: var(--gold);
}

.quality-btn[data-quality="premium"] {
    border-color: var(--primary-neon);
    color: var(--primary-neon);
}

.quality-btn.active {
    background: currentColor;
    color: #000;
}

/* Pricing Slider */
.pricing-container {
    background: rgba(0,0,0,0.8);
    border: 2px solid var(--primary-neon);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.pricing-title {
    text-align: center;
    color: var(--primary-neon);
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.pricing-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.pricing-label {
    font-size: 0.75rem;
    text-align: center;
    min-width: 80px;
}

#pricing-slider {
    flex: 1;
    height: 8px;
    background: linear-gradient(to right, var(--warning), var(--gold), var(--primary-neon));
    border-radius: 5px;
    -webkit-appearance: none;
    appearance: none;
}

#pricing-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(255,255,255,0.5);
}

.pricing-display {
    text-align: center;
    margin-top: 0.5rem;
}

#pricing-value {
    color: var(--gold);
    font-weight: bold;
    font-size: 1.2rem;
}

/* Notifications */
.notification {
    position: fixed;
    top: 80px;
    right: 20px;
    padding: 1rem 1.5rem;
    background: rgba(0,0,0,0.9);
    border: 2px solid var(--primary-neon);
    border-radius: 8px;
    color: var(--primary-neon);
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    z-index: 9999;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    max-width: 350px;
}

.notification.show {
    transform: translateX(0);
}

.notification.error {
    border-color: var(--warning);
    color: var(--warning);
}

.notification.success {
    border-color: var(--success);
    color: var(--success);
}

/* Upgrade Grid */
.upgrades-section {
    margin-bottom: 1rem;
}

.upgrades-title {
    color: var(--primary-neon);
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid var(--grid-color);
}

.upgrade-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
}

.upgrade-btn {
    background: var(--card-bg);
    border: 1px solid var(--grid-color);
    border-radius: 8px;
    padding: 0.75rem;
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
}

.upgrade-btn:hover {
    border-color: var(--primary-neon);
    box-shadow: 0 0 10px rgba(0,255,65,0.2);
}

.upgrade-btn.owned {
    border-color: var(--success);
    opacity: 0.7;
}

.upgrade-btn.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.upgrade-btn.essential {
    border-color: var(--gold);
    background: rgba(255,215,0,0.1);
}

.upgrade-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85rem;
    color: var(--primary-neon);
    margin-bottom: 0.25rem;
}

.upgrade-cost {
    font-size: 0.75rem;
    color: var(--gold);
}

.upgrade-desc {
    font-size: 0.65rem;
    color: #888;
    margin-top: 0.25rem;
}

/* Category Tabs */
.category-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.category-tab {
    padding: 0.5rem 1rem;
    background: #222;
    border: 1px solid #444;
    color: #888;
    cursor: pointer;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.category-tab.active {
    background: var(--primary-neon);
    color: #000;
    border-color: var(--primary-neon);
}

.category-tab:hover {
    border-color: #fff;
    color: #fff;
}

/* Event Log */
.event-log {
    background: var(--card-bg);
    border: 1px solid var(--grid-color);
    border-radius: 8px;
    padding: 0.75rem;
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.event-log-title {
    color: var(--primary-neon);
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.event-item {
    font-size: 0.75rem;
    color: #aaa;
    padding: 0.25rem 0;
    border-bottom: 1px solid #222;
}

.event-item:last-child {
    border-bottom: none;
}

/* Leaderboard Panel */
.leaderboard-panel {
    background: var(--card-bg);
    border: 1px solid var(--grid-color);
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 1rem;
}

.leaderboard-title {
    color: var(--gold);
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.leaderboard-entry {
    display: flex;
    justify-content: space-between;
    padding: 0.3rem 0;
    font-size: 0.75rem;
    border-bottom: 1px solid #222;
}

.leaderboard-entry:last-child {
    border-bottom: none;
}

.leaderboard-rank {
    color: var(--gold);
    min-width: 25px;
}

.leaderboard-name {
    flex: 1;
    color: #ccc;
}

.leaderboard-score {
    color: var(--primary-neon);
}

/* Start Game Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.modal {
    background: #111;
    border: 2px solid var(--primary-neon);
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    color: var(--primary-neon);
    text-align: center;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    color: #888;
    font-size: 0.8rem;
    margin-bottom: 0.3rem;
}

.form-input, .form-select {
    width: 100%;
    padding: 0.75rem;
    background: #222;
    border: 1px solid #444;
    color: #fff;
    border-radius: 5px;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.9rem;
}

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: var(--primary-neon);
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    background: var(--primary-neon);
    color: #000;
    border: none;
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s;
    margin-top: 1rem;
}

.submit-btn:hover {
    box-shadow: 0 0 20px var(--primary-neon);
}

/* Game Over Modal */
.game-over-modal .modal {
    text-align: center;
}

.final-score {
    font-size: 3rem;
    font-family: 'Orbitron', sans-serif;
    color: var(--gold);
    margin: 1rem 0;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 2rem;
    color: var(--primary-neon);
}

.loading::after {
    content: '';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* Responsive */
@media (max-width: 768px) {
    .game-hud {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .upgrade-grid {
        grid-template-columns: 1fr;
    }
    
    .quality-buttons {
        flex-direction: column;
    }
    
    .quality-btn {
        max-width: 100%;
    }
}

/* Market Ticker */
.event-log {
    background: #000;
    color: #0f0;
    font-family: 'Courier New', monospace;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #333;
    height: 150px;
    overflow-y: auto;
    font-size: 0.9rem;
    margin-bottom: 2rem;
    box-shadow: inset 0 0 10px rgba(0, 255, 0, 0.1);
}

.event-item {
    margin-bottom: 0.5rem;
    border-bottom: 1px solid #111;
    padding-bottom: 0.2rem;
}

.event-time {
    color: #666;
    margin-right: 0.5rem;
}

.event-type-news {
    color: #0ff;
    font-weight: bold;
}

.event-type-alert {
    color: #f00;
    font-weight: bold;
}

/* Modal Enhancements */
.modal-title {
    color: var(--gold);
    text-align: center;
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: #aaa;
}

.form-input {
    width: 100%;
    padding: 0.8rem;
    background: #222;
    border: 1px solid #444;
    color: #fff;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.form-input:focus {
    border-color: var(--gold);
    outline: none;
}

/* Funding Options Grid */
.funding-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    margin-bottom: 1rem;
}

.funding-card {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.funding-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    border-color: #555;
}

.funding-card.selected {
    border-color: var(--primary-neon);
    background: rgba(0, 255, 65, 0.05);
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.2);
}

.fund-title {
    font-size: 0.7rem;
    font-weight: bold;
    margin-bottom: 5px;
    text-transform: uppercase;
    font-family: 'Orbitron', sans-serif;
}

.fund-amount {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 5px;
    font-family: 'Orbitron', sans-serif;
}

.fund-desc {
    font-size: 0.65rem;
    color: #888;
    line-height: 1.2;
}

/* VC Browser Styles */
.vc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
    margin-top: 1rem;
}

.vc-card {
    background: #111;
    border: 1px solid #333;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s;
}

.vc-card:hover {
    transform: translateY(-3px);
    border-color: #666;
}

.vc-header {
    padding: 10px 15px;
    background: #1a1a1a;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vc-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    color: #fff;
}

.vc-type {
    font-size: 0.6rem;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: bold;
}

.vc-body {
    padding: 15px;
}

.vc-stat {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.85rem;
    border-bottom: 1px solid #222;
    padding-bottom: 4px;
}

.vc-stat .label {
    color: #666;
}

.vc-stat .value {
    font-family: 'Orbitron', sans-serif;
    font-weight: bold;
}

.vc-desc {
    font-size: 0.75rem;
    color: #888;
    margin-top: 10px;
    font-style: italic;
    line-height: 1.4;
}

.vc-select-btn {
    width: 100%;
    padding: 10px;
    border: none;
    color: #000;
    font-weight: bold;
    font-family: 'Orbitron', sans-serif;
    cursor: pointer;
    transition: filter 0.2s;
}

.vc-select-btn:hover {
    filter: brightness(1.2);
}
