* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #08141c;
    font-family: Arial, Helvetica, sans-serif;
    color: #fff;
    overflow: hidden;
}

.game-wrap {
    width: 1000px;
    transform-origin: center center;
}

#game {
    position: relative;
    width: 1000px;
    height: 560px;
    border: 4px solid #2a3340;
    border-radius: 16px;
    overflow: hidden;
    background: #6f8eaa;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

#view,
#view canvas {
    width: 1000px;
    height: 560px;
}

#hud {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    z-index: 3;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    background: linear-gradient(rgba(8, 20, 28, 0.7), transparent);
    font-weight: bold;
    text-shadow: 0 2px 0 #000;
    pointer-events: none;
}

#net-status {
    color: #9ee6ff;
}

.or-line {
    margin-top: 14px;
    font-size: 16px;
    color: #c8d4de;
}

#account-screen {
    z-index: 6;
}

#account-who {
    margin: 8px 0 0;
    color: #9ee6ff;
}

#account-nick,
#account-pass,
#join-code {
    margin-top: 8px;
    padding: 10px 12px;
    border: 3px solid #fff;
    border-radius: 10px;
    background: #10202c;
    color: #fff;
    font-size: 22px;
    font-weight: bold;
    text-align: center;
}

#account-nick {
    width: 220px;
    letter-spacing: 0.04em;
}

#account-pass {
    width: 160px;
    letter-spacing: 0.2em;
}

#account-error {
    min-height: 24px;
    color: #ffd100;
    font-size: 18px;
}

#join-code {
    width: 120px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

.name-tag {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 4;
    padding: 2px 8px;
    border-radius: 8px;
    background: rgba(8, 20, 28, 0.75);
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    text-shadow: 0 2px 0 #000;
    pointer-events: none;
    white-space: nowrap;
}

#online-error {
    min-height: 24px;
    color: #ffd100;
    font-size: 18px;
}

#door-label {
    position: absolute;
    left: 50%;
    bottom: 72px;
    z-index: 4;
    transform: translateX(-50%);
    padding: 8px 16px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.7);
    font-size: 20px;
    font-weight: bold;
}

.panel {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 20px 28px 28px;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-color: #ffd100 #10202c;
    background: rgba(8, 20, 28, 0.82);
    text-align: center;
}

.panel::-webkit-scrollbar {
    width: 14px;
}

.panel::-webkit-scrollbar-track {
    background: #10202c;
}

.panel::-webkit-scrollbar-thumb {
    background: #ffd100;
    border-radius: 8px;
}

.panel[hidden] {
    display: none;
}

h1 {
    margin: 0 0 10px;
    font-size: 48px;
    color: #ffd100;
    text-shadow: 0 5px 0 #c8102e;
}

p {
    margin: 0 0 10px;
    font-size: 20px;
}

button {
    margin-top: 12px;
    min-width: 160px;
    padding: 12px 20px;
    border: 3px solid #fff;
    border-radius: 12px;
    background: #5b3d8f;
    color: #fff;
    font-size: 22px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 5px 0 #3b2560;
}

button:hover {
    transform: translateY(-2px);
}
