* {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background-color: #1a1a1a;
            color: #f0f0f0;
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            overflow: hidden;
            display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
        }

        #gameContainer {
            position: relative;
            width: auto;
            max-width: 900px;
            height: auto;
            max-height: 700px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
        }

#characterSelect {
    background-color: #2a2a2a;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    text-align: center;
    
    width: 90%;           
    min-width: 850px;  
    max-width: 1200px; 

    height: auto;
    min-height: 600px; 
    max-height: 90vh; 
    
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

        #characterSelect h1 {
            margin-bottom: 20px;
            color: #8f0000;
            text-shadow: 2px 2px 4px rgb(173, 173, 173);
        }

        .tab-container {
            margin-bottom: 20px;
        }

        .tab-buttons {
            display: flex;
            justify-content: center;
            gap: 10px;
            margin-bottom: 20px;
        }

        .tab-button {
            background-color: #444;
            color: #fff;
            border: none;
            padding: 10px 20px;
            border-radius: 5px 5px 0 0;
            cursor: pointer;
            font-weight: bold;
            transition: all 0.3s ease;
        }

        .tab-button:hover {
            background-color: #555;
        }

        .tab-button.active {
            background-color: #ff4d4d;
        }

.tab-content {
    display: none;
    min-width: 700px; 
    min-height: 700px;
}

.tab-content.active {
    display: block;
}
        .character-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
            gap: 15px;
            margin-top: 20px;
        }

        .character-card {
            background-color: #333;
            border-radius: 8px;
            padding: 15px;
            cursor: pointer;
            transition: all 0.3s ease;
            border: 2px solid transparent;
        }

        .character-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 5px 15px rgba(255, 77, 77, 0.3);
            border-color: #ff4d4d;
        }

        .character-card.selected {
            border-color: #4d9dff;
            background-color: #3a3a4a;
        }

        .character-icon {
            font-size: 40px;
            margin-bottom: 10px;
        }

        .character-name {
            font-weight: bold;
            margin-bottom: 5px;
            color: #ff9d4d;
        }

        .character-desc {
            font-size: 12px;
            color: #ccc;
        }

        .difficulty-selector {
            margin: 20px 0;
            padding: 15px;
            background-color: #333;
            border-radius: 8px;
        }

        .difficulty-selector h3 {
            margin-bottom: 15px;
            color: #ff9d4d;
        }

        .difficulty-options {
            display: flex;
            justify-content: center;
            gap: 15px;
            flex-wrap: wrap;
        }

        .difficulty-option {
            background-color: #444;
            border: 2px solid transparent;
            border-radius: 8px;
            padding: 10px 15px;
            cursor: pointer;
            transition: all 0.3s ease;
            text-align: center;
            min-width: 120px;
        }

        .difficulty-option:hover {
            background-color: #555;
            transform: translateY(-2px);
        }

        .difficulty-option.selected {
            border-color: #4d9dff;
            background-color: #3a3a4a;
        }

        .difficulty-name {
            font-weight: bold;
            color: #fff;
            margin-bottom: 5px;
        }

        .difficulty-desc {
            font-size: 11px;
            color: #ccc;
        }


        .map-selector {
            margin: 20px 0;
            padding: 15px;
            background-color: #333;
            border-radius: 8px;
        }

        .map-selector h3 {
            margin-bottom: 15px;
            color: #ff9d4d;
        }

        .map-options {
            display: flex;
            justify-content: center;
            gap: 15px;
            flex-wrap: wrap;
        }

        .map-option {
            background-color: #444;
            border: 2px solid transparent;
            border-radius: 8px;
            padding: 10px 15px;
            cursor: pointer;
            transition: all 0.3s ease;
            text-align: center;
            min-width: 120px;
        }

        .map-option:hover {
            background-color: #555;
            transform: translateY(-2px);
        }

        .map-option.selected {
            border-color: #4d9dff;
            background-color: #3a3a4a;
        }

        .map-name {
            font-weight: bold;
            color: #fff;
            margin-bottom: 5px;
        }

        .map-desc {
            font-size: 11px;
            color: #ccc;
        }

        .start-button-container {
            margin-top: 20px;
        }

        .start-button {
            background-color: #4caf50;
            color: white;
            border: none;
            padding: 15px 40px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 18px;
            font-weight: bold;
            transition: all 0.3s ease;
            opacity: 0.5;
            pointer-events: none;
        }

        .start-button.enabled {
            background-color: rgb(6, 53, 29);
            opacity: 1;
            pointer-events: auto;
        }

        .start-button.enabled:hover {
            color: black;
            background-color: #771010;
            transform: translateY(-2px);
            box-shadow: 10px 20px 15px rgb(0, 0, 0);
        }

#gameCanvas {
    border: 2px solid #ff0000;
    background-color: #ff0000;
    display: none;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.7);
    cursor: crosshair;
    margin: 0 auto; 
}

#gameUI {
    position: absolute;
    pointer-events: none;
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 900px;
    height: 700px;
}

        #healthBar {
            position: absolute;
            bottom: 10px;
            left: 70px;
            width: 200px;
            height: 25px;
            background-color: #333;
            border: 2px solid #555;
            border-radius: 15px;
            overflow: hidden;
            z-index: 10;
        }


        #healthFill {
            height: 100%;
            background-color: #ff4d4d;
            transition: width 0.3s ease;
        }

        #healthText {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            color: #fff;
            font-weight: bold;
            font-size: 12px;
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
            pointer-events: none;
        }

        #waveCounter {
            position: absolute;
            top: 10px;
            left: 50%;
            transform: translateX(-50%);
            font-size: 24px;
            font-weight: bold;
            color: #ff9d4d;
            text-align: center;
            z-index: 10;
        }

        #zombieCounter {
            position: absolute;
            top: 40px;
            left: 50%;
            transform: translateX(-50%);
            font-size: 20px;
            font-weight: bold;
            color: #ff4d4d;
            text-align: center;
            z-index: 10;
        }


        #characterIcon {
            position: absolute;
            bottom: 10px;
            left: 10px;
            font-size: 36px;
            width: 50px;
            height: 50px;
            display: flex;
            justify-content: center;
            align-items: center;
            background-color: rgba(42, 42, 42, 0.8);
            border-radius: 10px;
            border: 2px solid #555;
            z-index: 10;
        }

#abilityContainer {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 10px;
    z-index: 10;
}

.ability-cube {
    width: 50px;
    height: 50px;
    background-color: rgb(158, 139, 52);
    border: 2px solid #555;
    border-radius: 5px;
    position: relative;
    overflow: hidden;
}

.ability-icon {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    z-index: 2;
}

.ability-cooldown {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgb(0, 0, 0);
    transition: height 0.1s linear;
    z-index: 1;
}

        #ammoDisplay {
            position: absolute;
            bottom: 10px; 
            left: 280px; 
            font-size: 16px;
            font-weight: bold;
            color: #4d9dff;
            z-index: 10;
        }

        #shop {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background-color: rgba(30, 30, 30, 0.98);
            border-radius: 10px;
            padding: 20px;
            display: none;
            text-align: center;
            pointer-events: all;
            box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
            z-index: 100;
            max-width: 90%;
            max-height: 80%;
            overflow-y: auto;
        }

        #shop h2 {
            margin-bottom: 10px;
            color: #ffd700;
        }

        #shopCredits {
            margin-bottom: 20px;
            font-size: 18px;
            color: #ffd700;
        }

        .shop-actions {
            display: flex;
            justify-content: center;
            gap: 10px;
            margin-bottom: 20px;
        }

        .shop-action-btn {
            background-color: #444;
            color: #fff;
            border: none;
            padding: 8px 15px;
            border-radius: 5px;
            cursor: pointer;
            font-weight: bold;
            transition: all 0.3s ease;
        }

        .shop-action-btn:hover {
            background-color: #555;
            transform: translateY(-2px);
        }

        .shop-action-btn:disabled {
            background-color: #333;
            color: #666;
            cursor: not-allowed;
            transform: none;
        }

        .shop-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 15px;
            margin-bottom: 20px;
        }

        .shop-card {
            background-color: #333;
            border-radius: 8px;
            padding: 15px;
            cursor: pointer;
            transition: all 0.3s ease;
            border: 2px solid #555;
            position: relative;
            min-height: 180px;
        }

        .shop-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
        }

        .shop-card.common {
            border-color: #888;
        }

        .shop-card.common:hover {
            border-color: #aaa;
            box-shadow: 0 5px 15px rgba(170, 170, 170, 0.3);
        }

        .shop-card.rare {
            border-color: #4d9dff;
        }

        .shop-card.rare:hover {
            border-color: #6bb6ff;
            box-shadow: 0 5px 15px rgba(107, 182, 255, 0.3);
        }

        .shop-card.epic {
            border-color: #9d4dff;
        }

        .shop-card.epic:hover {
            border-color: #b16bff;
            box-shadow: 0 5px 15px rgba(177, 109, 255, 0.3);
        }

        .shop-card.legendary {
            border-color: #ff9d4d;
        }

        .shop-card.legendary:hover {
            border-color: #ffb36d;
            box-shadow: 0 5px 15px rgba(255, 179, 109, 0.3);
        }

        .shop-card.red-path {
            border-color: #ff4d4d;
        }

        .shop-card.red-path:hover {
            border-color: #ff6b6b;
            box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
        }

        .shop-card.blue-path {
            border-color: #4d9dff;
        }

        .shop-card.blue-path:hover {
            border-color: #6bb6ff;
            box-shadow: 0 5px 15px rgba(107, 182, 255, 0.3);
        }

        .shop-card.purple-path {
            border-color: #db4dff;
        }

        .shop-card.purple-path:hover {
            border-color: #936bff;
            box-shadow: 0 5px 15px rgba(255, 113, 255, 0.3);
        }

        .shop-card.purchased {
            opacity: 0.5;
            cursor: not-allowed;
            border-color: #666;
        }

        .shop-card.purchased:hover {
            transform: none;
            box-shadow: none;
        }

        .card-rarity {
            position: absolute;
            top: 5px;
            left: 5px;
            font-size: 10px;
            font-weight: bold;
            padding: 2px 6px;
            border-radius: 10px;
        }

        .card-rarity.common {
            background-color: #888;
            color: #fff;
        }

        .card-rarity.rare {
            background-color: #4d9dff;
            color: #fff;
        }

        .card-rarity.epic {
            background-color: #9d4dff;
            color: #fff;
        }

        .card-rarity.legendary {
            background-color: #ff9d4d;
            color: #fff;
        }

        .card-path {
            position: absolute;
            top: 5px;
            right: 5px;
            font-size: 10px;
            font-weight: bold;
            padding: 2px 6px;
            border-radius: 10px;
        }

        .card-path.red-path {
            background-color: #ff4d4d;
            color: #fff;
        }

        .card-path.blue-path {
            background-color: #4d9dff;
            color: #fff;
        }

        .card-title {
            font-weight: bold;
            margin-bottom: 10px;
            color: #ff9d4d;
            font-size: 14px;
        }

        .card-desc {
            font-size: 12px;
            color: #ccc;
            margin-bottom: 10px;
        }

        .card-cost {
            position: absolute;
            bottom: 10px;
            right: 33%;
            left: 33%;
            background-color: #ffd700;
            color: #000;
            padding: 3px 8px;
            border-radius: 12px;
            font-size: 12px;
            font-weight: bold;
        }

        .card-cost.common {
            background-color: #888;
            color: #fff;
        }

        .card-cost.rare {
            background-color: #4d9dff;
            color: #fff;
        }

        .card-cost.epic {
            background-color: #9d4dff;
            color: #fff;
        }

        .card-cost.legendary {
            background-color: #ff9d4d;
            color: #fff;
        }

        #gameOver {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background-color: rgba(30, 30, 30, 0.95);
            border-radius: 10px;
            padding: 30px;
            text-align: center;
            display: none;
            pointer-events: all;
            box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
            z-index: 100;
        }

        #gameOver h2 {
            margin-bottom: 20px;
            color: #ff4d4d;
            font-size: 32px;
        }

        #gameOver p {
            margin-bottom: 20px;
            font-size: 18px;
        }

        .btn {
            background-color: #ff4d4d;
            color: white;
            border: none;
            padding: 10px 20px;
            border-radius: 5px;
            cursor: pointer;
            font-size: 16px;
            transition: all 0.3s ease;
            margin: 5px;
        }

        .btn:hover {
            background-color: #ff6b6b;
            transform: translateY(-2px);
        }

        #waveNotification {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            font-size: 48px;
            font-weight: bold;
            color: #ff4d4d;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
            pointer-events: none;
            opacity: 0;
            transition: opacity 0.5s ease;
            z-index: 50;
        }

        .damage-text {
            position: absolute;
            color: #ff4d4d;
            font-weight: bold;
            font-size: 14px;
            pointer-events: none;
            animation: floatUp 1s ease-out forwards;
        }

        .heal-text {
            position: absolute;
            color: #4caf50;
            font-weight: bold;
            font-size: 14px;
            pointer-events: none;
            animation: floatUp 1s ease-out forwards;
        }

        .credit-text {
            position: absolute;
            color: #ffd700;
            font-weight: bold;
            font-size: 14px;
            pointer-events: none;
            animation: floatUp 1s ease-out forwards;
        }

        .debug-text {
            position: absolute;
            color: #00ff00;
            font-weight: bold;
            font-size: 12px;
            pointer-events: none;
            animation: floatUp 2s ease-out forwards;
            z-index: 100;
        }

        @keyframes floatUp {
            0% {
                opacity: 1;
                transform: translateY(0);
            }
            100% {
                opacity: 0;
                transform: translateY(-30px);
            }
        }

        #debugToggle {
            position: absolute;
            bottom: 220px;
            right: 10px;
            background-color: #00ff00;
            color: #000;
            border: none;
            padding: 5px 10px;
            border-radius: 3px;
            cursor: pointer;
            font-weight: bold;
            font-size: 12px;
            z-index: 101;
            display: none;
        }

        #debugPanel {
            position: absolute;
            top: 10px;
            left: 10px;
            background-color: rgba(0, 0, 0, 0.7);
            color: #00ff00;
            padding: 10px;
            border-radius: 5px;
            font-family: monospace;
            font-size: 12px;
            z-index: 100;
            display: none;
            max-width: 300px;
        }

.terminal-container {
  position: fixed;
  bottom: 50px;
  right: 20px;
  width: 300px;
  height: 200px;
  padding: 10px;
  background-image: url("/Images/other images/matrixrain.gif");
  background-size: cover;
  border-radius: 10px 10px 10px 0;
  border: 3px solid green;
}

#input {
    position: absolute;
  resize: none;
  font-size: 16px;
  color: #fff;
  background-image: url("/Images/other images/matrixrain.gif");
background-size:contain;
  border: 2px solid green;
  padding: 5px;
  width: calc(100% - 30px);
  height: 60px;
  width: 93.5%;
}

#run-btn {
    font-weight: bolder;
  position: absolute;
  top: 65px;
  left: 120px;
  width: 70px;
  height: 50px;
  font-size: 24px;
  color: #000000;
  background-color: green;
  border: none;
  cursor: pointer;
  margin-top: 20px;
}

#pauseMenu {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(20, 20, 20, 0.95);
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    display: none;
    pointer-events: all;
    box-shadow: 0 0 30px rgba(77, 157, 255, 0.3);
    border: 2px solid #4d9dff;
    z-index: 200;
    min-width: 300px;
}

#pauseMenu h2 {
    margin-bottom: 20px;
    color: #4d9dff;
    font-size: 32px;
    letter-spacing: 2px;
}

#pauseMenu p {
    margin-bottom: 20px;
    color: #ccc;
}

.main-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #333;
}

.tab-btn {
    background-color: transparent;
    border: none;
    color: #f0f0f0;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 1.2em;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
}

.tab-btn:hover {
    color: #4d9dff;
}

.tab-btn.active {
    color: #ff9d4d;
    font-weight: bold;
    border-bottom: 3px solid #ff9d4d;
}
#play-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.currency-display {
    font-size: 1.2em;
    color: #ffe04d; 
    margin-bottom: 15px;
    padding: 5px 10px;
    border: 1px solid #444;
    border-radius: 5px;
    display: inline-block;
}

.shop-scroll-container {
    max-height: 450px; 
    overflow-y: auto; 
    padding-right: 10px; 
    border: 1px solid #444;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 5px;
    margin-top: 10px;
}

.shop-scroll-container::-webkit-scrollbar,
.inventory-items::-webkit-scrollbar {
    width: 8px;
}

.shop-scroll-container::-webkit-scrollbar-track,
.inventory-items::-webkit-scrollbar-track {
    background: #2a2a2a;
    border-radius: 4px;
}

.shop-scroll-container::-webkit-scrollbar-thumb,
.inventory-items::-webkit-scrollbar-thumb {
    background: #ff4d4d;
    border-radius: 4px;
}

.shop-scroll-container::-webkit-scrollbar-thumb:hover,
.inventory-items::-webkit-scrollbar-thumb:hover {
    background: #ff6b6b;
}

.shop-grid-cosmetics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    padding: 10px;
}

.cosmetic-card, .inventory-card {
    background-color: #3a3a3a;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    border: 2px solid transparent;
    transition: all 0.2s;
}

.cosmetic-card:hover {
    border-color: #ffe04d;
}

.cosmetic-card.owned {
    border-color: #28a745;
    opacity: 0.8;
}

.cosmetic-color-preview {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin: 0 auto 10px;
    border: 3px solid #f0f0f0;
}

.cosmetic-name {
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 1.1em;
}

.cosmetic-rarity {
    font-style: italic;
    color: #ccc;
    font-size: 0.9em;
    margin-bottom: 10px;
}

.cost-display {
    color: #ffe04d;
    font-weight: bold;
    margin-bottom: 10px;
}

.buy-btn, .equip-btn {
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s;
    width: 100%;
}

.buy-btn {
    background-color: #4d9dff;
    color: #1a1a1a;
}

.buy-btn:hover:not(:disabled) {
    background-color: #6daeff;
}

.buy-btn:disabled {
    background-color: #555;
    cursor: not-allowed;
    color: #999;
}

.inventory-hero-select {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.hero-select-btn {
    background-color: #333;
    color: #f0f0f0;
    border: 2px solid #555;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
}

.hero-select-btn.active {
    background-color: #4d9dff;
    border-color: #4d9dff;
    font-weight: bold;
}

.inventory-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    max-height: 400px;
    overflow-y: auto;  
    padding: 15px;
    border: 1px solid #444;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 5px;
}

.inventory-card.equipped {
    border-color: #28a745;
    box-shadow: 0 0 15px rgba(40, 167, 69, 0.5);
}

.equip-btn {
    background-color: #28a745;
    color: #fff;
}

.equip-btn:hover:not(.equipped) {
    background-color: #34b755;
}

.equip-btn.equipped {
    background-color: #555;
    cursor: default;
}

.difficulty-grid {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap; 
}

.difficulty-option {
    background-color: #333;
    border: 2px solid #555;
    border-radius: 8px;
    padding: 15px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    font-weight: bold;
    color: #f0f0f0;
    min-width: 120px;
    flex-grow: 1;
}

.difficulty-option:hover {
    border-color: #8f0000;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

.difficulty-option.selected {
    border-color: #ff0000; 
    background-color: #444;
    color: #ff0000;
    transform: scale(1.05);
}

.map-selection-container {
    margin-bottom: 30px;
}

.map-grid {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
    flex-wrap: wrap; 
}

.map-card {
    background-color: #3a3a3a;
    border: 2px solid #555;
    border-radius: 10px;
    padding: 15px;
    width: 160px; 
    height: 180px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

.map-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
    border-color: #888;
}

.map-card.selected {
    border-color: #4d9dff;
    background-color: #3a3a4a;
    box-shadow: 0 0 15px rgba(77, 157, 255, 0.6);
    transform: scale(1.05);
}

.map-card.locked {
    opacity: 0.6;
    cursor: not-allowed;
    border-color: #444;
    background-color: #222;
}

.map-card.locked:hover {
    transform: none;
    box-shadow: none;
}

.map-icon {
    font-size: 40px;
    margin-bottom: 5px;
}

.map-name {
    font-weight: bold;
    font-size: 1.1em;
    color: #f0f0f0;
}

.map-desc {
    font-size: 11px;
    color: #bbb;
    margin-top: 5px;
    line-height: 1.2;
}

.status-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 16px;
}

.shop-section-title {
    text-align: left;
    margin: 20px 0 10px 0;
    padding-bottom: 5px;
    border-bottom: 1px solid #444;
    color: #ffd700;
}

.map-shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 15px;
    padding: 10px;
    margin-bottom: 20px;
    justify-items: center;
}

.tab-content {
    display: none;
    flex: 1; 
    min-height: 0; 
    overflow-y: auto; 
    padding: 10px 20px 30px 20px; 
    width: 100%;
}

.tab-content.active {
    display: block;
}

#play-tab {
    display: none;
}

#play-tab.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-y: auto;
}

.tab-content::-webkit-scrollbar,
.shop-scroll-container::-webkit-scrollbar,
.inventory-items::-webkit-scrollbar {
    width: 10px;
}

.tab-content::-webkit-scrollbar-track,
.shop-scroll-container::-webkit-scrollbar-track,
.inventory-items::-webkit-scrollbar-track {
    background: #222;
    border-radius: 5px;
}

.tab-content::-webkit-scrollbar-thumb,
.shop-scroll-container::-webkit-scrollbar-thumb,
.inventory-items::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 5px;
    border: 2px solid #222;
}

.tab-content::-webkit-scrollbar-thumb:hover {
    background: #ff4d4d;
}

.shop-scroll-container,
.inventory-items {
    max-height: none;
    height: auto;
    overflow: visible;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.main-tabs {
    flex-shrink: 0; 
    background-color: #222;
    border-radius: 8px;
    padding: 5px;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    gap: 5px;
    border-bottom: none;
}

.tab-btn {
    flex: 1; 
    max-width: 200px;
    border-radius: 5px;
    padding: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-bottom: none;
    background-color: transparent;
    transition: all 0.2s;
}

.tab-btn:hover {
    background-color: #333;
    color: #fff;
}

.tab-btn.active {
    background-color: #ff4d4d;
    color: white;
    box-shadow: 0 4px 10px rgba(255, 77, 77, 0.3);
}

#startButton {
    position: sticky;
    bottom: 0;
    margin-top: 20px;
    width: 80%;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.5);
    z-index: 10;
}

.main-tabs {
    flex-shrink: 0; 
    background-color: #222; 
    border-radius: 8px;
    padding: 5px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-evenly;
    gap: 5px;
    border-bottom: none; 
}

.tab-btn {
    flex: 1; 
    max-width: 250px;
    border: none;
    border-radius: 5px;
    padding: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #ccc; 
    background-color: transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn:hover {
    background-color: #333; 
    color: #fff;
}

.tab-btn.active {
    background-color: #4d9dff;
    color: #1a1a1a; 
    box-shadow: 0 0 10px rgba(77, 157, 255, 0.5);
    font-weight: bold;
}

#characterSelect .tab-content {
    display: none; 
    padding: 10px 0;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

#characterSelect .tab-content.active {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    flex: 1;
}

.mode-selector {
    margin: 20px 0;
    padding: 15px;
    background-color: #333;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    border: 1px solid #444;
}

.mode-selector h2 {
    margin-bottom: 10px;
    color: #4d9dff;
    font-size: 1.5em;
    border-bottom: 2px solid #4d9dff;
    padding-bottom: 5px;
    display: inline-block;
}

.mode-options-grid {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.mode-option {
    flex: 1;
    text-align: center;
    padding: 10px 20px;
    margin: 5px 0;
    background-color: #444;
    color: #fff;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
    border: 2px solid transparent;
    max-width: 200px;
}

.mode-option:hover {
    background-color: #555;
}

.mode-option.selected {
    background-color: #4d9dff;
    color: #1a1a1a;
    border-color: #4d9dff;
    box-shadow: 0 0 10px rgba(77, 157, 255, 0.5);
}

.map-selector {
    margin: 20px 0;
    padding: 15px;
    background-color: #333;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    border: 1px solid #444;
}

.map-selector h2 {
    margin-bottom: 10px;
    color: #4d9dff; 
    font-size: 1.5em;
    border-bottom: 2px solid #4d9dff;
    padding-bottom: 5px;
    display: inline-block;
}

.map-options-grid {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.map-option {
    flex: 1;
    text-align: center;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    background-color: #444;
    color: #f0f0f0;
    border: 1px solid #555;
    transition: all 0.2s ease;
    font-size: 1em;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.map-option:hover:not(.selected) {
    background-color: #555;
    border-color: #777;
    transform: translateY(-2px);
}

.map-option.selected {
    background-color: #4d9dff; 
    border-color: #2a7acc;
    box-shadow: 0 0 10px rgba(77, 157, 255, 0.5);
    color: #1a1a1a;
    font-weight: bold;
}

.map-details {
    margin-top: 5px;
    font-size: 0.8em;
    color: #ccc;
}

.map-option.selected .map-details {
    color: #1a1a1a;
}

.sub-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    padding-bottom: 5px;
    border-bottom: 1px solid #444;
}

.sub-tab-btn {
    padding: 10px 15px;
    margin: 0 5px;
    background-color: #333;
    color: #bbb;
    border: none;
    border-radius: 5px 5px 0 0;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.sub-tab-btn:hover {
    background-color: #444;
    color: #f0f0f0;
}

.sub-tab-btn.active {
    background-color: #2a2a2a;
    color: #fff;
    border-bottom: 2px solid #ff4d4d; 
}

.sub-tab-content {
    display: none;
    padding-top: 10px;
}

.sub-tab-content.active {
    display: block;
}
.section-desc {
    font-size: 14px;
    color: #ccc;
    margin-bottom: 15px;
    text-align: center;
}

.sub-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    padding-bottom: 5px;
    border-bottom: 1px solid #444;
}

.sub-tab-btn {
    padding: 10px 15px;
    margin: 0 5px;
    background-color: #333;
    color: #bbb;
    border: none;
    border-radius: 5px 5px 0 0;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.sub-tab-btn:hover {
    background-color: #444;
    color: #f0f0f0;
}

.sub-tab-btn.active {
    background-color: #2a2a2a;
    color: #fff;
    border-bottom: 2px solid #ff4d4d;
}

.sub-tab-content {
    display: none;
    padding-top: 10px;
}

.sub-tab-content.active {
    display: block;
}

.section-desc {
    font-size: 14px;
    color: #ccc;
    margin-bottom: 15px;
    text-align: center;
}

.difficulty-selector, .config-selector {
    margin: 20px auto;
    padding: 15px;
    background-color: #202020;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 800px;
}

.difficulty-selector h2, .config-selector h2 {
    color: #ff4d4d;
    margin-bottom: 10px;
    font-size: 1.1em;
    border-bottom: 1px solid #333;
    padding-bottom: 5px;
    text-align: center;
}

.options-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.selection-option {
    flex-grow: 1;
    padding: 10px 15px;
    background-color: #444;
    color: #fff;
    border: 2px solid #444;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    text-align: center;
    min-width: 100px;
}

.selection-option:hover {
    background-color: #555;
    border-color: #777;
}

.selection-option.selected {
    background-color: #8f0000;
    border-color: #ff4d4d;
    box-shadow: 0 0 10px rgba(255, 77, 77, 0.5);
    font-weight: bold;
}

#startButton:not(:disabled) {
    background-color: #4CAF50;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.5);
}

/* game.css: Add this block near other UI styles (e.g., after #gameUI, before #healthBar) */
/* --- NEW: Frostbite Bar Styles (for 'ice' map mechanic) --- */
#frostbiteBarContainer {
    position: absolute;
    top: 50px; /* Positioned above the health bar */
    left: 10px;
    width: 250px;
    z-index: 10;
    pointer-events: none;
}

#frostbiteText {
    text-align: center;
    font-size: 14px;
    font-weight: bold;
    color: #E0FFFF; /* Light blue/cyan for frostbite */
    margin-bottom: 3px;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.7);
}

#frostbiteBar {
    position: relative;
    width: 100%;
    height: 10px;
    background-color: #333;
    border: 2px solid #E0FFFF;
    border-radius: 5px;
    overflow: hidden;
}

#frostbiteFill {
    position: absolute;
    height: 100%;
    /* The width and left properties will be set by game.js to represent the meter from -20 to 20 */
    background-color: rgba(135, 206, 250, 0.9); /* Light blue for positive */
    transition: width 0.1s linear, left 0.1s linear, background-color 0.1s;
}

#frostbiteBar.negative #frostbiteFill {
    background-color: rgba(77, 157, 255, 0.9); /* Darker blue for negative/danger */
}

#frostbiteCenterLine {
    position: absolute;
    left: 50%;
    top: 0;
    width: 2px;
    height: 100%;
    background-color: #ff4d4d; /* Red line for the zero boundary */
    z-index: 2;
}
/* --- END NEW FROSTBITE STYLES --- */