body {
    -webkit-user-select: none;  /* Safari */
    -moz-user-select: none;     /* Firefox */
    -ms-user-select: none;      /* IE 10+ */
    user-select: none;          /* Standard syntax */
}

.chap-unit {
    display: none;
}

.openbtn {
    font-size: 30px;
    cursor: pointer;
    align-items: center;
    background-color: transparent;
    color: #333;
    padding: 10px 15px;
    border: none;
    transition: transform 0.3s ease;
}

.openbtn:hover {
    color: #007bff;
}

header > div:nth-child(2) {
    display: flex;
    align-items: center;
    gap: 10px;  /* 로고와 타이틀 사이 간격 */
    margin-right: auto;  /* 왼쪽 정렬 */
}

.navbar-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.navbar-brand img {
    height: 40px;
    margin-right: 10px;
}

/* 중앙 타이틀 */
#cuin-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    font-size: 1.8rem;
    color: #333;
    white-space: nowrap; /* 줄바꿈 방지 */
    top: 30%;
}

/* 날짜 표시 */
#current-date {
    margin-left: auto;
    padding-right: 20px;
    font-size: 1rem;
    color: #666;
    white-space: nowrap;
}

/* 오른쪽 아이콘 */
.header-icons {
    display: flex;
    align-items: center;
}

.header-icons i {
    font-size: 20px;
    color: #333;
    cursor: pointer;
    transition: color 0.3s ease;
}

.header-icons i:hover {
    color: #007bff;
}

#main {
    transition: margin-left .5s;
    padding: 16px;
}

.chap-unit > .chap {
    font-size: 14px;
}

.chap-unit > .unit {
    font-size: 12px;
    margin-left: 4px;
    padding-left: 8px;
    border-left: 1px solid #9c9a9a; /* 구분선 추가 */
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    color: #333;
    background: linear-gradient(
        -45deg,
        #667eea,
        #764ba2,
        #6B8DD6,
        #8E37D7
    );
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
}

.sidebar {
    height: 100%;
    width: 0;
    position: fixed;
    z-index: 1;
    top: 0;
    left: 0;
    background-color: #111;
    overflow-x: hidden;
    transition: 0.5s;
    padding-top: 60px;
}

.sidebar a {
    padding: 8px 8px 8px 32px;
    text-decoration: none;
    font-size: 25px;
    color: #818181;
    display: block;
    transition: 0.3s;
}

.sidebar a:hover {
    color: #f1f1f1;
}

.sidebar .closebtn {
    position: absolute;
    top: 0;
    right: 25px;
    font-size: 36px;
    margin-left: 50px;
}

.openbtn {
    font-size: 20px;
    cursor: pointer;
    color: #333;
    background-color: transparent;
    border: none;
    padding: 10px 15px;
    transition: transform 0.3s ease, color 0.3s ease;
}

.openbtn:hover {
    transform: scale(1.2);
    color: #007bff;
}

header {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: #fff;
    height: 60px;
}

header h5 {
    margin: 0;
    font-size: 14px;
}

.header-icons i {
    margin-left: 15px;
    font-size: 20px;
    color: #333;
    transition: transform 0.3s ease, color 0.3s ease;
    cursor: pointer;
}

.header-icons i:hover {
    transform: scale(1.2);
    color: #007bff; /* 더 짙은 색상으로 변경 */
}

nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    background-color: #f8f9fa;
    padding: 10px 0;
    transition: max-height 0.5s ease-out, opacity 0.5s ease-out;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    border-radius: 10px 10px 0 0;
}

nav.nav-open {
    max-height: 500px; /* 적절한 높이로 조정 */
    opacity: 1;
}

nav a {
    text-decoration: none;
    color: #333;
    padding: 10px 15px;
    margin: 5px;
    border-radius: 5px;
    transition: background-color 0.3s, color 0.3s;
}

nav a.active, nav a:hover {
    background-color: #007bff;
    color: white;
}

.header-nav-container {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.content-wrapper {
    position: relative;
    overflow: hidden;
    max-width: 1800px;
    padding: 0 20px;
}

#content-container {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.content {
    display: flex;
    gap: 16px;
    transition: transform 0.3s ease;
    padding: 10px 0;
}

.content-item {
    flex: 0 0 auto;
    transition: transform 0.3s ease-out;
}

.content-item.dragging {
    cursor: grabbing;
    z-index: 1000;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transform: scale(1.05) rotate(2deg);
    transition: none;
}

.arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.3s, transform 0.3s;
    padding: 0; /* 패딩 제거 */
}

.arrow:hover {
    background-color: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.arrow-left {
    left: 10px;
}

.arrow-right {
    right: 10px;
}

.arrow i {
    font-size: 20px;
    line-height: 1;
    width: 100%; /* 너비를 100%로 설정 */
    height: 100%; /* 높이를 100%로 설정 */
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0; /* 마진 제거 */
}

/* Font Awesome 아이콘 위치 미세 조정 */
.arrow-left i {
    transform: translateX(-1px); /* 왼쪽 아이콘을 약간 왼쪽으로 */
}

.arrow-right i {
    transform: translateX(1px); /* 오른쪽 아이콘을 약간 오른쪽으로 */
}

.content-item {
    flex: 0 0 auto;
    width: calc(100% - 40px); 
    margin: 8px;
    background-color: #ffffff;
    border-radius: 10px; 
    padding: 10px 16px 10px 16px;
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.1); 
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    border-left: 4px solid #007bff; 
    font-size: 80%;
}

.content-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.content-item .header-area {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 8px;
}

.content-item .sub {
    font-size: 13px;
    font-weight: bold;
    color: #007bff;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 1px;
    margin-bottom: 3px;
}

.content-item .teb {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin-top: 3px;
    margin-bottom: 5px;
}

.content-item .chap-unit {
    font-size: 15px;
    color: #666;
    margin-bottom: 10px;
}

.content-item .chap-unit span {
    display: inline-block;
}

.content-item button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: flex-end;
    margin-top: auto;
}

.content-item button:hover {
    background-color: #1E88E5;
    transform: scale(1.05);
}

.content-item .learn-more {
    display: inline-block;
    margin-top: 3px;
    color: #007bff;
    font-weight: bold;
}

.content-item:hover .learn-more {
    text-decoration: underline;
}

#content-container2 {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin: 5px auto;
    max-width: 1800px;
    height: auto;
    max-height: calc(100vh - 420px);
    overflow-y: auto;
    overscroll-behavior-y: contain;
}

#selected-course-title {
    margin-bottom: 20px;
    color: #007bff;
}

#course-detail-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

#course-detail-table th,
#course-detail-table td {
    padding: 12px;
    text-align: left;
}

#course-detail-table thead {
    background-color: #f8f9fa;
}

#course-detail-table th {
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9em;
    color: #495057;
}

#course-detail-table tbody tr:hover {
    background-color: #f1f3f5;
}

.week-card {
    position: relative;
    margin-bottom: 12px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border: solid 4px #dadada;
}

.week-title {
    display: flex;
    align-items: center;
    font-size: 20px;
    font-weight: bold;
    gap: 2px;
    margin: 0 0 10px 0;
}

.week-index, .current-week-index, .dayoff-week-index {
    position: static;
    top: 15px;
    left: 10px;
    width: 30px;
    height: 30px;
    border-radius: 20%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 25px;
}

.week-index {
    background-color: #b4eaaf;  
    color: #2c7b41;
    font-weight: bold;
}

.current-week-index {
    background-color: #007bff;
    color: white;
    font-weight: bold;
}

.dayoff-week-index {
    background-color: #fdd835;
    color: #988325;
    font-weight: bold;
}

.week-number, .current-week-number, .dayoff-week-number {
    display: flex;
    align-items: center;
    margin: 0;
    font-size: 14px;
}

.week-number {
    color: #2c7b41;
    font-weight: bold;
}

.current-week-number {
    color: #007bff;
    font-weight: bold;
}

.dayoff-week-number {
    color: #988325  ;
    font-weight: bold;
}

.chap-title {
    font-size: 18px;
    color: #333;
    margin-left: 5px;
}

.units-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.unit-item {
    position: relative;
    background-color: #ffffff;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 4px solid #cfd7e0;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.unit-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.unit-index {
    position: absolute;
    top: 5px;
    left: 5px;
    width: 20px;
    height: 20px;
    background-color: #fdd835;
    color: #4e342e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: bold;
}

.unit-status {
    align-self: flex-start;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: bold;
    text-transform: uppercase;
}

.unit-title {
    margin: 0;
    font-size: 20px;
    font-weight: bold;
    color: #444;
    text-align: center;
    padding: 10px 15px 20px 15px;
}

.unit-item h4 {
    margin: 0 0 10px;
    font-size: 18px;
    color: #333;
}

.status-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: bold;
    text-transform: uppercase;
    width: 55px;
    text-align: center;
}

.status-start {
    background-color: #e6f7ff;  /* 밝은 하늘색 */
    color: #0066cc;  /* 진한 파란색 */
    font-size: 10px;
    border: 1px solid #91d5ff;  /* 테두리 추가 */
    padding: 2px 6px;
    border-radius: 12px;
}

.status-in-progress {
    background-color: #fff7e6;
    color: #d46b08;
    border: 1px solid #ffd591;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 12px;
}

.status-completed {
    background-color: #f6ffed;
    color: #389e0d;
    border: 1px solid #b7eb8f;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 12px;
    animation: completedPulse 2s;
    animation-iteration-count: 2;
}

.unit-item:hover .status-badge {
    transform: scale(1.15);
}

/* 각 상태별 hover 효과 */
.unit-item:hover .status-start {
    background-color: #d9f0ff;
    color: #0052a3;
    border-color: #69b5ff;
}

.unit-item:hover .status-in-progress {
    background-color: #fff0d9;
    color: #a85706;
    border-color: #ffbd5c;
}

.unit-item:hover .status-completed {
    background-color: #e8ffd9;
    color: #2d7e0a;
    border-color: #95d475;
}

.week-card.current-week {
    background-color: #d3e7ff;  /* 현재 주차의 배경색 */
    border-color: #90cbff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    animation: currentWeekBackgroundChange 4s ease-in-out infinite;
}

.week-card.current-week .week-title {
    color: #007bff;  /* 현재 주차 제목 색상 */
    font-weight: bold;
}

.week-card.current-week .week-index {
    background-color: #007bff;
    color: white;
}

@keyframes currentWeekBackgroundChange {
    0%, 100% {
        background-color: #d3e7ff;
    }
    50% {
        background-color: #e6f0ff;
    }
}


/* 과목별 색상 변경 */
/* 1. 수학 (파란색 계열) */
.content-item[data-subject="math"] {
    border-left-color: #2196F3;
}
.content-item[data-subject="math"] .sub {
    color: #2196F3;
}
.content-item[data-subject="math"] button {
    background-color: #2196F3;
}
.content-item[data-subject="math"] button:hover {
    background-color: #1E88E5;
}

/* 2. 과학 (초록색 계열) */
.content-item[data-subject="science"] {
    border-left-color: #4CAF50;
}
.content-item[data-subject="science"] .sub {
    color: #4CAF50;
}
.content-item[data-subject="science"] button {
    background-color: #4CAF50;
}
.content-item[data-subject="science"] button:hover {
    background-color: #45a049;
}

/* 3. 국어 (빨간색 계열) */
.content-item[data-subject="korean"] {
    border-left-color: #F44336;
}
.content-item[data-subject="korean"] .sub {
    color: #F44336;
}
.content-item[data-subject="korean"] button {
    background-color: #F44336;
}
.content-item[data-subject="korean"] button:hover {
    background-color: #E53935;
}

/* 4. 영어 (보라색 계열) */
.content-item[data-subject="english"] {
    border-left-color: #9C27B0;
}
.content-item[data-subject="english"] .sub {
    color: #9C27B0;
}
.content-item[data-subject="english"] button {
    background-color: #9C27B0;
}
.content-item[data-subject="english"] button:hover {
    background-color: #8E24AA;
}

/* 5. 사회 (주황색 계열) */
.content-item[data-subject="social"] {
    border-left-color: #FF9800;
}
.content-item[data-subject="social"] .sub {
    color: #FF9800;
}
.content-item[data-subject="social"] button {
    background-color: #FF9800;
}
.content-item[data-subject="social"] button:hover {
    background-color: #FB8C00;
}

/* 6. 역사 (갈색 계열) */
.content-item[data-subject="history"] {
    border-left-color: #795548;
}
.content-item[data-subject="history"] .sub {
    color: #795548;
}
.content-item[data-subject="history"] button {
    background-color: #795548;
}
.content-item[data-subject="history"] button:hover {
    background-color: #6D4C41;
}

/* 7. 음악 (분홍색 계열) */
.content-item[data-subject="music"] {
    border-left-color: #E91E63;
}
.content-item[data-subject="music"] .sub {
    color: #E91E63;
}
.content-item[data-subject="music"] button {
    background-color: #E91E63;
}
.content-item[data-subject="music"] button:hover {
    background-color: #D81B60;
}

/* 8. 미술 (청록색 계열) */
.content-item[data-subject="art"] {
    border-left-color: #009688;
}
.content-item[data-subject="art"] .sub {
    color: #009688;
}
.content-item[data-subject="art"] button {
    background-color: #009688;
}
.content-item[data-subject="art"] button:hover {
    background-color: #00897B;
}

/* 9. 체육 (연두색 계열) */
.content-item[data-subject="pe"] {
    border-left-color: #8BC34A;
}
.content-item[data-subject="pe"] .sub {
    color: #8BC34A;
}
.content-item[data-subject="pe"] button {
    background-color: #8BC34A;
}
.content-item[data-subject="pe"] button:hover {
    background-color: #7CB342;
}

/* 10. 컴퓨터 (회색 계열) */
.content-item[data-subject="bible"] {
    border-left-color: #607D8B;
}
.content-item[data-subject="bible"] .sub {
    color: #607D8B;
}
.content-item[data-subject="bible"] button {
    background-color: #607D8B;
}
.content-item[data-subject="bible"] button:hover {
    background-color: #546E7A;
}

/* 다른 과목들에 대해서도 비슷하게 정의 가능 */

.content-item p.completed {
    height: 36px; /* 버튼과 동일한 높이 설정 */
    line-height: 26px; /* 텍스트 세로 중앙 정렬 */
    padding: 5px 15px;
    border-radius: 5px;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
}

@keyframes initialPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(40, 167, 69, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
    }
}

.content-item.completed {
    opacity: 0.8;
    background-color: #f8f8f8;
}

.content-item.completed::after {
    content: '완료';
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #28a745;
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
}

.content-item.completed button {
    display: none;
}

.content-item.completed .sub,
.content-item.completed .teb,
.content-item.completed .chap-unit {
    opacity: 0.6;
}

@keyframes completedPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(189, 192, 190, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
    }
}

.content-item.completed {
    animation: completedPulse 2s infinite;
}

/* 각 과목별 완료 상태 스타일 */
.content-item[data-subject="math"].completed::after {
    background-color: #2196F3;
}

.content-item[data-subject="science"].completed::after {
    background-color: #4CAF50;
}

.content-item[data-subject="korean"].completed::after {
    background-color: #F44336;
}

.content-item[data-subject="english"].completed::after {
    background-color: #9C27B0;
}

.content-item[data-subject="social"].completed::after {
    background-color: #FF9800;
}

.content-item[data-subject="history"].completed::after {
    background-color: #795548;
}

.content-item[data-subject="music"].completed::after {
    background-color: #E91E63;
}

.content-item[data-subject="art"].completed::after {
    background-color: #009688;
}

.content-item[data-subject="pe"].completed::after {
    background-color: #8BC34A;
}

.content-item[data-subject="bible"].completed::after {
    background-color: #607D8B;
}

#footer {
    padding: 0 48px 0 16px;
    position: fixed;
    bottom: 0;
    width: 100%;
    transition: margin-left 0.5s;
}

footer {
    display: flex;
    justify-content: space-around;
    border-radius: 10px 10px 0 0;
    background-color: #f8f9fa;
    padding: 15px 0;
    width: 100%;
}

.footer-item {
    text-align: center;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.footer-item:hover {
    transform: scale(1.1);
}

.footer-item i {
    font-size: 24px;
    color: #007bff;
    margin-bottom: 5px;
    transition: color 0.3s ease;
}

.footer-item:hover i {
    color: #0056b3; /* 아이콘 색상 변경 (선택사항) */
}

@media screen and (max-height: 450px) {
    .sidebar {padding-top: 15px;}
    .sidebar a {font-size: 18px;}
}

@media (min-width: 1800px) {
    .content-item {
        width: calc(16.666% - 40px); /* 6개 아이템 */
    }
}

@media (max-width: 1440px) {
    #content-container2 {
        max-height: calc(100vh - 380px);
    }
    
    .content-item {
        width: calc(25% - 24px); /* 4개 항목으로 제한 */
    }
}

@media (min-width: 1600px) and (max-width: 1799px) {
    .content-item {
        width: calc(20% - 40px); /* 5개 아이템 */
    }
}

@media (min-width: 1250px) and (max-width: 1599px) {
    .content-item {
        width: calc(25% - 40px); /* 4개 아이템 */
    }
}

@media (max-width: 1200px) {
    #cuin-title {
        font-size: 1.5rem;
    }
    
    #current-date {
        font-size: 0.9rem;
    }
}

@media (max-width: 992px) {
    .content-item {
        width: calc(33.333% - 24px); /* 3개 항목으로 제한 */
    }
    
    #content-container2 {
        max-height: calc(100vh - 340px);
    }
}

@media (min-width: 769px) and (max-width: 1249px) {
    .content-item {
        width: calc(33.333% - 40px); /* 3개 아이템 */
    }
}

@media (min-width: 769px) {
    nav {
        max-height: none;
        opacity: 1;
        overflow: visible;
        border-radius: 10px 10px 0 0;
    }
    
    #navToggle {
        display: none;
    }
}

@media (max-width: 1439px) {
    #content-container2 {
        max-height: calc(2.7 * 190px + 20px); 
        -webkit-user-select: none; /* 텍스트 선택 방지 */
        user-select: none;
        cursor: default; /* 기본 커서 설정 */
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* Internet Explorer 10+ */
    }

    #content-container2::-webkit-scrollbar {
        display: none;
    }
}

@media (max-width: 768px) {
    header {
        height: 50px;
        padding: 8px 15px;
    }

    #content-container2 {
        padding: 15px;
        margin: 15px auto;
        max-height: calc(100vh - 300px);
    }

    #cuin-title {
        display: none;
    }

    #current-date {
        font-size: 0.8rem;
        padding-right: 10px;
    }

    .content {
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: auto;
    }

    .content.dragging {
        scroll-snap-type: none;
    }
    
    .content-item {
        width: calc(50% - 16px);
        flex: 0 0 40%;
        scroll-snap-align: center;
    }
    
    .arrow {
        display: none;
    }

    nav {
        display: flex !important;
        flex-direction: row;
        width: 100%;
        border-radius: 10px 10px 0 0;
    }
    
    nav a {
        flex: 1 0 40%; /* 2개씩 나열 */
        text-align: center;
    }
}

@media (max-width: 576px) {
    .content-item {
        flex: 0 0 100%;
        width: calc(100% - 16px);
    }

    #current-date {
        display: none;
    }

    #content-container2 {
        padding: 10px;
        margin: 10px auto;
    }

    .footer-item {
        font-size: 0px;
    }

    .header-icons i {
        font-size: 18px;
    }

    .sidebar {
        width: 0;
        padding-top: 15px;
    }

    .sidebar-text {
        display: none;
    }
}

@media screen and (min-width: 2560px) and (max-width: 2570px) {
    header {
        height: 70px;
    }
    
    #cuin-title {
        font-size: 2rem;
    }
    
    #current-date {
        position: relative;
        right: 50px; /* 우측으로 이동하여 겹침 방지 */
        font-size: 1.1rem;
    }
}

#content-container2::-webkit-scrollbar {
    width: 8px;
}

#content-container2::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

#content-container2::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

#content-container2::-webkit-scrollbar-thumb:hover {
    background: #555;
}

@media (max-width: 375px) {
    #current-date {
        font-size: 80%;
    }

    .header-icons i{
        font-size: 90%;
    }

    nav a {
        flex: 1 0 100%; /* 1개씩 나열 */
    }
}

@media (min-width: 1800px) {
    .unit-item {
        width: calc(16.666% - 8.333px);
    }
}

@media (min-width: 1600px) and (max-width: 1799px) {
    .unit-item {
        width: calc(16.64% - 8px);
    }
}

@media (min-width: 1250px) and (max-width: 1599px) {
    .unit-item {
        width: calc(19.95% - 7.5px);
    }
}

@media (min-width: 992px) and (max-width: 1249px) {
    .unit-item {
        width: calc(24.3% - 2px);
    }
}

@media (max-width: 991px) {
    .unit-item {
        width: calc(33% - 5px);
    }
}

@media (max-width: 711px) {
    .unit-item {
        width: calc(50% - 5px);
    }
}

@media (max-width: 576px) {
    .unit-item {
        width: 100%; /* 1개 아이템 */
    }
}

/* Modal styles */
.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.5);
    transition: opacity 0.5s ease;
    opacity: 0;
}

.modal.show {
    opacity: 1;
}

.modal-content {
    background-color: #fefefe;
    margin: 0;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    position: absolute;
    top: 0;
    right: -100%;
    bottom: 0;
    transition: right 0.5s ease;
    overflow-y: auto;
}

.modal.show .modal-content {
    right: 0;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
}

.semester-subject {
    margin-bottom: 20px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 5px;
}