@font-face {
    font-family: 'OneStoreMobilePop';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2105_2@1.0/ONE-Mobile-POP.woff') format('woff');
    font-weight: normal;
    font-display: swap;
}

body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
 /* background-color: black;*/
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.time-container {
  position: relative;
  width: 100%;
  margin-bottom: 20px;
}

.time-image {
  width: 100%;
  height: 60px;
  display: block;
  object-fit: cover;
}

.timer-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  text-align: end;
}

.free-text {
   font-family: 'OneStoreMobilePop';
  color: white;
  font-size: 1.2em;
  font-weight: bold;
  white-space: nowrap;
}


.timer-text {
  display: flex;
  gap: 5px;
  align-items: center;          /* 숫자 간격 */
}

.timer-text span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 35px; /* 직사각형의 너비를 조절합니다. */
  height: 40px; /* 직사각형의 높이를 조절합니다. */
  background-color: #000; /* 검은색 배경 */
  color: #fff;
  font-size: 1.2em;
  font-weight: bold;
  border-radius: 5px; /* 모서리를 둥글게 만듭니다. */
  border: 1px solid #fff; /* 흰색 테두리 */
  box-shadow: 3px 0.5px #fff;
}


/* '무료' 글씨만 노란색으로 만드는 클래스 */
.yellow-text {
    color: rgb(248, 203, 3);
}


/*추가 영역*/
.top img, .main-banner img {
  width: 100%;
  display: block;
}

.main-banner, .grid {
  /* 모바일 화면에서는 너비를 꽉 채우도록 설정 */
  width: 90%; 
  margin-left: auto;
  margin-right: auto;
}

.main-banner {
  margin-top: 0;
  border-radius: 10px;
  overflow: hidden;
  text-align: center;
  padding: 20px;
}

.main-banner img {
  width: 100%;
  display: block;
  border-radius: 10px;
  /* 만약 width:80%할떄
 display: inline-flex;
  */
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /*2개의 열을 만들되, 각 열의 크기를 1fr로 한다는 의미*/
  gap: 10px;
  margin-bottom: 20px;
  /*  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  화면 크기에 따라 1열 → 2열 → 3열 자동 변환*/
  padding-bottom: 50px;
  row-gap: 20px;
}

.grid-item {
  background-color: #222;
  border-radius: 10px;
  overflow: hidden;
  text-align: center;
  padding-bottom: 10px;
}

.grid-item img {
  /*width: 100%;
  height: 150px;
  display: block;*/
  width: 100%;
  height: auto;       /* 비율 유지 */
  display: block;
  object-fit: cover;  /* 비율 유지하면서 꽉 차게 */
  border-radius: 10px;

}

.grid-item p {
  margin: 5px 0 0 0;
  font-size: 13px;
  color: white;
}

a, a:visited, a:hover, a:active {
  text-decoration: none !important;
  color: inherit;
}

/* ------------------------------------------------------------- */

/* 데스크톱 화면 스타일 (너비 630px 이상일 때 적용) */
@media (min-width: 630px) {
 body {
 /* 너비 630px의 가상 컨테이너 역할을 함 */
 max-width: 630px;
 margin: 0 auto;
 }

 .top {
 width: 100%;
 padding: 0;
}

.timer-text {
  font-size: 2.5em;
}
.main-banner, .grid {
 /* body의 가상 컨테이너 너비에 맞춰 100%로 설정 */
 width: 100%;
 /* 좌우에 여백 추가 */
 padding : 20px 20px;
 box-sizing: border-box;
 }
  
  .main-banner {
    border-radius: 0;
  }

  .grid {
    padding-bottom: 100px;
  }

}

/* 사용자 시스템 설정에 따라 색상 변경 */
@media (prefers-color-scheme: light) {
  body {
    background-color: white; /* 라이트 모드일 때 배경을 흰색으로 변경 */
    color: #333; /* 텍스트를 어둡게 변경 */
  }

  .grid-item {
    background-color: #222; 
  }


  @media (min-width: 630px) {
    .main-banner, .grid {
      background-color: white; 
    }
  }
}

/* 데스크톱 화면 (630px 이상)에서 main-banner 아래 여백 추가 */
@media (min-width: 630px) {
  .main-banner {
    padding-bottom: 50px; /* main-banner 아래에 50px 여백 추가 */
  }
}