/* 전역 스타일 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    height: 100%;
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #0c0c1d 0%, #1a1a2e 50%, #16213e 100%);
    color: #e0e6ed;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    /* 모바일 최적화 */
    touch-action: none;
    -webkit-overflow-scrolling: touch;
    position: fixed; /* 모바일 주소창 숨기기 */
    width: 100%;
}

/* 로딩 스크린 */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0c0c1d 0%, #1a1a2e 50%, #16213e 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loading-content {
    text-align: center;
    max-width: 400px;
    padding: 2rem;
}

.astral-logo {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

.loading-content h1 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #4facfe 0%, #00f2fe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.loading-content p {
    font-size: 1rem;
    opacity: 0.8;
    margin-bottom: 2rem;
}

.loading-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.loading-progress {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%);
    border-radius: 2px;
    transition: width 0.3s ease;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.version-display {
    position: absolute;
    bottom: 20px;
    left: 20px;
    font-size: 0.9rem;
    opacity: 0.6;
    color: #4facfe;
    font-weight: 500;
}

.update-status {
    margin-top: 15px;
    font-size: 0.9rem;
    opacity: 0.8;
    min-height: 20px;
}

.update-status.checking {
    color: #ffd700;
}

.update-status.available {
    color: #ff6b9d;
    animation: pulse 2s infinite;
}

.update-status.updating {
    color: #4facfe;
}

.update-status.updated {
    color: #00ff88;
}

/* 게임 컨테이너 */
#game-container {
    position: relative;
    width: 100%;
    height: 100%;
}

canvas {
    display: block;
    cursor: none;
}

/* UI 오버레이 */
#ui-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

#ui-overlay > * {
    pointer-events: auto;
}

/* 상단 HUD */
#top-hud {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.energy-bar {
    min-width: 200px;
}

.energy-bar label {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 5px;
    opacity: 0.9;
}

.bar-container {
    position: relative;
    width: 100%;
    height: 20px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #00f2fe 0%, #4facfe 100%);
    border-radius: 10px;
    transition: width 0.3s ease;
    width: 100%;
}

.bar-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.8rem;
    font-weight: 500;
    text-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
}

.collected-items {
    display: flex;
    gap: 15px;
}

.stage-info {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(138, 43, 226, 0.3);
    border: 1px solid rgba(186, 85, 211, 0.5);
    border-radius: 20px;
    padding: 8px 16px;
    font-weight: 500;
    color: #DDA0DD;
}

.stage-info .stage-icon {
    font-size: 1.2rem;
    animation: twinkle 2s infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.item-counter {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 8px 16px;
    font-weight: 500;
    flex-direction: column;
    min-width: 80px;
}

.item-counter.stage-seeds {
    background: rgba(255, 215, 0, 0.2);
    border-color: rgba(255, 215, 0, 0.5);
    color: #FFD700;
}

.item-counter.total-seeds {
    background: rgba(186, 85, 211, 0.2);
    border-color: rgba(186, 85, 211, 0.5);
    color: #DDA0DD;
}

.item-counter .icon {
    font-size: 1.2rem;
    margin-bottom: 2px;
}

.item-counter small {
    font-size: 0.7rem;
    opacity: 0.8;
    margin-top: 2px;
}

.item-counter .icon {
    font-size: 1.2rem;
    animation: sparkle 3s infinite;
}

@keyframes sparkle {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.2) rotate(180deg); }
}

.ui-button {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    padding: 10px;
    color: #e0e6ed;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.ui-button:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

/* 중앙 알림 */
#center-notification {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    padding: 20px;
    font-size: 1.1rem;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    max-width: 80%;
    z-index: 100;
}

/* 가로 모드에서 알림 위치 조정 */
@media (orientation: landscape) and (max-height: 500px) {
    #center-notification {
        top: 30%;
        font-size: 0.9rem;
        padding: 15px;
        max-width: 70%;
    }
}

#center-notification.show {
    opacity: 1;
}

/* 하단 HUD */
#bottom-hud {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

.controls-guide {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    padding: 10px 20px;
    font-size: 0.9rem;
}

.desktop-controls {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

kbd {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* 모바일 컨트롤 */
.mobile-only {
    display: none;
}

@media (max-width: 768px), (pointer: coarse) {
    .mobile-only {
        display: block !important;
    }
    
    .desktop-controls {
        display: none !important;
    }
    
    .desktop-hint {
        display: none !important;
    }
    
    .mobile-hint {
        display: block !important;
    }
    
    /* 모바일에서 더 큰 터치 영역 - 액션 버튼 제거됨 */
    
    #joystick {
        width: 140px;
        height: 140px;
    }
    
    #joystick-knob {
        width: 50px;
        height: 50px;
    }
}

@media (min-width: 769px) and (pointer: fine) {
    .desktop-hint {
        display: block;
    }
    
    .mobile-hint {
        display: none;
    }
}

#mobile-controls {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* 좌측 이동 조이스틱 (로블록스 스타일) */
/* 새로운 모바일 이동 버튼 컨트롤 */
#movement-buttons-container {
    position: absolute;
    bottom: 60px;
    left: 30px;
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.movement-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.movement-btn {
    width: 80px;
    height: 60px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}

.movement-btn:active {
    background: rgba(79, 172, 254, 0.4);
    border-color: #4facfe;
    transform: scale(0.95);
    box-shadow: 0 0 15px rgba(79, 172, 254, 0.6);
}

.movement-btn.forward {
    border-color: rgba(0, 255, 100, 0.6);
}

.movement-btn.forward:active {
    background: rgba(0, 255, 100, 0.3);
    border-color: #00ff64;
    box-shadow: 0 0 15px rgba(0, 255, 100, 0.5);
}

.movement-btn.backward {
    border-color: rgba(255, 100, 0, 0.6);
}

.movement-btn.backward:active {
    background: rgba(255, 100, 0, 0.3);
    border-color: #ff6400;
    box-shadow: 0 0 15px rgba(255, 100, 0, 0.5);
}

.btn-icon {
    font-size: 1.2rem;
}

.btn-label {
    font-size: 0.7rem;
    opacity: 0.9;
}



/* 우측 카메라 터치패드 (로블록스 스타일) */
#camera-touchpad-container {
    position: absolute;
    bottom: 60px;
    right: 30px;
    pointer-events: auto;
    text-align: center;
}

#camera-touchpad {
    width: 120px;
    height: 120px;
    border: 3px solid rgba(255, 255, 255, 0.4);
    border-radius: 15px;
    background: rgba(0, 0, 0, 0.4);
    position: relative;
    touch-action: none;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.touchpad-hint {
    font-size: 2rem;
    opacity: 0.6;
    pointer-events: none;
}

/* 조이스틱과 터치패드 라벨 */
.joystick-label, .touchpad-label {
    margin-top: 8px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
}

/* 액션 버튼들 제거됨 */

/* 시작 화면 */
#start-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.start-content {
    text-align: center;
    max-width: 500px;
    padding: 2rem;
}

.start-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #4facfe 0%, #00f2fe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.start-content p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.primary-button {
    background: linear-gradient(45deg, #4facfe 0%, #00f2fe 100%);
    border: none;
    border-radius: 25px;
    padding: 15px 30px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.primary-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(79, 172, 254, 0.3);
}

.controls-hint {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* 모달 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 10px;
    box-sizing: border-box;
    overflow-y: auto;
}

.modal-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    padding: 0;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    color: #e0e6ed;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.modal-body {
    padding: 20px;
}

.setting-group {
    margin-bottom: 20px;
}

.setting-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
}

.setting-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.setting-group select,
.setting-group input[type="range"] {
    flex: 1;
    padding: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    color: #e0e6ed;
    font-size: 1rem;
}

.secondary-button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 10px 20px;
    color: #e0e6ed;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    margin-right: 10px;
}

.secondary-button:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.version-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    font-size: 0.9rem;
}

.version-info span {
    opacity: 0.8;
}

#app-version {
    font-weight: 600;
    color: #4facfe;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    #top-hud {
        top: 10px;
        left: 10px;
        right: 10px;
        flex-direction: column;
        gap: 10px;
    }
    
    .energy-bar {
        min-width: auto;
        width: 100%;
    }
    
    .collected-items {
        justify-content: center;
        gap: 8px;
    }
    
    .item-counter {
        min-width: 60px;
        padding: 6px 12px;
        font-size: 0.9rem;
    }
    
    .item-counter .icon {
        font-size: 1rem;
    }
    
    .item-counter small {
        font-size: 0.6rem;
    }
    
    #bottom-hud {
        display: none;
    }
    
    .start-content h1 {
        font-size: 2rem;
    }
    
    .start-content {
        padding: 1rem;
    }
}

/* 가로 모드 세부 조정 */
@media (orientation: landscape) and (max-height: 500px) {
    #top-hud {
        flex-direction: row;
        align-items: center;
        top: 8px;
        left: 8px;
        right: 8px;
    }
    
    .energy-bar {
        min-width: 150px;
        width: auto;
    }
    
    .energy-bar label {
        font-size: 0.8rem;
        margin-bottom: 3px;
    }
    
    .bar-container {
        height: 16px;
    }
    
    .bar-text {
        font-size: 0.7rem;
    }
    
    .item-counter {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
    
    .ui-button {
        padding: 8px;
        font-size: 1rem;
    }
}

/* 화면 회전 안내 오버레이 */
#orientation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.orientation-message {
    text-align: center;
    color: #e0e6ed;
    padding: 2rem;
}

.rotate-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: rotateHint 2s infinite ease-in-out;
}

@keyframes rotateHint {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(90deg); }
}

.orientation-message h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #4facfe 0%, #00f2fe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.orientation-message p {
    font-size: 1rem;
    opacity: 0.8;
    line-height: 1.6;
}

/* 세로 모드에서만 회전 안내 표시 */
@media (orientation: portrait) and (max-height: 600px) {
    #orientation-overlay {
        display: flex !important;
    }
}

/* 가로 모드 최적화 */
@media (orientation: landscape) {
    #orientation-overlay {
        display: none !important;
    }
    
    /* 가로 모드에서 UI 조정 */
    #top-hud {
        top: 15px;
        left: 15px;
        right: 15px;
    }
    
    #movement-buttons-container {
        bottom: 40px;
        left: 25px;
    }
    
    .movement-btn {
        width: 70px;
        height: 50px;
        font-size: 0.7rem;
    }
    
    .btn-icon {
        font-size: 1rem;
    }
    
    .btn-label {
        font-size: 0.6rem;
    }
    

    
    #camera-touchpad-container {
        bottom: 40px;
        right: 25px;
    }

}

/* 성능 최적화 */
* {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

canvas {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* 게임 완료 팝업 */
.completion-modal {
    max-width: 500px;
    max-height: 90vh;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.95), rgba(52, 58, 64, 0.95));
    border: 2px solid rgba(186, 85, 211, 0.6);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(138, 43, 226, 0.3);
    text-align: center;
    padding: 0;
    overflow-y: auto;
    margin: 20px;
}

.completion-header {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.2), rgba(186, 85, 211, 0.2));
    padding: 30px 20px;
    border-bottom: 1px solid rgba(186, 85, 211, 0.3);
}

.completion-icon {
    font-size: 4rem;
    margin-bottom: 10px;
    animation: celebration 1s ease-in-out infinite alternate;
}

@keyframes celebration {
    from { transform: scale(1) rotate(0deg); }
    to { transform: scale(1.1) rotate(5deg); }
}

.completion-header h2 {
    margin: 10px 0;
    font-size: 2.5rem;
    background: linear-gradient(45deg, #FFD700, #FFA500, #FF69B4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.completion-message {
    font-size: 1.2rem;
    color: #DDA0DD;
    margin: 0;
}

.completion-stats {
    padding: 25px 20px;
    background: rgba(0, 0, 0, 0.3);
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-icon {
    font-size: 1.5rem;
    width: 30px;
}

.stat-label {
    flex: 1;
    text-align: left;
    margin-left: 15px;
    color: #B0B0B0;
}

.stat-value {
    font-weight: bold;
    font-size: 1.2rem;
    color: #FFD700;
}

.completion-choices {
    padding: 25px 20px;
}

.completion-choices h3 {
    margin-bottom: 20px;
    color: #DDA0DD;
    font-size: 1.3rem;
}

.choice-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.choice-button {
    padding: 20px;
    border: 2px solid transparent;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 5px;
    position: relative;
    z-index: 10;
    pointer-events: auto;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.choice-button.primary {
    background: linear-gradient(135deg, #6A5ACD, #8A2BE2);
    color: white;
    border-color: #9370DB;
}

.choice-button.primary:hover {
    background: linear-gradient(135deg, #8A2BE2, #9370DB);
    border-color: #BA55D3;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(138, 43, 226, 0.4);
}

.choice-button.secondary {
    background: linear-gradient(135deg, rgba(25, 25, 112, 0.8), rgba(72, 61, 139, 0.8));
    color: #DDA0DD;
    border-color: rgba(186, 85, 211, 0.5);
}

.choice-button.secondary:hover {
    background: linear-gradient(135deg, rgba(72, 61, 139, 0.9), rgba(106, 90, 205, 0.8));
    border-color: #BA55D3;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(72, 61, 139, 0.4);
}

.choice-button small {
    font-size: 0.9rem;
    opacity: 0.8;
    font-weight: 400;
}

/* 모바일 최적화 */
@media (max-width: 600px) {
    .completion-modal {
        max-width: 95vw;
        max-height: 85vh;
        margin: 10px;
    }
    
    .completion-header {
        padding: 20px 15px;
    }
    
    .completion-header h2 {
        font-size: 1.8rem;
        margin: 8px 0;
    }
    
    .completion-icon {
        font-size: 2.5rem;
    }
    
    .completion-message {
        font-size: 1rem;
    }
    
    .completion-stats {
        padding: 20px 15px;
    }
    
    .stat-item {
        padding: 10px 0;
    }
    
    .stat-value {
        font-size: 1.1rem;
    }
    
    .completion-choices {
        padding: 20px 15px;
    }
    
    .completion-choices h3 {
        font-size: 1.1rem;
        margin-bottom: 15px;
    }
    
    .choice-buttons {
        gap: 12px;
    }
    
    .choice-button {
        padding: 15px 12px;
        font-size: 1rem;
    }
    
    .choice-button small {
        font-size: 0.8rem;
    }
}

/* 가로 모드 모바일 최적화 */
@media (max-height: 600px) and (orientation: landscape) {
    .completion-modal {
        max-height: 95vh;
        margin: 5px;
    }
    
    .completion-header {
        padding: 15px;
    }
    
    .completion-header h2 {
        font-size: 1.6rem;
        margin: 5px 0;
    }
    
    .completion-icon {
        font-size: 2rem;
    }
    
    .completion-stats {
        padding: 15px;
    }
    
    .stat-item {
        padding: 8px 0;
    }
    
    .completion-choices {
        padding: 15px;
    }
    
    .choice-buttons {
        gap: 10px;
    }
    
    .choice-button {
        padding: 12px;
        font-size: 0.95rem;
    }
}

/* 매우 작은 화면 대응 */
@media (max-height: 500px) {
    .modal {
        align-items: flex-start;
        padding: 5px;
    }
    
    .completion-modal {
        max-height: 98vh;
        margin: 2px;
    }
    
    .completion-header {
        padding: 10px;
    }
    
    .completion-header h2 {
        font-size: 1.4rem;
        margin: 3px 0;
    }
    
    .completion-icon {
        font-size: 1.5rem;
    }
    
    .completion-message {
        font-size: 0.9rem;
    }
    
    .completion-stats {
        padding: 10px;
    }
    
    .stat-item {
        padding: 6px 0;
    }
    
    .completion-choices {
        padding: 10px;
    }
    
    .completion-choices h3 {
        font-size: 1rem;
        margin-bottom: 10px;
    }
}