@import url('https://fonts.googleapis.com/css2?family=Gowun+Dodum&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --teal-bg: #008080;
    --teal-dark: #006666;
    --gray-light: #c0c0c0;
    --gray-mid: #a0a0a0;
    --gray-dark: #808080;
    --gray-darker: #404040;
    --white: #ffffff;
    --black: #000000;
    --navy: #000080;
    --red: #ff0000;
}

body {
    font-family: 'Gowun Dodum', 'Malgun Gothic', sans-serif;
    background: var(--teal-bg);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===== 3단 레이아웃 ===== */
.app-container {
    display: grid;
    grid-template-columns: 200px 1fr 220px;
    min-height: 100vh;
}

/* ===== 왼쪽 사이드바 ===== */
.sidebar {
    background: var(--gray-light);
    border-right: 3px solid;
    border-color: var(--white) var(--gray-darker) var(--gray-darker) var(--white);
    display: flex;
    flex-direction: column;
    padding: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 16px;
    background: linear-gradient(90deg, var(--navy) 0%, #1084d0 100%);
    border-bottom: 2px solid var(--gray-darker);
}

.logo-icon {
    font-size: 24px;
}

.logo-text {
    font-size: 18px;
    font-weight: bold;
    color: var(--white);
}

.nav-menu {
    display: flex;
    flex-direction: column;
    padding: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: var(--black);
    text-decoration: none;
    font-size: 14px;
    border: 2px solid transparent;
}

/* 네비게이션 버튼 */
.nav-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 14px;
    font-family: 'Gowun Dodum', sans-serif;
    font-size: 14px;
    color: var(--black);
    background: var(--gray-light);
    border: 2px solid;
    border-color: var(--white) var(--gray-darker) var(--gray-darker) var(--white);
    cursor: pointer;
    text-align: left;
    margin-bottom: 4px;
}

.nav-btn:hover {
    background: var(--white);
}

.nav-btn:active,
.nav-btn.active {
    background: var(--teal);
    color: var(--white);
    border-color: var(--gray-darker) var(--white) var(--white) var(--gray-darker);
    transform: scale(0.98);
}

.nav-icon {
    font-size: 14px;
}



/* ===== 인증 영역 ===== */
.auth-section {
    margin-top: auto;
    padding: 12px 8px;
    border-top: 2px solid var(--gray-dark);
}

.login-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 12px;
    font-family: 'Gowun Dodum', sans-serif;
    font-size: 13px;
    color: var(--black);
    background: var(--gray-light);
    border: 2px solid;
    border-color: var(--white) var(--gray-darker) var(--gray-darker) var(--white);
    cursor: pointer;
}

.login-btn:active {
    border-color: var(--gray-darker) var(--white) var(--white) var(--gray-darker);
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px;
    background: var(--white);
    border: 2px solid;
    border-color: var(--gray-darker) var(--white) var(--white) var(--gray-darker);
}

.user-name {
    font-size: 13px;
    font-weight: bold;
    color: var(--navy);
}

.logout-btn {
    padding: 6px 10px;
    font-family: 'Gowun Dodum', sans-serif;
    font-size: 11px;
    color: var(--black);
    background: var(--gray-light);
    border: 2px solid;
    border-color: var(--white) var(--gray-darker) var(--gray-darker) var(--white);
    cursor: pointer;
}

.logout-btn:active {
    border-color: var(--gray-darker) var(--white) var(--white) var(--gray-darker);
}

/* ===== 게임 시작 모달 ===== */
.game-start-overlay {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(200, 200, 200, 0.85);
    backdrop-filter: blur(3px);
    z-index: 50;
    justify-content: center;
    align-items: center;
}

.game-start-overlay.active {
    display: flex;
}

.game-start-modal {
    background: var(--gray-light);
    border: 3px solid;
    border-color: var(--white) var(--gray-darker) var(--gray-darker) var(--white);
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.4);
    text-align: center;
    padding: 0;
    min-width: 340px;
}

/* 모달 타이틀 바 */
.game-start-modal .modal-header {
    background: linear-gradient(90deg, var(--navy), var(--teal));
    color: var(--white);
    padding: 6px 12px;
    font-size: 14px;
    font-weight: bold;
    text-align: left;
}

/* 모달 콘텐츠 영역 */
.game-start-modal .modal-body {
    padding: 20px 30px;
}

.game-number {
    font-size: 28px;
    font-weight: bold;
    color: var(--navy);
    margin-bottom: 8px;
}

.game-level {
    font-size: 16px;
    font-weight: bold;
    color: var(--black);
    margin-bottom: 8px;
}

.game-difficulty-info {
    font-size: 13px;
    color: var(--navy);
    margin-bottom: 10px;
    padding: 6px 10px;
    background: var(--white);
    border: 1px solid var(--gray-mid);
    display: inline-block;
}

.game-level-desc {
    font-size: 12px;
    color: var(--gray-darker);
    line-height: 1.5;
    margin-bottom: 12px;
}

.game-stats-row {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 16px;
    padding: 12px 0;
    border-top: 1px solid var(--gray-mid);
    border-bottom: 1px solid var(--gray-mid);
}

.game-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.game-stat-value {
    font-size: 22px;
    font-weight: bold;
    color: var(--black);
}

.game-stat-label {
    font-size: 11px;
    color: var(--gray-darker);
}

/* 게임 이력 섹션 */
.game-history-section {
    width: 100%;
    margin: 12px 0;
    background: var(--white);
    border: 2px solid;
    border-color: var(--gray-darker) var(--white) var(--white) var(--gray-darker);
}

.game-history-title {
    background: var(--navy);
    color: var(--white);
    padding: 4px 8px;
    font-size: 11px;
    font-weight: bold;
}

.game-history-list {
    padding: 8px;
    max-height: 120px;
    overflow-y: auto;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    border-bottom: 1px solid var(--gray-mid);
    font-size: 11px;
}

.history-item:last-child {
    border-bottom: none;
}

.history-user {
    flex: 1;
    font-weight: bold;
    color: var(--navy);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 8px;
    text-align: left;
}

.history-result {
    font-weight: bold;
    margin-right: 8px;
}

.history-result.success {
    color: #2e7d32;
}

.history-result.fail {
    color: #c62828;
}

.history-time {
    color: var(--gray-dark);
}

.start-game-btn {
    padding: 12px 40px;
    font-family: 'Gowun Dodum', sans-serif;
    font-size: 15px;
    color: var(--white);
    background: #4a9eff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.start-game-btn:hover {
    background: #3d8be0;
}

/* ===== 프로필 설정 모달 ===== */
.profile-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 300;
    justify-content: center;
    align-items: center;
}

.profile-modal-overlay.active {
    display: flex;
}

.profile-modal {
    background: var(--gray-light);
    border: 3px solid;
    border-color: var(--white) var(--gray-darker) var(--gray-darker) var(--white);
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.3);
    min-width: 320px;
    max-width: 90%;
}

.profile-modal .modal-body {
    padding: 16px;
}

.profile-section {
    margin-bottom: 16px;
}

.profile-label {
    display: block;
    font-size: 13px;
    color: var(--black);
    margin-bottom: 6px;
    font-weight: bold;
}

.nickname-input {
    width: 100%;
    padding: 8px 10px;
    font-family: 'Gowun Dodum', sans-serif;
    font-size: 14px;
    border: 2px solid;
    border-color: var(--gray-darker) var(--white) var(--white) var(--gray-darker);
    background: var(--white);
    box-sizing: border-box;
}

.nickname-input:focus {
    outline: none;
    border-color: var(--navy) var(--navy) var(--navy) var(--navy);
}

.nickname-error {
    color: #c62828;
    font-size: 11px;
    margin-top: 4px;
    min-height: 16px;
}

/* 색상 슬라이더 */
.color-slider {
    width: 100%;
    height: 24px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(to right,
            hsl(0, 70%, 50%),
            hsl(60, 70%, 50%),
            hsl(120, 70%, 50%),
            hsl(180, 70%, 50%),
            hsl(240, 70%, 50%),
            hsl(300, 70%, 50%),
            hsl(360, 70%, 50%));
    border: 2px solid var(--gray-darker);
    border-radius: 0;
    cursor: pointer;
    margin-bottom: 12px;
}

.color-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 28px;
    background: var(--white);
    border: 2px solid var(--black);
    cursor: pointer;
}

.color-slider::-moz-range-thumb {
    width: 16px;
    height: 28px;
    background: var(--white);
    border: 2px solid var(--black);
    cursor: pointer;
}

.color-option:hover {
    transform: scale(1.1);
}

.color-option.selected {
    border: 3px solid var(--black);
    box-shadow: 0 0 0 2px var(--white);
}

.color-preview {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.color-preview-box {
    width: 24px;
    height: 24px;
    border: 2px solid var(--gray-darker);
}

.confirm-profile-btn {
    width: 100%;
    padding: 12px;
    font-family: 'Gowun Dodum', sans-serif;
    font-size: 15px;
    color: var(--white);
    background: var(--navy);
    border: 2px solid;
    border-color: var(--white) var(--gray-darker) var(--gray-darker) var(--white);
    cursor: pointer;
    margin-bottom: 8px;
}

.confirm-profile-btn:hover {
    background: #1a4a7a;
}

.confirm-profile-btn:disabled {
    background: var(--gray-mid);
    cursor: not-allowed;
}

.profile-notice {
    font-size: 11px;
    color: var(--gray-darker);
    text-align: center;
    margin: 0;
}

/* ===== 메인 콘텐츠 ===== */
.main-content {
    display: flex;
    flex-direction: column;
    position: relative;
    background: var(--gray-light);
}

/* 타이틀 바 */
.title-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 6px 12px;
    background: linear-gradient(90deg, var(--navy) 0%, #1084d0 100%);
    min-height: 28px;
}

.title-text {
    font-size: 15px;
    font-weight: bold;
    color: var(--white);
    letter-spacing: 6px;
}

/* 상태 바 */
.status-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 50px;
    padding: 10px 20px;
    background: var(--gray-light);
    border-bottom: 2px solid var(--gray-dark);
}

.status-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-label {
    font-size: 13px;
    color: var(--gray-darker);
}

.status-value {
    font-size: 15px;
    font-weight: bold;
    color: var(--black);
}

.hearts {
    display: flex;
    gap: 2px;
}

.heart {
    font-size: 16px;
    color: var(--red);
}

.heart.lost {
    color: var(--gray-dark);
}

/* 게임 래퍼 */
.game-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 8px;
    gap: 8px;
    min-height: 0;
}

/* 게임 영역 */
.game-area {
    flex: 1;
    background: var(--teal-bg);
    border: 3px solid;
    border-color: var(--gray-darker) var(--white) var(--white) var(--gray-darker);
    position: relative;
    overflow: hidden;
    min-height: 350px;
}

/* 떨어지는 단어 */
.word-block {
    position: absolute;
    padding: 0;
    background: transparent;
    border: none;
    color: var(--black);
    font-family: 'Gowun Dodum', 'Malgun Gothic', sans-serif;
    font-size: 22px;
    font-weight: bold;
    transform: translateX(-50%);
    text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.4);
    white-space: nowrap;
}

/* 단어 제거 효과 */
.word-block.destroyed {
    animation: wordDestroy 0.3s ease-out forwards;
}

@keyframes wordDestroy {
    0% {
        transform: translateX(-50%) scale(1);
        opacity: 1;
    }

    100% {
        transform: translateX(-50%) scale(1.3);
        opacity: 0;
    }
}

/* 단어 충돌 효과 */
.word-block.crashed {
    animation: wordCrash 0.3s ease-out forwards;
}

@keyframes wordCrash {
    0% {
        opacity: 1;
        color: var(--black);
    }

    50% {
        color: var(--red);
    }

    100% {
        opacity: 0;
    }
}

/* 입력 영역 */
.input-area {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    background: var(--gray-light);
    border: 2px solid;
    border-color: var(--white) var(--gray-darker) var(--gray-darker) var(--white);
}

.typing-input {
    width: 80%;
    max-width: 600px;
    padding: 8px 16px;
    font-family: 'Gowun Dodum', 'Malgun Gothic', sans-serif;
    font-size: 18px;
    color: var(--black);
    background: var(--white);
    border: 2px solid;
    border-color: var(--gray-darker) var(--white) var(--white) var(--gray-darker);
    outline: none;
    text-align: center;
}

.typing-input::placeholder {
    color: var(--gray-dark);
    font-size: 14px;
}

/* 흔들기 효과 */
@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-4px);
    }

    75% {
        transform: translateX(4px);
    }
}

/* ===== 오른쪽 패널 ===== */
.right-panel {
    background: var(--gray-light);
    border-left: 3px solid;
    border-color: var(--white) var(--gray-darker) var(--gray-darker) var(--white);
    padding: 8px;
    padding-top: 72px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.panel-section {
    background: var(--gray-light);
    border: 2px solid;
    border-color: var(--white) var(--gray-darker) var(--gray-darker) var(--white);
}

.panel-title-bar {
    padding: 4px 8px;
    background: linear-gradient(90deg, var(--navy) 0%, #1084d0 100%);
    font-size: 12px;
    color: var(--white);
    text-align: center;
}

.panel-content {
    padding: 12px;
    background: var(--white);
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 13px;
    border-bottom: 1px solid var(--gray-mid);
}

.info-row:last-child {
    border-bottom: none;
}

.info-row span:last-child {
    font-weight: bold;
}

/* ===== 최근 게임 목록 ===== */
.recent-section .panel-content {
    padding: 8px;
    max-height: 300px;
    overflow-y: auto;
}

.recent-item {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 2px 8px;
    padding: 8px;
    border-bottom: 1px solid var(--gray-mid);
    font-size: 11px;
}

.recent-item:last-child {
    border-bottom: none;
}

.recent-user {
    font-weight: bold;
    color: var(--navy);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recent-result {
    text-align: right;
    font-weight: bold;
}

.recent-result.success {
    color: #2e7d32;
}

.recent-result.fail {
    color: #c62828;
}

.recent-game {
    color: var(--gray-darker);
}

.recent-time {
    text-align: right;
    color: var(--gray-dark);
}

.loading-text,
.empty-text,
.error-text {
    text-align: center;
    padding: 20px;
    color: var(--gray-darker);
    font-size: 12px;
}

/* 내 기록 유저 행 */
.my-user-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-mid);
    margin-bottom: 4px;
}

.my-user-row span {
    font-weight: bold;
    color: var(--navy);
    font-size: 13px;
}

.panel-login-btn {
    padding: 4px 10px;
    font-family: 'Gowun Dodum', sans-serif;
    font-size: 11px;
    color: var(--black);
    background: var(--gray-light);
    border: 2px solid;
    border-color: var(--white) var(--gray-darker) var(--gray-darker) var(--white);
    cursor: pointer;
}

.panel-login-btn:hover {
    background: var(--gray-mid);
}

.panel-login-btn:active {
    border-color: var(--gray-darker) var(--white) var(--white) var(--gray-darker);
}

/* ===== 게임 오버 모달 ===== */
.game-over-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 128, 128, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
    z-index: 100;
}

.game-over-overlay.active {
    opacity: 1;
    visibility: visible;
}

.game-over-modal {
    background: var(--gray-light);
    border: 3px solid;
    border-color: var(--white) var(--gray-darker) var(--gray-darker) var(--white);
    box-shadow: 4px 4px 0 var(--black);
    width: 260px;
}

.modal-title-bar {
    padding: 5px 10px;
    background: linear-gradient(90deg, var(--navy) 0%, #1084d0 100%);
    text-align: center;
    font-size: 13px;
    color: var(--white);
}

.modal-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.result-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--white);
    border: 2px solid;
    border-color: var(--gray-darker) var(--white) var(--white) var(--gray-darker);
    font-size: 14px;
}

.result-row span:last-child {
    font-weight: bold;
    color: var(--navy);
}

.modal-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 12px;
}

.restart-btn,
.other-game-btn {
    padding: 8px 20px;
    font-family: 'Gowun Dodum', 'Malgun Gothic', sans-serif;
    font-size: 14px;
    color: var(--black);
    background: var(--gray-light);
    border: 2px solid;
    border-color: var(--white) var(--gray-darker) var(--gray-darker) var(--white);
    cursor: pointer;
}

.restart-btn:hover,
.other-game-btn:hover {
    background: var(--gray-mid);
}

.restart-btn:active,
.other-game-btn:active {
    border-color: var(--gray-darker) var(--white) var(--white) var(--gray-darker);
}

/* ===== 지도 팝업 (지뢰찾기 스타일) ===== */
.map-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    z-index: 200;
    justify-content: center;
    align-items: center;
}

.map-popup.active {
    display: flex;
}

/* 초기 실행 시 (닫기 버튼 숨김) */
.map-popup.initial .map-close-btn {
    display: none;
}

.map-window {
    background: var(--gray-light);
    border: 3px solid;
    border-color: var(--white) var(--gray-darker) var(--gray-darker) var(--white);
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.4);
    width: fit-content;
    min-width: 340px;
    max-width: 90vw;
    padding: 0;
}

.map-title-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 6px;
    background: linear-gradient(90deg, var(--navy) 0%, #1084d0 100%);
    color: var(--white);
    font-size: 13px;
}

.map-close-btn {
    background: var(--gray-light);
    border: 2px solid;
    border-color: var(--white) var(--gray-darker) var(--gray-darker) var(--white);
    color: var(--black);
    font-size: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
}

.map-close-btn:active {
    border-color: var(--gray-darker) var(--white) var(--white) var(--gray-darker);
}

.map-content {
    padding: 8px;
    background: var(--gray-light);
    border: 2px solid;
    border-color: var(--gray-darker) var(--white) var(--white) var(--gray-darker);
    margin: 4px;
    overflow: auto;
    max-height: 70vh;
}

/* 게임 소개 콘텐츠 */
.about-content {
    max-width: 600px;
    font-size: 13px;
    line-height: 1.6;
}

.about-content h3 {
    font-size: 15px;
    color: var(--navy);
    margin-top: 12px;
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 2px solid var(--gray-mid);
}

.about-content h3:first-child {
    margin-top: 0;
}

.about-content p {
    margin-bottom: 12px;
    color: var(--black);
}

.about-content ul {
    margin-left: 16px;
    margin-bottom: 12px;
}

.about-content li {
    margin-bottom: 6px;
    color: var(--black);
}

.about-content strong {
    color: var(--navy);
    font-weight: bold;
}


/* 지역 선택 탭 */
.district-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
}

.district-tab {
    flex: 1;
    padding: 8px 16px;
    font-family: 'Gowun Dodum', sans-serif;
    font-size: 13px;
    color: var(--black);
    background: var(--gray-light);
    border: 2px solid;
    border-color: var(--white) var(--gray-darker) var(--gray-darker) var(--white);
    cursor: pointer;
    text-align: center;
}

.district-tab:hover {
    background: var(--white);
}

.district-tab.active {
    background: var(--navy);
    color: var(--white);
    border-color: var(--gray-darker) var(--white) var(--white) var(--gray-darker);
}

/* 로딩 스피너 */
.map-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px;
    color: var(--gray-darker);
    font-size: 13px;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--gray-mid);
    border-top-color: var(--navy);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.map-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    grid-template-rows: repeat(10, 1fr);
    gap: 2px;
    width: 300px;
    height: 300px;
    margin: 0 auto;
    background: var(--gray-darker);
    padding: 2px;
    border: 2px solid var(--gray-darker);
}

.map-cell {
    width: 100%;
    height: 100%;
    background: var(--gray-light);
    border: 1px solid;
    border-color: var(--white) var(--gray-mid) var(--gray-mid) var(--white);
    font-size: 10px;
    font-family: monospace;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
}

.map-cell:hover {
    background: var(--white);
    transform: scale(1.1);
    z-index: 10;
}

.map-cell.cleared {
    background: var(--teal);
    color: var(--white);
    border-color: #4db6ac #00695c #00695c #4db6ac;
}

.map-cell.failed {
    background: var(--red);
    color: var(--white);
    border-color: #ef5350 #c62828 #c62828 #ef5350;
}

/* ===== 반응형 ===== */

/* 태블릿 */
@media (max-width: 1024px) {
    .app-container {
        grid-template-columns: 180px 1fr;
    }

    .right-panel {
        display: none;
    }
}

/* 모바일 */
@media (max-width: 768px) {
    .app-container {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
    }

    .right-panel {
        display: none;
    }

    .status-bar {
        gap: 25px;
        padding: 8px 15px;
    }

    .status-label {
        font-size: 12px;
    }

    .status-value {
        font-size: 14px;
    }

    .game-area {
        min-height: 300px;
    }

    .word-block {
        font-size: 18px;
    }

    .typing-input {
        width: 90%;
        font-size: 16px;
    }

    .title-text {
        font-size: 14px;
        letter-spacing: 4px;
    }
}

/* 작은 모바일 */
@media (max-width: 480px) {
    .status-bar {
        gap: 15px;
        flex-wrap: wrap;
    }

    .game-wrapper {
        padding: 6px;
    }

    .game-area {
        min-height: 250px;
    }

    .word-block {
        font-size: 16px;
    }
}

/* ===== 사이드바 링크 ===== */
.sidebar-links {
    margin-top: auto;
    padding: 10px 12px;
    font-size: 10px;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.sidebar-links a {
    color: var(--gray-darker);
    text-decoration: none;
}

.sidebar-links a:hover {
    text-decoration: underline;
}