* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 40px;
  font-family: "Noto Sans KR", Arial, sans-serif;
  background-color: #2b2522;
  color: #111;
}

.page {
  max-width: 1400px;
  width: 92vw;
  margin: 0 auto;
}

.main-title {
  margin-top: 40px;
  margin-bottom: 35px;
  text-align: center;
  font-size: 34px;
  font-weight: 900;
  letter-spacing: 2px;
  color: #d99020;
  border-bottom: 3px solid #111;
  padding-bottom: 12px;
}

.top-control {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
}

.category-row {
  flex: 1;
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-btn,
.mode-btn {
  border: 1px solid #111;
  background-color: #a47a4f;
  color: #f5eedf;
  padding: 10px 16px;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.2s;
}

.category-btn:hover,
.mode-btn:hover {
  background-color: #8c653d;
}

.category-btn.active,
.mode-btn.active {
  background-color: #e5b044;
  color: #111;
  box-shadow: 0 0 10px rgba(229, 176, 68, 0.4);
}

.mode-row {
  flex-shrink: 0;
  display: flex;
  justify-content: flex-end;
}

.mode-buttons {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.section {
  width: 100%;
  margin-top: 20px;
  margin-bottom: 40px;
}

.section-title {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 10px;
  color: #d99020;
}

.image-area {
  width: 100%;
  min-height: 180px;
  padding: 20px;
  border: 4px solid #111;
  background-color: #1e1917;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.inner-group {
  border: 2px solid #555;
  padding: 12px;
  background-color: #3d3531;
}

.group-title {
  font-size: 15px;
  font-weight: bold;
  margin-bottom: 10px;
  color: #f5eedf;
}

.box-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.damage-box {
  position: relative;
  width: 58px;
  height: 58px;
  border: 4px solid #d99020;
  background-color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.damage-box img {
  width: 80%;
  height: 80%;
  object-fit: contain;
}

.damage-box:hover {
  background-color: #444;
  transform: translateY(-3px);
  transition: 0.2s;
}

.damage-box.plus-mode::after,
.damage-box.double-plus-mode::after {
  position: absolute;
  right: -8px;
  bottom: -8px;
  background: #d99020;
  color: #111;
  border: 2px solid #111;
  font-size: 10px;
  font-weight: bold;
  padding: 1px 4px;
}

.damage-box.plus-mode::after {
  content: "+";
}

.damage-box.double-plus-mode::after {
  content: "++";
}

.damage-box.plus-mode {
  box-shadow: 0 0 0 3px #c99a35;
}

.damage-box.double-plus-mode {
  box-shadow: 0 0 0 3px #f0c35a;
}

.tooltip {
  position: absolute;
  left: 50%;
  bottom: 72px;
  transform: translateX(-50%);
  width: 280px;
  max-height: 360px;
  overflow-y: auto;
  padding: 12px;
  border: 2px solid #111;
  background-color: #eee;
  color: #111;
  font-size: 14px;
  line-height: 1.45;
  text-align: left;
  word-break: keep-all;
  white-space: pre-line;
  opacity: 0;
  visibility: hidden;
  transition: 0.2s;
  z-index: 10;
  box-shadow: 4px 4px 0 #111;
}

.damage-box:hover .tooltip {
  opacity: 1;
  visibility: visible;
}

.tooltip-title {
  display: block;
  font-weight: bold;
  margin-bottom: 6px;
  font-size: 18px;
  white-space: nowrap;
}

.tooltip-desc {
  display: block;
}

.empty-message {
  padding: 30px;
  color: #f5eedf;
}

@media (max-width: 700px) {
  body {
    padding: 20px;
  }

  .top-control {
    flex-direction: column;
    align-items: flex-start;
  }

  .mode-buttons {
    flex-wrap: wrap;
  }

  .tooltip {
    width: 220px;
    font-size: 12px;
  }
  .top-control {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 24px;
  }

  .category-row {
    width: 100%;
  }

  .category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }

  .mode-row {
    width: 100%;
    justify-content: flex-start;
  }

  .mode-buttons {
    flex-wrap: wrap;
  }

  .section {
    width: 100%;
    margin-top: 20px;
    margin-bottom: 40px;
  }

  .image-area {
    width: 100%;
    min-height: 280px;
    padding: 20px;
    border: 4px solid #111;
    background-color: #a47a4f;

    display: flex;
    flex-direction: column;
    gap: 20px;
  }
}

  .damage-box.combo-gift {
     background-color: #333;
     border-color: #b01c37;
  }