* {
    box-sizing: border-box;
}

:root {
    --app-width: 100vw;
    --app-height: 100dvh;
}

html,
body {
    width: 100%;
    height: var(--app-height);
    min-height: var(--app-height);
    margin: 0;
    padding: 0;
    overflow: hidden;
    color: #2b1800;
    background: #12151f;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    touch-action: none;
    user-select: none;
}

#app {
    position: fixed;
    inset: 0;
    width: var(--app-width);
    height: var(--app-height);
    overflow: hidden;
    background: #12151f;
}

#game-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

#game-container canvas {
    display: block;
}

#orientation-lock {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 32px;
    text-align: center;
    color: #3b2400;
    background: radial-gradient(circle at 50% 34%, #ffe38b 0%, #ffbb38 45%, #ff7a1a 100%);
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 0;
}

.name-dialog {
    position: fixed;
    inset: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(18, 21, 31, 0.42);
}

.name-dialog__panel {
    width: min(420px, 92vw);
    padding: 24px;
    color: #3a2000;
    background: #fff2bf;
    border: 6px solid #3a2000;
    box-shadow: 0 10px 0 rgba(58, 32, 0, 0.28);
}

.name-dialog__title {
    margin-bottom: 14px;
    font-size: 30px;
    font-weight: 900;
    line-height: 1;
}

.name-dialog__input {
    width: 100%;
    height: 54px;
    padding: 0 14px;
    color: #3a2000;
    background: #fffaf0;
    border: 4px solid #3a2000;
    border-radius: 0;
    outline: none;
    font: 800 22px Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    touch-action: manipulation;
}

.name-dialog__input:focus {
    border-color: #ff8a1f;
}

.name-dialog__actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 18px;
}

.name-dialog__button {
    min-width: 96px;
    height: 48px;
    color: #3a2000;
    background: #ffd042;
    border: 4px solid #3a2000;
    border-radius: 0;
    font: 900 20px "Arial Black", "PingFang SC", sans-serif;
    cursor: pointer;
    touch-action: manipulation;
}

.name-dialog__button--ghost {
    background: #ffffff;
}

@media (orientation: portrait) and (max-width: 920px) {
    #orientation-lock {
        display: flex;
    }
}
