@charset "UTF-8";

html {
  font-family: "Pretendard Variable", Pretendard, -apple-system,
    BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI",
    "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Apple Color Emoji",
    "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
  width: 100%;
  margin: 0;
  padding: 0;
  background-color: #fff;
  color: #212431;
  -webkit-text-size-adjust: none;
  touch-action: manipulation;
}

body {
  width: 100%;
  margin: 0 auto;
  padding: 0;
  line-height: 1.2;
  font-family: "Pretendard Variable", Pretendard, -apple-system,
    BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI",
    "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Apple Color Emoji",
    "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
  position: relative;
  min-width: 320px;
  font-size: 16px;
  font-weight: 500;
  word-break: keep-all;
  overscroll-behavior: contain;
  touch-action: manipulation;
  -ms-overflow-style: none;
}

.wrap {
  min-height: 100vh;
  overflow-y: hidden;
  display: flex;
  flex-direction: column;
}

/* default */
* {
  margin: 0;
  padding: 0;
  outline: 0;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

header,
section,
article,
aside,
footer,
nav {
  display: block;
}

fieldset {
  display: block;
  margin: 0;
  border: 0;
  padding: 0;
}

pre {
  white-space: pre-wrap;
}

img {
  max-width: 100%;
  vertical-align: middle;
  border: 0;
}

ul,
li,
ol {
  list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6,
dd {
  margin: 0;
}

a,
select,
button,
input,
textarea {
  font-family: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input[type="submit"] {
  margin: 0;
  padding: 0;
  border: 0;
  color: inherit;
  cursor: pointer;
  background: transparent;
}

button::-moz-focus-inner,
input::-moz-focus-inner {
  border: 0;
  padding: 0;
}

a,
button {
  -webkit-tap-highlight-color: transparent;
}

a:focus,
button:focus {
  outline: none;
}

::-webkit-scrollbar {
  display: none;
}

/* font color */
.color_fff {
  color: #fff;
}

.g50 {
  color: #f8f9fb;
}

.g100 {
  color: #eff1f5;
}

.g200 {
  color: #d3d7e0;
}

.g300 {
  color: #bdc2cf;
}

.g400 {
  color: #a6abba !important;
}

.g500 {
  color: #848a9c;
}

.g600 {
  color: #6d7284;
}

.g700 {
  color: #535765;
}

.g800 {
  color: #393d48;
}

.gr500 {
  color: #52bd57;
}

.wrapper {
  display: flex;
  flex-direction: column;
  gap: 60px;
  padding: 82px 20px 30px;
}

.todaygame_wrapper {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 52px;
  margin-left: -20px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  background-color: #fff;
  z-index: 6;
  border-bottom: 1px solid #efefef;
}

.header p {
  font-weight: 700;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.title {
  font-size: 24px;
  font-weight: 700;
  color: #393d48;
}

.settingicon {
  width: 24px;
  height: 24px;
  position: absolute;
  top: 50%;
  right: 18px;
  transform: translate(0, -50%);
}

.todaygame_inner {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px 8px;
}

.todaygame {
  position: relative;
  border: 1px solid #eff1f5;
  border-radius: 12px;
  overflow: hidden;
}
/* 7:4 비율 컨테이너 */
.todaygame .top {
  position: relative;
  overflow: hidden;
  aspect-ratio: 7 / 4; /* 210:120 비율 유지 (반응형) */
}

/* 이미지: 비율 유지하며 가로/세로 꽉 채움, 절대배치 불필요 */
.todaygame .top .game_bg {
  display: block;
  width: 100%;
  height: 100%; /* 컨테이너 높이에 맞춰 채움 */
  object-fit: cover; /* 비율 유지 + 꽉 채우기 (넘치는 부분 크롭) */
  object-position: center;
  position: relative; /* 흐름 유지하면서 z-index 사용 가능 */
  z-index: 0; /* 오버레이 아래 레이어 */
}

/* 오버레이 요소는 위로 */
.todaygame .top .tag,
.todaygame .top .user {
  position: absolute;
  z-index: 2; /* 이미지보다 위 */
  /* 필요 위치 지정 예시
  top: 8px; left: 8px;
  */
}

.tag {
  background-color: #f45a5a;
  padding: 5px 8px 4px;
  border-bottom-right-radius: 8px;
  position: absolute;
  top: 0;
  left: 0;
}

.user {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 4px 8px;
  background-color: #fff;
  border-radius: 50px;
  position: absolute;
  top: 10px;
  right: 10px;
}

.user img {
  width: 12px;
  height: 12px;
}

.user .g500 {
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
}

.bottom {
  display: flex;
  flex-direction: column;
  padding: 14px 12px;
  gap: 4px;
}

.bottom .g800 {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
}

.bottom .g400 {
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
}

.comingupgame_wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.comingupgame_inner {
  display: grid;
  gap: 20px;
}

.comingupgame {
  display: flex;
  flex-direction: row;
  gap: 14px;
  align-items: center;
}

.thumb {
  width: 60px;
  height: 60px;
  border-radius: 20px;
  overflow: hidden;
}

.thumb img {
  width: 60px;
  height: 60px;
}

.txt_wrapper {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.txt_wrapper .g800 {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
}

.txt_wrapper .g400 {
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
}

.more {
  width: 100%;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: row;
  flex-shrink: 0;
  border: 1px solid #eff1f5;
  border-radius: 8px;
}

.more p.g400 {
  font-size: 16px;
  font-weight: 500;
}

/* 숨김 처리 */
.is_hidden {
  display: none;
}

/* 기본: 웹(PC) */
:root {
  --init_count: 6;
  --batch_count: 4;
}

.comingupgame_inner {
  grid-template-columns: repeat(4, 1fr); /* 4열 */
}

/* 모바일 (<=600px) */
@media (max-width: 600px) {
  :root {
    --init_count: 3;
    --batch_count: 5;
  }
  .comingupgame_inner {
    grid-template-columns: 1fr; /* 1열 */
  }
}

/* 태블릿 세로 (601px ~ 899px) */
@media (min-width: 601px) and (max-width: 899px) {
  :root {
    --init_count: 4;
    --batch_count: 4;
  }
  .comingupgame_inner {
    grid-template-columns: repeat(2, 1fr); /* 2열 */
  }
  .todaygame_inner {
    grid-template-columns: repeat(3, 1fr); /* 3열 */
  }
}

/* 태블릿 가로 (900px ~ 1199px) */
@media (min-width: 900px) and (max-width: 1199px) {
  :root {
    --init_count: 3;
    --batch_count: 6;
  }
  .comingupgame_inner {
    grid-template-columns: repeat(3, 1fr); /* 3열 */
  }
  .todaygame_inner {
    grid-template-columns: repeat(4, 1fr); /* 4열 */
    gap: 20px 12px;
  }
}

/* 웹 (>=1200px) */
@media (min-width: 1200px) {
  :root {
    --init_count: 4;
    --batch_count: 8;
  }
  .comingupgame_inner {
    grid-template-columns: repeat(4, 1fr); /* 4열 */
  }
  .todaygame_inner {
    grid-template-columns: repeat(4, 1fr); /* 4열 */
    gap: 20px 18px;
  }
}

/* popup */

#settingPopup {
  display: none;
  /* display: block; */
  position: absolute;
  top: 0;
  width: 100vw;
  height: 100%;
  overflow: hidden;
}

.dimm {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 10;
}

.popup_wrapper {
  position: fixed;
  top: 35%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #fff;
  z-index: 11;
  width: 280px;
  height: fit-content;
  padding: 20px 20px 30px;
  border-radius: 8px;
  box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.05);
}

@media (hover: none) and (pointer: coarse) and (orientation: landscape) {
  .popup_wrapper {
    top: 10%;
  }
}

.popup_inner {
  display: flex;
  flex-direction: column;
  gap: 30px;
}
.popup_header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.popupclose {
  width: 20px;
  height: 20px;
}

.setting_wrapper {
  display: flex;
  height: 82px;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
}

.setting_inner {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.toggle {
  display: flex;
  width: 42px;
  height: 26px;
  padding: 3px;
  align-items: center;
  border-radius: 99px;
  background: #d3d7e0;
  transition: background-color 0.25s ease;
}

.toggle.on {
  background: #3da1f3;
}
.toggle.on .toggle_inner {
  transform: translateX(16px);
}

.toggle_inner {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border-radius: 99px;
  background: #fff;
  transform: translateX(0);
  transition: transform 0.25s ease;
}
