:root {
    --primary-color: white;
    --accent-color: #e74c3c;
    /* 빨간색 강조용 */
    --bg-color: #000000;
    --bg-navBar: #151515;
    --white: #ffffff;
    --text-main: #334155;
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

/* 기초 설정 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Pretendard', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
}

.image-container {
    max-width: 1100px;   /* 최대 1100px */
    width: 100%;
    margin: 0 auto;      /* 가운데 정렬 */
}

.image-container img {
    width: 100%;         /* 컨테이너 너비에 맞춤 */
    height: auto;        /* 비율 유지 */
    display: block;
}

/* [PC] 헤더 레이아웃 */
.header {
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.46);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5.7px);
    -webkit-backdrop-filter: blur(5.7px);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1200px;
    padding: 0 30px;
}

/* 메뉴 리스트 공통 */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 15px;
    flex: 1;
    align-items: center;
}

.left-menu {
    justify-content: flex-start;
}

.right-menu {
    justify-content: flex-end;
}

/* 메뉴 아이템 스타일 */
.menu-item {
    padding: 10px 15px;
    cursor: pointer;
    transition: 0.2s;
    font-size: 1rem;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    display: flex;
    align-items: center;
    color: var(--white);
}

.menu-item:hover {
    color: var(--white);
}

.menu-item.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* 설정(Admin) 메뉴 숨기기 */
#admin-menu {
    display: none !important;
}

/* [핵심 수정] 로그아웃 버튼: 빨간색 배경 + 흰색 글자 + 우측 끝 배치 */
.logout-btn {
    background-color: var(--accent-color);
    /* 빨간색 배경 */
    color: var(--white);
    /* 흰색 글자 */
    padding: 8px 18px;
    border: none;
    border-radius: 6px;
    /* 모서리 둥글게 */
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background-color 0.3s, transform 0.2s;
    white-space: nowrap;
    /* 왼쪽 여백을 자동으로 채워 버튼을 오른쪽 끝으로 밀어냄 */
    margin-left: auto;
    box-shadow: 0 2px 4px rgba(231, 76, 60, 0.2);
}

.logout-btn:hover {
    background-color: #c0392b;
    /* 호버 시 조금 더 어두운 빨간색 */
    transform: translateY(-1px);
    /* 약간 위로 떠오르는 효과 */
}

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

/* 로고 영역 */
.logo-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 40px;
    overflow: hidden;
}

.logo-area img {
    filter: invert(1);
}

#header-logo {
    width: 140px;
    cursor: pointer;
    transition: transform 0.2s;
}

#header-logo:hover {
    transform: scale(1.05);
}

#admin-tag {
    font-size: 0.7rem;
    background: var(--accent-color);
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    margin-top: 5px;
}

/* 메인 컨텐츠 및 캘린더 */
.main-container {
    width: 100%;
    display: block;
}

.content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px;
}

.content-header {
    color: white;
    margin-bottom: 16px;
    padding-inline: 16px;
}

.calendar-container {
    background: transparent;
    padding: 30px;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    color: white;
}

.calendar-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 4px;

    background: linear-gradient(135deg,
            #FFA496,
            #FD4267,
            #3F6DDD,
            #FFA496);
    filter: saturate(1.2);
}

.calendar-table thead th {
    padding: 10px;
    /* 헤더는 그라데이션 배경이 보이지 않도록 기본 배경색 사용 */
    background-color: var(--bg-color);
    color: var(--white);
    font-weight: 600;
    margin-bottom: 16px;
    border: none;
    /* 헤더에는 테두리 제거 */
}

/* 요일행(1행) 경계(그라데이션)만 안 보이게 덮기 */
.calendar-table thead {
    position: relative;
}

.calendar-table thead::after {
    content: "";
    position: absolute;

    /* 위 + 좌우만 덮기 */
    top: -4px;
    left: -4px;
    right: -4px;

    /* 아래는 덮지 않음 */
    bottom: 0px;

    background: var(--bg-color);
    z-index: 0;
    pointer-events: none;
}

.calendar-table thead th {
    position: relative;
    z-index: 1;
}

.calendar-table thead tr {
    border-spacing: 0;
}


.calendar-table td {
    height: 100px;
    /* 셀 자체에는 테두리 없음; 배경색을 채워서 그라데이션이 셀 간격으로 보이게 함 */
    background: var(--bg-color);
    cursor: pointer;
    vertical-align: top;
    padding: 10px;
    position: relative;

}


/* 오늘 날짜 강조
.today {
    border: 2px solid var(--primary-color) !important;
    font-weight: bold;
}

.today span {
    color: var(--primary-color);
} */

.calendar-bar-container {
    display: flex;
    flex-direction: column;
    margin-top: 5px;
}

.calendar-bar {
    height: 4px;
    border-radius: 2px;
    width: 100%;
}

.bar-task {
    background-color: #3498db;
}

.bar-event {
    background-color: #f39c12;
}

.bar-etc {
    background-color: #94a3b8;
}

.course-card {
    background: var(--white);
    padding: 24px;
    border-radius: 16px;
    border-top: 4px solid var(--primary-color);
    box-shadow: var(--shadow-md);
    margin-bottom: 20px;
}

.nav-btn{
    background: transparent;
    border: none;
    color: var(--white);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px 12px;
}


/* 모달 스타일 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    width: 320px;
    text-align: center;
}

.modal-content input {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

#login-submit {
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 10px;
}

/* ------------------------------------------------------
   모바일 최적화 (768px 이하) - 한 줄 가로 스크롤 레이아웃
   ------------------------------------------------------ */
@media screen and (max-width: 768px) {

    /* 헤더 높이 고정 */
    .header {
        height: 58px;
        padding: 0;
    }

    /* nav-container: 단일 가로 행, 오버플로우 시 스크롤 */
    .nav-container {
        max-width: 100%;
        padding: 0;
        display: flex;
        justify-content: space-between;
        overflow-y: hidden;
        scrollbar-width: none;
        gap: 0;
        padding-inline: 32px;
    }

    .nav-container::-webkit-scrollbar {
        display: none;
    }

    /* 로고: 맨 앞으로, 왼쪽에 sticky 고정 */
    .logo-area {
        order: 1;
        position: sticky;
        left: 0;
        z-index: 10;
        margin: 0;
        padding: 0 12px;
        flex-shrink: 0;
        height: 64px;
        overflow: hidden;
        justify-content: center;
    }

    #header-logo {
        width: auto;
        max-height: 36px;
    }

    /* 왼쪽 메뉴: 로고 다음 */
    .left-menu {
        order: 2;
        flex: none;
        justify-content: flex-start;
        gap: 0;
        overflow-x: visible;
        padding-bottom: 0;
        scrollbar-width: unset;
    }

    .left-menu::-webkit-scrollbar {
        display: unset;
    }

    /* 오른쪽 메뉴: 왼쪽 메뉴 다음, 끝에 여백 */
    .right-menu {
        order: 3;
        flex: none;
        justify-content: flex-start;
        gap: 0;
        padding-right: 15px;
    }

    /* 메뉴 아이템 크기 축소 */
    .menu-item {
        font-size: 0.82rem;
        padding: 8px 11px;
        white-space: nowrap;
    }

    /* 로그아웃 버튼 */
    .logout-btn {
        margin-left: 8px;
        font-size: 0.78rem;
        padding: 6px 11px;
        flex-shrink: 0;
    }

    /* 컨텐츠 영역 */
    .content {
        padding: 20px 10px;
    }

    .calendar-container {
        padding: 10px 5px;
    }

    .calendar-table td {
        height: 65px;
        padding: 5px;
        font-size: 0.75rem;
    }
}