/* 전체 바디 스타일 */
body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: #1e1e2f;
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  flex-direction: column;
}

/* 시작 화면 */
#start-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#start-screen h1 {
  font-size: 48px;
  margin-bottom: 30px;
  color: #ff6b6b;
  text-shadow: 2px 2px #000;
}

#start-btn {
  padding: 12px 30px;
  font-size: 24px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  background: #ff6b6b;
  color: #fff;
  transition: background 0.3s;
}

#start-btn:hover {
  background: #ff4c4c;
}

/* 게임 화면 */
#game-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 상태바 (점수 / 시간) */
#status-bar {
  display: flex;
  justify-content: space-between;
  width: 700px;
  margin-bottom: 10px;
  font-size: 20px;
  font-weight: bold;
}

#score {
  color: #ffd93d;
}

#time {
  color: #6bcfff;
}

/* 타이머 바 */
#timer-container {
  width: 700px;
  height: 20px;
  background: #444;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 15px;
}

#timer-bar {
  width: 100%;
  height: 100%;
  background: #6bcfff;
  transition: width 1s linear;
}

/* 게임판 */
#game {
  display: grid;
  grid-template-columns: repeat(17, 40px);
  grid-template-rows: repeat(10, 40px);
  gap: 8px;
}

/* 셀 스타일 */
.cell {
  width: 40px;
  height: 40px;
  background: #ff6b6b;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  font-weight: bold;
  font-size: 18px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s;
}

.cell:hover {
  transform: scale(1.1);
}

.selected {
  border: 3px solid #ffd93d;
}

.explode {
  animation: explode 0.3s forwards;
}

@keyframes explode {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.5);
    opacity: 0.7;
  }
  100% {
    transform: scale(0);
    opacity: 0;
  }
}

/* 게임 컨트롤 */
#game-controls {
  margin-top: 15px;
}

.reset-btn {
  padding: 8px 20px;
  font-size: 18px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  background: #ffd93d;
  color: #222;
  font-weight: bold;
  transition: background 0.3s;
}

.reset-btn:hover {
  background: #ffc700;
}

/* 모달 전체 */
.modal {
  display: none; /* 초기 숨김 */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

/* 모달 내용 */
.modal-content {
  background-color: #1e1e1e; /* 다크모드용 진한 배경 */
  color: #fff; /* 글자색 흰색 */
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  min-width: 300px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}
