/* 기본 스타일 */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f8f9fa;
    margin: 20px;
    font-size: 14px;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: auto;
    background-color: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

h1, h2, h3 {
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    margin-top: 0;
}

body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; background-color: #f8f9fa; margin: 20px; font-size: 14px; }
.container { max-width: 1200px; margin: auto; background-color: #fff; padding: 25px; border-radius: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
h1 { border-bottom: 2px solid #eee; padding-bottom: 10px; }

/* ================== 신규 대시보드 버튼 스타일 ================== */
.dashboard-buttons {
    display: flex;
    justify-content: center;
    gap: 5px;
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid #dee2e6;
}
.dash-button {
    flex: 1;
    padding: 12px 10px;
    text-decoration: none;
    text-align: center;
    border-radius: 6px;
    border: 1px solid transparent;
    background-color: #fff;
    color: #495057;
    border: 1px solid #dee2e6;
    transition: all 0.2s ease-in-out;
}
.dash-button:hover {
    border-color: #007bff;
    box-shadow: 0 2px 5px rgba(0,123,255,0.1);
}
.dash-button.active {
    background-color: #007bff;
    color: white;
    font-weight: bold;
    border-color: #0056b3;
}
.dash-button .type-name {
    font-size: 16px;
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
}
.dash-button .count {
    font-size: 20px;
    display: block;
    font-weight: 500;
}
.dash-button .details {
    font-size: 11px;
    display: block;
    margin-top: 5px;
    opacity: 0.8;
}
.dash-button.active .details {
    color: white;
}
/* =========================================================== */

body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; background-color: #f8f9fa; margin: 20px; font-size: 14px; }
.container { max-width: 1200px; margin: auto; background-color: #fff; padding: 25px; border-radius: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
h1, h2, h3 { border-bottom: 2px solid #eee; padding-bottom: 10px; }

/* 대시보드 및 필터 스타일 (이전과 동일) */
/* ... */

.modal-body { display: grid; grid-template-columns: 1fr 2fr; gap: 20px; margin-top: 15px; }

/* ======== JSON 배경색 및 복사 버튼 관련 스타일 변경/추가 ======== */
.item-json {
    position: relative; /* 자식 요소인 버튼을 위치시키기 위해 필요 */
    background-color: #f0f0f0; /* 옅은 회색 배경 */
    color: #333; /* 어두운 글자색 */
    padding: 20px;
    border-radius: 5px;
    max-height: 60vh;
    overflow-y: auto;
    border: 1px solid #ccc;
}
.copy-json-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 5px 10px;
    font-size: 12px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}
.copy-json-btn:hover {
    opacity: 1;
}

/* ... (기존 스타일 상단) ... */

/* [추가됨] 아이템 목록 내 오류 메시지 스타일 */
.item-error-list {
    padding: 10px 15px;
    background-color: #fff2f2;
    border-top: 1px solid #ffdddd;
    font-size: 13px;
}
.item-error-list strong {
    color: #c82333;
    font-weight: bold;
}
.item-error-list ul {
    margin: 5px 0 0 0;
    padding-left: 20px;
    color: #a12c34;
}
.item-error-list li {
    margin-bottom: 3px;
}

/* ... (기존 스타일 하단) ... */
/* ========================================================== */

.item-json pre { margin: 0; white-space: pre-wrap; word-wrap: break-word; font-size: 14px; }
.error-summary { padding: 15px; background-color: #fffbe6; border: 1px solid #ffe58f; border-radius: 5px; max-height: 60vh; overflow-y: auto;}
.error-summary h4 { margin-top: 0; padding-bottom: 5px;}
.error-summary ul { padding-left: 20px; margin: 0; list-style-type: none; }
.error-summary li { color: #c82333; font-weight: bold; margin-bottom: 8px; }
.button { padding: 8px 15px; border: none; border-radius: 5px; cursor: pointer; font-size: 14px; text-decoration: none; display: inline-block; background-color: #007bff; color: white; }
/* 필터 컨트롤 스타일 (이전과 동일) */
.filter-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 15px;
    background-color: #e9ecef;
    border-radius: 8px;
    margin-bottom: 25px;
}
.filter-group { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.filter-group strong { font-size: 14px; margin-right: 10px; }
.filter-group a { text-decoration: none; color: #007bff; background-color: #fff; padding: 6px 12px; border-radius: 15px; border: 1px solid #dee2e6; font-size: 13px; }
.filter-group a:hover { border-color: #007bff; }
.filter-group a.active { font-weight: bold; background-color: #007bff; color: white; border-color: #007bff; }

/* 아이템 목록, 모달 등 나머지 스타일은 이전과 동일 */
/* ... */

/* 버튼 */
.button {
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
    background-color: #007bff;
    color: white;
}

.button.red { background-color: #dc3545; }

/* 리포트 및 필터 */
.report-section, .filter-group, .pagination {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #dee2e6;
}

/* 퀴즈 아이템 목록 */
.item-list {
    list-style-type: none;
    padding: 0;
}
.item {
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 15px;
    overflow: hidden;
}
.item-header {
    background-color: #f7f7f7;
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.item.valid { border-left: 5px solid #28a745; }
.item.invalid { border-left: 5px solid #dc3545; }
.empty-list {
    text-align: center;
    padding: 30px;
    color: #777;
}


/* 상태 배지 */
.status-badge {
    padding: 3px 8px;
    border-radius: 10px;
    color: white;
    font-size: 12px;
    font-weight: bold;
}
.status-used { background-color: #28a745; }
.status-unused { background-color: #6c757d; }

/* 모달 스타일 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
}
.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 900px;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}
.modal-close {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}
.modal-body {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
    margin-top: 15px;
}
.item-json {
    background-color: #2d2d2d;
    color: #f1f1f1;
    padding: 20px;
    border-radius: 5px;
    max-height: 60vh;
    overflow-y: auto;
    border: 1px solid #ddd;
}
.item-json pre {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 14px;
}
.error-summary {
    padding: 15px;
    background-color: #fffbe6;
    border: 1px solid #ffe58f;
    border-radius: 5px;
    max-height: 60vh;
    overflow-y: auto;
}
.error-summary h4 {
    border-bottom: 1px solid #ffe58f;
    margin-top: 0;
    padding-bottom: 5px;
}
.error-summary ul {
    padding-left: 20px;
    margin: 0;
    list-style-type: none;
}
.error-summary li {
    color: #c82333;
    font-weight: bold;
    margin-bottom: 8px;
}