/* css
*/

/* 로컬 폰트 불러오기 */
@font-face {
    font-family: 'Cafe24OhsquareAir-v2.0';
    src: url('./Cafe24OhsquareAir-v2.0.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
}

/* 전체 애플리케이션에 폰트 적용 */
* {
    font-family: 'Cafe24OhsquareAir-v2.0' !important;
}

/* HTML과 body에 스크롤 개선 적용 */
html {
    -webkit-overflow-scrolling: touch; /* iOS 스크롤 개선 */
    overflow-x: hidden; /* 가로 스크롤 방지 */
}

/* 추가로 body에도 적용 */
/* 추가로 body에도 적용 */
body {
    font-family: 'Cafe24OhsquareAir-v2.0';
    
    /* 크림슨 기반 미니멀 배경 */
    background: linear-gradient(135deg, 
        #faf8f8 0%, 
        #f5f2f2 50%, 
        #f0ebeb 100%);
    height: 100vh;
    overflow: hidden; /* 전체 스크롤 방지 */
    margin: 0;
    padding: 0;
    -webkit-overflow-scrolling: touch; /* iOS 스크롤 개선 */
}

/* 과목 정보 팝업 스타일 */
.course-popup {
    position: fixed;
    background: white;
    border: 2px solid #333;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    min-width: 300px;
    max-width: 400px;
}

/* 도움말 팝업 스타일 */
.help-popup {
    position: fixed;
    background: white;
    border: 2px solid #dc143c;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 12px 32px rgba(220, 20, 60, 0.3);
    z-index: 10001;
    min-width: 400px;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.help-popup-title {
    font-size: 1.2em;
    font-weight: bold;
    color: #dc143c;
    margin-bottom: 16px;
    text-align: center;
    border-bottom: 2px solid #dc143c;
    padding-bottom: 8px;
}

.help-popup-content {
    font-size: 0.9em;
    line-height: 1.6;
    color: #333;
}

.help-popup-content p {
    margin-bottom: 12px;
}

.help-popup-content strong {
    color: #dc3545;
    font-weight: bold;
}

.help-popup-content a {
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
}

.help-popup-content a:hover {
    text-decoration: underline;
}

.help-popup-close-btn {
    background: #dc143c;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 16px;
    width: 100%;
}

.help-popup-close-btn:hover {
    background: #b22222;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 20, 60, 0.3);
}

/* P/NP 평점 스타일 */
.grade-select option[value="P"] {
    color: #28a745;
    font-weight: bold;
}

.grade-select option[value="NP"] {
    color: #dc3545;
    font-weight: bold;
}

/* 과목 아이템 툴팁 스타일 */
/*
.course-item {
    position: relative;
    cursor: pointer;
}
.course-item:hover::after {
    content: "드래그 또는 클릭(다중선택 가능) 후 학기 클릭";
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
}
*/

/* 선택된 과목 스타일 */
.course-item.selected {
    background: linear-gradient(135deg, #dc143c, #b22222);
    color: white;
    border: 2px solid #8b0000;
    box-shadow: 0 0 12px rgba(220, 20, 60, 0.4);
}

/* taken-course가 선택되었을 때도 동일한 스타일 적용 */
.taken-course.selected {
    background: linear-gradient(135deg, #dc143c, #b22222);
    color: white;
    border: 2px solid #8b0000;
    box-shadow: 0 0 12px rgba(220, 20, 60, 0.4);
}

/* 클릭 모드일 때 셀 호버 효과 */
.click-mode .semester-cell:hover {
    background: rgba(220, 20, 60, 0.05);
    border: 2px dashed #dc143c;
    border-radius: 12px;
    box-shadow: 
        0 4px 16px rgba(220, 20, 60, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transform: translateY(-1px);
}
.semester-cell.dragover {
    background: rgba(220, 20, 60, 0.05);
    border: 2px dashed #dc143c;
    border-radius: 12px;
    box-shadow: 
        0 4px 16px rgba(220, 20, 60, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transform: translateY(-1px);
}

/* 전공 추가 버튼 툴팁 */
#major-add-btn {
    position: relative;
}

#major-add-btn:hover::after {
    content: "전공 추가";
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
}

.course-popup-title {
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
    margin-bottom: 12px;
    line-height: 1.4;
    word-break: keep-all;
}

.course-popup-info {
    margin-bottom: 12px;
    color: #666;
    font-size: 0.9em;
}

.course-popup-grade {
    margin-bottom: 16px;
    color: #333;
    font-size: 0.9em;
}

.course-popup-major {
    margin-bottom: 20px;
    color: #333;
    font-size: 0.9em;
}

.grade-select {
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9em;
}

.grade-select:focus {
    outline: none;
    border-color: #a0203a;
    box-shadow: 0 0 5px rgba(160, 32, 58, 0.3);
}

.course-popup-buttons {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.course-popup-delete-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.2s;
}

.course-popup-delete-btn:hover {
    background-color: #c82333;
}

.course-popup-close-btn {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.2s;
}

.course-popup-close-btn:hover {
    background-color: #5a6268;
}

/* 화면 가로 삼등분을 위한 컨테이너 */
.main-container {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 100vh;
    align-items: stretch; /* 자식 요소들이 같은 높이를 갖도록 함 */
    position: relative; /* 팝업 위치 기준점 */
    overflow: hidden; /* 전체 스크롤 방지 */
    -webkit-overflow-scrolling: touch; /* iOS 스크롤 개선 */
}

/* 세 영역의 스타일 시작 */
.course-container {
    width: 19em; /* 고정 너비 증가 */
    flex-shrink: 0; /* 창 크기가 줄어도 너비 고정 */
    display: flex;
    flex-direction: column;
    padding: 16px;
    gap: 12px; /* search-box와 search-result 사이 간격 */
    transition: width 0.3s ease-in-out, padding 0.3s ease-in-out;
    
    /* 크림슨 미니멀 컨테이너 */
    background: white;
    border: 1px solid rgba(220, 20, 60, 0.08);
    border-radius: 16px;
    box-shadow: 
        0 2px 16px rgba(220, 20, 60, 0.04),
        0 1px 4px rgba(0, 0, 0, 0.02);
    
    /* 부드러운 전환 */
    transition: all 0.3s ease;
}

.course-container.collapsed {
    width: 0;
    padding: 0;
    border: none;
    overflow: hidden;
}

.container-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    font-weight: bold;
    user-select: none;
    padding: 8px 12px;
    margin: -16px -16px 8px -16px;
    
    /* 로고 배경을 위한 흰색 배경 */
    background: white;
    border-radius: 16px 16px 0 0;
    border-bottom: 1px solid rgba(220, 20, 60, 0.08);
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}


.lang-btn {
    background: transparent;
    border: none;
    color: #666;
    padding: 3px 6px;
    border-radius: 6px;
    font-size: 0.5em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Cafe24OhsquareAir-v2.0';
}

.lang-btn:hover {
    background: rgba(220, 20, 60, 0.1);
    color: #dc143c;
}

.lang-btn.active {
    background: #dc143c;
    color: white;
    font-weight: bold;
}

.lang-btn.active:hover {
    background: #b91c3c;
}

.logo-image {
    height: 32px; /* 로고 높이 조정 */
    width: auto; /* 비율 유지 */
    object-fit: contain; /* 이미지 비율 유지하며 크기 조정 */
}



#search-year-container select {
    min-width: 45px;
    font-size: 0.8em;
    padding: 2px 4px;
    border: 1px solid rgba(220, 20, 60, 0.2);
    border-radius: 6px;
    background: white;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 7.5px;
}

#search-year-container select:focus {
    outline: none;
    border-color: #dc143c;
    box-shadow: 0 0 5px rgba(220, 20, 60, 0.2);
}

#search-year-container select:hover {
    border-color: #dc143c;
}

#search-year-container label {
    font-weight: 600;
    color: #dc143c;
    font-size: 0.8em;
    margin-right: -1px;
    margin-top: 7.5px;
}

/* 교양과목 추가 관련 스타일 */
#search-type-selector {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
    justify-content: space-between;
}

/* 라디오 버튼 크림슨 스타일 */
#search-type-selector input[type="radio"] {
    accent-color: #dc143c;
    transform: scale(1.1);
}

#search-type-selector label {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    font-size: 0.9em;
    color: #333;
}

#custom-course-container {
    display: none;
}

/* 교양과목 입력 폼 */
.custom-course-form-container {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.custom-course-form-container h3 {
    margin: 0 0 12px 0;
    color: #333;
    font-size: 1.1em;
}

.custom-course-form {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 12px;
    align-items: center;
}

.custom-course-form label {
    font-weight: bold;
    color: #555;
}

.custom-course-form input {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9em;
}

.custom-course-form input:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.3);
}

/* number 입력 필드의 스핀 버튼 스타일링 */
.custom-course-form input[type="number"]::-webkit-inner-spin-button,
.custom-course-form input[type="number"]::-webkit-outer-spin-button {
    opacity: 1;
    height: 20px;
    margin-right: 4px;
}

.custom-course-form input[type="number"]::-webkit-inner-spin-button:hover,
.custom-course-form input[type="number"]::-webkit-outer-spin-button:hover {
    opacity: 0.8;
}

.custom-course-buttons {
    grid-column: 1 / -1;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 8px;
}

.custom-course-add-btn {
    background-color: #a0203a;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.2s;
}

.custom-course-add-btn:hover {
    background-color: #8a1c32;
}

.custom-course-cancel-btn {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.2s;
}

.custom-course-cancel-btn:hover {
    background-color: #5a6268;
}

.deck-management {
    padding: 8px;
    position: relative;
}

.deck-tabs-row {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.deck-tabs {
    display: flex;
    gap: 4px;
    align-items: center;
    justify-content: flex-start;
}

.deck-controls-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.deck-tab {
    background-color: white;
    color: #333;
    border: 2px solid rgba(220, 20, 60, 0.1);
    border-radius: 12px;
    padding: 4px 8px; /* 이전 크기로 되돌림 */
    font-size: 0.8em;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    height: 26px; /* 26px로 변경 */
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(220, 20, 60, 0.05);
}

.deck-tab:hover:not(.active) {
    background-color: rgba(220, 20, 60, 0.05);
    border-color: rgba(220, 20, 60, 0.2);
    box-shadow: 0 4px 16px rgba(220, 20, 60, 0.1);
    transform: translateY(-1px);
}

.deck-tab.active {
    background: linear-gradient(135deg, #dc143c, #b22222);
    color: white;
    border-color: #dc143c;
    box-shadow: 0 4px 16px rgba(220, 20, 60, 0.2);
}

.deck-tab.active:hover {
    background: linear-gradient(135deg, #b22222, #8b0000);
    border-color: #b22222;
    box-shadow: 0 6px 20px rgba(220, 20, 60, 0.3);
}

.deck-copy-paste-btn {
    background-color: white;
    color: #333;
    width: 4.5em;
    border: 2px solid rgba(220, 20, 60, 0.1);
    border-radius: 12px;
    padding: 4px 8px; /* 이전 크기로 되돌림 */
    font-size: 0.8em;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    height: 26px; /* 26px로 변경 */
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    box-sizing: border-box;
    box-shadow: 0 2px 8px rgba(220, 20, 60, 0.05);
}

.deck-copy-paste-btn:hover {
    background-color: rgba(220, 20, 60, 0.05);
    border-color: rgba(220, 20, 60, 0.2);
    box-shadow: 0 4px 16px rgba(220, 20, 60, 0.1);
    transform: translateY(-1px);
}

.deck-copy-paste-btn.paste-mode {
    background: linear-gradient(135deg, #dc143c, #b22222);
    color: white;
    border-color: #dc143c;
    box-shadow: 0 4px 16px rgba(220, 20, 60, 0.2);
}

.deck-copy-paste-btn.paste-mode:hover {
    background: linear-gradient(135deg, #b22222, #8b0000);
    border-color: #b22222;
    box-shadow: 0 6px 20px rgba(220, 20, 60, 0.3);
}

.add-deck-btn {
    background-color: white;
    color: #333;
    border: 2px solid rgba(220, 20, 60, 0.1);
    border-radius: 12px;
    padding: 4px 6px; /* 이전 크기로 되돌림 */
    font-size: 0.8em;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    width: 26px; /* 26px로 변경 */
    height: 26px; /* 26px로 변경 */
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    box-shadow: 0 2px 8px rgba(220, 20, 60, 0.05);
}

.add-deck-btn:hover {
    background-color: rgba(220, 20, 60, 0.05);
    border-color: rgba(220, 20, 60, 0.2);
    box-shadow: 0 4px 16px rgba(220, 20, 60, 0.1);
    transform: translateY(-1px);
}

#course-container-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
    overflow: hidden;
}

#container-divider {
    width: 16px;
    /*background-color: #f0f0f0; /* 구분용 색상 */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0; /* 너비가 줄어들지 않도록 함 */
    border-right: 1px solid white; /* 구분선 */
    padding-right: 2px;
}

.toggle-btn {
    background: rgba(220, 20, 60, 0.1);
    border: 1px solid rgba(220, 20, 60, 0.2);
    border-radius: 8px;
    cursor: pointer;
    padding: 6px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(220, 20, 60, 0.1);
    position: relative;
    overflow: hidden;
}

.toggle-icon {
    width: 0;
    height: 0;
    border-left: 8px solid #dc143c;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    transition: all 0.3s ease;
}

.toggle-btn:hover {
    background: rgba(220, 20, 60, 0.15);
    border-color: rgba(220, 20, 60, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 20, 60, 0.2);
}

.toggle-btn .toggle-icon {
    /* 펼쳐진 상태: 오른쪽 화살표 (접을 수 있음을 의미) */
    transform: rotate(0deg);
}

.toggle-btn:hover .toggle-icon {
    border-left-color: #b22222;
    transform: scale(1.1) rotate(0deg);
}

.toggle-btn.collapsed .toggle-icon {
    /* 접힌 상태: 왼쪽 화살표 (펼칠 수 있음을 의미) */
    transform: rotate(180deg);
}

.toggle-btn.collapsed:hover .toggle-icon {
    transform: scale(1.1) rotate(180deg);
}

.semester-container {
    flex-grow: 1;
    
    /* 미니멀 크림슨 컨테이너 */
    background: linear-gradient(135deg, 
        rgba(220, 20, 60, 0.05) 0%,
        rgba(178, 34, 34, 0.03) 50%,
        rgba(139, 0, 0, 0.04) 100%);
    border: 1px solid rgba(220, 20, 60, 0.08);
    border-radius: 20px;
    box-shadow: 
        0 4px 20px rgba(220, 20, 60, 0.05),
        0 2px 8px rgba(0, 0, 0, 0.02);
    
    /* 레이아웃 */
    display: flex;
    position: relative;
    padding: 10px;
    gap: 10px;
    min-width: 0;
    margin-right: 12px;
    
    /* 부드러운 전환 */
    transition: all 0.3s ease;
    -webkit-overflow-scrolling: touch; /* iOS 스크롤 개선 */
}

#semester-scroll-container {
    display: flex;
    flex-direction: row;
    height: 100%;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
    /*-ms-overflow-style: none; /* IE and Edge */
    -webkit-overflow-scrolling: touch; /* iOS 스크롤 개선 */
    flex-grow: 1; /* 남은 공간을 차지하도록 설정 */
    min-width: 0; /* flex item이 최소 크기 제약을 받지 않도록 */
}


#semester-scroll-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

#semester-row-headers {
    display: grid;
    grid-template-rows: 65px 1.9fr 0.75fr 1.9fr 0.75fr;
    gap: 4px;
    text-align: center;
    margin-left: 0px; /* 원래 위치로 복원 */
    margin-top: 12px; /* 아래로 이동 */
    width: 34px; /* 고정 너비 설정 - chart-container collapsed 시에도 유지 */
    flex-shrink: 0; /* flex 컨테이너에서 크기 축소 방지 */
}

.row-header {
    font-family: 'Cafe24OhsquareAir-v2.0' !important;
    font-size: 0.9em;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    background: linear-gradient(135deg, rgba(220, 20, 60, 0.08), rgba(178, 34, 34, 0.05));
    border: 1px solid rgba(220, 20, 60, 0.12);
    border-radius: 12px;
    padding: 2px; /* 테두리와 텍스트 사이 간격 축소 */
    color: #333;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(220, 20, 60, 0.1);
    min-height: 40px; /* semester cell과 비슷한 높이 */
    width: 100%; /* 부모 컨테이너의 전체 너비 사용 */
    box-sizing: border-box; /* padding과 border를 width에 포함 */
}

/* 한국어: 세로 배치 */
html[lang="ko"] .row-header {
    writing-mode: vertical-rl; /* 텍스트를 세로로 배치 */
    text-orientation: upright; /* 글자를 세로로 서게 함 */
    letter-spacing: 0.1em; /* 세로 배치 시 가독성을 위한 자간 조정 */
}

/* 영어: 가로 배치 */
html[lang="en"] .row-header {
    writing-mode: horizontal-tb; /* 텍스트를 가로로 배치 (기본값) */
    text-orientation: mixed; /* 글자를 가로로 서게 함 (기본값) */
    letter-spacing: normal; /* 가로 배치 시 기본 자간 */
}

#semester-grid-container {
    height: 100%;
    display: flex;
    flex-direction: row;
    gap: 16px;
    margin-left: 0px;
}

.year-column {
    display: grid;
    grid-template-rows: auto 5fr 1.5fr 5fr 1.5fr;
    gap: 8px;
    width: 280px;
    flex-shrink: 0;
    
    /* 미니멀 크림슨 카드 */
    background: white;
    border: 1px solid rgba(220, 20, 60, 0.1);
    border-radius: 16px;
    padding: 16px;
    
    /* 세련된 그림자 */
    box-shadow: 
        0 2px 16px rgba(220, 20, 60, 0.04),
        0 1px 4px rgba(0, 0, 0, 0.02);
    
    /* 호버 효과 */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.year-column:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 32px rgba(220, 20, 60, 0.08),
        0 4px 16px rgba(0, 0, 0, 0.04);
    border-color: rgba(220, 20, 60, 0.15);
}

.semester-cell {
    /* 미니멀 셀 배경 */
    background: #fafafa;
    border: 1px solid rgba(220, 20, 60, 0.08);
    border-radius: 12px;
    
    /* 레이아웃 */
    padding: 10px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
    align-content: flex-start;
    position: relative;
    
    /* 스크롤 */
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    
    /* 미묘한 그림자 */
    box-shadow: 
        0 1px 3px rgba(220, 20, 60, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    
    /* 부드러운 전환 */
    transition: all 0.2s ease;
}

.semester-cell:hover {
    background: #f8f8f8;
    border-color: rgba(220, 20, 60, 0.12);
    box-shadow: 
        0 2px 8px rgba(220, 20, 60, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.semester-cell::-webkit-scrollbar {
    display: none; /* 스크롤바 숨기기 (Chrome/Safari/Opera) */
}

.semester-header {
    font-weight: 700;
    font-size: 0.9em;
    color: white !important;
    margin-bottom: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    
    /* 크림슨 그라데이션 헤더 */
    background: linear-gradient(135deg, 
        #dc143c 0%, 
        #b22222 50%, 
        #8b0000 100%);
    border-radius: 10px;
    padding: 8px 12px;
    
    /* 세련된 그림자 */
    box-shadow: 
        0 1px 8px rgba(220, 20, 60, 0.15),
        0 1px 2px rgba(0, 0, 0, 0.08);
    
    /* 텍스트 가독성 향상 */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    
    /* 높이 제한 */
    min-height: 36px;
    max-height: 36px;
}

.year-info {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: nowrap;
    min-height: 30px;
    padding: 4px;
    width: 100%;
    
    /* 미니멀 스타일 제거 (투명) */
    background: transparent;
    border-radius: 0;
}

.year-title {
    font-weight: 800;
    font-size: 1.1em;
    letter-spacing: -0.02em;
    color: white !important;
}

.year-title[style*="cursor: pointer"]:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    padding: 2px 4px;
    margin: -2px -4px;
}

.year-stats {
    font-size: 0.75em;
    font-weight: 500;
    color: white !important;
    letter-spacing: -0.01em;
    opacity: 0.9;
    white-space: nowrap;
}

.remove-year-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: .8em;
    color: #ffffff;
    /*padding: 0 4px;*/
}

.remove-year-btn:hover {
    color: #000;
}


.add-year-column {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 5px;
}

.chart-container {
    width: 18em;
    flex-shrink: 0; /* 창 크기가 줄어도 너비 고정 */
    height: 100%;
    overflow-y: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    -webkit-overflow-scrolling: touch; /* iOS 스크롤 개선 */
    position: relative;
    
    /* 크림슨 미니멀 컨테이너 */
    background: white;
    border: 1px solid rgba(220, 20, 60, 0.08);
    border-radius: 16px;
    padding: 16px;
    margin-left: 12px;
    
    /* 세련된 그림자 */
    box-shadow: 
        0 2px 16px rgba(220, 20, 60, 0.04),
        0 1px 4px rgba(0, 0, 0, 0.02);
    
    /* 부드러운 전환 - semester section과 동일하게 */
    transition: width 0.3s ease-in-out, padding 0.3s ease-in-out;
}

.chart-container.collapsed {
    width: 0;
    padding: 0;
    border: none;
    margin-left: 0;
    overflow: hidden;
}

/* 졸업요건 섹션 접기/펼치기 버튼 컨테이너 */
#chart-container-divider {
    width: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    border-right: 1px solid white;
    padding-right: 2px;
}

/* semester section (container-toggle-btn) 화살표 방향 - 졸업요건과 반대 */
#container-toggle-btn .toggle-icon {
    /* 펼쳐진 상태: 왼쪽 화살표 (접을 수 있음을 의미) */
    transform: rotate(180deg);
}

#container-toggle-btn:hover .toggle-icon {
    border-left-color: #b22222;
    transform: scale(1.1) rotate(180deg);
}

#container-toggle-btn.collapsed .toggle-icon {
    /* 접힌 상태: 오른쪽 화살표 (펼칠 수 있음을 의미) */
    transform: rotate(0deg);
}

#container-toggle-btn.collapsed:hover .toggle-icon {
    transform: scale(1.1) rotate(0deg);
}

/* 접힌 상태일 때 아이콘 회전 - 졸업요건 섹션 */
.chart-container-toggle-btn.collapsed .toggle-icon {
    transform: rotate(180deg);
}

.chart-container-toggle-btn.collapsed:hover .toggle-icon {
    transform: scale(1.1) rotate(180deg);
}

/* semester-container와 chart-container 사이의 중앙 구분선 - 제거됨 */
/* .chart-container::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 0;
    bottom: 0;
    width: 1px;
    background-color: black;
} */
/* 세 영역의 스타일 끝 */

/* 강의검색기 영역 시작 */

.search-box {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-shrink: 0; /* 상단에 고정, 크기 줄어들지 않음 */
    
    /* 크림슨 미니멀 스타일 */
    background: #fafafa;
    border: 1px solid rgba(220, 20, 60, 0.08);
    border-radius: 12px;
    padding: 12px;
    
    /* 미묘한 그림자 */
    box-shadow: 
        0 1px 3px rgba(220, 20, 60, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

#search-type-selector {
    display: flex;
    gap: 1em;
    margin-bottom: 1px;
    user-select: none;
    align-items: center;
}

#search-type-selector label {
    font-size: small;
}

.deck-controls {
    display: flex;
    gap: 8px;
}

.deck-controls-center {
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
    margin-top: 8px;
    margin-bottom: -5px;
    width: fit-content;
}

.deck-reset-btn {
    width: 5em;
    background-color: white;
    color: #333;
    border: 2px solid rgba(220, 20, 60, 0.1);
    border-radius: 12px;
    padding: 4px 8px; /* 이전 크기로 되돌림 */
    font-size: 0.8em;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    height: 26px; /* 26px로 변경 */
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    box-sizing: border-box;
    box-shadow: 0 2px 8px rgba(220, 20, 60, 0.05);
}

.deck-reset-btn:hover {
    background-color: rgba(220, 20, 60, 0.05);
    border-color: rgba(220, 20, 60, 0.2);
    box-shadow: 0 4px 16px rgba(220, 20, 60, 0.1);
    transform: translateY(-1px);
}

.deck-export-btn, .deck-import-btn {
    width: 5em;
    background-color: white;
    color: #333;
    border: 2px solid rgba(220, 20, 60, 0.1);
    border-radius: 12px;
    padding: 4px 8px;
    font-size: 0.8em;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    box-sizing: border-box;
    box-shadow: 0 2px 8px rgba(220, 20, 60, 0.05);
}

.deck-export-btn:hover, .deck-import-btn:hover {
    background-color: rgba(220, 20, 60, 0.05);
    border-color: rgba(220, 20, 60, 0.2);
    box-shadow: 0 4px 16px rgba(220, 20, 60, 0.1);
    transform: translateY(-1px);
}

/* 검색 컨테이너 레이아웃 개선 */
#dept-search-container, #course-search-container {
    display: flex;
    gap: 4px; /* 기본 간격을 4px로 설정 */
    width: 100%;
    align-items: center; /* flex-end에서 center로 변경하여 동일 선상에 정렬 */
}

/* 강의명 검색 컨테이너 특별 간격 */
#course-search-container {
    gap: 12px; /* 강의명 검색 컨테이너와 버튼 간격 늘리기 */
}

/* 학과 이름 입력 필드와 검색 버튼 사이의 간격을 8px로 설정 */
#dept-search-container .floating-dropdown:nth-child(2),
#course-search-container .floating-dropdown:nth-child(1) {
    margin-right: 4px; /* 추가로 4px 여백을 주어 총 8px 간격 생성 */
}

/* 초기에는 강의명 검색 UI 숨김 */
#course-search-container {
    display: none;
    /* 강의명 검색 컨테이너 특별 스타일 */
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 2px 2px; /* 상하 패딩을 늘려서 전체 높이 맞춤 */
    box-shadow: none;
    justify-content: center;
    align-items: center;
    min-height: 10px; /* 최소 높이 설정으로 학과명 검색과 동일한 크기 */
}

#search-result {
    flex-grow: 1; /* 남은 공간을 모두 차지 */
    overflow-y: auto; /* 내용이 넘칠 경우 스크롤 */
    font-size: 0.95em;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    
    /* 크림슨 미니멀 스타일 */
    background: #fafafa;
    border: 1px solid rgba(220, 20, 60, 0.08);
    border-radius: 12px;
    padding: 12px;
    
    /* 미묘한 그림자 */
    box-shadow: 
        0 1px 3px rgba(220, 20, 60, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

#search-result::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

/* 검색 결과 스타일 */
.result-group {
    border: 1px solid rgba(220, 20, 60, 0.1);
    border-radius: 8px;
    margin-bottom: 8px;
    overflow: hidden;
    
    /* 크림슨 미니멀 스타일 */
    background: white;
    box-shadow: 0 1px 3px rgba(220, 20, 60, 0.04);
}

.result-group-header {
    background: linear-gradient(135deg, 
        rgba(220, 20, 60, 0.08) 0%,
        rgba(178, 34, 34, 0.05) 100%);
    padding: 10px 12px;
    user-select: none;
    font-weight: 600;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    color: #333;
}

.result-group-content {
    padding: 8px 12px;
    background: white;
}

.course-item {
    padding: 6px 8px;
    margin: 4px 0;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: grab;
    font-size: 0.9em;
}

.course-item:hover {
    background-color: #f9f9f9;
    border-color: #bbb;
}


/* 강의검색기 영역 끝 */

/* 총 이수학점 섹션 */
.total-credit-section {
    margin-top: 16px;
    padding: 12px;
    
    /* 크림슨 미니멀 스타일 */
    background: #fafafa;
    border: 1px solid rgba(220, 20, 60, 0.08);
    border-radius: 12px;
    
    /* 미묘한 그림자 */
    box-shadow: 
        0 1px 3px rgba(220, 20, 60, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.total-credit-row {
    display: flex;
    align-items: center;
    gap: 0.4em;
    font-size: 1.1em;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.gpa-row {
    display: flex;
    align-items: center;
    gap: 0.4em;
    font-size: 1.0em;
}

.history-controls {
    display: flex;
    gap: 4px;
}

.history-btn {
    background: white;
    border: 1px solid rgba(220, 20, 60, 0.15);
    border-radius: 6px;
    padding: 4px 6px;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* 크림슨 미니멀 스타일 */
    box-shadow: 0 1px 2px rgba(220, 20, 60, 0.1);
}

.history-btn:hover:not(:disabled) {
    background: rgba(220, 20, 60, 0.05);
    border-color: rgba(220, 20, 60, 0.25);
    box-shadow: 0 2px 4px rgba(220, 20, 60, 0.15);
}

.history-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 단축키 안내 버튼 스타일 */
.shortcuts-btn {
    width: auto;
    min-width: 5em;
    background-color: white;
    color: #333;
    border: 2px solid rgba(220, 20, 60, 0.1);
    border-radius: 12px;
    padding: 4px 8px;
    font-size: 0.8em;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    box-sizing: border-box;
    box-shadow: 0 2px 8px rgba(220, 20, 60, 0.05);
}

.shortcuts-btn:hover {
    background-color: rgba(220, 20, 60, 0.05);
    border-color: rgba(220, 20, 60, 0.2);
    box-shadow: 0 4px 16px rgba(220, 20, 60, 0.1);
    transform: translateY(-1px);
}

/* 평점 표시 기준 토글 버튼 스타일 */
.gpa-scale-toggle-btn {
    width: auto;
    min-width: 4em;
    background-color: white;
    color: #333;
    border: 2px solid rgba(220, 20, 60, 0.1);
    border-radius: 12px;
    padding: 4px 8px;
    font-size: 0.8em;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    box-sizing: border-box;
    box-shadow: 0 2px 8px rgba(220, 20, 60, 0.05);
}

.gpa-scale-toggle-btn:hover {
    background-color: rgba(220, 20, 60, 0.05);
    border-color: rgba(220, 20, 60, 0.2);
    box-shadow: 0 4px 16px rgba(220, 20, 60, 0.1);
    transform: translateY(-1px);
}

/* 도움말 버튼 스타일 */
.help-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: white;
    color: #495057;
    border: 2px solid #495057;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 8px rgba(73, 80, 87, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.help-btn:hover {
    background: #495057;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(73, 80, 87, 0.3);
}

.help-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.2);
}

/* selectContainer 스타일 */
#selectContainer {
    overflow: visible;
    position: relative;
    z-index: 1;
}

/* 전공영역 추가 버튼 */
.plus-line-container {
    width: 100%;
    display: flex;
    justify-content: center;
    /* 가로 중앙 */
    align-items: flex-start;
    /* 세로 상단 */
    /* border-top: 2px solid #000; */
    border-right: none;
    border-bottom: none;
    border-left: none;
    padding-top: 4px;
    /* 버튼과 선 사이 간격 */
    background: transparent;
    position: relative;
    height: 48px;
    /* 필요시 조절 */
    z-index: 100;
    overflow: visible;
    margin-top: 20px;
    padding-bottom: 10px;
}

.plus-rect-btn {
    background: white;
    border: 2px solid rgba(220, 20, 60, 0.2);
    border-radius: 8px;
    width: 40px;
    height: 32px;
    font-size: 1.5em;
    color: #dc143c;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    
    /* 크림슨 미니멀 스타일 */
    box-shadow: 0 2px 4px rgba(220, 20, 60, 0.1);
    z-index: 1000;
    position: relative;
    pointer-events: auto;
}

.plus-rect-btn:hover {
    background: rgba(220, 20, 60, 0.05);
    border-color: rgba(220, 20, 60, 0.3);
    box-shadow: 0 4px 8px rgba(220, 20, 60, 0.15);
    transform: translateY(-1px);
}

/* 플러스 버튼 클릭 시 나타나는 메뉴 */
.plus-popup-menu {
    font-size: 1em;
    user-select: none;
    animation: fadeIn 0.15s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 진입년도 선택 */
.year-select {
    min-width: 70px;
    padding: 8px 12px; /* floating-dropdown과 동일한 패딩 */
    border: 2px solid rgba(220, 20, 60, 0.1); /* floating-dropdown과 동일한 테두리 */
    border-radius: 12px; /* floating-dropdown과 동일한 둥근 모서리 */
    background: white; /* floating-dropdown과 동일한 배경 */
    font-size: 0.8em; /* floating-dropdown과 동일한 폰트 크기 */
    color: #333; /* floating-dropdown과 동일한 텍스트 색상 */
    cursor: pointer;
    transition: all 0.3s ease; /* floating-dropdown과 동일한 전환 효과 */
    box-shadow: 0 2px 8px rgba(220, 20, 60, 0.05); /* floating-dropdown과 동일한 그림자 */
    height: 36px; /* 높이를 36px로 늘림 */
    box-sizing: border-box;
    line-height: 1; /* 텍스트 세로 중앙 정렬 */
    display: flex;
    align-items: center; /* flexbox를 사용한 세로 중앙 정렬 */
}

.year-select:focus {
    outline: none;
    border-color: #dc143c; /* floating-dropdown과 동일한 포커스 색상 */
    box-shadow: 0 0 0 3px rgba(220, 20, 60, 0.1); /* floating-dropdown과 동일한 포커스 효과 */
    transform: translateY(-1px); /* floating-dropdown과 동일한 호버 효과 */
}

.year-select:hover {
    border-color: rgba(220, 20, 60, 0.2); /* floating-dropdown과 동일한 호버 효과 */
    box-shadow: 0 4px 16px rgba(220, 20, 60, 0.1); /* floating-dropdown과 동일한 호버 그림자 */
}

/* 학과 선택 */
.dept-select-container {
    display: flex;
    flex-direction: column;
    gap: 1px;
    /*background-color: lightyellow; /* 배경색 */
    /* width: fit-content; */
    position: relative;
    padding: 1px;
}

.dept-select-container .group-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 12px; /* 10px에서 6px로 줄여서 height 축소 */
    font-size: 0.9em;
    background: white;
    border: 2px solid rgba(220, 20, 60, 0.08);
    border-radius: 12px;
    margin: 4px 0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(220, 20, 60, 0.05);
}

.dept-select-container .group-container:hover {
    background: rgba(220, 20, 60, 0.12); /* 더 진한 색상으로 변경 */
    border-color: rgba(220, 20, 60, 0.3); /* 더 진한 테두리 색상 */
    box-shadow: 0 4px 16px rgba(220, 20, 60, 0.15); /* 더 진한 그림자 */
    transform: translateY(-1px);
}

.dept-select-container hr {
    border: none;
    border-top: 1px solid rgba(220, 20, 60, 0.1);
    margin: 6px 0;
}

.group-toggle-area {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 1000px;
    /* 펼쳐진 상태의 충분히 큰 값 */
}

.group-toggle-area.collapsed {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.group-toggle-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 0.8em;
    vertical-align: middle;
    color: #dc143c;
    transition: all 0.3s ease;
}

.group-toggle-btn:hover {
    color: #b22222;
    transform: scale(1.1);
}

.group-label {
    text-align: left;
    font-size: 0.9em;
    line-height: 1.2;
    color: #333;
    font-weight: 500;
}

.group-progress {
    text-align: right;
    min-width: 60px; /* 80px의 3분의 2로 축소 */
    text-align: center;
    font-weight: 600;
    font-size: 0.8em;
    border-radius: 12px;
    padding: 4px 12px; /* 6px에서 4px로 줄여서 height 축소 */
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid rgba(220, 20, 60, 0.1);
    box-shadow: 0 2px 8px rgba(220, 20, 60, 0.05);
    transition: all 0.3s ease;
    color: #333;
}

.dept-select {
    /* width: 18em; */
    padding: 4px 12px; /* 상하 패딩을 늘려서 텍스트 중앙 정렬 */
    border: 2px solid rgba(220, 20, 60, 0.1); /* floating-dropdown과 동일한 테두리 */
    border-radius: 12px; /* floating-dropdown과 동일한 둥근 모서리 */
    background: white; /* floating-dropdown과 동일한 배경 */
    font-size: 0.9em; 
    color: #333; /* floating-dropdown과 동일한 텍스트 색상 */
    cursor: pointer;
    transition: all 0.3s ease; /* floating-dropdown과 동일한 전환 효과 */
    box-shadow: 0 2px 8px rgba(220, 20, 60, 0.05); /* floating-dropdown과 동일한 그림자 */
    height: 36px; /* 높이를 36px로 늘림 */
    box-sizing: border-box;
    line-height: 1; /* 텍스트 세로 중앙 정렬 */
    display: flex;
    align-items: center; /* flexbox를 사용한 세로 중앙 정렬 */
}

.dept-select:focus {
    outline: none;
    border-color: #dc143c; /* floating-dropdown과 동일한 포커스 색상 */
    box-shadow: 0 0 0 3px rgba(220, 20, 60, 0.1); /* floating-dropdown과 동일한 포커스 효과 */
    transform: translateY(-1px); /* floating-dropdown과 동일한 호버 효과 */
}

.dept-select:hover {
    border-color: rgba(220, 20, 60, 0.2); /* floating-dropdown과 동일한 호버 효과 */
    box-shadow: 0 4px 16px rgba(220, 20, 60, 0.1); /* floating-dropdown과 동일한 호버 그림자 */
}

/* 드래그 중인 요소 스타일(선택사항) */
.sortable-ghost {
    opacity: 0.5;
    background: #ffe;
}

.taken-course {
    position: relative; /* 체크 표시의 위치 기준점 */
    background-color: #e0e0e0;
    border: 1px solid #bbb;
    border-radius: 4px;
    padding: 4px 6px;
    font-size: 0.85em;
    cursor: pointer; /* 클릭 가능하다는 시각적 피드백 */
    white-space: nowrap; /* 텍스트가 한 줄에 표시되도록 */
    overflow: hidden;     /* 넘치는 텍스트 숨김 */
    text-overflow: ellipsis; /* 넘치는 텍스트를 ...으로 표시 */
    max-width: calc(50% - 4px); /* 2열 배치를 위해 너비 제한 (gap 4px 고려) */
    box-sizing: border-box; /* padding과 border가 너비에 포함되도록 */
    flex-shrink: 0; /* 줄어들지 않도록 */
    transition: all 0.2s ease; /* 부드러운 전환 효과 */
}

.major-check-mark {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background-color: #dc143c;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    font-weight: bold;
    z-index: 1;
    box-shadow: 0 0 2px rgba(0,0,0,0.5);
    content: '✔';
}

.taken-course:hover {
    background-color: #d0d0d0;
    border-color: #aaa;
    transform: translateY(-1px); /* 살짝 위로 올라가는 효과 */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* 그림자 효과 */
}

/* 평점별 과목 스타일 - 모던한 플랫 톤 */
.taken-course[data-grade="A+"] {
    background: linear-gradient(135deg, #033500, #044400);
    border: 1px solid #022200;
    color: white;
}

.taken-course[data-grade="A"] {
    background: linear-gradient(135deg, #388E3C, #4CAF50);
    border: 1px solid #2E7D32;
    color: white;
}

.taken-course[data-grade="B+"] {
    background: linear-gradient(135deg, #CDDC39, #D4E157);
    border: 1px solid #AFB42B;
    color: #424242;
}

.taken-course[data-grade="B"] {
    background: linear-gradient(135deg, #FFEB3B, #FFEE58);
    border: 1px solid #FBC02D;
    color: #424242;
}

.taken-course[data-grade="C+"] {
    background: linear-gradient(135deg, #FF9800, #FFB74D);
    border: 1px solid #F57C00;
    color: white;
}

.taken-course[data-grade="C"] {
    background: linear-gradient(135deg, #FF5722, #FF8A65);
    border: 1px solid #E64A19;
    color: white;
}

.taken-course[data-grade="D+"] {
    background: linear-gradient(135deg, #B71C1C, #C62828);
    border: 1px solid #A00000;
    color: white;
}

.taken-course[data-grade="D"] {
    background: linear-gradient(135deg, #660000, #800000);
    border: 1px solid #4A0000;
    color: white;
}

.taken-course[data-grade="F"] {
    background: linear-gradient(135deg, #F5F5F5, #E0E0E0); 
    border: 1px solid #424242;
    color: black;
    text-decoration: line-through;
    opacity: 0.6; /* 불투명도 조정 */
}

.taken-course[data-grade="P"] {
    background: linear-gradient(135deg, #9E9E9E, #BDBDBD);
    border: 1px solid #757575;
    color: white;
}

.taken-course[data-grade="NP"] {
    background: linear-gradient(135deg, #F5F5F5, #E0E0E0); 
    border: 1px solid #424242;
    color: black;
    text-decoration: line-through;
    opacity: 0.6; /* 불투명도 조정 */
}

.taken-course.highlight {
    background: rgba(220, 20, 60, 0.1); /* 투명한 크림슨 배경 */
    border: 1px solid rgba(220, 20, 60, 0.4); /* 1px로 통일 */
    color: #333; /* 텍스트 색상 유지 */
    box-shadow: 0 2px 8px rgba(220, 20, 60, 0.2); /* 크림슨 그림자 */
}

.course-item.taken-in-search {
    text-decoration: line-through;
    color: #999;
}

.semester-credit-total {
    position: absolute;
    bottom: 4px;
    right: 8px;
    font-size: 0.75em;
    color: #666;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 2px 4px;
    border-radius: 3px;
    pointer-events: none; /* 클릭 이벤트를 방지하여 아래 요소에 영향을 주지 않도록 */
    z-index: 1; /* 다른 요소 위에 표시 */
}

/* 플로팅 라벨 드롭다운 스타일 */
.floating-dropdown {
    position: relative;
    flex: 0.6; 
    margin-bottom: 2px; 
    margin-left: 0.5px; /* 왼쪽 여백 추가 */
}

/* 전공 선택 드롭다운만 더 작게 조정 */
.floating-dropdown:first-child {
    flex: 0.74; 
}

/* 학과 이름 입력 필드는 남은 공간을 모두 차지 */
.floating-dropdown:nth-child(2) {
    flex: 1; /* 남은 공간을 모두 차지 */
}

.floating-dropdown select,
.floating-dropdown input {
    width: 100%;
    padding: 8px 12px; /* 상하 패딩을 동일하게 조정 */
    border: 2px solid rgba(220, 20, 60, 0.1);
    border-radius: 12px;
    background: white;
    font-size: 0.8em; /* 폰트 크기를 더 줄임 */
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(220, 20, 60, 0.05);
    height: 32px;
    box-sizing: border-box;
    line-height: 1; /* 텍스트 세로 중앙 정렬을 위한 line-height 설정 */
    display: flex;
    align-items: center; /* flexbox를 사용한 세로 중앙 정렬 */
}

/* 강의명 검색 입력 필드 특별 스타일 */
#course-search-container input {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.95) 0%,
        rgba(248, 248, 248, 0.9) 100%);
    border: 2px solid rgba(220, 20, 60, 0.15);
    border-radius: 20px;
    height: 24px; 
    text-align: center; /* 텍스트 가운데 정렬 */
    box-shadow: 
        0 2px 8px rgba(220, 20, 60, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

#course-search-container input:focus {
    border-color: #dc143c;
    background: white;
    box-shadow: 
        0 0 0 3px rgba(220, 20, 60, 0.15),
        0 4px 16px rgba(220, 20, 60, 0.12);
    transform: translateY(-1px);
}

.floating-dropdown select:focus,
.floating-dropdown input:focus {
    outline: none;
    border-color: #dc143c;
    box-shadow: 0 0 0 3px rgba(220, 20, 60, 0.1);
    transform: translateY(-1px);
}

.floating-dropdown label {
    position: absolute;
    top: 4px; /* 라벨 위치 조정 */
    left: 12px;
    font-size: 0.75em; /* 라벨 폰트 크기 줄임 */
    color: #666;
    transition: all 0.3s ease;
    pointer-events: none;
    background: white;
    padding: 0 4px;
    border-radius: 4px;
}

.floating-dropdown select:focus + label,
.floating-dropdown input:focus + label,
.floating-dropdown select:not([value=""]) + label,
.floating-dropdown input:not(:placeholder-shown) + label {
    top: 2px; /* 포커스 시 라벨 위치 조정 */
    font-size: 0.65em; /* 포커스 시 라벨 폰트 크기 줄임 */
    color: #dc143c;
    font-weight: 600;
}

.floating-dropdown:hover select,
.floating-dropdown:hover input {
    border-color: rgba(220, 20, 60, 0.2);
    box-shadow: 0 4px 16px rgba(220, 20, 60, 0.1);
}

/* 드롭다운 화살표 커스텀 */
.floating-dropdown select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23dc143c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px; /* 화살표 크기도 줄임 */
    padding-right: 35px; /* 패딩 조정 */
}

/* 검색 버튼 스타일 개선 */
#dept-search-btn, #course-search-btn {
    width: 3.2em;
    padding: 6px; /* 아이콘에 맞게 패딩 조정 */
    background: linear-gradient(135deg, #dc143c, #b22222);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(220, 20, 60, 0.2);
    flex-shrink: 0;
    height: 28px; /* 높이를 28px로 통일 */
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center; /* 아이콘 중앙 정렬 */
}

#dept-search-btn:hover, #course-search-btn:hover {
    background: linear-gradient(135deg, #b22222, #8b0000);
    transform: translateY(-1px);
}

/* 강의명 검색 버튼 특별 스타일 */
#course-search-btn {
    background: linear-gradient(135deg, #dc143c, #c41e3a);
    box-shadow: 
        0 2px 8px rgba(220, 20, 60, 0.25),
        0 1px 3px rgba(220, 20, 60, 0.1);
}

#course-search-btn:hover {
    background: linear-gradient(135deg, #b22222, #a01818);
    box-shadow: 
        0 4px 12px rgba(220, 20, 60, 0.35),
        0 2px 6px rgba(220, 20, 60, 0.15);
    transform: translateY(-2px);
}

/* 돋보기 아이콘 스타일 */
.search-icon {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* 언어 전환 버튼 스타일 */
.language-switcher {
    display: flex;
    background: rgba(255, 192, 203, 0.1); /* 연한 핑크색 배경 */
    border-radius: 8px;
    padding: 3px;
    gap: 3px;
    border: 1px solid rgba(255, 192, 203, 0.3); /* 연한 핑크색 테두리 */
    align-self: flex-start;
}

/* 로고와 언어 전환 버튼 컨테이너 */
.logo-language-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: -3px;
}

/* 세로 언어 전환 버튼 */
.language-switcher-vertical {
    right: 55px;
    display: flex;
    flex-direction: column;
    background: rgba(255, 192, 203, 0.1); /* 연한 핑크색 배경 */
    border-radius: 8px;
    padding: 3px;
    gap: 1px;
    border: 1px solid rgba(255, 192, 203, 0.3); /* 연한 핑크색 테두리 */
    margin-right: 5px;
}

/* 목표 평점 계산 버튼 스타일 */
.gpa-goal-section {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 8px 0;
}

.gpa-goal-btn {
    background-color: white;
    color: #333;
    border: 2px solid rgba(220, 20, 60, 0.1);
    border-radius: 12px;
    padding: 6px 12px;
    font-size: 0.85em;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    box-sizing: border-box;
    box-shadow: 0 2px 8px rgba(220, 20, 60, 0.05);
    font-weight: 500;
}

.gpa-goal-btn:hover {
    background-color: rgba(220, 20, 60, 0.05);
    border-color: rgba(220, 20, 60, 0.2);
    box-shadow: 0 4px 16px rgba(220, 20, 60, 0.1);
    transform: translateY(-1px);
}

.gpa-goal-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(220, 20, 60, 0.1);
}

/* 덱 시뮬레이션 버튼 스타일 */
.deck-simulation-btn {
    background-color: white;
    color: #333;
    border: 2px solid rgba(220, 20, 60, 0.1);
    border-radius: 12px;
    padding: 6px 12px;
    font-size: 0.85em;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    white-space: nowrap;
    min-width: 80px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    box-shadow: 0 2px 8px rgba(220, 20, 60, 0.05);
    font-weight: 500;
}

.deck-simulation-btn:hover {
    background-color: rgba(220, 20, 60, 0.05);
    border-color: rgba(220, 20, 60, 0.2);
    box-shadow: 0 4px 16px rgba(220, 20, 60, 0.1);
    transform: translateY(-1px);
}

.deck-simulation-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(220, 20, 60, 0.1);
}

/* 목표 평점 계산 팝업 스타일 */
.gpa-goal-popup {
    position: fixed;
    top: 50%;
    left: 35%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    min-width: 250px;
    max-width: 350px;
    width: 67.5vw;
    max-height: 80vh;
    overflow-y: auto;
    border: 1px solid rgba(220, 20, 60, 0.1);
}

.gpa-goal-popup-content {
    padding: 0;
    border-radius: 16px;
    overflow: hidden;
}

.gpa-goal-popup-header {
    background: linear-gradient(135deg, #dc143c, #b22222);
    color: white;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    cursor: move;
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    touch-action: none;
}

.gpa-goal-popup-header h3 {
    margin: 0;
    font-size: 1.1em;
    font-weight: 600;
}

.gpa-goal-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5em;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.gpa-goal-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.gpa-goal-popup-body {
    padding: 20px;
    background: white;
}

.gpa-goal-input-row,
.gpa-goal-result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding: 4px 0;
}

.gpa-goal-input-row:last-child,
.gpa-goal-result-row:last-child {
    margin-bottom: 0;
}

.gpa-goal-input-row label,
.gpa-goal-result-row label {
    font-weight: 500;
    color: #333;
    font-size: 1.25em;
    margin-left: 15px;
}

.gpa-goal-input {
    width: 100px;
    padding: 10px 14px;
    border: 2px solid rgba(220, 20, 60, 0.15);
    border-radius: 8px;
    font-size: 0.95em;
    transition: all 0.3s ease;
    background: white;
    color: #333;
}

.gpa-goal-input:focus {
    outline: none;
    border-color: rgba(220, 20, 60, 0.4);
    box-shadow: 0 0 0 3px rgba(220, 20, 60, 0.1);
}

.gpa-goal-input:hover {
    border-color: rgba(220, 20, 60, 0.3);
}

.gpa-goal-result {
    font-weight: 600;
    font-size: 1.2em;
    color: #dc143c;
    min-width: 100px;
    text-align: center;
    padding: 12px 16px;
    background: rgba(220, 20, 60, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(220, 20, 60, 0.1);
}

/* 결과가 계산되었을 때의 스타일 */
.gpa-goal-result.calculated {
    background: linear-gradient(135deg, rgba(220, 20, 60, 0.1), rgba(178, 34, 34, 0.05));
    border-color: rgba(220, 20, 60, 0.2);
    color: #b22222;
}

/* 에러 상태 스타일 */
.gpa-goal-input.error {
    border-color: #ff4444;
    background: rgba(255, 68, 68, 0.05);
}

.gpa-goal-result.error {
    color: #ff4444;
    background: rgba(255, 68, 68, 0.05);
    border-color: rgba(255, 68, 68, 0.2);
}

/* 성공 상태 스타일 */
.gpa-goal-result.success {
    color: #28a745;
    background: rgba(40, 167, 69, 0.05);
    border-color: rgba(40, 167, 69, 0.2);
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .gpa-goal-popup {
        min-width: 280px;
        max-width: 95vw;
        width: 95vw;
        margin: 10px;
    }
    
    .gpa-goal-input-row,
    .gpa-goal-result-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .gpa-goal-input-row label,
    .gpa-goal-result-row label {
        min-width: auto;
    }
    
    .gpa-goal-input {
        width: 100%;
    }
    
    .gpa-goal-result {
        width: 100%;
        text-align: center;
    }
    
    .semester-item {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .semester-item-label {
        min-width: auto;
    }
    
    .semester-item-input {
        width: 100%;
    }
    
    .semester-plan-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* 학기별 계획 토글 버튼 */
.semester-plan-toggle {
    margin: 16px 0;
    text-align: center;
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
}

.semester-plan-toggle-btn {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    color: #495057;
    border: 2px solid rgba(220, 20, 60, 0.1);
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 0.85em;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.semester-plan-toggle-btn:hover {
    background: linear-gradient(135deg, #e9ecef, #dee2e6);
    border-color: rgba(220, 20, 60, 0.2);
    transform: translateY(-1px);
}

.semester-plan-toggle-btn.active {
    background: linear-gradient(135deg, #dc143c, #b22222);
    color: white;
    border-color: #dc143c;
    display: none;
}

/* 학기별 계획 섹션 */
.semester-plan-section {
    margin: 20px 0;
    padding: 10px;
    background: rgba(220, 20, 60, 0.02);
    border: 1px solid rgba(220, 20, 60, 0.1);
    border-radius: 12px;
}

.semester-plan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    margin-left: 10px;
    border-bottom: 1px solid rgba(220, 20, 60, 0.1);
}

.semester-plan-header h4 {
    margin: 0;
    font-size: 1em;
    font-weight: 600;
    color: #333;
}

.semester-plan-summary {
    font-size: 0.85em;
    color: #666;
}

.semester-plan-list {
    margin-bottom: 12px;
}

/* 학기 항목 */
.semester-item {
    display: flex;
    align-items: center;
    padding: 12px;
    background: white;
    border: 1px solid rgba(220, 20, 60, 0.1);
    border-radius: 8px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.semester-item:hover {
    border-color: rgba(220, 20, 60, 0.2);
    box-shadow: 0 2px 8px rgba(220, 20, 60, 0.05);
}

.semester-item-label {
    font-weight: 500;
    color: #333;
    min-width: 80px;
    font-size: 0.95em;
    margin-right: 25px;
}

.semester-item-input {
    width: 50px;
    padding: 8px 10px;
    border: 1px solid rgba(220, 20, 60, 0.15);
    border-radius: 6px;
    font-size: 0.9em;
    transition: all 0.3s ease;
    margin-left: -30px;
    margin-right: 15px;
}

/* 학점 입력 박스와 평점 입력 박스 사이의 간격 조정 */
.semester-item-input.semester-credits {
    margin-left: -40px;
}

.semester-item-input.semester-gpa {
    margin-left: -10px;
}

.semester-item-input:focus {
    outline: none;
    border-color: rgba(220, 20, 60, 0.4);
    box-shadow: 0 0 0 2px rgba(220, 20, 60, 0.1);
}

.semester-item-input.error {
    border-color: #ff4444;
    background: rgba(255, 68, 68, 0.05);
}

.semester-item-remove {
    background: none;
    border: none;
    color: #dc143c;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 1.2em;
    line-height: 1;
    margin-left: -10px;
    margin-bottom: -4px;
}

.semester-item-remove:hover {
    background: rgba(220, 20, 60, 0.1);
    transform: scale(1.1);
    
}

/* 학기 추가 버튼 */
.semester-plan-controls {
    text-align: center;
}

.add-semester-btn {
    background: linear-gradient(135deg, #dc143c, #b22222);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 0.85em;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.add-semester-btn:hover {
    background: linear-gradient(135deg, #b22222, #8b0000);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 20, 60, 0.3);
}

.add-semester-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 학점 초과 경고 */
.semester-plan-section.warning {
    border-color: #ffc107;
    background: rgba(255, 193, 7, 0.05);
}

.semester-plan-summary.warning {
    color: #856404;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .semester-item {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .semester-item-label {
        min-width: auto;
    }
    
    .semester-item-input {
        width: 100%;
    }
    
    .semester-plan-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* 저장 버튼 섹션 */
.gpa-goal-save-section {
    margin-top: 20px;
    text-align: center;
    padding-top: 16px;
    border-top: 1px solid rgba(220, 20, 60, 0.1);
}

.gpa-goal-save-btn {
    background: linear-gradient(135deg, #dc143c, #b22222);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 24px;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    min-width: 100px;
}

.gpa-goal-save-btn:hover {
    background: linear-gradient(135deg, #b22222, #8b0000);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 20, 60, 0.3);
}

.gpa-goal-save-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(220, 20, 60, 0.3);
}

.gpa-goal-save-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.gpa-goal-save-btn.saved {
    background: linear-gradient(135deg, #dc143c, #b22222);
}

.gpa-goal-save-btn.saved:hover {
    background: linear-gradient(135deg, #b22222, #8b0000);
}

/* 학기별 계획 닫기 버튼 */
.semester-plan-close-btn {
    background: none;
    border: none;
    color: #dc143c;
    font-size: 1.2em;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.3s ease;
    line-height: 1;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.semester-plan-close-btn:hover {
    background: rgba(220, 20, 60, 0.1);
    transform: scale(1.1);
}

.semester-plan-close-btn:active {
    transform: scale(1);
}

/* 전공 과목 체크 표시 스타일 */
.major-check {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #28a745;
    color: white;
    border-radius: 50%;
    width: 9px;
    height: 9px;
    font-size: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    z-index: 10;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    border: 1px solid white;
}

/* 전공 과목이 체크 표시를 가질 수 있도록 relative 포지션 설정 */
.taken-course[data-is-major="true"] {
    position: relative;
}

/* 재수강 과목 버튼 스타일 */
.retake-courses-section {
    margin: 20px 0;
    text-align: center;
}

.retake-courses-btn {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    color: #495057;
    border: 2px solid rgba(220, 20, 60, 0.1);
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 0.85em;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.retake-courses-btn:hover {
    background: linear-gradient(135deg, #e9ecef, #dee2e6);
    border-color: rgba(220, 20, 60, 0.2);
    transform: translateY(-1px);
}

.retake-courses-btn:active {
    transform: translateY(0);
}

/* 재수강 과목 팝업 스타일 */
.retake-courses-popup {
    position: fixed;
    top: 20%;
    left: 75%;
    transform: translateX(-50%);
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    min-width: 300px;
    max-width: 600px;
    width: 80vw;
    max-height: 60vh;
    overflow-y: auto;
    border: 1px solid rgba(220, 20, 60, 0.1);
}

.retake-courses-popup-content {
    padding: 0;
    border-radius: 16px;
    overflow: hidden;
}

.retake-courses-popup-header {
    background: linear-gradient(135deg, #dc143c, #b22222);
    color: white;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    cursor: move;
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    touch-action: none;
}

.retake-courses-popup-header h3 {
    margin: 0;
    font-size: 1.1em;
    font-weight: 600;
}

.retake-courses-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5em;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.retake-courses-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.retake-courses-popup-body {
    padding: 20px;
    background: white;
}



.retake-instructions {
    margin-bottom: 20px;
    padding: 15px;
    background: #fde8e8;
    border-radius: 8px;
    border-left: 4px solid #dc143c;
}

.retake-instructions p {
    margin: 0;
    color: #b22222;
    font-size: 0.9em;
    line-height: 1.4;
}

.retake-courses-table {
    margin-bottom: 20px;
}

.retake-courses-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 0.8fr 1fr;
    gap: 10px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
    font-weight: 600;
    color: #333;
    border: 1px solid #e9ecef;
    border-bottom: none;
}

.retake-course-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 0.8fr 1fr;
    gap: 10px;
    padding: 8px 12px;
    border: 1px solid #e9ecef;
    border-top: none;
    align-items: center;
}

.retake-course-row:last-child {
    border-radius: 0 0 8px 8px;
}

.retake-course-name {
    font-weight: 500;
    color: #333;
}

.retake-current-grade,
.retake-credit {
    text-align: center;
    color: #666;
}

.retake-target-grade select {
    width: 120%;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9em;
    margin-left: -10%; /* 왼쪽으로 10% 이동하여 중앙 정렬 */
}

.retake-effect {
    text-align: center;
    font-weight: 600;
}

.retake-effect.positive {
    color: #4CAF50;
}

.retake-effect.neutral {
    color: #666;
}

.retake-effect.abandon {
    color: #f44336;
    font-weight: 700;
}



.no-retake-courses {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.no-retake-courses p {
    margin: 0;
    font-size: 1.1em;
}

/* 재수강 저장 버튼 스타일 */
.retake-save-section {
    margin-top: 20px;
    text-align: center;
}

.retake-save-btn {
    background: linear-gradient(135deg, #dc143c, #b22222);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(220, 20, 60, 0.3);
}

.retake-save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(220, 20, 60, 0.4);
}

.retake-save-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(220, 20, 60, 0.3);
}

.retake-save-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 덱 시뮬레이션 팝업 스타일 */
.deck-simulation-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.deck-simulation-popup-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(220, 20, 60, 0.1);
    width: 95%;
    height: 85%;
    max-width: 1200px;
    max-height: 800px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.deck-simulation-popup-header {
    background: linear-gradient(135deg, #dc143c, #b22222);
    color: white;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.deck-simulation-popup-header h3 {
    margin: 0;
    font-size: 1.2em;
    font-weight: 600;
}

.deck-simulation-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5em;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.deck-simulation-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.deck-simulation-popup-body {
    padding: 20px;
    background: white;
    flex-grow: 1;
    overflow: hidden;
}

/* 덱 비교 컨테이너 */
.deck-comparison-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    height: 100%;
}

/* 덱 섹션 (A, B) */
.deck-comparison-section {
    display: flex;
    flex-direction: column;
    background: #fafafa;
    border: 1px solid rgba(220, 20, 60, 0.08);
    border-radius: 12px;
    padding: 16px;
    overflow-y: auto;
    min-height: 0;
    position: relative;
    scrollbar-width: thin;
    scrollbar-color: rgba(220, 20, 60, 0.3) rgba(220, 20, 60, 0.1);
}

/* 웹킷 기반 브라우저 스크롤바 스타일 */
.deck-comparison-section::-webkit-scrollbar {
    width: 6px;
}

.deck-comparison-section::-webkit-scrollbar-track {
    background: rgba(220, 20, 60, 0.1);
    border-radius: 3px;
}

.deck-comparison-section::-webkit-scrollbar-thumb {
    background: rgba(220, 20, 60, 0.3);
    border-radius: 3px;
}

.deck-comparison-section::-webkit-scrollbar-thumb:hover {
    background: rgba(220, 20, 60, 0.5);
}

/* 태블릿 전용 스크롤 스타일 */
@media (max-width: 1024px) and (min-width: 768px) {
    .chart-container {
        -webkit-overflow-scrolling: touch;
        overflow-y: auto;
        height: 100%;
        max-height: 100vh;
    }
    
    .chart-container::-webkit-scrollbar {
        width: 8px;
    }
    
    .chart-container::-webkit-scrollbar-track {
        background: rgba(220, 20, 60, 0.1);
        border-radius: 4px;
    }
    
    .chart-container::-webkit-scrollbar-thumb {
        background: rgba(220, 20, 60, 0.3);
        border-radius: 4px;
    }
    
    .chart-container::-webkit-scrollbar-thumb:hover {
        background: rgba(220, 20, 60, 0.5);
    }
}

.deck-section-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 3px;
    padding-bottom: 3px;
    border-bottom: 1px solid rgba(220, 20, 60, 0.1);
    margin-top: -6px;
}

.deck-select {
    padding: 6px 12px;
    border: 2px solid rgba(220, 20, 60, 0.1);
    border-radius: 8px;
    background: white;
    font-size: 0.9em;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

.deck-select:focus {
    outline: none;
    border-color: #dc143c;
    box-shadow: 0 0 0 3px rgba(220, 20, 60, 0.1);
}

.deck-name-display {
    font-weight: 600;
    font-size: 1em;
    color: #dc143c;
}

.deck-section-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
}

/* 성적 분포 도넛 차트 */
.grade-chart-container {
    height: 250px;
    background: white;
    border: 1px solid rgba(220, 20, 60, 0.08);
    border-radius: 8px;
    padding: 12px;
    flex-shrink: 0;
}

.grade-chart-wrapper {
    display: flex;
    height: 100%;
    gap: 12px;
}

.grade-chart {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
}

.grade-data-list {
    flex: 0 0 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 8px;
    background: rgba(220, 20, 60, 0.02);
    border-radius: 6px;
    border: 1px solid rgba(220, 20, 60, 0.05);
}

.grade-data-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 0.75em;
    transition: all 0.2s ease;
}

.grade-data-item:hover {
    background: rgba(220, 20, 60, 0.05);
}

.grade-data-item .grade-label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
}

.grade-color-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.grade-data-item .grade-info {
    text-align: right;
    color: #666;
    font-size: 0.9em;
}

.no-data-message {
    text-align: center;
    color: #999;
    font-size: 0.8em;
    padding: 20px 8px;
    line-height: 1.4;
}

.no-requirements-message {
    text-align: center;
    color: #999;
    font-size: 0.8em;
    padding: 20px 8px;
    line-height: 1.4;
}

/* 졸업요건 막대그래프 세부 스타일 */
.requirements-major-title {
    font-weight: 600;
    font-size: 0.9em;
    color: #dc143c;
    margin-bottom: 8px;
    padding: 6px 8px;
    background: rgba(220, 20, 60, 0.05);
    border-radius: 6px;
    border-left: 3px solid #dc143c;
}

.requirements-group-item {
    margin-bottom: 8px;
    padding: 6px 8px;
    background: rgba(220, 20, 60, 0.02);
    border-radius: 6px;
    border: 1px solid rgba(220, 20, 60, 0.05);
}

.requirements-group-label {
    font-size: 0.75em;
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
}

.requirements-group-progress {
    display: flex;
    align-items: center;
    gap: 8px;
}

.requirements-progress-bar {
    flex: 1;
    height: 12px;
    background: rgba(220, 20, 60, 0.1);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(220, 20, 60, 0.15);
}

.requirements-progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #dc143c, #b22222);
    border-radius: 5px;
    transition: width 0.5s ease;
}

.requirements-progress-text {
    font-size: 0.7em;
    font-weight: 600;
    color: #666;
    min-width: 80px;
    text-align: right;
}

.requirements-divider {
    border: none;
    border-top: 1px solid rgba(220, 20, 60, 0.1);
    margin: 12px 0;
}

.deck-section-bottom {
    display: grid;
    gap: 12px;
    flex-grow: 1;
    min-height: 0;
}

/* A 영역은 왼쪽에 졸업요건(3), 오른쪽에 학점/평점(1) */
.deck-section-a .deck-section-bottom {
    grid-template-columns: 3fr 1fr;
}

/* B 영역은 왼쪽에 학점/평점(1), 오른쪽에 졸업요건(3) */
.deck-section-b .deck-section-bottom {
    grid-template-columns: 1fr 3fr;
}

/* 졸업요건 막대그래프 */
.requirements-chart-container {
    background: transparent;
    border: none;
    border-radius: 8px;
    padding: 8px;
    overflow: visible;
    min-height: 200px;
    display: flex;
    flex-direction: column;
}

/* 학점/평점 비교 섹션 */
.stats-comparison-a, .stats-comparison-b {
    background: transparent;
    border: none;
    border-radius: 8px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 4px;
    min-height: 120px;
    overflow: visible;
}

.stat-value {
    font-size: 1.1em;
    font-weight: 600;
    text-align: right;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
    margin: 0;
    min-width: 50px;
    background: rgba(220, 20, 60, 0.08);
    border: 1px solid rgba(220, 20, 60, 0.1);
}

/* 통계 항목 스타일 */
.stat-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
    padding: 4px 8px;
    background: rgba(220, 20, 60, 0.02);
    border-radius: 6px;
    border: 1px solid rgba(220, 20, 60, 0.05);
}

.stat-label {
    font-weight: 600;
    font-size: 0.85em;
    color: #333;
    white-space: nowrap;
    text-align: left;
    margin: 0;
    flex-shrink: 0;
}

/* 값 비교 색상 */
.stat-value.higher {
    background: rgba(220, 20, 60, 0.1);
    color: #dc143c;
    border: 1px solid rgba(220, 20, 60, 0.2);
}

.stat-value.lower {
    background: rgba(100, 100, 100, 0.1);
    color: #666;
    border: 1px solid rgba(100, 100, 100, 0.2);
}

.stat-value.equal {
    background: rgba(150, 150, 150, 0.1);
    color: #777;
    border: 1px solid rgba(150, 150, 150, 0.2);
}

/* 반응형 디자인 */
@media (max-width: 1024px) {
    .deck-comparison-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        gap: 16px;
    }
    

    
    .deck-section-bottom {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

@media (max-width: 768px) {
    .deck-simulation-popup-content {
        width: 98%;
        height: 90%;
        margin: 1%;
    }
    
    .deck-simulation-popup-body {
        padding: 12px;
    }
    
    .grade-chart-container {
        height: 150px;
    }
    
    .chart-container {
        -webkit-overflow-scrolling: touch;
        overflow-y: auto;
        height: 100%;
        max-height: 100vh;
    }
}

/* 성적별 과목 목록 팝업 스타일 */
.grade-courses-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.grade-courses-popup-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(220, 20, 60, 0.1);
    width: 90%;
    max-width: 500px;
    max-height: 70%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.grade-courses-popup-header {
    background: linear-gradient(135deg, #dc143c, #b22222);
    color: white;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.grade-courses-popup-header h4 {
    margin: 0;
    font-size: 1.1em;
    font-weight: 600;
    font-family: 'Cafe24OhsquareAir-v2.0';
}

.grade-courses-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.4em;
    cursor: pointer;
    padding: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.grade-courses-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.grade-courses-popup-body {
    padding: 16px;
    background: white;
    flex-grow: 1;
    overflow: hidden;
}

.grade-courses-list {
    max-height: 300px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(220, 20, 60, 0.3) rgba(220, 20, 60, 0.1);
}

.grade-courses-list::-webkit-scrollbar {
    width: 6px;
}

.grade-courses-list::-webkit-scrollbar-track {
    background: rgba(220, 20, 60, 0.1);
    border-radius: 3px;
}

.grade-courses-list::-webkit-scrollbar-thumb {
    background: rgba(220, 20, 60, 0.3);
    border-radius: 3px;
}

.grade-courses-list::-webkit-scrollbar-thumb:hover {
    background: rgba(220, 20, 60, 0.5);
}

.grade-course-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    margin-bottom: 8px;
    background: #fafafa;
    border: 1px solid rgba(220, 20, 60, 0.08);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.grade-course-item:hover {
    background: rgba(220, 20, 60, 0.02);
    border-color: rgba(220, 20, 60, 0.15);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(220, 20, 60, 0.1);
}

.course-info {
    flex: 1;
    min-width: 0;
}

.course-name {
    font-weight: 600;
    font-size: 0.95em;
    color: #333;
    margin-bottom: 4px;
    font-family: 'Cafe24OhsquareAir-v2.0';
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.course-details {
    font-size: 0.8em;
    color: #666;
    font-family: 'Cafe24OhsquareAir-v2.0';
}

.course-grade {
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9em;
    font-family: 'Cafe24OhsquareAir-v2.0';
    min-width: 40px;
    text-align: center;
    flex-shrink: 0;
}

/* 5과목까지만 보이게 하고 나머지는 스크롤 */
.grade-courses-list {
    max-height: calc(5 * 60px); /* 과목 아이템 5개 높이 */
}