/* 모던 디자인 변수 호환 */
/* common-modern.css의 변수를 사용하여 다크모드 및 테마 호환성 확보 */

/* duelcard.css - 모던 디자인 호환 */

/* Bootstrap container는 그대로 사용, 페이지별 스타일만 추가 */
.duelcard-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

h1 {
  text-align: center;
  color: var(--text-primary);
  font-size: 2.5rem;
  font-weight: 800;
  margin-top: 20px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h5 {
  display: flex;
  flex-direction: column;
    align-items: center;
}

.button-container {
  width: 100%;
  position: sticky;
  top: 70px; /* 네비게이션 바 아래 */
  left: 0;
  right: 0;
  background-color: var(--background);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  z-index: 100;
}

.info {
  text-align: center;
  padding: 1.5rem;
  background-color: var(--surface);
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

.highlight {
  color: var(--success-color);
  font-weight: bold;
}

.form-control {
  font-size: 1rem;
  padding: 0.75rem;
  background: var(--background);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  transition: all var(--transition-base);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
  line-height: 1.5; /* 줄 높이 조정 */
  vertical-align: middle; /* 수직 정렬 */
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  width: 100%;
  padding: 10px;
  box-sizing: border-box;
}

.card {
  background-color: #202020;
  border: 1px solid #ffffff00;
  border-radius: 5px;
  padding: 10px;
  text-align: center;
  cursor: pointer;
  position: relative;
  width: 220px;  /* 카드 너비 */
  height: 352px;  /* 카드 높이 */
  background-size: cover; /* 배경 이미지 크기 조정 */
}

.card-selected-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1; /* 카드의 내용 위에 표시되도록 설정 */
  background-color: transparent;
  border-radius: 5px;
  pointer-events: none; /* 오버레이가 클릭 이벤트를 차단하지 않도록 설정 */
}

.card.main-card .card-selected-overlay {
  background-color: rgba(0, 255, 0, 0.1); /* 반투명한 초록 오버레이 */
}

.card.sub-card .card-selected-overlay {
  background-color: rgba(255, 0, 0, 0.1); /* 반투명한 빨강 오버레이 */
}

.exp-bar {
  position: absolute;
  bottom: 10px;
  left: 10%;
  width: 80%;
  height: 15px;
  background-color: #ddd;
  border-radius: 5px;
  overflow: hidden;
}

.exp-bar-inner {
  height: 100%;
  background-color: orange;
  transition: width 0.3s;
}

.exp-bar-inner.full {
  background-color: cyan;
}

.exp-bar-container {
  width: 100%;
  background-color: #ddd;
  border-radius: 5px;
  overflow: hidden;
  margin-top: 5px;
}

.job-illustration {
  width: 100%;
  height: auto;
}

.job-thumbnail {
  width: 30px; /* 직업 썸네일 크기 조정 */
  height: 30px;
}

.ability-image {
  width: 24px; /* 능력 이미지 크기 조정 */
  height: 24px;
  margin: 2px;
}

.abilities-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 2px;
}

.card-overlay {
  position: absolute;
  bottom: 10px;
  left: 10px;
  right: 10px;
  width: 90%;
  height: 100%;
  height: 120px;
  bottom: 20px;
  left: 10px;
  right: 10px;
  background-color: rgba(0, 0, 0, 0.5);
  color: #fff;
  border-radius: 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.card-overlay p {
  margin: 3px;
  padding: 5px;
  font-size: 15px;
  top:-20px;
  bottom:20px;
}

.card.main-card {
  border-color: rgb(0, 255, 0);
  border-width: 2px;
}

.card.sub-card {
  border-color: rgb(255, 0, 0);
  border-width: 2px;
}

#upgrade-container {
  margin-top: 20px;
}

.modal-content {
  background-color: #fff;
  border-radius: 5px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.modal-header, .modal-footer {
  border-bottom: 1px solid #ddd;
}

.modal-title {
  font-size: 18px;
  font-weight: bold;
}

.modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.modal-body img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto 10px;
}

.ability-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding-bottom: 30px;
}

.ability-item {
  text-align: center;
  position: relative;
}

.ability-item img {
  width: 50px;
  height: 50px;
}

.skill-changer {
  position: absolute;
  bottom: -40px; /* 더 아래로 배치 */
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 30px;
  cursor: pointer;
}

.ability-item img {
  width: 50px;
  height: 50px;
}
/* 추가적인 반응형 스타일 */
@media (max-width: 768px) {
  #button-container {
    flex-direction: column;
    gap: 5px;
  }

  .card-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }

  .card {
    max-width: 82px;
    max-height: 135px;
  }

  .job-thumbnail, .ability-image {
    width: 20px; /* 모바일에서 이미지 크기 조정 */
    height: 20px;
  }

  .card-overlay p {
    font-size: 3px; /* 모바일에서 텍스트 크기 조정 */
  }

  .card-overlay {
    width: 90%;
    max-height: 45px;
    position: absolute;
    left: 5%;
    right: 5%;
    background-color: rgba(0, 0, 0, 0.5);
    color: #fff;
    border-radius: 5px;
    flex-direction: column;
    align-items: center;
  }

  .job-thumbnail {
    width: 14px; /* 모바일에서 직업 썸네일 크기 조정 */
    height: 14px;
  }
  
  .ability-image {
    width: 10px; /* 모바일에서 능력 이미지 크기 조정 */
    height: 10px;
    margin: 1px;
  }

  
  .exp-bar {
    position: absolute;
    bottom: 10px;
    left: 10%;
    width: 80%;
    height: 5px;
    background-color: #ddd;
    border-radius: 5px;
    overflow: hidden;
  }

  .exp-bar-inner {
    height: 100%;
    background-color: orange;
    transition: width 0.3s;
  }

  .exp-bar-inner.full {
    background-color: cyan;
  }

  .exp-bar-container {
    width: 100%;
    background-color: #ddd;
    border-radius: 5px;
    overflow: hidden;
    margin-top: 5px;
  }
}