/* Rune evaluation and recommendation styles */
.runeTable {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.runeTable th, .runeTable td {
    border: 1px solid #dfe6e9;
    padding: 0.5rem;
    text-align: center;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
    background: var(--modal-bg);
    z-index: 2000;
    overflow-y: auto;
    overscroll-behavior: contain;
}

#rune-modal {
    z-index: 2100;
}

.modal-content {
    background: var(--modal-content-bg);
    color: var(--modal-content-text);
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 1rem;
    box-sizing: border-box;
}

.modal-content .header-inner {
    border-bottom: 1px solid var(--section-border);
}

.modal-content .header-inner h2 {
    color: var(--text-color);
}

.rune-grid {
    display: grid;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.rune-grid.two-col {
    grid-template-columns: 1fr 1fr;
}

.slot-placeholder {
    visibility: hidden;
}

.equip-slot {
    border: 1px solid #dfe6e9;
    border-radius: 4px;
    padding: 0.5rem;
    text-align: center;
    background: #f9f9f9;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: background 0.2s;
}

.equip-slot:hover {
    background: #e7f1ff;
}

.equip-slot .slot-label {
    font-weight: bold;
    margin-bottom: 0.25rem;
    display: block;
    font-family: 'mabinogi_classic';
}

.eval-section {
    margin-bottom: 2rem;
}

.eval-section h4{
    font-family: 'mabinogi_classic';
    margin-bottom: 0.5rem;
}

#savedSets {
    margin: 1rem 0;
    padding: 0;
    list-style: none;
}

#savedSets li {
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border: 1px solid #dfe6e9;
    margin-bottom: 0.25rem;
    border-radius: 4px;
}

#savedSets li:hover {
    background: #e7f1ff;
}

.selected-character-info {
    margin: 0.5rem 0 1rem;
    font-weight: bold;
}

.synergy-matched {
    color: #2ecc71;
    font-weight: bold;
}

.synergy-recommend {
    color: #3498db;
}


/* 평가 테이블 */
.runeTable {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.runeTable th, .runeTable td {
    border: 1px solid #dfe6e9;
    padding: 0.5rem;
    text-align: center;
}


.eval-section {
    margin-bottom: 2rem;
}

#savedSets {
    margin: 1rem 0;
    padding: 0;
    list-style: none;
}

#savedSets li {
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border: 1px solid #dfe6e9;
    margin-bottom: 0.25rem;
    border-radius: 4px;
}

#savedSets li:hover {
    background: #e7f1ff;
}

.synergy-matched {
    color: #2ecc71;
    font-weight: bold;
}

.synergy-recommend {
    color: #3498db;
}


/* 추천 페이지 전용 */
#runeList {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

#runeList .rune-item {
  padding: 2px 4px;
  font-size: 0.85rem;
  color: white;
}

#runeList .rune-grade-유니크 {
  color: #5C4A35 !important;
}

#runeList .category-header {
  width: 100%;
  margin-top: 0.5rem;
}


#ownedList {
  list-style: none;
  padding: 0;
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

#ownedList .owned-rune {
  display: flex;
  align-items: center;
  gap: 2px;
}

.owned-rune .remove-btn {
  padding: 0rem 0rem 0rem 1rem;
  background: none;
  border: none;
  cursor: pointer;
  font-weight: bold;
  margin-left: -4px;
  margin-right: 2px;
  font-size: 0.9rem;
}

/* accordion for rune registration */
.accordion {
  margin-top: 0.5rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.accordion-header {
  padding: 0.5rem 1rem;
  background: #e7f1ff;
  color: #2d3436;
  font-weight: bold;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s;
}

.accordion-header:hover {
  background: #b3d4fc;
}

.accordion-header::after {
  content: '▼';
  font-size: 0.8rem;
  transition: transform 0.2s;
}

.accordion-header.active::after {
  transform: rotate(180deg);
}

.accordion-content {
  display: none;
  padding: 0.5rem;
  background: var(--container-bg);
}

.accordion-content.active {
  display: block;
}
.selected-rune {
  padding: 2px 6px;
  border: 1px solid #dfe6e9;
  border-radius: 4px;
  margin-top: 0.25rem;
}

/* slot evaluation card */
.slot-card {
  background: var(--container-bg);
  border: 1px solid var(--input-border);
  border-radius: 8px;
  padding: 0.8rem;
  margin-bottom: 1rem;
}

.slot-header {
  font-weight: bold;
  margin-bottom: 0.5rem;
  font-size: 1rem;
  color: var(--header-blue-text);
}

.slot-body {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}


.slot-field {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
}

.synergy-field {
  flex-direction: column;
  align-items: flex-start;
}

.synergy-field .field-label {
  margin-bottom: 0.25rem;
}

.current-rune-info {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: 'mabinogi_classic';
}

.score-info {
  font-size: 0.85rem;
}

.field-label {
  font-weight: bold;
  min-width: 4rem;
}

.current-rune,
.recommend-runes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
}

.synergy-list {
  list-style: none;
  padding-left: 1rem;
}

/* enhancement info */
.enhancement-info-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.enhancement-info-list li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.4rem;
}

.enhance-label {
  font-weight: bold;
  min-width: 5.5rem;
  color: var(--button-bg);
}

.enhance-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.enhance-card .ranked-list,
.enhance-card .option-tags {
  margin-top: 0.3rem;
}


.ranked-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.ranked-list li {
      display: flex !important;
    align-items: flex-start !important;
    gap: 2rem !important;
    margin-bottom: 0.2rem !important;
    justify-content: normal !important;
}

.rank-num {
  font-weight: bold;
  color: var(--button-bg);
}

.option-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.option-tag {
  display: inline-block;
  padding: 0.2rem 0.4rem;
  background: var(--section-bg);
  border: 1px solid var(--section-border);
  border-radius: 4px;
  font-size: 0.8rem;
  color: var(--text-color);
  white-space: nowrap;
}

.eval-item {
  display: flex;
  gap: 0.4rem;
  align-items: baseline;
}

.eval-user {
  font-weight: bold;
  color: var(--button-bg);
  margin-right: 0.25rem;
}

.eval-comment {
  flex: 1;
}

.eval-vote {
  font-size: 0.75rem;
  color: #3b82f6;
}

.synergy-list li {
  margin-bottom: 0.3rem;
}

/* evaluation list */
.eval-field {
  flex-direction: column;
  align-items: flex-start;
}

.eval-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.eval-list li {
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
}

/* recommendation cards */
.recommend-card {
  background: var(--container-bg);
  border: 1px solid var(--input-border);
  border-radius: 8px;
  padding: 0.8rem;
  margin-bottom: 1rem;
}

.recommend-title {
  font-weight: bold;
  margin-bottom: 0.5rem;
  font-size: 1rem;
  color: var(--button-bg);
}

.recommend-subtitle {
  font-weight: bold;
  margin-top: 0.6rem;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
  color: var(--text-color);
  border-left: 4px solid var(--section-border);
  padding-left: 0.4rem;
}

.recommend-subtitle.high-rec {
  color: #e74c3c;
  border-left-color: #e74c3c;
}

.recommend-body {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
}

.sub-section-title {
  font-family: 'mabinogi_classic';
  font-size: 1.1rem;
  margin: 1.5rem 0 0.75rem;
  font-weight: bold;
  color: var(--text-color);
  border-bottom: 2px solid var(--section-border);
  padding-bottom: 0.25rem;
  font-family: 'mabinogi_classic';
  color: var(--button-bg);
}

.result-group {
  background: var(--section-bg);
  border: 1px solid var(--section-border);
  border-radius: 8px;
  padding: 1rem;
  margin-top: 1rem;
}

.result-group:first-child {
  margin-top: 0;
}

body.dark-mode .action-btn:disabled {
  background: #4b5563;
  color: #9ca3af;
}


@media (max-width: 600px) {
    .owned-rune {
        padding: 0 !important;
    }
}
