body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: #121212;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    touch-action: manipulation;
    color: #fff;
}

#gameContainer {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

#gameCanvas {
    position: absolute;
    top: 0;
    left: 0;
    background-color: #121212;
    z-index: 2;
}

#backgroundCanvas {
    position: absolute;
    top: 0;
    left: 0;
    background-color: #121212;
    z-index: 1;
    opacity: 0.3;
}

#messageBox {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 15px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 20px;
    font-size: 16px;
    text-align: center;
    transition: opacity 0.5s;
    max-width: 80%;
    opacity: 0;
    z-index: 3;
}

#depthCounter {
    position: absolute;
    top: 20px;
    left: 20px;
    color: white;
    font-size: 16px;
    z-index: 3;
}

#zoneCounter {
    position: absolute;
    top: 50px;
    left: 20px;
    color: white;
    font-size: 16px;
    z-index: 3;
}

/* UI elements for imprints */
#imprintCounter {
    position: absolute;
    top: 80px;
    left: 20px;
    color: white;
    font-size: 16px;
    z-index: 3;
}

#imprintTypes {
    position: absolute;
    top: 110px;
    left: 20px;
    color: white;
    font-size: 14px;
    z-index: 3;
    opacity: 0.8;
}

#startScreen {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, rgba(25, 25, 35, 0.95), rgba(10, 10, 20, 0.98));
    z-index: 10;
    overflow-y: auto;
}

.startContent {
    max-width: 800px;
    padding: 20px;
    text-align: center;
    animation: fadeIn 1s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.game-title {
    color: white;
    font-size: 48px;
    margin-bottom: 5px;
    text-shadow: 0 0 15px rgba(94, 107, 231, 0.8);
    background: linear-gradient(90deg, #5e6be7, #9e7be7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    color: #aaccff;
    font-size: 18px;
    margin-top: 0;
    margin-bottom: 30px;
    font-weight: 300;
}

.instruction-section {
    background-color: rgba(40, 40, 60, 0.6);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(94, 107, 231, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s, box-shadow 0.3s;
}

.instruction-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 25px rgba(94, 107, 231, 0.3);
}

.section-title {
    font-size: 20px;
    margin-top: 0;
    margin-bottom: 10px;
    color: #5e6be7;
    font-weight: 600;
}

.control-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin: 15px 0;
}

.control-box {
    background-color: rgba(30, 30, 50, 0.7);
    padding: 15px;
    border-radius: 10px;
    text-align: left;
}

.control-box h4 {
    margin-top: 0;
    margin-bottom: 5px;
    color: #aaccff;
}

.action-highlight {
    color: #5e6be7;
    font-weight: bold;
}

.imprint-box {
    background-color: rgba(94, 107, 231, 0.2);
    border: 1px dashed rgba(94, 107, 231, 0.5);
    padding: 15px;
    border-radius: 10px;
    margin-top: 15px;
}

#startButton {
    padding: 16px 40px;
    font-size: 20px;
    background: linear-gradient(135deg, #5e6be7, #6e5be7);
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s;
    box-shadow: 0 5px 20px rgba(94, 107, 231, 0.5);
    font-weight: 600;
    letter-spacing: 1px;
}

#startButton:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(94, 107, 231, 0.6);
    background: linear-gradient(135deg, #6e7bf7, #7e6bf7);
}

#startButton:active {
    transform: translateY(1px);
}

.floating {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
    100% { transform: translateY(0px); }
}

.marble-icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    background: radial-gradient(circle, #ffffff, #aaccff);
    border-radius: 50%;
    margin: 0 5px;
    box-shadow: 0 0 10px rgba(94, 107, 231, 0.8);
    vertical-align: middle;
}

#transitionOverlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: black;
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
    z-index: 5;
}

.hintBox {
    position: absolute;
    top: 70px;
    right: 20px;
    padding: 10px 15px;
    background-color: rgba(60, 100, 170, 0.7);
    color: white;
    border-radius: 10px;
    font-size: 14px;
    max-width: 250px;
    transition: opacity 0.5s;
    opacity: 0;
    z-index: 3;
}

/* Responsive adjustments */
@media (max-width: 700px) {
    .control-grid {
        grid-template-columns: 1fr;
    }
    .game-title {
        font-size: 36px;
    }
    .startContent {
        padding: 15px;
    }
}


#powerUpContainer {
    z-index: 100;
    transition: all 0.3s ease;
}

.power-up-indicator {
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    font-family: 'Arial', sans-serif;
    letter-spacing: 1px;
    text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.5);
}


  /* Additional styles for new features */
  #energyMeter {
    position: absolute;
    top: 40px;
    left: 10px;
    padding: 5px 10px;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border-radius: 15px;
    font-weight: bold;
}

#startScreen .control-box {
    margin-bottom: 20px;
}

.enemy-info {
    margin-top: 20px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 20px;
}

.enemy-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.enemy-type {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.enemy-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 10px;
    display: inline-block;
}

.mushroom-icon { background-color: #e56db3; }
.bouncer-icon { background-color: #f7a847; }
.explosive-icon { background-color: #eb4f47; }
.ghost-icon { background-color: #77a1d9; }

 /* Mobile-specific styles */
 @media (max-width: 768px) {
    #depthCounter, #zoneCounter, #energyMeter, #imprintCounter {
        font-size: 12px;
        padding: 3px 6px;
    }
    
    #messageBox, #hintBox {
        font-size: 14px;
        padding: 8px;
        max-width: 90%;
    }
    
    .power-up-indicator {
        padding: 3px 8px;
        font-size: 12px;
        min-width: 100px;
    }
}