:root {
    --primary-blue: #00f3ff;
    --primary-orange: #ff9100;
    --bg-dark: #0a0a12;
    --hud-bg: rgba(15, 23, 36, 0.85);
    --text-color: #ffffff;
}

body {
    margin: 0;
    background-color: #090911 !important;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    font-family: 'Roboto', sans-serif;
    overflow: hidden;
    color: var(--text-color);
}

#game-container {
    position: relative;
    width: 100%;
    max-width: 900px;
    aspect-ratio: 900 / 520;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    border-radius: 12px;
    overflow: hidden;
    background: #111;
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* Em css/css1.css */

#hud {
    /* ... mantenha as outras propriedades (position, top, background, etc) ... */

    /* REMOVA ou COMENTE estas linhas: */
    /* display: flex; */
    /* justify-content: space-between; */
    /* align-items: flex-start; */

    /* ADICIONE estas linhas: */
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: start;
}

/* Adicione no final do css/css1.css ou logo após a classe .hud-panel */

.hud-panel:last-child {
    justify-self: end;
}

.hud-panel {
    text-align: center;
}

.score-box {
    font-family: 'Orbitron', sans-serif;
    font-size: 24px;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    color: aqua;
}

#problem-display {
    font-family: 'Orbitron', sans-serif;
    font-size: 48px;
    font-weight: 700;
    color: #fff;
    background: rgba(0, 0, 0, 0.6);
    padding: 2px 30px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.1);
    transition: transform 0.2s;
    margin-top: 2px;
    margin-bottom: 2px;
}

.legend {
    display: flex;
    gap: 20px;
    font-size: 16px;
    font-weight: bold;
    /*background: rgba(0, 0, 0, 0.6);*/
    padding: 8px 16px;
    border-radius: 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    box-shadow: 0 0 8px currentColor;
}

#start-screen,
#game-over-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 18, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 0;
    backdrop-filter: blur(5px);
}

h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 48px;
    margin: 0 0 20px 0;
    background: linear-gradient(45deg, var(--primary-blue), #fff, var(--primary-orange));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
    letter-spacing: 2px;
}

p {
    font-size: 18px;
    max-width: 600px;
    text-align: center;
    line-height: 1.6;
    color: #ccc;
    margin-bottom: 30px;
}

button {
    background: linear-gradient(90deg, var(--primary-blue), #00c2cc);
    border: none;
    padding: 15px 40px;
    font-family: 'Orbitron', sans-serif;
    font-size: 20px;
    color: #000;
    font-weight: bold;
    border-radius: 30px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.4);
}

button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.6);
}

.hidden {
    display: none !important;
}

.lives {
    display: flex;
    gap: 5px;
    justify-content: center;
    margin-top: 5px;
}

.heart {
    color: #ff4444;
    font-size: 18px;
}


/* =========================================
   4. SNIPPET: AUDIO CONTROLLER
   ========================================= */
.controles-audio {
    position: absolute;
    left: 1vh;
    bottom: 1vh;
    scale: 0.90;
    display: flex;
    opacity: 0.3;
}

#valorVolume {
    font-size: 0.8rem;
}

#volumeSlider {
    width: 5vw;
}

.controles-audio:hover {
    opacity: 1;
}





/* =========================================
   12. SNIPPET: FOOTER
   ========================================= */
.rodapemini {
    position: absolute;
    bottom: 1vh;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 0.8rem;
    text-align: center;
    font-family: 'Orbitron', sans-serif !important;
    letter-spacing: 1px;
}

/* =========================================
   13. SNIPPET: MODALS
   ========================================= */
.modeltopo {
    background-color: #2f3546;
    color: #fff;
}

.modelconteudo {
    background-color: #161923;
    color: #c9cfd9;
    font-size: 0.8rem;
    font-family: 'Roboto';
    text-align: justify;
}













/* =========================================
   14. RESPONSIVE - Mobile Support
   ========================================= */

/* Large screens - ensure desktop look */
@media (min-width: 901px) {
    body {
        padding: 20px;
    }
}

/* Medium screens (tablets and smaller desktops) */
@media (max-width: 900px) {
    body {
        padding: 10px;
        height: auto;
        min-height: 100vh;
        overflow-y: auto;
        flex-direction: column;
    }

    #game-container {
        border-radius: 8px;
    }

    #hud {
        gap: 5px;
        padding: 5px 10px;
    }

    #problem-display {
        font-size: clamp(28px, 6vw, 48px);
        padding: 2px 15px;
    }

    .score-box {
        font-size: clamp(18px, 4vw, 24px);
    }

    .legend {
        font-size: clamp(12px, 3vw, 16px);
        gap: 10px;
        padding: 4px 8px;
    }

    .dot {
        width: 10px;
        height: 10px;
    }

    h1 {
        font-size: clamp(24px, 6vw, 48px);
    }

    p {
        font-size: clamp(14px, 3.5vw, 18px);
        padding: 0 10px;
    }

    button {
        padding: clamp(10px, 2.5vw, 15px) clamp(20px, 5vw, 40px);
        font-size: clamp(14px, 3.5vw, 20px);
    }

    .controles-audio {
        scale: 0.7;
    }

    .rodapemini {
        font-size: 0.7rem;
        padding: 0 10px;
        width: 100%;
        box-sizing: border-box;
    }
}

/* Tablet portrait and below */
@media (max-width: 768px) {
    body {
        padding: 5px;
    }

    #game-container {
        cursor: auto;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }

    #hud {
        gap: 3px;
        padding: 3px 5px;
    }

    #problem-display {
        font-size: clamp(24px, 5.5vw, 40px);
        padding: 2px 10px;
        margin-top: 0;
        margin-bottom: 0;
    }

    .score-box {
        font-size: clamp(16px, 4vw, 22px);
    }

    .legend {
        font-size: clamp(10px, 2.5vw, 14px);
        gap: 8px;
        padding: 3px 6px;
    }

    .legend-item {
        gap: 4px;
    }

    .dot {
        width: 8px;
        height: 8px;
    }

    .heart {
        font-size: 14px;
    }

    h1 {
        font-size: clamp(22px, 5.5vw, 36px);
        margin: 0 0 10px 0;
    }

    p {
        font-size: clamp(12px, 3vw, 16px);
        margin-bottom: 20px;
        line-height: 1.4;
    }

    button {
        padding: 12px 25px;
        font-size: clamp(14px, 3.5vw, 18px);
        min-height: 44px;
        /* Better mobile touch target */
    }

    .controles-audio {
        scale: 0.6;
        left: 2px;
        bottom: 2px;
    }

    #volumeSlider {
        width: 60px;
    }

    .rodapemini {
        font-size: 0.6rem;
        bottom: 2px;
    }
}

/* Mobile phones */
@media (max-width: 480px) {
    body {
        background-size: 100% 100%, 20px 20px, 20px 20px;
        padding: 3px;
    }

    #game-container {
        border-radius: 6px;
    }

    #hud {
        gap: 2px;
        padding: 2px 4px;
    }

    #problem-display {
        font-size: clamp(20px, 5vw, 32px);
        padding: 1px 8px;
        border-radius: 6px;
    }

    .score-box {
        font-size: clamp(14px, 3.5vw, 20px);
    }

    .legend {
        font-size: clamp(9px, 2.3vw, 12px);
        gap: 6px;
        padding: 2px 4px;
    }

    .legend-item {
        gap: 3px;
    }

    .dot {
        width: 7px;
        height: 7px;
    }

    .heart {
        font-size: 12px;
    }

    .lives {
        gap: 3px;
        margin-top: 3px;
    }

    h1 {
        font-size: clamp(18px, 5vw, 28px);
        letter-spacing: 1px;
    }

    p {
        font-size: clamp(11px, 2.8vw, 14px);
        margin-bottom: 15px;
    }

    button {
        padding: 10px 20px;
        font-size: clamp(12px, 3vw, 16px);
        border-radius: 20px;
    }

    .controles-audio {
        scale: 0.5;
        left: 0;
        bottom: 0;
    }

    #volumeSlider {
        width: 50px;
    }

    #valorVolume {
        font-size: 0.65rem;
    }

    .rodapemini {
        font-size: 0.55rem;
        bottom: 1px;
    }

    #start-screen,
    #game-over-screen {
        padding: 10px;
    }
}

/* Very small phones */
@media (max-width: 360px) {
    #problem-display {
        font-size: clamp(18px, 4.5vw, 28px);
        padding: 1px 6px;
    }

    .score-box {
        font-size: clamp(12px, 3vw, 18px);
    }

    .legend {
        font-size: 9px;
        gap: 4px;
        padding: 2px 3px;
    }

    .dot {
        width: 6px;
        height: 6px;
    }

    h1 {
        font-size: clamp(16px, 4.5vw, 24px);
    }

    p {
        font-size: clamp(10px, 2.5vw, 12px);
    }

    button {
        padding: 8px 16px;
        font-size: 12px;
    }

    .rodapemini {
        font-size: 0.5rem;
    }
}

/* Portrait orientation specific */
@media (orientation: portrait) and (max-width: 600px) {
    #game-container {
        margin-top: 5px;
        margin-bottom: 5px;
    }

    .rodapemini {
        position: relative;
        bottom: auto;
        left: auto;
        transform: none;
        margin-top: 10px;
        padding-bottom: 5px;
    }
}

/* Landscape mode on mobile - maximize game area */
@media (orientation: landscape) and (max-height: 500px) {
    body {
        padding: 2px;
    }

    #game-container {
        max-height: 95vh;
    }

    .controles-audio {
        scale: 0.4;
    }

    .rodapemini {
        display: none;
    }

    #ranking-module10 {
        display: none;
    }
}

/* MODULO homeimg */
.homeimg {
    position: absolute;
    left: 0.4vh;
    top: 1.1vh;
    z-index: 333;
    width: auto;
    height: 5vh;
    display: flex;
    opacity: 0.4;
    transition: all 0.2s ease-in-out;
}

.homeimg img {
    display: block;
    object-fit: contain;
    height: 100%;
}

.homeimg:hover {
    height: 6vh;
    cursor: pointer;
    opacity: 1;
}

/*-----------------------------------------------------------------------*/