html, body { margin: 0; padding: 0; height: 100%; color: #e5e7eb; font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; background: #0b0a0e; }
#game { display: block; margin: 0 auto; background: #0f172a; border: 1px solid rgba(31,41,55,0.7); border-radius: 10px; margin-top: 60px; box-shadow: 0 20px 60px rgba(0,0,0,0.45); }
#hud { 
  position: fixed; 
  top: 8px; 
  left: 8px; 
  right: 8px;
  background: rgba(0,0,0,0.35); 
  padding: 8px 12px; 
  border-radius: 8px; 
  font-size: 14px; 
  backdrop-filter: blur(6px); 
  border: 1px solid rgba(255,255,255,0.1); 
  z-index: 20; 
}

.hud-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 8px;
}

.hud-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-item .label {
  color: #94a3b8;
  font-size: 12px;
  min-width: 80px;
}

.hud-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.hud-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 8px;
}

.camera-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.camera-info .label {
  color: #94a3b8;
  font-size: 12px;
}

#hud .ghost { 
  background: transparent; 
  color: #e5e7eb; 
  border: 1px solid rgba(255,255,255,0.2); 
  border-radius: 6px; 
  padding: 4px 8px; 
  cursor: pointer; 
  font-size: 11px;
  white-space: nowrap;
  transition: all 0.2s;
}
#hud .ghost:hover { background: rgba(255,255,255,0.06); }
#overlay { position: fixed; inset: 0; display: grid; place-items: center; background: radial-gradient(ellipse at center, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.55) 60%, rgba(0,0,0,0.45) 100%); }
#overlay.start { background: #000000cc; }
#overlay.hidden { display: none; }
.panel { background: linear-gradient(180deg, rgba(15,23,42,0.92), rgba(10,15,28,0.92)); padding: 28px; border-radius: 14px; width: min(720px, 92vw); box-shadow: 0 30px 80px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); text-align: center; }
.panel h1 { margin: 10px 0 10px; font-size: 40px; letter-spacing: 0.4px; background: linear-gradient(90deg, #f59e0b, #22c55e); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: 0 2px 8px rgba(34,197,94,0.25); }
.panel .tips { margin-top: 14px; font-size: 12px; color: #94a3b8; }
.mini { position: fixed; right: 10px; bottom: 10px; border: 1px solid rgba(255,255,255,0.2); background: rgba(0,0,0,0.35); border-radius: 6px; z-index: 15; }
.btn { 
  margin-top: 14px; 
  background: #2563eb; 
  color: white; 
  border: none; 
  border-radius: 8px; 
  padding: 10px 16px; 
  cursor: pointer; 
  position: relative;
  z-index: 10;
  user-select: none;
  -webkit-user-select: none;
}
.btn:hover { background: #1d4ed8; }
.btn.primary { background: #16a34a; }
.btn.primary:hover { background: #15803d; }
.btn:active { 
  transform: scale(0.98); 
  background: #15803d;
}
.pill { display: inline-block; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); margin: 0 6px; font-size: 12px; }
.row.controls { display: flex; justify-content: center; gap: 18px; margin-top: 16px; }
.control { display: inline-flex; align-items: center; gap: 6px; background: rgba(0,0,0,0.25); border: 1px solid rgba(255,255,255,0.12); padding: 6px 10px; border-radius: 10px; }
.control select { background: transparent; color: #e5e7eb; border: 1px solid rgba(255,255,255,0.2); border-radius: 6px; padding: 2px 6px; } 

/* 모바일 터치 최적화 */
* {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* 버튼과 인터랙티브 요소는 터치 허용 */
button, input, select {
  touch-action: manipulation;
  -webkit-user-select: auto;
  user-select: auto;
  -webkit-tap-highlight-color: rgba(0,0,0,0.1);
}

#game, #minimap {
  touch-action: manipulation;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* 모바일 반응형 디자인 */
@media (max-width: 768px) {
  #hud {
    top: 4px;
    left: 4px;
    right: 4px;
    padding: 6px 8px;
  }
  
  .hud-top {
    flex-direction: column;
    gap: 8px;
  }
  
  .hud-info {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .info-item {
    min-width: auto;
  }
  
  .info-item .label {
    font-size: 11px;
    min-width: auto;
  }
  
  .hud-buttons {
    justify-content: center;
    gap: 4px;
  }
  
  #hud .ghost {
    padding: 6px 8px;
    font-size: 10px;
  }
  
  .mini {
    width: 120px;
    height: 120px;
    right: 4px;
    bottom: 4px;
  }
  
  .panel {
    padding: 20px;
    width: 95vw;
  }
  
  .panel h1 {
    font-size: 32px;
  }
  
  .row.controls {
    flex-direction: column;
    gap: 12px;
  }
}

/* 터치 피드백 */
#hud .ghost:active {
  background: rgba(255,255,255,0.1);
  transform: scale(0.95);
}

.btn:active {
  transform: scale(0.98);
}

/* 게임 설명 모달 스타일 */
.help-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: none; /* 기본적으로 숨김 */
  align-items: center;
  justify-content: center;
  z-index: 9999; /* z-index를 매우 높게 설정 */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none; /* 기본적으로 클릭 불가 */
}

.help-modal.show {
  display: flex !important; /* 강제로 표시 */
  opacity: 1;
  visibility: visible;
  pointer-events: auto; /* 표시될 때만 클릭 가능 */
}

.help-modal.hidden {
  display: none !important;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.help-content {
  background: linear-gradient(180deg, rgba(15,23,42,0.95), rgba(10,15,28,0.95));
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 16px;
  width: min(800px, 95vw);
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 30px 80px rgba(0,0,0,0.8);
}

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

.help-header h2 {
  margin: 0;
  font-size: 28px;
  background: linear-gradient(90deg, #f59e0b, #22c55e);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.close-btn {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 24px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s;
}

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

.help-body {
  padding: 20px 24px 24px;
}

.help-body h3 {
  margin: 20px 0 12px 0;
  font-size: 18px;
  color: #f59e0b;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 6px;
}

.help-body h3:first-child {
  margin-top: 0;
}

.help-body p {
  margin: 8px 0;
  line-height: 1.5;
}

.help-body ul {
  margin: 8px 0;
  padding-left: 20px;
}

.help-body li {
  margin: 6px 0;
  line-height: 1.4;
}

.help-body strong {
  color: #fbbf24;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
  .help-content {
    width: 95vw;
    max-height: 85vh;
  }
  
  .help-header {
    padding: 16px 20px 12px;
  }
  
  .help-header h2 {
    font-size: 24px;
  }
  
  .help-body {
    padding: 16px 20px 20px;
  }
  
  .help-body h3 {
    font-size: 16px;
  }
} 