@font-face {
    font-family: 'LINESeedKR';
    src: url('/fonts/LINESeedKR-Rg.woff2') format('woff2');
    font-weight: 400;
}
@font-face {
    font-family: 'LINESeedKR';
    src: url('/fonts/LINESeedKR-Bd.woff2') format('woff2');
    font-weight: 700;
}
@font-face {
    font-family: 'NeoDunggeunmo';
    src: url('/fonts/neodgm.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

:root {
    --bg-main: #000000;
    --lime: #B0E321;
    --text-white: #FFFFFF;
    --gray-text: #C2C2C2;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-main);
    color: var(--text-white);
    font-family: 'LINESeedKR', sans-serif;
    overflow-x: auto;
    min-width: 1280px;
}

#tab-miniroom, 
#tab-quiz,
.game-view-container,
.quiz-board,
.large-explain-modal,
.center-prepare-wrap,
.pixel-text,
.pixel-btn,
.fullscreen-guide-bar,
.mc-bubble,
.tombstone,
.modal-box,
.chat-container,
.chat-bubble,
.header-status-panel,
.center-join-btn,
.shop-notice-bubble,
.hud-exp-wrap,
.hud-quick-menu {
    font-family: 'NeoDunggeunmo', monospace !important;
    -webkit-font-smoothing: none;
    -moz-osx-font-smoothing: grayscale;
}

header {
    position: sticky;
    top: 0;
    width: 100%;
    min-width: 1280px;
    height: 45px;
    padding: 0 40px;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(12px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
    font-size: 18px;
    font-weight: 700;
    color: var(--lime);
    cursor: pointer;
}
.logo span { color: var(--text-white); font-weight: 100; }

.nav-links {
    display: flex;
    gap: 20px;
}
.nav-item {
    color: var(--gray-text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    transition: color 0.2s;
}
.nav-item:hover, .nav-item.active {
    color: var(--lime);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
}
.test-user-select {
    background: #111;
    color: var(--lime);
    border: 1px solid #444;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
}

.btn-viewport-sound {
    position: absolute;
    top: 16px;
    right: 20px;
    width: 58px;
    height: 58px;
    box-sizing: border-box;
    background: rgba(14, 14, 18, 0.88);
    border: 2px solid var(--lime);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 60;
    box-shadow: 2px 2px 0px #000;
    transition: all 0.15s ease-in-out;
    user-select: none;
}
.btn-viewport-sound:hover {
    background: rgba(25, 25, 35, 0.95);
    transform: scale(1.05);
    box-shadow: 0 0 12px rgba(176, 227, 33, 0.5), 2px 2px 0px #000;
}
.btn-viewport-sound .sound-icon {
    font-size: 22px;
    line-height: 1;
    margin-bottom: 3px;
}
.btn-viewport-sound .sound-text {
    font-size: 12px;
    font-weight: normal;
    color: var(--lime);
    letter-spacing: 0px;
}
.btn-viewport-sound.muted {
    border-color: #ff4444;
    background: rgba(28, 12, 12, 0.9);
}
.btn-viewport-sound.muted .sound-text {
    color: #ff5555;
}

.tab-content {
    display: none;
    width: 100%;
    min-width: 1280px;
    min-height: calc(100vh - 45px);
    box-sizing: border-box;
}
.tab-content.active { display: block; }

.hero-section {
    width: 100%;
    height: 400px;
    background: url('/images/head.jpg') center/cover no-repeat;
    background-color: #111;
}
.slider-wrap {
    max-width: 800px;
    margin: 40px auto;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: #1a1a1a;
    height: 350px;
}
.slider-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}
.slider-track img {
    width: 800px;
    height: 350px;
    object-fit: cover;
    background-color: #222;
}
.discord-btn-wrap {
    text-align: center;
    margin: 30px 0;
}
.btn-discord {
    background-color: var(--lime);
    color: #000;
    font-weight: 700;
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 16px;
    display: inline-block;
    transition: transform 0.2s;
}
.btn-discord:hover { transform: scale(1.05); }

.pixel-btn {
    background: #222;
    color: #fff;
    border: 2px solid #fff;
    box-shadow: 2px 2px 0px #000;
    padding: 6px 14px;
    cursor: pointer;
    image-rendering: pixelated;
    font-size: 14px;
    font-weight: normal;
    letter-spacing: 0px;
}
.pixel-btn:hover {
    background: var(--lime);
    color: #000;
}

.game-view-container {
    width: 1400px;
    margin: 0 auto 20px auto; /* 상단 여백 완전 제거 (헤더 바로 아래 밀착) */
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.fullscreen-guide-bar {
    display: none !important;
}

.game-viewport {
    width: 1400px;
    height: 865px;
    position: relative;
    /* z-index 제거: 기본 서열로 복귀하여 채팅창(2600)이 정상 표시됨 */
    box-sizing: border-box;
    background-color: #1a1a1a;
    background-image: url('/images/quiz_bg.png');
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    border: 3px solid #444;
    border-radius: 8px;
    overflow: visible; /* 구슬 날개가 캔버스 아래로 삐져나와도 잘리지 않음 */
    box-shadow: none;
    cursor: pointer;
    user-select: none;
    -webkit-user-drag: none;
    -webkit-user-select: none;
}

.game-viewport.danger-369 {
    box-shadow: inset 0 0 60px rgba(255, 0, 0, 0.6), 0 0 40px rgba(255, 30, 30, 0.8) !important;
    border-color: #ff3333 !important;
}
.game-viewport.earthquake-hit {
    animation: quakeImpact 0.15s ease-in-out;
}
@keyframes quakeImpact {
    0% { transform: translate(0, 0); }
    25% { transform: translate(-4px, 3px); }
    50% { transform: translate(4px, -3px); }
    75% { transform: translate(-2px, -2px); }
    100% { transform: translate(0, 0); }
}

.banner-369-wrap {
    position: absolute;
    top: 28%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(20, 0, 0, 0.94);
    border: 3px solid #ff2222;
    box-shadow: 0 0 35px rgba(255, 0, 0, 0.85), inset 0 0 20px rgba(255, 0, 0, 0.5);
    border-radius: 10px;
    padding: 14px 34px;
    text-align: center;
    z-index: 2100;
    display: none;
    animation: pop369 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes pop369 {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
    100% { transform: translate(-50%, -50%) scale(1.0); opacity: 1; }
}
.banner-369-title {
    font-size: 28px;
    font-weight: bold;
    color: #ff3333;
    text-shadow: 2px 2px 0px #000, 0 0 15px rgba(255, 50, 50, 0.8);
    margin-bottom: 4px;
}
.banner-369-desc {
    font-size: 16px;
    font-weight: normal;
    color: #ffde59;
    text-shadow: 1px 1px 0px #000;
}

/* 👇 튀어나오던 콤보 배너 기본 숨김 처리 */
.combo-popup-banner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 4000;
    pointer-events: none;
    display: none !important;
}

.blur-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 50;
    background: rgba(0,0,0,0.4);
}

#quizCanvas {
    width: 100%;
    height: 100%;
    position: relative;
}

.header-status-panel {
    position: absolute;
    top: 16px;
    left: 20px;
    width: 58px;
    height: 58px;
    background: rgba(14, 14, 18, 0.88);
    border: 2px solid var(--lime);
    border-radius: 8px;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 2px 2px 0px #000;
    z-index: 50;
    pointer-events: auto !important;
    cursor: pointer;
    box-sizing: border-box;
    user-select: none;
}
.status-round-row {
    display: none;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    font-weight: bold;
    color: #FFDE59;
    text-shadow: 1px 1px 0px #000;
}
.status-divider {
    display: none;
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.15);
}
.status-players-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    width: 100%;
}
.status-players-icon {
    font-size: 22px;
    line-height: 1;
}
.status-players-num {
    font-size: 12px;
    font-weight: normal;
    color: var(--lime);
    letter-spacing: 0px;
    white-space: nowrap;
}

.players-dropdown-list {
    position: absolute;
    top: 66px;
    left: 0;
    width: 210px;
    max-height: 280px;
    overflow-y: auto;
    background: rgba(14, 14, 18, 0.96);
    border: 2px solid var(--lime);
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.9), 0 0 10px rgba(176, 227, 33, 0.2);
    padding: 8px 10px;
    display: none;
    flex-direction: column;
    gap: 6px;
    z-index: 120;
    box-sizing: border-box;
    animation: rollDownAnim 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.2) forwards;
}
.players-dropdown-list.open {
    display: flex;
}
@keyframes rollDownAnim {
    0% { opacity: 0; transform: translateY(-8px); }
    100% { opacity: 1; transform: translateY(0); }
}
.players-dropdown-header {
    font-size: 12px;
    font-weight: normal;
    color: #FFDE59;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.2);
    padding-bottom: 4px;
    margin-bottom: 2px;
    display: flex;
    justify-content: space-between;
    letter-spacing: 0px;
}
.dropdown-player-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: #ffffff;
    background: #1e1e28;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #333;
    gap: 6px;
}
.dropdown-player-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
}
.dropdown-player-item .dp-lvl {
    color: var(--lime);
    font-weight: normal;
    font-size: 12px;
}
.dropdown-player-item .dp-name {
    font-weight: normal;
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.btn-kick-user {
    background: #4a1515;
    color: #ff6b6b;
    border: 1px solid #ff4444;
    border-radius: 3px;
    font-size: 11px;
    font-weight: normal;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
}
.btn-kick-user:hover {
    background: #ff4444;
    color: #fff;
}
.dropdown-player-empty {
    font-size: 12px;
    color: #888;
    text-align: center;
    padding: 8px 0;
}
.players-dropdown-list::-webkit-scrollbar { width: 5px; }
.players-dropdown-list::-webkit-scrollbar-thumb { background: #444; border-radius: 3px; }

.header-status-panel.in-quiz {
    width: auto;
    height: auto;
    padding: 6px 14px;
    gap: 4px;
    align-items: stretch;
    background: rgba(14, 14, 18, 0.92);
}
.header-status-panel.in-quiz .status-round-row {
    display: flex;
}
.header-status-panel.in-quiz .status-divider {
    display: block;
}
.header-status-panel.in-quiz .status-players-row {
    flex-direction: row;
    gap: 6px;
    font-size: 13px;
    font-weight: normal;
    color: #ffffff;
}
.header-status-panel.in-quiz .status-players-icon {
    font-size: 14px;
}
.header-status-panel.in-quiz .status-players-num {
    font-size: 13px;
}

.center-join-wrap {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 70;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}
.center-join-btn {
    background: #111115;
    color: #777777;
    border: 3px solid #555555;
    border-radius: 8px;
    padding: 16px 40px;
    font-size: 22px;
    font-weight: normal;
    box-shadow: 4px 4px 0px #000;
    cursor: not-allowed;
    transition: all 0.2s;
    text-shadow: 2px 2px 0px #000;
    letter-spacing: 0px;
    white-space: nowrap;
}
.center-join-btn.active {
    background: var(--lime);
    color: #000000;
    border-color: #ffffff;
    box-shadow: 0 0 25px rgba(176, 227, 33, 0.8), 4px 4px 0px #000;
    cursor: pointer;
    text-shadow: none;
    animation: pulseBtn 1.2s infinite alternate;
}
@keyframes pulseBtn {
    0% { transform: scale(1); }
    100% { transform: scale(1.06); }
}

.player-avatar {
    position: absolute;
    width: 192px;
    height: 240px;
    transform: translate(-50%, -88%);
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    will-change: transform, left, top;
    transition: opacity 0.3s;
}

.avatar-body {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.avatar-body img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.45));
}

.player-avatar.facing-right .avatar-body {
    transform: scaleX(-1);
}

.player-avatar.walking .avatar-body img {
    animation: dotBounce 0.22s infinite alternate ease-in-out;
}
@keyframes dotBounce {
    0% { transform: translateY(0px) scale(1, 1); }
    100% { transform: translateY(-14px) scale(0.96, 1.04); }
}

.player-avatar.ghost {
    transform: translate(-50%, -88%) scale(0.85) !important;
}
.player-avatar.ghost .avatar-body {
    opacity: 0.65;
}
.player-avatar.ghost.walking .avatar-body img {
    animation: ghostFloat 0.6s infinite alternate ease-in-out;
}
@keyframes ghostFloat {
    0% { transform: translateY(0px); }
    100% { transform: translateY(-10px); }
}

.player-avatar.angel-ari .avatar-body img,
.player-avatar.angel-yunmi .avatar-body img {
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.85)) drop-shadow(0 0 16px rgba(255, 235, 100, 0.5));
    animation: none;
}
.player-avatar.angel-ari.walking .avatar-body img,
.player-avatar.angel-yunmi.walking .avatar-body img {
    animation: angelFlyBounce 0.45s infinite alternate ease-in-out !important;
}
@keyframes angelFlyBounce {
    0% { transform: translateY(-2px) scale(0.98, 1.02); }
    100% { transform: translateY(-16px) scale(1.02, 0.98); }
}

.player-choice-badge {
    position: absolute;
    top: -24px;
    left: 50%;
    transform: translateX(-50%);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    font-weight: normal;
    box-shadow: 0 0 10px rgba(0,0,0,0.8), 2px 2px 0px #000;
    border: 2px solid #ffffff;
    z-index: 15;
    animation: choicePop 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.player-choice-badge.badge-o {
    background: #10b981;
    color: #ffffff;
    border-color: #a7f3d0;
}
.player-choice-badge.badge-x {
    background: #ef4444;
    color: #ffffff;
    border-color: #fca5a5;
}
@keyframes choicePop {
    0% { transform: translateX(-50%) scale(0.3); opacity: 0; }
    100% { transform: translateX(-50%) scale(1.0); opacity: 1; }
}

.player-name-box {
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(235, 235, 240, 0.95);
    color: #111111;
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
    border: 1px solid #777788;
    box-shadow: 1px 1px 0px #000;
    font-size: 14px;
    font-weight: normal;
    letter-spacing: 0px;
    z-index: 10;
}
.player-lvl-tag {
    color: #2b7a0b;
    font-size: 12px;
    font-weight: normal;
    margin-right: 2px;
}
.player-avatar.me .player-name-box {
    background: var(--lime);
    color: #000;
    border-color: #000;
}
.player-avatar.me .player-lvl-tag {
    color: #000;
}

.player-avatar.staff-admin .player-name-box {
    background: rgba(26, 10, 20, 0.92) !important;
    border: 2px solid #FF69B4 !important;
    box-shadow: 0 0 10px rgba(255, 105, 180, 0.6), 2px 2px 0px #000 !important;
    color: #FFB6C1 !important;
    font-weight: normal !important;
    text-shadow: none !important;
    padding: 3px 8px !important;
}
.player-avatar.staff-admin .player-lvl-tag {
    color: #FF69B4 !important;
    text-shadow: none !important;
}

.player-avatar.ghost .player-name-box {
    background: rgba(0, 0, 0, 0.85);
    color: #ccc;
    border-color: #777;
}
.player-hearts {
    color: #ff5e62;
    font-size: 13px;
}

.chat-bubble {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: #ffffff;
    color: #000000;
    border: 2px solid #000000;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 13px;
    font-weight: normal;
    letter-spacing: 0px;
    box-shadow: 2px 2px 0px rgba(0,0,0,0.6);
    white-space: nowrap;
    pointer-events: none;
    z-index: 40;
    animation: bubblePop 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.chat-bubble::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px 5px 0 5px;
    border-style: solid;
    border-color: #ffffff transparent transparent transparent;
}
@keyframes bubblePop {
    0% { transform: translateX(-50%) scale(0.5); opacity: 0; }
    100% { transform: translateX(-50%) scale(1); opacity: 1; }
}

.floating-damage {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(10, 10, 15, 0.95);
    border: 2px solid #ff2a4b;
    box-shadow: 0 0 10px rgba(255, 42, 75, 0.6), 2px 2px 0px #000;
    border-radius: 6px;
    padding: 3px 8px 2px 8px;
    color: #ff3b5c;
    font-size: 15px;
    font-weight: bold;
    text-shadow: 1px 1px 0px #000;
    white-space: nowrap;
    pointer-events: none;
    z-index: 50;
    animation: floatDamageBox 1.4s forwards cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes floatDamageBox {
    0% { opacity: 0; transform: translate(-50%, 5px) scale(0.6); }
    20% { opacity: 1; transform: translate(-50%, -18px) scale(1.2); }
    35% { opacity: 1; transform: translate(-50%, -15px) scale(1.0); }
    80% { opacity: 1; transform: translate(-50%, -25px) scale(1.0); }
    100% { opacity: 0; transform: translate(-50%, -35px) scale(0.85); }
}

.skull-pop {
    display: inline-block;
    animation: skullImpactHuge 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.3) forwards;
    filter: drop-shadow(0 0 6px #ff0000);
}
@keyframes skullImpactHuge {
    0% { transform: scale(6.5) translateY(-30px); opacity: 0; }
    45% { transform: scale(0.7) translateY(0px); opacity: 1; }
    70% { transform: scale(1.4) translateY(-4px); }
    100% { transform: scale(1.0) translateY(0px); opacity: 1; }
}

.tombstone {
    position: absolute;
    width: 44px;
    height: 52px;
    background: #2b2b36;
    border: 2px solid #555;
    border-radius: 20px 20px 2px 2px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 5px;
    box-sizing: border-box;
    transform: translate(-50%, -100%);
    box-shadow: 0 4px 6px rgba(0,0,0,0.6);
    pointer-events: none;
    overflow: hidden;
}
.tomb-cross { font-size: 14px; color: #888; line-height: 1; flex-shrink: 0; }
.tomb-name-wrap {
    width: 38px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    margin-top: 4px;
}
.tomb-name {
    font-size: 10px;
    color: #ffaa00;
    white-space: nowrap;
    text-align: center;
}
.tomb-name.marquee {
    display: inline-block;
    animation: tombMarquee 3s ease-in-out infinite alternate;
}
@keyframes tombMarquee {
    0%, 20% { transform: translateX(0%); }
    80%, 100% { transform: translateX(calc(-100% + 36px)); }
}

.center-prepare-wrap {
    position: absolute;
    top: 48%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1600 !important;
    display: none;
    pointer-events: none;
}
.prepare-title {
    font-size: 32px;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 3px 3px 0px #000, 0 0 15px rgba(0,0,0,0.8);
    margin-bottom: 15px;
}
.prepare-countdown {
    font-size: 70px;
    font-weight: bold;
    color: var(--lime);
    text-shadow: 4px 4px 0px #000;
}

.quiz-board {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 1100px;
    min-height: 110px;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
    border: 2px solid var(--lime);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
    padding: 12px 30px;
    border-radius: 8px;
    z-index: 30;
    display: none;
    box-sizing: border-box;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
}
.quiz-board.has-image {
    width: 1180px;
    padding: 15px 25px;
}
.quiz-board-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    width: 100%;
}
.quiz-img-wrap {
    max-width: 260px;
    max-height: 150px;
    border: 2px solid #555;
    border-radius: 6px;
    overflow: hidden;
    background: #111;
    display: none;
}
.quiz-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.quiz-board-content {
    flex: 1;
    text-align: center;
}
.quiz-question {
    font-size: 22px;
    line-height: 1.5;
    color: #ffffff;
    font-weight: normal;
    letter-spacing: 0px;
    white-space: pre-wrap !important;
    word-break: keep-all;
}

.quiz-sub-limit-bar {
    margin-top: 8px;
    font-size: 14px;
    font-weight: normal;
    color: #ff3333;
    background: rgba(255, 0, 0, 0.15);
    border: 1px solid rgba(255, 50, 50, 0.5);
    border-radius: 4px;
    padding: 4px 12px;
    display: inline-block;
    animation: pulse369Bar 1s infinite alternate ease-in-out;
}
@keyframes pulse369Bar {
    0% { transform: scale(1); opacity: 0.9; }
    100% { transform: scale(1.02); opacity: 1; border-color: #ff3333; }
}

.quiz-timer {
    position: absolute;
    top: 235px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 110px;
    font-weight: bold;
    text-align: center;
    text-shadow: 5px 5px 0px #000000, 0 0 20px rgba(0, 0, 0, 0.95);
    transition: color 0.2s, transform 0.15s;
    pointer-events: none;
    z-index: 1500 !important;
    display: none;
}
.quiz-timer.color-green { color: var(--lime); }
.quiz-timer.color-yellow { color: #FFDE59; }
.quiz-timer.color-red { color: #FF4444; }
.quiz-timer.pulse {
    animation: timerPop 0.4s infinite alternate ease-in-out;
}
@keyframes timerPop {
    0% { transform: translateX(-50%) scale(1); }
    100% { transform: translateX(-50%) scale(1.25); }
}

.large-explain-modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 580px;
    height: 300px;
    background: rgba(10, 10, 14, 0.94);
    backdrop-filter: blur(8px);
    border: 2px solid var(--lime);
    box-shadow: 0 10px 40px rgba(0,0,0,0.9);
    border-radius: 12px;
    z-index: 2000 !important;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
    text-align: center;
    transition: width 0.25s ease-out, height 0.25s ease-out;
}
.large-explain-modal.mode-text-only {
    width: 680px;
    height: 340px;
}
.large-explain-modal.mode-has-image {
    width: 960px;
    height: 540px;
}

.explain-step-1 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}
#explainStep1Q {
    white-space: pre-wrap !important;
    word-break: keep-all;
    font-weight: normal;
}
.explain-step-2 {
    display: none;
    font-size: 46px;
    font-weight: bold;
    color: #FFDE59;
    text-shadow: 3px 3px 0px #000;
}
.explain-step-3 {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    gap: 12px;
}
.explain-img-box {
    width: 500px;
    height: 250px;
    background: #000;
    border: 2px solid #444;
    border-radius: 6px;
    display: none;
    align-items: center;
    justify-content: center;
    margin: 6px 0;
    overflow: hidden;
    flex-shrink: 0;
}
.explain-img-box img {
    width: 100%;
    height: 100%;
    object-fit: fill;
}
.explain-desc-text {
    width: 100%;
    max-width: 600px;
    font-size: 20px;
    line-height: 1.6;
    color: #ffffff;
    font-weight: normal;
    letter-spacing: 0px;
    text-align: center;
    white-space: pre-wrap !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
}
.large-explain-modal.mode-has-image .explain-desc-text {
    max-width: 860px;
    font-size: 18px;
}

#confettiCanvas {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    z-index: 80;
}

.lobby-guide-overlay {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 1200px;
    height: 115px;
    background: rgba(0, 0, 0, 0.75);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
    z-index: 25;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 25px;
    box-sizing: border-box;
    pointer-events: none;
}
.guide-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 15px;
}
.guide-col.divider {
    border-right: 1px dashed rgba(255, 255, 255, 0.25);
}
.guide-title {
    font-size: 16px;
    font-weight: normal;
    color: var(--lime);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.guide-desc {
    font-size: 13px;
    line-height: 1.5;
    color: #ececec;
    font-weight: normal;
    letter-spacing: 0px;
    word-break: keep-all;
}
.guide-highlight {
    color: #ffde59;
    font-weight: normal;
}

.mc-avatar {
    position: absolute;
    left: 30px;
    bottom: 140px;
    width: 240px;
    height: 260px;
    transform: scaleX(-1);
    z-index: 50;
    pointer-events: none;
    display: none;
}
.mc-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: pixelated;
    user-select: none;
    -webkit-user-drag: none;
}
.mc-bubble {
    position: absolute;
    left: 80px;
    bottom: 390px;
    background: #ffffff;
    color: #000000;
    border: 2px solid #000000;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 14px;
    font-weight: normal;
    letter-spacing: 0px;
    box-shadow: 2px 2px 0px rgba(0,0,0,0.5);
    z-index: 1500 !important;
    display: none;
    white-space: nowrap;
    pointer-events: none;
    animation: bubblePop 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.mc-bubble::after {
    content: '';
    position: absolute;
    left: 20px;
    bottom: -8px;
    border-width: 8px 6px 0 6px;
    border-style: solid;
    border-color: #ffffff transparent transparent transparent;
}

.hud-exp-wrap {
    position: absolute;
    bottom: 159px;
    left: 50%;
    transform: translateX(-50%);
    width: 780px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    z-index: 3000 !important; /* 채팅창(2600)보다 높으므로 구슬이 위로 올라옴 */
    pointer-events: none;
}

.exp-continuous-track {
    position: relative;
    width: 100%;
    height: 22px;
    background: rgba(130, 130, 145, 0.95);
    border: 2px solid #33333d;
    box-sizing: border-box;
    border-radius: 4px;
    overflow: visible;
    box-shadow: 0 4px 10px rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 18px;
}
.exp-continuous-fill {
    position: absolute;
    top: 0; left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(180deg, #d2f854 0%, #8ebc15 100%);
    box-shadow: 0 0 8px rgba(176, 227, 33, 0.7);
    transition: width 0.3s ease-out;
    z-index: 1;
    border-radius: 2px;
}
.exp-grid-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    display: flex;
    z-index: 2;
    pointer-events: none;
}
.exp-grid-col {
    flex: 1;
    border-right: 2px solid rgba(0,0,0,0.25);
    box-sizing: border-box;
}
.exp-grid-col:last-child { border-right: none; }

.hud-exp-text-inner {
    position: relative;
    z-index: 5;
    font-size: 13px;
    font-weight: normal;
    color: #111111;
    letter-spacing: 0px;
    user-select: none;
    line-height: 1;
}

.hud-level-badge-anchor {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -62%); /* ← Y 위치 조절 포인트 (아래 설명 참조) */
    width: 144px;
    height: 144px;
    z-index: 3000 !important; /* 채팅창(2600)을 뚫고 맨 위로 완벽하게 올라옴 */
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.hud-level-badge-img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: pixelated;
    filter: drop-shadow(0 6px 14px rgba(0,0,0,0.85));
}
.hud-level-badge-text {
    position: relative;
    z-index: 2;
    font-size: 20px;
    font-weight: bold;
    color: #0d2c54;
    text-shadow: 0 0 3px rgba(255, 255, 255, 0.9);
    margin-top: -12px;
    letter-spacing: -0.5px;
}

.hud-quick-menu {
    position: absolute;
    bottom: 159px; /* 하단 145px 여백 + 원래 띄움값 14px */
    right: 24px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    z-index: 1000;
    pointer-events: auto;
}

.hud-gold-badge {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 17px;
    font-weight: normal;
    color: #FFDE59;
    text-shadow: 2px 2px 0px #000, 0 0 6px rgba(0,0,0,0.9);
    letter-spacing: 0px;
    user-select: none;
}
.hud-gold-badge span {
    font-size: 17px;
    font-weight: normal;
    color: #FFDE59;
    letter-spacing: 0px;
}

.hud-btn-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hud-btn-icon {
    position: relative;
    width: 72px;
    height: 72px;
    cursor: pointer;
    transition: transform 0.15s ease-in-out, filter 0.15s;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hud-btn-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: pixelated;
    filter: drop-shadow(2px 3px 0px #000);
    pointer-events: none;
}
.hud-btn-icon:hover {
    transform: scale(1.08);
    filter: drop-shadow(0 0 10px var(--lime));
}
.hud-btn-icon:active {
    transform: scale(0.95);
}

.hud-btn-icon .hud-custom-tooltip {
    position: absolute;
    top: -34px;
    left: 50%;
    transform: translateX(-50%);
    background: #111115;
    color: var(--lime);
    border: 2px solid var(--lime);
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 13px;
    font-weight: normal;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
    box-shadow: 2px 2px 0px #000;
    z-index: 20;
}
.hud-btn-icon:hover .hud-custom-tooltip { opacity: 1; }

.menu-new-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ff5e00;
    color: #ffffff;
    border: 1.5px solid #ffffff;
    font-size: 11px;
    font-weight: normal;
    padding: 1px 6px;
    border-radius: 8px;
    box-shadow: 0 0 8px rgba(255, 94, 0, 0.9);
    display: none;
    animation: pulseNew 0.8s infinite alternate;
    z-index: 10;
    pointer-events: none;
}
@keyframes pulseNew {
    0% { transform: scale(1); }
    100% { transform: scale(1.15); }
}

.dock-gold-float {
    position: absolute;
    top: -32px;
    left: 50%;
    transform: translateX(-50%);
    color: #FFE600;
    font-size: 24px;
    font-weight: normal;
    text-shadow: 0 0 16px rgba(255, 230, 0, 1), 0 0 8px #FF8800, 2px 2px 0px #000;
    pointer-events: none;
    z-index: 100;
    animation: goldFloatPop 1.8s forwards cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes goldFloatPop {
    0% { opacity: 0; transform: translate(-50%, 15px) scale(0.5); }
    20% { opacity: 1; transform: translate(-50%, -10px) scale(1.3); }
    40% { opacity: 1; transform: translate(-50%, -15px) scale(1.0); }
    75% { opacity: 1; transform: translate(-50%, -30px) scale(1.0); }
    100% { opacity: 0; transform: translate(-50%, -48px) scale(0.85); }
}
.hud-gold-badge.coin-shining { animation: coinShineGlow 0.8s ease-out; }
@keyframes coinShineGlow {
    0% { filter: drop-shadow(0 0 0px #FFE600); transform: scale(1); }
    30% { filter: drop-shadow(0 0 14px #FFE600) brightness(1.4); transform: scale(1.1); }
    100% { filter: drop-shadow(0 0 0px #FFE600); transform: scale(1); }
}

.shop-notice-bubble {
    position: absolute;
    bottom: 84px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(180deg, #d2f854 0%, #8ebc15 100%);
    color: #000000;
    border: 2px solid #ffffff;
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: normal;
    box-shadow: 0 0 18px rgba(176, 227, 33, 0.8), 2px 2px 0px #000;
    white-space: nowrap;
    pointer-events: none;
    display: none;
    z-index: 100;
    letter-spacing: 0px;
    animation: bounceNotice 0.8s infinite alternate ease-in-out;
}

.game-modal-backdrop {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(5px);
    z-index: 5000 !important;
    display: none;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}
.modal-box {
    width: 980px;
    max-height: 640px;
    background: #14141a;
    border: 3px solid var(--lime);
    box-shadow: 0 0 35px rgba(0,0,0,0.95);
    border-radius: 8px;
    padding: 20px 24px;
    box-sizing: border-box;
    color: #fff;
    display: flex;
    flex-direction: column;
    z-index: 5010 !important;
    pointer-events: auto;
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #333;
    padding-bottom: 10px;
    margin-bottom: 12px;
}
.modal-title {
    font-size: 22px;
    color: var(--lime);
    font-weight: normal;
    letter-spacing: 0px;
}
.modal-close-btn {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    font-weight: normal;
}
.modal-close-btn:hover { color: #ff5e62; }

.item-grid {
    display: grid;
    gap: 16px;
    margin-top: 10px;
    overflow-y: auto;
    padding-right: 8px;
    max-height: 520px;
}
.item-grid.col-shop { grid-template-columns: repeat(2, 1fr); }
.item-grid.col-hair { grid-template-columns: repeat(3, 1fr); }
.item-grid.col-bag { grid-template-columns: repeat(4, 1fr); }
.item-grid::-webkit-scrollbar { width: 8px; }
.item-grid::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
    border: 1px solid var(--lime);
}

.shop-tier-card {
    background: #1a1a24;
    border: 2px solid #383848;
    border-radius: 8px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    position: relative;
}
.shop-tier-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.2);
    padding-bottom: 8px;
    margin-bottom: 10px;
}
.shop-tier-title {
    font-size: 15px;
    font-weight: normal;
    color: var(--lime);
}
.shop-tier-price {
    font-size: 14px;
    font-weight: normal;
    color: #FFDE59;
}
.shop-tier-slots {
    display: flex;
    gap: 12px;
    flex: 1;
}
.shop-slot-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding: 8px 4px;
    box-sizing: border-box;
    border-radius: 6px;
    overflow: hidden;
}
.shop-slot-item.owned .item-preview-img {
    filter: drop-shadow(0 0 10px rgba(176, 227, 33, 0.85)) drop-shadow(0 6px 10px rgba(0, 0, 0, 0.7));
}
.shop-slot-item.disabled-strike::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: repeating-linear-gradient(45deg, rgba(255, 0, 0, 0.4), rgba(255, 0, 0, 0.4) 10px, transparent 10px, transparent 20px);
    mask-image: radial-gradient(circle, rgba(0,0,0,1) 40%, rgba(0,0,0,0) 95%);
    -webkit-mask-image: radial-gradient(circle, rgba(0,0,0,1) 40%, rgba(0,0,0,0) 95%);
    pointer-events: none;
    z-index: 1;
}

.item-preview-img {
    width: 192px;
    height: 240px;
    object-fit: contain;
    margin-bottom: 8px;
    filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.7));
    position: relative;
    z-index: 2;
}
.item-name {
    font-size: 15px;
    font-weight: normal;
    letter-spacing: 0px;
    margin-bottom: 8px;
    text-align: center;
    position: relative;
    z-index: 2;
}
.item-btn {
    width: 90%;
    padding: 7px 0;
    font-size: 13px;
    font-weight: normal;
    letter-spacing: 0px;
    position: relative;
    z-index: 2;
}

.bag-card {
    background: #1e1e28;
    border: 2px solid #444;
    border-radius: 8px;
    padding: 14px 8px 12px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    min-height: 340px;
    box-sizing: border-box;
}
.bag-card .item-preview-img {
    width: 192px;
    height: 240px;
}

.chat-container {
    width: 1400px;
    margin-top: -145px !important;
    position: relative;
    z-index: 2600; /* 캔버스 배경(auto)보다는 위, 구슬(3000)보다는 아래 */
    background: transparent !important;
    border: none !important;
    padding: 0 16px 12px 16px;
    box-sizing: border-box;
    box-shadow: none !important;
}

/* 박스(2): 짙은 다크그레이 로그 창 (총 88px 높이) */
.chat-log-box {
    height: 88px;
    overflow-y: auto;
    background: #14141a !important;
    border: 2px solid #333340;
    border-radius: 4px;
    padding: 6px 10px;
    box-sizing: border-box;
    font-size: 13px;
    line-height: 1.6;
    color: #ffffff;
    margin-bottom: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    scroll-behavior: smooth;
}
.chat-log-box::-webkit-scrollbar { width: 5px; }
.chat-log-box::-webkit-scrollbar-thumb { background: #444; border-radius: 3px; }

/* 닉네임/레벨: 화이트 볼드 / 대화: 화이트 / 운영진 텍스트는 핑크 유지 */
.chat-log-msg .chat-user-lvl { color: #dddddd !important; font-weight: 700; margin-right: 4px; }
.chat-log-msg .chat-user-name { color: #ffffff !important; font-weight: 700; margin-right: 6px; }
.chat-log-msg .chat-user-text { color: #ffffff; font-weight: 400; word-break: break-all; letter-spacing: 0px; }
.chat-log-msg.admin-msg .chat-user-name { color: #ffffff !important; font-weight: 700; }
.chat-log-msg.admin-msg .chat-user-text { color: #ff69b4 !important; font-weight: 400; }

/* 박스(3): 짙은 다크그레이 입력 바 (총 34px 높이) */
.chat-input-bar {
    display: flex;
    gap: 8px;
    align-items: center;
    height: 34px;
    box-sizing: border-box;
}
.chat-input-text {
    flex: 1;
    height: 100%;
    background: #14141a !important;
    border: 2px solid #333340;
    color: #ffffff;
    padding: 0 10px;
    font-size: 13px;
    border-radius: 4px;
    outline: none;
    letter-spacing: 0px;
    box-sizing: border-box;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}
.chat-input-text:focus { border-color: var(--lime); }
.chat-input-text::placeholder { color: #777788; }
.chat-send-btn {
    height: 100%;
    background: #22222c;
    color: #ffffff;
    border: 2px solid #444455;
    padding: 0 18px;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 0px;
    border-radius: 4px;
    box-sizing: border-box;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    transition: all 0.15s;
}
.chat-send-btn:hover:not(:disabled) { background: var(--lime); color: #000; border-color: var(--lime); }
.chat-send-btn:disabled { border-color: #cccccc; background: #eeeeee; color: #999999; cursor: not-allowed; }

/* 최후 1인 우승 팝업 */
.winner-banner-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 4500;
    pointer-events: auto;
}
.winner-banner-box {
    background: #111116;
    border: 3px solid var(--lime);
    box-shadow: 0 0 35px rgba(176, 227, 33, 0.6), 4px 4px 0px #000;
    border-radius: 8px;
    padding: 30px 40px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    animation: popWinner 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes popWinner {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}
.winner-crown { font-size: 55px; line-height: 1; }
.winner-name-text {
    font-size: 32px;
    font-weight: bold;
    color: var(--lime);
    text-shadow: 2px 2px 0px #000;
}
.winner-sub-text {
    font-size: 22px;
    color: #ffffff;
    text-shadow: 1px 1px 0px #000;
}
.winner-title-badge {
    margin-top: 10px;
    background: #ffaa00;
    color: #000000;
    font-size: 20px;
    font-weight: bold;
    padding: 6px 18px;
    border-radius: 6px;
    border: 2px solid #ffffff;
    box-shadow: 0 0 15px rgba(255, 170, 0, 0.8), 2px 2px 0px #000;
    animation: pulseNew 0.8s infinite alternate;
}

/* 우상단 사운드 버튼 아래 역대 지식왕 트로피 버튼 */
.btn-hof-launcher {
    position: absolute;
    top: 86px;
    right: 20px;
    width: 58px;
    height: 44px;
    box-sizing: border-box;
    background: rgba(14, 14, 18, 0.88);
    border: 2px solid var(--lime);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 60;
    box-shadow: 2px 2px 0px #000;
    transition: all 0.15s ease-in-out;
    user-select: none;
    font-size: 18px;
    line-height: 1;
}
.btn-hof-launcher:hover {
    background: rgba(25, 25, 35, 0.95);
    transform: scale(1.05);
    box-shadow: 0 0 12px rgba(176, 227, 33, 0.5), 2px 2px 0px #000;
}