/* CSS Reset
* http://meyerweb.com/eric/tools/css/reset/ 
* v2.0 | 20110126
* License: none (public domain)
*/

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 100%;
	font: inherit;
	vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
	display: block;
}
body {
	line-height: 1;
}
ol, ul {
	list-style: none;
}
blockquote, q {
	quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
	content: '';
	content: none;
}
table {
	border-collapse: collapse;
	border-spacing: 0;
}



/* color */
:root {
    --bgColor: rgba(255, 255, 255, 1);
    --CnuDarkBlue: rgba(0, 28, 84, 1);
    --CnuBlue: rgba(3, 78, 162, 1);
    --CnuSkyBlue: rgba(0, 114, 188, 1);
    --CnuLightBlue: rgba(0, 161, 228, 1);
    --CnuYellow: rgba(253, 185, 19, 1);
    --CnuOrange: rgba(247, 148, 29, 1);
    --Pantone877C: rgba(188, 190, 192, 1);
    --Pantone871C: rgba(179, 161, 119, 1);
}



/* body */
body{ 
    background-color: var(--bgColor);
    font-family: "Noto Sans KR", "Nanum Gothic", sans-serif;
    font-optical-sizing: auto;
    height: 100vh;
}



/* Page Loading */
.loading-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s linear;
}

.loading-page.show {
    opacity: 1;
    visibility: visible;
}

.loading-page::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--Pantone877C);
    opacity: 0.5; /* 배경에만 투명도 적용 */
    z-index: -1; /* 배경이 텍스트 및 자식 요소 뒤에 있도록 설정 */
}

.loading-spinner {
    border: 4px solid transparent;
    border-top: 4px solid var(--CnuDarkBlue);
    border-right: 4px solid var(--CnuSkyBlue);
    border-bottom: 4px solid var(--CnuBlue);
    border-left: 4px solid var(--CnuLightBlue);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}



/* Radio Btn */
.custom-radio {
    position: relative;
    padding-left: 30px;
    margin-right: 15px;
    cursor: pointer;
    display: inline-block;
    font-size: 16px;
    color: #333;
    user-select: none;
}

.custom-radio input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.radio-btn {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: var(--bgColor);
    border-radius: 50%;
    border: 2px solid #ddd;
    transition: transform 0.2s ease, border 0.2s ease;
}

.custom-radio input:checked ~ .radio-btn {
    transform: scale(1.3);
    border-color: var(--CnuDarkBlue);
}

.custom-radio input:checked ~ .radio-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(246, 87, 87, 0.6) 60%, transparent 60%);
    border-radius: 50%;
    animation: explode 0.3s ease-out forwards;
    opacity: 0;
}

@keyframes explode {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(2.5);
        opacity: 0;
    }
}



/* btn */
.scale-button {
    background-color: var(--CnuBlue);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scale-button:disabled {
    background-color: #cccccc;
    color: #666666;
    cursor: not-allowed;
    opacity: 0.5;
    transform: none;
}

.scale-button:not(:disabled):hover {
    background-color: var(--CnuDarkBlue);
    transform: scale(1.05);
}

.admin-button {
    background-color: var(--CnuLightBlue);
}

.admin-button:not(:disabled):hover {
    background-color: var(--CnuSkyBlue);
}



/* Toast Notification */
#toast-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 10000;
}

.custom-toast {
    background-color: var(--CnuLightBlue);
    color: white;
    padding: 1rem 2rem;
    margin-top: 10px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateX(-100%);
    transition: opacity 0.5s ease, transform 0.5s ease-out;
    position: absolute;
    display: inline-block;
    font-size: 1.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100vw - 40px);
}

.custom-toast-show {
    opacity: 1;
    transform: translateX(0);
}

.warning-toast {
    background-color: var(--CnuOrange);
}



/* Nav */
#nav {
    box-shadow: 0 4px 2px -2px gray; /* 하단에만 그림자가 생기도록 설정 */
    z-index: 10; /* 다른 요소 위에 표시되도록 우선순위를 높임 */
    background-color: white; /* nav 배경색이 명확히 보이도록 설정 */
    position: sticky; /* 스크롤 시 상단에 고정 */
    top: 0; /* 상단에 위치 */
}

#nav img {
    margin-left: 3rem;
    height: 35px;
}

.nav-btns {
    padding-right: 3rem;
    display: flex;
    justify-content: right;
    gap: 1rem;
}

.nav-btns button {
    width: 120px;
    height: 35px;
}

.welcome-message {
    display: flex;
    align-items: center;
    margin-right: 2rem;
    color: var(--Pantone877C);
}



/* Search Section */
.search-controls {
    margin: 2rem auto;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    color: var(--CnuDarkBlue);
    text-align: center;

    /* Flexbox settings */
    display: flex;
    flex-direction: row; /* Horizontal layout */
    justify-content: center; /* Center items horizontally */
    align-items: center; /* Center items vertically */
    gap: 3rem; /* Space between items */
}

.search-item {
    flex: 1; /* Allow items to grow and take equal space */
    max-width: 400px; /* Increase maximum width */
    text-align: left; /* Align text to the left for better readability */
}

.search-button {
    max-width: 100px; /* Reduce the maximum width for the button */
    flex: none; /* Ensure the button does not grow like the other items */
}



/* 깃허브 page용 경고 메시지 */
#github-message {
    display: none;
    position: fixed;
    bottom: 10px;
    right: 10px;
    line-height: 1.2rem;
    background-color: rgba(255, 255, 255, 0.7); /* 반투명한 흰색 배경 */
    color: black;
    padding: 10px;
    border-radius: 5px;
    font-size: 14px;
    z-index: 9999; /* 다른 콘텐츠 위에 표시되도록 z-index 설정 */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); /* 그림자 효과 */
}

#force-login {
    color: var(--CnuBlue);
    cursor: pointer;
    font-weight: bold;
}
