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

body {
    background: #111;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    min-height: 100dvh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden;
    touch-action: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: #111;
    overflow: hidden;
}


#gameCanvas {
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

#ui-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    pointer-events: none;
}

#title-bar {
    font-size: 20px;
    font-weight: 900;
    color: #1a1a1a;
    letter-spacing: 2px;
}


#cleaner-btn {
    display: none;
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 30px;
    background: #f5f0e8;
    color: #1a1a1a;
    border: 3px solid #1a1a1a;
    border-radius: 0;
    font-weight: 900;
    font-size: 16px;
    letter-spacing: 2px;
    cursor: pointer;
    font-family: inherit;
    z-index: 10;
}

#cleaner-btn:hover {
    background: #1a1a1a;
    color: #f5f0e8;
}

#tools-btn {
    position: absolute;
    bottom: 14px;
    left: 12px;
    padding: 10px 24px;
    background: #f5f0e8;
    color: #1a1a1a;
    border: 2.5px solid #1a1a1a;
    border-radius: 0;
    font-weight: 900;
    font-size: 15px;
    letter-spacing: 2px;
    cursor: pointer;
    font-family: inherit;
    z-index: 10;
    box-shadow: 2px 2px 0 #1a1a1a;
    transition: bottom 0.2s ease;
}

#tools-btn:hover {
    background: #1a1a1a;
    color: #f5f0e8;
    box-shadow: 2px 2px 0 #444;
}

#tool-hint {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 13px;
    font-weight: 700;
    color: rgba(26, 26, 26, 0.5);
    letter-spacing: 1px;
    pointer-events: none;
    z-index: 10;
    transition: opacity 0.3s;
}


#twitter-btn {
    position: absolute;
    top: 10px;
    right: 54px;
    width: 36px;
    height: 36px;
    background: #f5f0e8;
    border: 2.5px solid #1a1a1a;
    color: #1a1a1a;
    font-size: 20px;
    font-weight: 900;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 2px 2px 0 #1a1a1a;
    z-index: 20;
    text-decoration: none;
    font-family: inherit;
}

#twitter-btn:hover {
    background: #1a1a1a;
    color: #f5f0e8;
}

#back-btn {
    display: none;
    position: absolute;
    top: 10px;
    left: 12px;
    padding: 6px 14px;
    background: #f5f0e8;
    border: 2.5px solid #1a1a1a;
    color: #1a1a1a;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 1px;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 2px 2px 0 #1a1a1a;
    z-index: 20;
}

#back-btn:hover {
    background: #1a1a1a;
    color: #f5f0e8;
}

#fs-btn {
    position: absolute;
    top: 10px;
    right: 98px;
    padding: 6px 12px;
    background: #f5f0e8;
    border: 2.5px solid #1a1a1a;
    color: #1a1a1a;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1px;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 2px 2px 0 #1a1a1a;
    z-index: 20;
}

#fs-btn:hover {
    background: #1a1a1a;
    color: #f5f0e8;
}

#vol-panel {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 20;
    font-family: inherit;
}

#vol-toggle {
    width: 36px;
    height: 36px;
    background: #f5f0e8;
    border: 2.5px solid #1a1a1a;
    color: #1a1a1a;
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 2px 2px 0 #1a1a1a;
    margin-left: auto;
}

#vol-toggle:hover {
    background: #1a1a1a;
    color: #f5f0e8;
}

#vol-sliders {
    display: none;
    background: #f5f0e8;
    border: 2.5px solid #1a1a1a;
    padding: 12px 14px;
    margin-top: 4px;
    box-shadow: 2px 2px 0 #1a1a1a;
    touch-action: auto;
}

#vol-sliders.open {
    display: block;
}

#vol-sliders label {
    display: block;
    font-size: 11px;
    font-weight: 900;
    color: #1a1a1a;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

#vol-sliders label:last-child {
    margin-bottom: 0;
}

#vol-sliders input[type="range"] {
    display: block;
    width: 120px;
    margin-top: 4px;
    accent-color: #1a1a1a;
    touch-action: auto;
}

@media (max-width: 600px) {
    #title-bar { font-size: 13px; letter-spacing: 1px; }
    #cleaner-btn { font-size: 12px; padding: 8px 20px; }
}

/* Mobile landscape */
@media (max-height: 500px) {
    #twitter-btn { top: 4px; right: 40px; width: 28px; height: 28px; font-size: 14px; }
    #back-btn { top: 4px; left: 6px; padding: 4px 10px; font-size: 10px; }
    #fs-btn { top: 4px; right: 74px; padding: 4px 8px; font-size: 9px; }
    #vol-panel { top: 4px; right: 4px; }
    #vol-toggle { width: 28px; height: 28px; font-size: 14px; }
    #vol-sliders { padding: 8px 10px; }
    #vol-sliders input[type="range"] { width: 90px; }
    #tools-btn { bottom: 6px; left: 6px; padding: 6px 14px; font-size: 12px; }
    #cleaner-btn { bottom: 10px; padding: 6px 16px; font-size: 11px; }
    #tool-hint { bottom: 8px; font-size: 11px; }
}
