* {
    box-sizing: border-box;
}

html,
body,
#app,
#gameContainer {
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
}

body {
    background: #0f172a;
    color: #f8fafc;
    font-family: Arial, Helvetica, sans-serif;
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
}

#gameContainer {
    position: relative;
}

#startOverlay {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgb(0 0 0 / 48%);
    cursor: pointer;
}

.start-card {
    display: grid;
    gap: 8px;
    padding: 20px 24px;
    border: 1px solid rgb(255 255 255 / 22%);
    border-radius: 12px;
    background: rgb(15 23 42 / 92%);
    text-align: center;
}

.start-card strong {
    font-size: 18px;
}

.start-card span {
    color: #94a3b8;
    font-size: 14px;
}

#debugHud {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 10;
    display: grid;
    gap: 7px;
    min-width: 260px;
    padding: 12px;
    border: 1px solid rgb(255 255 255 / 15%);
    border-radius: 10px;
    background: rgb(15 23 42 / 84%);
    backdrop-filter: blur(5px);
    pointer-events: none;
}

#debugHud > div:not(.debug-title) {
    display: flex;
    justify-content: space-between;
    gap: 18px;
}

#debugHud span {
    color: #94a3b8;
}

#debugHud strong {
    max-width: 155px;
    overflow: hidden;
    color: #f8fafc;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.debug-title {
    margin-bottom: 3px;
    color: #38bdf8;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 1px;
}

#crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 8;
    width: 18px;
    height: 18px;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

#crosshair span {
    position: absolute;
    display: block;
    background: white;
    box-shadow: 0 0 4px black;
}

#crosshair span:first-child {
    top: 0;
    left: 8px;
    width: 2px;
    height: 18px;
}

#crosshair span:last-child {
    top: 8px;
    left: 0;
    width: 18px;
    height: 2px;
}

#resetButton {
    position: absolute;
    right: 14px;
    bottom: 14px;
    z-index: 10;
    border: 1px solid rgb(255 255 255 / 18%);
    border-radius: 10px;
    padding: 10px 15px;
    background: rgb(15 23 42 / 86%);
    color: white;
    cursor: pointer;
}

#resetButton:hover {
    background: rgb(30 41 59 / 95%);
}

@media (max-width: 600px) {
    #debugHud {
        min-width: 220px;
        font-size: 13px;
    }
}
