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

body {
    font-family: 'Arial', sans-serif;
    background-color: #1a1a2e;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    width: 100%;
    color: white;
    overflow: hidden;
}

#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
}

#game-area {
    width: 100%;
    height: 100%;
    position: relative;
    background-color: #16213e;
    overflow: hidden;
    border: 4px solid #0f3460;
    border-radius: 5px;
}

.parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('MUGA GIF.gif');
    background-size: cover;
    background-position: center;
    opacity: 0.4;
    mix-blend-mode: luminosity;
    z-index: 0;
}

#player {
    width: 40px;
    height: 40px;
    background-image: url('grandma cube.png');
    background-size: cover;
    position: absolute;
    bottom: 60px;
    left: 100px;
    transform: rotate(0deg);
    border-radius: 5px;
    transition: transform 0.1s linear;
    z-index: 2;
}

#player.cube {
    background-image: url('grandma cube.png');
    border-radius: 5px;
}

#player.ship {
    background-image: url('grandma cube.png');
    transform: rotate(-15deg);
    clip-path: polygon(0% 50%, 40% 0%, 100% 20%, 100% 80%, 40% 100%);
    border-radius: 0;
}

#player.wave {
    background-image: url('grandma cube.png');
    clip-path: polygon(0% 50%, 50% 0%, 100% 50%, 50% 100%);
    border-radius: 0;
    background-color: #4d88ff;
}

.obstacle {
    position: absolute;
    background-color: transparent;
    background-image: url('vortrox 92 image.avif');
    background-size: cover;
    bottom: 0;
    border-radius: 5px;
    z-index: 2;
}

.spike {
    position: absolute;
    width: 30px;
    height: 30px;
    background-image: url('vortrox 92 image.avif');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    bottom: 60px;
    z-index: 2;
}

.mini-muga {
    position: absolute;
    width: 40px;
    height: 40px;
    background-image: url('vortrox 92 image.avif');
    background-size: cover;
    background-position: center;
    border-radius: 50%;
    z-index: 2;
}

.ground {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 60px;
    background-color: #0f3460;
    z-index: 1;
}

#ui {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    height: 60px;
    background-color: #0f3460;
    border-radius: 5px;
    margin-top: 10px;
}

#score, #attempts {
    font-size: 1.2em;
    color: white;
}

button {
    padding: 8px 16px;
    background-color: #f8485e;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #e63e6d;
}

#start-screen, #game-over {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(26, 26, 46, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
    z-index: 10;
}

#game-over {
    display: none;
}

#twitch-chat-container {
    position: absolute;
    width: 300px;
    height: 350px;
    right: 20px;
    top: 20px;
    background-color: rgba(18, 18, 33, 0.9);
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #6441a5;
    display: flex;
    flex-direction: column;
}

.chat-header {
    background-color: #6441a5;
    padding: 8px;
    color: white;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

#chat-messages {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chat-message {
    animation: fadeIn 0.3s ease-in;
}

.chat-username {
    font-weight: bold;
    margin-right: 5px;
}

.chat-text {
    color: #ddd;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.mode-transition {
    animation: flash 1s;
}

@keyframes flash {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.5); }
}

h1, h2 {
    color: #f8485e;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
}

p {
    color: white;
    font-size: 1.2em;
}

#main-menu {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(26, 26, 46, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
    z-index: 15;
}

#level-selection {
    background-color: rgba(15, 52, 96, 0.8);
    padding: 20px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 400px;
}

.level-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.level-btn {
    padding: 12px 20px;
    background-color: #f8485e;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em;
    transition: all 0.3s;
    width: 120px;
}

.level-btn:hover {
    background-color: #e63e6d;
    transform: scale(1.05);
}

.kai-cenat {
    position: absolute;
    width: 50px;
    height: 50px;
    background-image: url('vortrox 92 image.avif');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 2;
}

@font-face {
    font-family: 'Pusab';
    src: url('https://cdn.jsdelivr.net/gh/Templarian/MaterialDesign-Webfont@master/fonts/materialdesignicons-webfont.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

#progress-bar {
    position: absolute;
    top: 10px;
    left: 0;
    width: 100%;
    height: 20px;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 5;
    border-radius: 10px;
    overflow: hidden;
}

#progress-fill {
    height: 100%;
    width: 0%;
    background-color: #f8485e;
    transition: width 0.3s linear;
}

#progress-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-weight: bold;
    font-family: 'Pusab', sans-serif;
    text-shadow: 1px 1px 2px black;
    font-size: 14px;
}

#boss-health-container {
    position: absolute;
    bottom: 10px;
    left: 0;
    width: 100%;
    height: 20px;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 5;
    border-radius: 10px;
    overflow: hidden;
    display: none;
}

#boss-health-bar {
    height: 100%;
    width: 100%;
    background-color: #ff0000;
    transition: width 0.3s linear;
}

#boss-health-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-weight: bold;
    font-family: 'Pusab', sans-serif;
    text-shadow: 1px 1px 2px black;
    font-size: 14px;
}

.boss {
    position: absolute;
    width: 200px;
    height: 200px;
    background-image: url('freakyikes.avif');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 3;
    filter: drop-shadow(0 0 10px #ff3800);
}

.boss-projectile {
    position: absolute;
    width: 30px;
    height: 30px;
    background-image: url('freakyikes.avif');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 50%;
    z-index: 2;
    filter: hue-rotate(90deg);
}

.flying-car {
    position: absolute;
    width: 80px;
    height: 40px;
    background-image: url('flying-car.png');
    background-size: cover;
    background-position: center;
    z-index: 2;
    filter: hue-rotate(30deg);
}

#shop-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(26, 26, 46, 0.9);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
    z-index: 20;
}

#characters-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 600px;
    margin: 20px auto;
}

.character-item {
    width: 120px;
    height: 150px;
    background-color: rgba(15, 52, 96, 0.8);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.character-item:hover {
    transform: scale(1.05);
    background-color: rgba(15, 52, 96, 1);
}

.character-icon {
    width: 80px;
    height: 80px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    margin-bottom: 10px;
}

.character-name {
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    color: white;
}

.character-price {
    position: absolute;
    bottom: 5px;
    font-size: 12px;
    color: gold;
}

.character-locked {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    color: white;
}

.character-selected {
    border: 3px solid #f8485e;
}

.menu-btn {
    padding: 12px 24px;
    background-color: #f8485e;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em;
    transition: all 0.3s;
    margin-top: 20px;
}

.menu-btn:hover {
    background-color: #e63e6d;
    transform: scale(1.05);
}

#robtop-container {
    position: absolute;
    right: 20px;
    bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: float 3s ease-in-out infinite;
}

#robtop-image {
    width: 180px;
    height: 180px;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
}

#robtop-speech {
    background-color: white;
    color: #1a1a2e;
    padding: 10px 15px;
    border-radius: 20px;
    margin-top: 10px;
    font-weight: bold;
    position: relative;
    max-width: 200px;
    text-align: center;
}

#robtop-speech:after {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    margin-left: -10px;
    border-width: 0 10px 10px 10px;
    border-style: solid;
    border-color: white transparent;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

#milo-encouragement {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 12;
    animation: fadeIn 0.5s;
}

#milo-image {
    width: 300px;
    height: auto;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.5));
    animation: pulse 2s infinite;
}

#milo-speech {
    font-size: 24px;
    font-weight: bold;
    color: white;
    text-align: center;
    max-width: 600px;
    padding: 20px;
    background-color: #f8485e;
    border-radius: 15px;
    box-shadow: 0 0 15px rgba(255, 99, 71, 0.7);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.lizard {
    position: absolute;
    width: 60px;
    height: 40px;
    background-color: red;
    clip-path: polygon(20% 0%, 80% 0%, 100% 50%, 80% 100%, 20% 100%, 0% 50%);
    z-index: 2;
    filter: drop-shadow(0 0 5px #ff0000);
}

.zygon-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #500000;
    opacity: 0.4;
    z-index: 0;
}

.chest-pain-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #0a0a0a;
    opacity: 0.8;
    z-index: 0;
    animation: pulse-pain 2s infinite;
}

@keyframes pulse-pain {
    0%, 100% { opacity: 0.8; background-color: #0a0a0a; }
    50% { opacity: 0.9; background-color: #500000; }
}

.pain-particle {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: #ff0000;
    border-radius: 50%;
    filter: blur(2px);
    z-index: 1;
    opacity: 0.7;
}

#secret-button {
    position: fixed;
    top: 10px;
    left: 10px;
    padding: 8px 16px;
    background-color: #f8485e;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s;
    text-decoration: none;
    z-index: 9999;
}

#secret-button:hover {
    background-color: #e63e6d;
}