* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;

}

/* 여기서부터 선수단 정보 */

main {
  /* 화면에 꽉 차게 */
  min-height: 100vh;
  /* 메인 부분 확인용 */
  /* border: 5px solid red; */


  margin: 0 auto;
}

/*버튼 디자인*/
.go_up {
  position: static !important;
  /* 고정 아님 — 문서 흐름 안에 */
  width: 100%;
  display: flex;
  justify-content: flex-end;
  /* 오른쪽 정렬 */
  padding: 12px 16px;
  /* 여백 */
  box-sizing: border-box;
}

.btn-go-up {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
  margin-right: 20px;
}

.btn-go-up:hover {
  transform: translateY(-2px);
}


/*버튼 디자인해야하는데 썅 디자인 하다가 뒤질거 같음*/

.player_btn {
  cursor: pointer;
  transition: all 0.25s ease;
  width: 60px;
  height: 35px;
  /* font-weight: bold; */
  font-size: 16px;

  background-color: white;
  border: 2px solid #000080;
  
}

.player_btn:active {
  background-color: #0076ff;
}

/* 두 버튼 나란히 중앙정렬 */
.btn-container {
  text-align: center;
  margin-top: 30px;
}



/* pc 버전*/
@media (min-width: 769px) {

  main {
    margin: 0 0px;
    /* background-color: red; */
  }

  .line1_player {
    margin-top: 10px;
    border-top: 3px solid #000080;
    margin-bottom: 10px;

  }

  .hitterInfo {
    /* background-color: green; */


    margin-top: 30px;
    margin-bottom: 20px;
    /* margin-left: clamp(8px, calc((100vw - 750px) / 2), 200px);
    margin-right: clamp(8px, calc((100vw - 750px) / 2), 200px); */
    /* margin-top: 100px; */
  }

  .inFielderPlayer,
  .outFielderPlayer,
  .pitcherPlayer {
    grid-column: 1 / -1;
    /* 전체 열 가로지르기 */
  }

  .inFielderPlayer p,
  .outFielderPlayer p,
  .pitcherPlayer p {
    /* background-color: blue; */
    /* margin-bottom: 10px; */

    font-size: 28px;
    font-weight: bold;
    display: block;
  }

  .InFielder,
  .OutFielder,
  .Catcher,
  .pitcher {
    display: grid;
    grid-template-columns: repeat(auto-fit, 220px);
    gap: 30px;
    /* margin: 50px 200px;        좌우 여백 200px 유지 */
    /* justify-content: center; */
    justify-content: flex-start;
    /* 그리드 트랙을 가운데 정렬 */
    /* background-color: red; */
    margin-top: 30px;
  }

  .InFielder,
  .OutFielder,
  .Catcher,
  .pitcher {
    margin-bottom: 80px;
  }

  .player {
    width: 220px;
    height: 280px;
    border: 1px solid black;
    overflow: hidden;
    position: relative;
    margin-bottom: 32px;
    margin-right: 24px;
  }

  .player:hover {
    border: 3px solid red;
    cursor: pointer;
  }

  .player img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 20%;
    /* X축 50%(가운데), Y축 20% 지점 */
  }

  .player .info {
    position: absolute;
    bottom: 0;
    /* 사진 아래쪽에 고정 */
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    padding: 10px;

    opacity: 1;
    /* 항상 보이게 */
  }

  .player_btn[data-scroll-to="#outside"],
  .player_btn[data-scroll-to="#catch"] {
    display: none;
  }

  /* #inside {
    scroll-margin-top: 200px; 
  } */
}




/* 모바일 버전 */
@media (max-width: 768px) {

  /* 컨테이너 */
  .hitterInfo {
    margin: 0 0;
    /* background-color: aqua; */
    box-sizing: border-box;
    overflow: hidden;
    /* 혹시 모를 가로 넘침 방지 */
    margin-top: 20px;
  }

  .inFielderPlayer,
  .outFielderPlayer,
  .pitcherPlayer {
    grid-column: 1 / -1;
    /* 전체 열 가로지르기 */
    /* display: flex; */
    align-items: center;
    /* gap: 8px; */
    justify-content: space-between;

  }

  .line1_player {
    margin-top: 5px;
    border-top: 3px solid #000080;
    width: 100%;          /* 부모 영역 가득 */
    display: block;        /* 혹시 inline이면 표시 안 될 수 있음 */
    height: 0;

  }

  .inFielderPlayer {
    display: flex;
    
    flex-direction: column; /* 요소를 위아래로 배치 */
    align-items: flex-start; /* 왼쪽 정렬 */
  }

  
  .player_btn_group {
    display: flex;
    gap: 10px;
    /* 버튼 간격 */
  }

  .inFielderPlayer>#inside,
  .outFielderPlayer>#outside,
  .inFielderPlayer>#catch,
  .pitcherPlayer>#top {
    /* background-color: blue; */
    /* margin-bottom: 10px; */

    font-size: 28px;
    font-weight: bold;
    display: inline;
  }

  .inFielderPlayer button:first-of-type {
    margin-left: auto;

  }

  

  .player_btn_group {
    /* background-color: #000080; */
    margin-left: auto;

  }

  .InFielder,
  .OutFielder,
  .Catcher,
  .pitcher {
    display: grid;
    grid-template-columns: repeat(auto-fit, 150px);
    gap: 15px;
    /* margin: 50px 200px;        좌우 여백 200px 유지 */
    justify-content: center;
    /* 그리드 트랙을 가운데 정렬 */
    /* background-color: red; */

  }


  .InFielder,
  .OutFielder,
  .pitcher {
    margin-bottom: 100px;
  }

  /* 카드: 칸 너비 100%, 높이는 비율로 자동 */
  .hitterInfo .player {
    width: 150px;
    height: 210px;
    border: 1px solid black;
    overflow: hidden;
    position: relative;
  }

  .hitterInfo .player:hover {
    border: 3px solid red;
    cursor: pointer;
  }

  .hitterInfo .player img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 20%;
  }

  .hitterInfo .player .info {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    padding: 7px;
    opacity: 1;
  }

  /*스크롤 할때 위에 헤더 고정된거 생각해서 위치 조절하는거*/
  /* #inside{
    scroll-margin-top: 0; 
  } */

  #outside {
    scroll-margin-top: 50px;
    /*외야수 버튼*/
  }

  #catch {
    scroll-margin-top: 50px;
    /*외야수 버튼*/
  }
}