@charset "UTF-8";
input[type="text"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #d1d5db;
  border-radius: 0.25rem;
  box-sizing: border-box;
}

textarea {
  resize: vertical;
  height: 6rem;
}

.job-filter-group {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: #b2bec3 #f9f9f9;
    justify-content: space-evenly;
}

.job-filter-group::-webkit-scrollbar {
    width: 6px;
}

.job-filter-group::-webkit-scrollbar-track {
    background: #f9f9f9;
}

.job-filter-group::-webkit-scrollbar-thumb {
    background: #b2bec3;
    border-radius: 4px;
}

.job-group {
    flex: 1;
    min-width: 100px;
    max-width: 120px;
    display: flex;
    flex-direction: column;
    border: 1px solid #dfe6e9;
    border-radius: 8px;
    padding: 0.5rem;
    background: #f9f9f9;
}

.group-header {
    font-weight: bold;
    color: #2d3436;
    padding: 0.4rem;
    display: flex;
    align-items: center;
    background: #e5e7eb;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.group-button {
    background: #3b82f6;
    color: white;
    padding: 0.4rem 0.4rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s ease;
    width: 100%;
    text-align: center;
    font-size: 0.85rem;
}

.group-button[data-selected="true"] {
    background: #2563eb;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.group-button[data-selected="false"] {
    background: #d1d5db;
}

.job-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.job-button, .filter-button {
    padding: 0.4rem 0.8rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background: #e5e7eb;
    color: #2d3436;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    font-size: 0.85rem;
    text-align: center;
}

.job-button[data-selected="true"], .filter-button[data-selected="true"] {
    background: #0984e3;
    color: white;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.job-button[data-selected="false"], .filter-button[data-selected="false"] {
    background: #e5e7eb;
    color: #2d3436;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.date-inputs {
    display: none;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.filter-section {
    margin-bottom: 1rem;
}

.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
}

table th, table td {
    border: 1px solid #dfe6e9;
    padding: 0.5rem;
}

table thead {
    background: #f4f6f8;
}

table tbody tr:nth-child(even) {
    background: #f9f9f9;
}

#rune-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.rune-item {
    padding: 2px 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: inline-block;
    margin: 2px;
}

.rune-item:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* highlight runes already selected in the set modal */
#rune-modal-list .rune-item.chosen {
    border: 2px solid #3b82f6;
    filter: grayscale(40%);
}

/* highlight runes already registered on the recommendation page */
#runeList .rune-item.chosen {
    border: 2px solid #3b82f6;
    filter: grayscale(40%);
}

.category-header {
    margin: 20px 0 10px;
    border-bottom: 1px solid #ddd;
    width: 100%;
}

.category-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.allowed-jobs-group {
    width: 100%;
    margin: 6px 0 2px;
}

.allowed-jobs-text {
    display: inline-block;
    font-size: small;
    font-family: 'mabinogi_classic';
    color: #0984e3;
    padding: 0 4px;
}

.rune-name {
    color: white;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
}

.rune-item.rune-grade-유니크 .rune-name {
    color: #5C4A35 !important;
}
td .rune-item .rune-name {
    font-size: 14px;
    padding: 5px 10px;
}

.rune-grade-엘리트 {
    background-color: #8d7ab8;
}

.rune-grade-에픽 {
    background-color: #cc7a9a;
}

.rune-grade-전설 {
    background-color: #d48c5c;
}

.rune-grade-원형 {
    background-color: #e1c541;
}

.rune-grade-신화 {
    background-color: #FFD700;
}

.rune-grade-유니크 {
    background-color: #e3dac7;
}

.rune-header.rune-grade-엘리트 {
  background-color: #8d7ab8;
  color: white;
}

.rune-header.rune-grade-에픽 {
  background-color: #cc7a9a;
  color: white;
}

.rune-header.rune-grade-전설 {
  background-color: #d48c5c;
  color: white;
}

.rune-header.rune-grade-원형 {
  background-color: #e1c541;
  color: white;
}

.rune-header.rune-grade-유니크 {
  background-color: #f4e9d4;
  color: #474541;
}

.rune-header.rune-grade-신화 {
  background-color: #FFD700;
  color: #c05621;
}

.rune-info-group {
    /* display: grid; */
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
    margin-bottom: 2rem;
}

.rune-info {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1rem;
    color: #2d3436;
    line-height: 1.5;
}

.rune-info .label {
    font-weight: bold;
    color: #1f2937;
}

.rune-info .grade {
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    color: #fff;
    font-size: 0.9rem;
}

.rune-rating {
    font-size: 1rem;
    color: var(--header-blue-text);
    font-weight: bold;
    text-align: center;
    margin: 1rem 0;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    overflow: hidden;
}

.rune-header-inne {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal.open {
    display: flex;
}

.modal-content {
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.rune-header {
    background: #f4f6f8;
    padding: 1rem;
    border-radius: 8px 8px 0 0;
    text-align: center;
    color: #fff;
    font-size: 1.5rem;
    font-weight: bold;
}

.modal-header h2 {
    font-size: 1.25rem;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: #6b7280;
}

.modal-close:hover {
    color: #1f2937;
}

.modal-footer,
.actions {
    display: flex;
    gap: 1rem;
}

.comments {
    margin-top: 1.5rem;
}

.comments-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 1rem;
    border-bottom: 1px solid #dfe6e9;
    padding-bottom: 0.5rem;
}

.comment {
    background: #ffffff;
    border: 1px solid #dfe6e9;
    border-radius: 10px;
    padding: 1.2rem;
    margin-bottom: 1.2rem;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.comment-user {
    font-weight: bold;
    color: #1f2937;
}

.comment-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: #4b5563;
    margin-bottom: 0.5rem;
}

.comment-jobs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.comment-job {
    background: #e5e7eb;
    color: #1f2937;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.85rem;
}

.comment-job.rune-grade-엘리트 { background-color: #e9d8fd; color: #5b21b6; }
.comment-job.rune-grade-에픽 { background-color: #fce7f3; color: #be185d; }
.comment-job.rune-grade-전설 { background-color: #feebc8; color: #c05621; }
.comment-job.rune-grade-원형 { background-color: #e1c541; color: #c05621; }
.comment-job.rune-grade-유니크 { background-color: #f4e9d4; color: #474541; }
.comment-job.rune-grade-신화 { background-color: #FFD700; color: #c05621; }

.comment-text {
    font-size: 0.95rem;
    color: #2d3436;
    margin-bottom: 0.5rem;
}

.comment-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #6b7280;
}

.recommend-btn {
    background: #10b981;
    color: #fff;
    padding: 0.3rem 0.8rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.2s;
}

.recommend-btn:hover {
    background: #059669;
}

.recommend-btn:disabled {
    background: #d1d5db;
    cursor: not-allowed;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

#tier-table-body {
    transition: opacity 0.2s ease;
}

.search-bar {
    max-width: 600px;
    margin: 1rem auto;
    display: flex;
    gap: 10px;
    padding: 0 1rem;
}

.search-bar input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 6px;
}

.controls .button, .controls .action-btn {
    background-color: #3b82f6;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.25rem;
    text-decoration: none;
    cursor: pointer;
    text-align: center;
    font-size: 0.95rem;
    transition: background 0.2s;
}

.controls .action-btn:hover, .controls .button:hover {
    background-color: #2563eb;
}

@media (max-width: 768px) {
    .job-filter-group {
        flex-direction: row;
        flex-wrap: wrap;
        max-height: 300px;
        overflow-x: hidden;
    }

    .job-group {
        flex: 1 1 calc(33.333% - 0.5rem); /* 한 줄에 세 개씩 배치 */
        min-width: 90px;
        max-width: none;
        padding: 0;
    }

    .job-button, .filter-button {
        padding: 0.3rem 0.4rem;
        font-size: 0.7rem;
    }

    .group-button {
        padding: 0.3rem 0.4rem;
        font-size: 0.7rem;
    }
}

@media (max-width: 600px) {

    .job-buttons, .filter-buttons {
        gap: 0.2rem;
    }

    .job-button, .filter-button {
        padding: 0.3rem 0.4rem;
        font-size: 0.65rem;
    }

    .group-button {
        padding: 0.3rem 0.4rem;
        font-size: 0.65rem;
    }

    .filter-section {
        gap: 0.4rem;
    }

    .rune-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    td .rune-item .rune-name {
        font-size: 12px;
        padding: 3px 6px;
    }

    .modal-content {
        width: 95%;
    }

    .rune-header {
        font-size: 1.25rem;
        margin: -1.5rem -1.5rem 1rem;
    }

    .rune-info-group {
        grid-template-columns: 1fr;
    }

    .rune-header-inner {
        display: flex;
        justify-content: space-between;
        align-items: stretch;
        align-content: space-between;
        flex-wrap: nowrap;
        flex-direction: row;
        padding-bottom: 1rem;
    }
}

/* 다크모드 스타일 */
body.dark-mode .job-group {
    background: #252525;
    border: 1px solid #3a3a3a;
}

body.dark-mode .group-header {
    background: #37474f;
    color: #e0e0e0;
}

body.dark-mode .group-button {
    background: #1e88e5;
    color: #ffffff;
}

body.dark-mode .group-button[data-selected="true"] {
    background: #1565c0;
    box-shadow: 0 2px 4px rgba(255, 255, 255, 0.1);
}

body.dark-mode .group-button[data-selected="false"] {
    background: #2d2d2d;
    color: #e0e0e0;
}

body.dark-mode .job-button,
body.dark-mode .filter-button {
    background: #2d2d2d;
    color: #e0e0e0;
}

body.dark-mode .job-button[data-selected="true"],
body.dark-mode .filter-button[data-selected="true"] {
    background: #196cb5;
    color: #ffffff;
}

body.dark-mode table thead {
    background: #2d2d2d;
}

body.dark-mode table tbody tr:nth-child(even) {
    background: #252525;
}

body.dark-mode .rune-info {
    color: #e0e0e0;
}

body.dark-mode .rune-info .label {
    color: #e0e0e0;
}

body.dark-mode .comment {
    background: #252525;
    border: 1px solid #3a3a3a;
}

body.dark-mode .comment-user {
    color: #42a5f5;
}

body.dark-mode .comment-text {
    color: #e0e0e0;
}

body.dark-mode .comment-job {
    background: #37474f;
    color: #e0e0e0;
}

body.dark-mode .modal-content {
    background: #2d2d2d;
}

body.dark-mode .search-bar input {
    background: #3a3a3a;
    border: 1px solid #546e7a;
    color: #e0e0e0;
}

body.dark-mode .category-header {
    border-bottom: 1px solid #3a3a3a;
}

body.dark-mode .category-header h3 {
    color: #e0e0e0;
}

body.dark-mode .controls .button,
body.dark-mode .controls .action-btn {
    background: #1e88e5;
}

body.dark-mode .controls .button:hover,
body.dark-mode .controls .action-btn:hover {
    background: #42a5f5;
}

#outdated-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0.5rem 0;
}

.outdated-item {
    border: 1px solid #dfe6e9;
    padding: 0.5rem;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.outdated-item-buttons button {
    margin-left: 0.5rem;
}

.outdated-item-buttons .refresh-btn {
    background: #34d399;
    color: #fff;
}
.outdated-item-buttons .refresh-btn:hover {
    background: #6ee7b7;
}
.outdated-item-buttons .edit-btn {
    background: #3b82f6;
    color: #fff;
}
.outdated-item-buttons .edit-btn:hover {
    background: #2563eb;
}

.outdated-info {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.outdated-comment {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.9rem;
    color: #4b5563;
}

.outdated-jobs {
    font-size: 0.85rem;
    color: #6b7280;
}

@media (max-width: 600px) {
    .outdated-item {
        flex-direction: column;
        align-items: flex-start;
    }
    .outdated-item-buttons {
        width: 100%;
        display: flex;
        gap: 0.5rem;
        margin-top: 0.5rem;
    }
    .outdated-item-buttons button {
        flex: 1;
        margin-left: 0;
    }
    .outdated-comment,
    .outdated-jobs {
        white-space: normal;
    }
}