body {
    margin: 0;
    padding: 20px;
    background-color: #87CEEB;
    font-family: Arial, sans-serif;
    overflow: hidden;
}

#gameContainer {
    position: relative;
    width: 1000px;
    height: 800px;
    margin: 0 auto;
    border: 2px solid #333;
    background: linear-gradient(to bottom, #87CEEB 0%, #98FB98 100%);
    overflow: hidden;
    transition: filter 1s ease-in-out;
}

/* Friday night OG event - grayscale filter */
#gameContainer.friday-night-og {
    filter: grayscale(100%);
}

/* Tokyo event - background video */
#tokyoVideo {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 180%;
    height: 180%;
    transform: translate(-50%, -50%);
    z-index: 0;
    border: none;
    opacity: 0.7;
    object-fit: cover;
    pointer-events: none;
}

/* Internet event - iPad background */
#internetBackground {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../img/ipad.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
    pointer-events: none;
}

#gameCanvas {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

#gameWorld {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

/* Omega weapon dark atmosphere */
#omegaAtmosphere {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(20, 20, 40, 0.6);
    z-index: 3;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

#omegaAtmosphere.active {
    opacity: 1;
}

.omega-cloud {
    position: absolute;
    pointer-events: none;
    opacity: 0.8;
    animation: driftCloud linear infinite;
}

/* Lightning effects - appended to omegaAtmosphere container to appear above dark overlay */
.lightning-cloud {
    pointer-events: none;
}

.lightning-bolt {
    pointer-events: none;
}

@keyframes driftCloud {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100px);
    }
}

.player {
    position: absolute;
    width: 60px;
    height: 80px;
    z-index: 10;
}

.player img {
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
}

/* Snake projectiles */
.snake-projectile {
    position: absolute;
    z-index: 12;
    pointer-events: none;
}

.snake-projectile img {
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
}

/* Snake impact effects */
.snake-impact {
    position: absolute;
    z-index: 15;
    pointer-events: none;
    animation: snakeImpact 0.5s ease-out forwards;
}

.snake-impact img {
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
}

@keyframes snakeImpact {
    0% {
        transform: scale(0.5);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 0;
    }
}

#controls {
    text-align: center;
    margin-top: 20px;
    color: #333;
}

/* Ground platform */
.platform {
    position: absolute;
    background-color: #8B4513;
    border: 2px solid #654321;
}

.ground {
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50px;
}

.floating-platform {
    width: 150px;
    height: 20px;
}

/* Falling boxes */
.box {
    position: absolute;
    border: 2px solid #333;
    border-radius: 3px;
    z-index: 5;
    transition: transform 0.1s ease;
}

/* Coin counter */
#coinCounter {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 50;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 8px 12px;
    border-radius: 20px;
    border: 2px solid #FFD700;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#coinIcon {
    width: 24px;
    height: 24px;
    background-color: #FFD700;
    border: 2px solid #FFA500;
    border-radius: 50%;
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.3);
}

#coinCount {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
}

/* Weapon indicator */
#weaponIndicator {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    z-index: 50;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 8px 12px;
    border-radius: 15px;
    border: 2px solid #4CAF50;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#weaponLabel {
    font-size: 12px;
    font-weight: bold;
    color: #666;
    text-transform: uppercase;
}

#currentWeapon {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
}

#weaponKeys {
    font-size: 10px;
    color: #888;
    font-style: italic;
}

/* Aura indicator */
#auraIndicator {
    position: absolute;
    top: 80px;
    left: 10px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    z-index: 50;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 8px 12px;
    border-radius: 15px;
    border: 2px solid #9C27B0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#auraLabel {
    font-size: 12px;
    font-weight: bold;
    color: #666;
    text-transform: uppercase;
}

#currentAura {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
}

/* Game Over Modal Dialog */
#gameOverDialog {
    border: none;
    border-radius: 15px;
    padding: 0;
    background: transparent;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    max-width: 400px;
    width: 90%;
}

#gameOverDialog:not([open]) {
    display: none;
}

#gameOverDialog::backdrop {
    background-color: rgba(0, 0, 0, 0.7);
}

.dialog-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    font-family: Arial, sans-serif;
}

.dialog-content h2 {
    margin: 0 0 20px 0;
    font-size: 28px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.dialog-content p {
    margin: 15px 0;
    font-size: 16px;
    line-height: 1.4;
}

#restartButton {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 25px;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

#restartButton:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #ee5a24 0%, #ff6b6b 100%);
}

#restartButton:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Shop Modal Dialog */
#shopDialog {
    border: none;
    border-radius: 15px;
    padding: 0;
    background: transparent;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
}

#shopDialog:not([open]) {
    display: none;
}

#shopDialog::backdrop {
    background-color: rgba(0, 0, 0, 0.7);
}

.shop-content {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: white;
    padding: 25px;
    border-radius: 15px;
    font-family: Arial, sans-serif;
    overflow-y: auto;
    max-height: 80vh;
}

.shop-content h2 {
    margin: 0 0 15px 0;
    font-size: 28px;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.tab-navigation {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.tab-button {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px 8px 0 0;
    border-bottom: 3px solid transparent;
}

.tab-button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.tab-button.active {
    background: rgba(255, 255, 255, 0.3);
    border-bottom-color: #FFD700;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.section-title {
    margin: 15px 0 10px 0;
    font-size: 18px;
    text-align: center;
    color: #e8f4fd;
}

.weapons-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    min-height: 200px;
}

.auras-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    min-height: 150px;
    margin-top: 10px;
}

.weapon-item {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
    border: 3px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: relative;
}

.weapon-item.unlocked {
    border-color: #4CAF50;
    cursor: pointer;
}

.weapon-item.unlocked:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.weapon-item.locked {
    border-color: #999;
    opacity: 0.5;
    cursor: not-allowed;
}

.weapon-item.active {
    border-color: #FFD700;
    background: rgba(255, 215, 0, 0.2);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.weapon-key {
    position: absolute;
    top: 5px;
    left: 5px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.weapon-icon {
    font-size: 40px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.weapon-name {
    font-weight: bold;
    font-size: 14px;
    color: #333;
}

.weapon-status {
    font-size: 11px;
    color: #666;
    font-style: italic;
}

.aura-item {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
    border: 3px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: relative;
}

.aura-item.unlocked {
    border-color: #4CAF50;
    cursor: pointer;
}

.aura-item.unlocked:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.aura-item.locked {
    border-color: #999;
    opacity: 0.5;
    cursor: not-allowed;
}

.aura-item.active {
    border-color: #FFD700;
    background: rgba(255, 215, 0, 0.2);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.aura-icon {
    font-size: 40px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.aura-name {
    font-weight: bold;
    font-size: 14px;
    color: #333;
}

.aura-status {
    font-size: 11px;
    color: #666;
    font-style: italic;
}

.shop-layout {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.shop-section {
    flex: 1;
}

.shop-section h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    text-align: center;
    color: #e8f4fd;
}

.shop-grid, .inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    min-height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.shop-item, .inventory-item {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.shop-item:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.shop-item.affordable {
    border-color: #4CAF50;
}

.shop-item.expensive {
    border-color: #f44336;
    opacity: 0.6;
    cursor: not-allowed;
}

.inventory-item {
    background: rgba(76, 175, 80, 0.9);
    color: white;
    cursor: default;
}

.item-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.item-name {
    font-weight: bold;
    font-size: 12px;
}

.item-price {
    font-size: 11px;
    color: #666;
}

.item-quantity {
    font-size: 11px;
    background: rgba(0, 0, 0, 0.2);
    padding: 0;
    margin: 0;
    border-radius: 10px;
}

.shop-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 2px solid rgba(255, 255, 255, 0.2);
}

.shop-coins {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 8px 12px;
    border-radius: 20px;
    border: 2px solid #FFD700;
}

.shop-coins .coin-icon {
    width: 24px;
    height: 24px;
    background-color: #FFD700;
    border: 2px solid #FFA500;
    border-radius: 50%;
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.3);
}

#shopCoinCount {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

#backToGameButton {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

#backToGameButton:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #ee5a24 0%, #ff6b6b 100%);
}

#backToGameButton:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Inventory icons inside coin counter */
#inventoryIcons {
    display: flex;
    gap: 8px;
}

.inventory-icon-container {
    display: flex;
    align-items: center;
    gap: 4px;
}

.inventory-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.inventory-quantity {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
    padding: 0;
    margin: 0;
}

@media (max-width: 700px) {
    .shop-layout {
        flex-direction: column;
    }

    .shop-grid, .inventory-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
}
