@charset "UTF-8";

.tool-header { background-color: #ffffff; padding: 30px 0px 10px 0px; border-bottom: 1px solid #e2e8f0; text-align: center; }
.tool-title { font-weight: 900; font-size: 2rem; color: #0f172a; }
.calc-card { background: #ffffff; border-radius: 12px; padding: 20px; border: 1px solid #e2e8f0; box-shadow: 0 4px 6px rgba(0,0,0,0.02); text-align: center; }

/* #fullscreen-game-wrapper {
    position: fixed;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background-color: #0b0f19;
    z-index: 99999;
    display: none;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    overflow: hidden;
    touch-action: none;
    user-select: none;
} */

#fullscreen-game-wrapper {
    position: fixed;
    top: 0; left: 0;
    width: 100vw;
    height: 100dvh;
    height: var(--app-height, 100dvh);
    background-color: #0b0f19;
    z-index: 99999;
    display: none;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    overflow: hidden;
    touch-action: none;
    user-select: none;
    
    /* 🌟 추가: OS 네비게이션 바가 화면을 덮을 때 그 높이만큼 하단에 여백을 줘서 UI를 위로 밀어올림 */
    box-sizing: border-box;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* daltipArcade.css */
.virtual-arcade-cabinet {
    max-width: 800px; /* 게임기 최대 너비 고정 */
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    margin: 0 auto; /* PC에서 화면 정중앙 배치 */
    background-color: #0b0f19; /* 오락기 자체의 배경색 */
    position: relative;
    box-shadow: 0 0 50px rgba(0,0,0,0.8); /* 오락기 테두리 그림자 효과 */
}

.game-hud-full { 
    width: 100%; 
    display: flex; justify-content: space-between; align-items: center; 
    padding: 10px 20px; 
    background-color: #1e293b;
    color: #ffffff;
    font-weight: 800;
    font-size: 1.05rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    z-index: 30;
    flex-shrink: 0;
}

.target-display-full {
    background: rgba(255, 255, 255, 0.15); padding: 3px 12px; 
    border-radius: 20px; font-size: 0.9rem; letter-spacing: 1px;
}

.arcade-screen-container {
    width: 100%;
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    background-color: #05070c;
    min-height: 0;
}

.daltip-game-screen {
    background-color: #0f172a; /* 게임기 화면 기본 배경색 */
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    /* 지뢰찾기 같은 DOM 기반 게임이 들어올 경우를 대비한 속성 추가 */
    position: relative;
    overflow: hidden; 
}

.arcade-ad-space {
    width: 100%;
    height: 45px;
    background: #0f172a;
    border-top: 2px solid #1e293b;
    border-bottom: 2px solid #1e293b;
    display: flex;
    justify-content: center;
    align-items: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
    font-weight: bold;
    letter-spacing: 1px;
    flex-shrink: 0;
    z-index: 25;
}

.arcade-controller-area {
	position: relative;
    width: 100%;
    height: 185px; 
    background: linear-gradient(to bottom, #1e293b, #0f172a);
    border-top: 4px solid #334155;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 50px;
    padding: 0 20px;
    flex-shrink: 0;
    z-index: 30;
}

.console-engraving {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem; /* 크기는 살짝 줄임 */
    font-weight: 900;
    
    /* 🌟 글자색을 배경보다 밝은 톤으로 올려서 확실히 보이게 처리 */
    /* color: #64748b; */ 
    color: #ebebeb;
    
    /* 🌟 좌상단은 어두운 그림자(파인 느낌), 우하단은 옅은 반사광(빛 맺힘)으로 음각 완성 */
    text-shadow: -1px -1px 1px rgba(0, 0, 0, 0.9), 1px 1px 1px rgba(255, 255, 255, 0.15);
    
    letter-spacing: 2px;
    pointer-events: none;
}

.analog-stick-base {
    width: 120px;
    height: 120px;
    background: rgba(15, 23, 42, 0.85);
    border: 4px solid #475569;
    border-radius: 50%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: inset 0 6px 12px rgba(0,0,0,0.6);
    touch-action: none;
}
.analog-stick-knob {
    width: 56px;
    height: 56px;
    background: radial-gradient(circle at 30% 30%, #60a5fa, #1d4ed8);
    border: 2px solid #93c5fd;
    border-radius: 50%;
    position: absolute;
    box-shadow: 0 4px 8px rgba(0,0,0,0.5);
    cursor: pointer;
    transition: transform 0.05s ease-out;
}

/* .system-buttons-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
    align-items: center;
    width: max-content; 🌟 상단 PAUSE+START 두 버튼의 합친 너비만큼만 영역을 잡도록 강제
} */
.system-buttons-group {
    display: flex;
    flex-direction: column;
    gap: 5px; /* 버튼 사이 간격도 살짝 좁힘 */
    align-items: center;
    width: max-content;
    margin-top: -38px !important; /* 🌟 이 값을 조절하여 위로 끌어올림 (-10px ~ -25px 사이로 테스트) */
    margin-left: auto;
    margin-right: auto; /* 가운데 정렬 유지 */
}
.sys-top-row {
    display: flex;
    gap: 8px;
}
.sys-btn {
    background: #475569;
    color: #f8fafc;
    border: none;
    padding: 8px 14px;
    font-size: 0.8rem;
    font-weight: 900;
    border-radius: 6px;
    letter-spacing: 1px;
    box-shadow: 0 3px 0 #1e293b;
    cursor: pointer;
    outline: none;
}
.sys-btn:active { transform: translateY(2px); box-shadow: 0 0px 0 #1e293b; }
.sys-btn-pause { background: #f59e0b; box-shadow: 0 3px 0 #b45309; }
.sys-btn-start { background: #10b981; box-shadow: 0 3px 0 #047857; }
.sys-btn-exit  { 
    background: #ef4444; 
    box-shadow: 0 3px 0 #b91c1c; 
    width: 100%; /* 🌟 하드코딩(110px) 제거하고 부모(PAUSE+START) 너비에 100% 꽉 차게 자동 조절 */
    padding: 6px 10px; 
}

.action-buttons-group {
    position: relative;
    width: 110px;
    height: 120px;
    background: rgba(15, 23, 42, 0.4);
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.05);
    display: flex;
    justify-content: center;
    align-items: center;
}
.action-btn {
    position: absolute;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    color: white;
    font-weight: 900;
    font-size: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 0 rgba(0,0,0,0.4), 0 6px 12px rgba(0,0,0,0.3);
    cursor: pointer;
    outline: none;
}
.action-btn-a { background: #ef4444; border-bottom: 3px solid #b91c1c; bottom: 8px; left: 8px; } 
.action-btn-b { background: #3b82f6; border-bottom: 3px solid #1d4ed8; top: 8px; right: 8px; } 
.action-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0,0,0,0.4); }

.game-overlay-panel {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(11, 15, 25, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 40;
}

/* =========================================
   2. 모바일 반응형 (768px 이하) 수정
   ========================================= */
@media (max-width: 768px) {
    .tool-header { padding: 15px 0; }
    .tool-title { font-size: 1.5rem; }
    .game-hud-full { font-size: 0.85rem; padding: 6px 12px; }
    .arcade-ad-space { height: 38px; font-size: 0.7rem; }
    .arcade-controller-area { height: 165px; gap: 20px; padding: 0 10px; justify-content: space-around; }
    .analog-stick-base { width: 100px; height: 100px; }
    .analog-stick-knob { width: 46px; height: 46px; }
    .sys-btn { padding: 5px 10px; font-size: 0.75rem; }
    /* 🌟 여기서 .sys-btn-exit { width: 96px; } 삭제함 (위에서 100%로 알아서 맞춰짐) */
    .action-buttons-group { width: 95px; height: 105px; }
    .action-btn { width: 42px; height: 42px; font-size: 0.9rem; }
}