/* General Styles */
body {
    font-family: 'Pretendard', 'Apple SD Gothic Neo', 'Malgun Gothic', '맑은 고딕', 'Noto Sans KR', sans-serif;
    background-color: #fff; /* Dark background */
    color: #000; /* Light gray text */
    margin: 0;
    padding: 0;
    font-size: 1.1em;
    font-weight: 400;
    word-break: keep-all;
}

/* Layout */
.container {
    display: flex;
    height: 100%;
}

.sidebar {
    background-color: #000; /* Teal background */
    color: #ddd; /* Default text color for unselected items */
    padding: 20px;
    width: 23%;
    box-sizing: border-box;
    min-height: 100vh; /* Ensure it never shrinks below the viewport height */
    height: auto; /* Allow it to grow beyond the viewport height */
}

.sidebar h3 {
    font-size: 1.2em;
    /*margin-bottom: 15px;*/
    color: #fff; /* White color for the title */
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar li {
    margin: 10px 0;
    color: #555; /* Gray text for unselected items */
    font-size: 1em;
    font-weight: normal;
}

.sidebar li a {
    text-decoration: none;
    color: inherit; /* Inherit color */
    display: block;
    transition: color 0.2s ease;
}

.sidebar li a:hover {
    color: #fff; /* Hover effect */
}

.sidebar li.selected a,
.sidebar li.selected {
    font-weight: bold;
    color: #fff; /* White text for selected item */
}

/* Content */
.content {
    padding: 20px;
    flex: 1;
    box-sizing: border-box;
}

h1, h2, h3 {
    color: #000; /* Teal text */
}

p {
    line-height: 1.6;
    margin: 15px 0;
}

ul {
    margin: 20px 0;
    padding-left: 20px;
}

ul li {
    margin-bottom: 10px;
}

/* Buttons */
a.button, button {
    font-size: 1.2em; /* Match size */
    font-family: inherit;
    font-weight: bold; /* Ensure bold text */
    display: inline-block;
    margin-top: 20px;
    padding: 10px 20px;
    background-color: #000;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    border: none;
    cursor: pointer;
}

a.button:hover, button:hover {
    background-color: #aaa;
}


/* Options (task1.html specific) */
#options {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
}

.option {
    padding: 10px 20px;
    background-color: #fff;
    color: #000;
    border: 1px solid #aaa;
    border-radius: 5px;
    cursor: pointer;
    text-align: center;
    min-width: 100px;
}

.option.selected {
    background-color: #aaa;
    color: #000;
    border-color: #777;
}

/* Results */
.result {
    margin-top: 20px;
    font-size: 1.2em;
}

.result span {
    display: block;
    margin-top: 10px;
    font-weight: bold;
}

.result span.correct {
    color: #00d1b2;
}

.result span.wrong {
    color: #ff5555;
}

#query-section {
    margin-bottom: 20px;
    font-size: 1.1em;
}

.app-section {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #fff;
    color: #000;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.app-section h3 {
    color: #333;
    margin-bottom: 10px;
}

.question p {
    margin: 5px 0;
}

label {
    margin-right: 15px;
    font-weight: bold;
}

.data-type p {
    margin: 5px 0;
    font-weight: bold;
}

.extra-input {
    margin-top: 20px;
}

.extra-input input {
    display: block;
    margin: 5px 0;
    padding: 8px;
    width: 100%;
    max-width: 400px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

.correct {
    color: #00d1b2;
    font-weight: bold;
}

.option.locked {
    pointer-events: none; /* Prevent further interaction */
    opacity: 0.6; /* Dim the appearance */
    cursor: not-allowed;
}

button[disabled] {
    background-color: #ccc;
    cursor: not-allowed;
}

.app-container {
    /*margin-bottom: 20px;*/
    width: 100%;
    text-align: center; /* Center all content within the container */
    display: flex; /* Use flexbox for alignment */
    flex-direction: column; /* Stack the app title and options vertically */
    align-items: flex-start; /* Center the app title and options horizontally */
}

.app-title {
    font-size: 1em; /* Larger font size */
    font-weight: bold; /* Make it bold */
    margin-bottom: 15px; /* Add some spacing below the app title */
    text-transform: uppercase; /* Optional: Make it uppercase */
    color: #ffffff; /* Optional: Color for better visibility */
    /*background-color: #4caf50; !* Optional: Background color for emphasis *!*/
    padding: 10px;
    border-radius: 5px; /* Rounded edges for a cleaner look */
    width: 50%; /* Set a fixed width for consistent alignment */
    text-align: left; /* Ensure the text is centered inside the box */
}

.option-group {
    display: flex;
    flex-wrap: wrap; /* Allow options to wrap to the next line */
    justify-content: left; /* Center the options under the app name */
    gap: 10px; /* Add spacing between options */
}

.progress-container {
    width: 100%;
    background-color: #f3f3f3;
    margin-bottom: 20px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #ccc;
}
.progress-bar {
    height: 20px;
    width: 0;
    background-color: #333;
    text-align: center;
    color: white;
    line-height: 20px;
    border-radius: 10px;
}
.progress-text {
    margin-top: 5px;
    font-size: 14px;
    text-align: center;
}

#dialogue-box {
    border: 2px solid #111;
    padding: 15px;
    border-radius: 8px;
    background-color: #111;
    color: #fff;
    margin-bottom: 20px;
}

#dialogue-container {
    display: flex;
    flex-direction: column; /* Stack items vertically */
    gap: 10px;
}

#dialogue-user-box, #dialogue-mira-box {
    border: 2px solid #111;
    padding: 10px;
    border-radius: 8px;
    background-color: #111;
    color: #fff;
}

#dialogue-user-box p, #dialogue-mira-box p {
    margin: 5px 0;
}

#dialogue-user-box {
    border-left: 5px solid #00d1b2; /* Green for user */
}

#dialogue-mira-box {
    border-left: 5px solid #ff5555; /* Red for MIRA */
}

#dialogue-user {
    font-weight: bold;
    color: #fff;
    display: flex;
    /*align-items: center;*/
    gap: 10px;
    margin-bottom: 30px;
}

#dialogue-mira {
    font-style: italic;
    color: #fff;
    display: flex;
    /*align-items: center;*/
    gap: 10px;
}

.icon {
    width: 24px; /* Adjust the size as needed */
    height: 24px;
    filter: invert(1);
    /*vertical-align: middle;*/
    /*margin-right: 8px; !* Add some spacing between the icon and the text *!*/
    margin-top: 3px;
}

.question-container {
    display: block; /* Ensure the container takes the full width and appears on a new line */
    width: 100%; /* Set full width for alignment */
}


.data-box, .app-box {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 5px;
    font-weight: bold;
    margin: 0px 2px; /* Reduce vertical margin */
    line-height: 1.2;
}

.data-box {
    background-color: #000; /* Light Blue for App */
    border: 2px solid #000;
    color: #fff;
}

.app-box {
    background-color: #000; /* Light Blue for App */
    border: 2px solid #000;
    color: #fff;
}

button#return {
    margin-right: 10px;
    background-color: #000; /* A different color for distinction */
    color: #fff;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    padding: 10px 20px;
    cursor: pointer;
}

button#return:hover {
    background-color: #999; /* Slightly darker on hover */
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    width: 80%;
    max-width: 800px;
    text-align: center;
    overflow-y: auto;
    max-height: 80vh;
}

.close-button {
    background-color: #ff5555;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
}

.close-button:hover {
    background-color: #cc4444;
}

/* ===== 2026-10 UI 개선 (세미나 피드백 반영) ===== */
.content { max-width: 1100px; padding: 28px 36px; }

/* 선택지: 선택 여부가 확실히 보이도록 */
.option { transition: background-color .15s, color .15s; user-select: none; }
.option:hover { border-color: #000; }
.option.selected { background-color: #000; color: #fff; border-color: #000; }
/* 체크 표시 자리를 미리 확보해서, 선택해도 박스 크기가 바뀌지 않게 함 */
.option { position: relative; padding-left: 30px; padding-right: 30px; }  /* 체크 표시 자리만큼 오른쪽도 같은 여백 */
.option::before { content: "✓"; position: absolute; left: 11px; top: 50%; transform: translateY(-50%); opacity: 0; }
.option.selected::before { opacity: 1; }

/* 안내 문구 (팝업 대신 화면 안에 표시) */
.inline-msg { color: #d63333; font-weight: bold; margin-top: 12px; min-height: 1.4em; }
.hint { color: #555; font-size: .9em; margin: 4px 0 0; }

/* 하단 버튼 영역 */
#return, #submit { min-width: 110px; }

/* 동의서 버튼: 내용과 겹치지 않게 */
#consent-button { font-size: .9em; padding: 8px 14px; opacity: .85; z-index: 10; }

/* 모바일 화면 */
@media (max-width: 768px) {
    body { font-size: 1em; }
    .container { flex-direction: column; }
    .sidebar { width: 100%; min-height: 0; padding: 12px 16px; }
    .sidebar h3 { margin: 0 0 4px; font-size: 1em; }
    .sidebar ul { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; }
    .sidebar li { margin: 0; font-size: .85em; }
    .content { padding: 16px; }
    h1 { font-size: 1.4em; }
    h2 { font-size: 1.15em; }
    #consent-button { position: static !important; transform: none !important; display: block; margin: 0 16px 24px; }
    .option { min-width: 0; padding: 8px 30px; }
}

/* 동의서 본문 왼쪽 정렬 */
.modal-content p { text-align: left; }

/* 훈련 가이드: 클릭 이동 없이 진행 단계 표시만 (이전 단계로 가면 답변이 덮어써지는 문제 방지) */
.sidebar li.selected { color: #fff; font-weight: bold; }

@media (max-width: 768px) {
    /* 모바일: 현재 단계만 한 줄로 표시 */
    .sidebar { display: flex; align-items: center; gap: 8px; padding: 10px 16px; }
    .sidebar h3 { margin: 0; font-size: .8em; color: #aaa; font-weight: normal; white-space: nowrap; }
    .sidebar ul { margin: 0; }
    .sidebar li { display: none; }
    .sidebar li.selected { display: block; font-size: .9em; }
    /* 페이지 제목 축소 */
    .content h1 { font-size: 1.15em; margin: 10px 0; }
    /* 3단계 안내·경고 문구: 문구와 빨간색은 유지, 글자 크기만 본문에 맞춤 */
    #query-section { font-size: 1em; }
    #query-section p { font-size: .95em; line-height: 1.5; }
    .progress-container { margin-bottom: 8px; }
}
