/* 기본 스타일 */
body {
    margin: 0;
    background: #001a4d;
    color: #ffffff;
    font-family: "Courier New", monospace;

    overflow: hidden;          /* 전체 화면 스크롤 제거 */
    position: fixed;           /* iOS 스크롤 방지 */
    width: 100%;
    height: 100%;
}

/* CRT 전체 */
.crt {
    position: relative;
    width: 100vw;
    height: 100%;
}

/* 스캔라인 */
.crt::before {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        to bottom,
        rgba(255,255,255,0.05),
        rgba(255,255,255,0.05) 1px,
        transparent 1px,
        transparent 3px
    );
    pointer-events: none;
}

/* 깜빡임 */
.crt {
    animation: flicker 0.15s infinite;
}

@keyframes flicker {
    0% { opacity: 0.97; }
    50% { opacity: 1; }
    100% { opacity: 0.98; }
}

.center {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

/* ---------------- 입장 화면 ---------------- */
#loginBox {
    border: 1px solid white;
    padding: 40px;
    text-align: center;
}

#nickname {
    width: 80%;
    font-size: 24px;
    padding: 12px 10px;
    margin: 10px 0;
    box-sizing: border-box;
    background: #001a4d;
    color: white;
    border: 1px solid white;
}

#loginBox button {
    font-size: 22px;
    padding: 12px 25px;
    cursor: pointer;
    background: #001a4d;
    color: white;
    border: 1px solid white;
}

/* 로그인 박스 상단 헤더 */
#loginHeader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-bottom: 2px solid white;
    padding: 10px 0;
    margin-bottom: 20px;
}

#loginHeader img#loginLogo {
    width: 60px;
    height: auto;
    margin-bottom: 8px;
}

#loginHeader span {
    font-size: 28px;
    font-weight: bold;
    color: #ffffff;
    letter-spacing: 2px;
    text-align: center;
}

/* ---------------- 채팅 화면 ---------------- */
#chatScreen {
    display: none;
    flex-direction: column;
    height: 100%;
    width: 100%;
    box-sizing: border-box;
}

/* 채팅 영역 */
/* ================= 채팅 화면 ================= */
#chat {
    position: fixed;              /* absolute → fixed */
    top: 0;
    left: 0;
    right: 0;
    bottom: 60px;                 /* 입력창 높이만큼 띄움 */
    overflow-y: auto;
    border: 1px solid #ffffff55;
    padding: 10px;
    padding-bottom: 0;            /* 필요 시 */
    -webkit-overflow-scrolling: touch; /* iOS 스크롤 부드럽게 */
}

/* ================= 입력 영역 ================= */
#inputArea {
    position: fixed;
    left: 0;
    width: 100%;
    bottom: 0;                     /* 항상 화면 하단 고정 */
    background: #001a4d;
    padding: 5px;
    box-sizing: border-box;
    z-index: 10;
    height: 60px;                  /* 입력창 높이 고정 */
}
#inputArea input {
    width: 100%;
    font-size: 18px;
    padding: 10px;
    box-sizing: border-box;
    background: #001a4d;
    color: #ffffff;
    border: 1px solid #ffffff55;
}

.nick {
    color: #7ec8ff;
}

/* ---------------- 모바일 대응 ---------------- */
@media (max-width: 600px) {
    #nickname {
        font-size: 22px;
    }

    #loginBox button {
        font-size: 20px;
        padding: 10px 20px;
    }
}