* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Pretendard-Light';
    letter-spacing: 0.03em
}

body {
    background-color: #fff;
    height: 100vh;
    display: flex;
    overflow: hidden;
}

a:not(.terms) {
    text-decoration: none;
    color: #fff;
}

.layout {
    display: flex;
    width: 100%;
}



.login-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(to bottom right, rgba(0, 0, 0, 0.7), rgba(30, 30, 30, 0.7));
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease-out;
}

.modal {
    background: #fff;
    padding: 2.5rem;
    border-radius: 1.5rem;
    width: 600px;
    text-align: center;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
    animation: scaleUp 0.3s ease-out;
}

.login-modal p {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 1rem;
}

.login-modal .logo {
    width: 200px;
    margin-bottom: 1rem;
}

.login-modal span {
    font-size: 0.7rem;
}



.social-login {
    width: 100%;
    padding: 0.8rem;
    margin-top: 0.7rem;
    margin-bottom: 1rem;
    border-radius: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    font-size: 1rem;
    cursor: pointer;
    background-color: #f9f9f9;
    color: #333;
    border: 1px solid #ccc;
    transition: all 0.2s ease-in-out;
}

.social-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
    background-color: #fff;
}

.social-login img {
    width: 22px;
    height: 22px;
}

.hidden {
    display: none;
}

/* 애니메이션 효과 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes scaleUp {
    from {
        transform: scale(0.95);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}






/* ===== 왼쪽 사이드바 ===== */
.sidebar {
    width: 260px;
    min-width: 260px;
    height: 100vh;
    background-color: #f9fbff;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #dbe4ff;
    display: flex;
    gap: 2rem;
}

.logo {
    gap: 0.5rem;
}

.logo img {
    height: 40px;
}


.balance-section {
    background-color: #eef4ff;
    padding: 1rem;
    border-radius: 0.75rem;
    text-align: center;
}

.balance-label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.2rem;
}

.balance-amount {
    font-size: 1.4rem;
    font-weight: bold;
    color: #3366cc;
    margin-bottom: 0.6rem;
}

.charge-btn {
    background-color: #3366ff;
    color: #fff;
    border: none;
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.charge-btn:hover {
    background-color: #2b5edb;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

/* 인스턴스 섹션 제목 */
.sidebar span {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: -1rem;
    display: block;
}

/* 인스턴스 버튼 스타일 */
.sidebar-menu button,
.sidebar-menu a {
    display: flex;
    align-items: center;
    /* 세로 정렬 중앙 */
    gap: 0.5rem;
    padding: 0.4rem 0.2rem;
    font-size: 1rem;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    color: #333;
    border-radius: 0.4rem;
    overflow: hidden;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.sidebar-menu button img,
.sidebar-menu a img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    vertical-align: middle;
}

.sidebar-menu button:hover,
.sidebar-menu a:hover {
    color: #3366cc;
    background-color: #f0f4ff;
    text-decoration: none;
}






/* ===== 메인 콘텐츠 ===== */
.main-content {
    flex-grow: 1;
    padding: 1.5rem 2rem;
    overflow: auto;
    scroll-behavior: smooth;
}

.header {
    display: flex;
    justify-content: space-between;
    /* 좌우 정렬 */
    align-items: center;
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
    border-bottom: #c2d4ff solid 1px;
}

/* 완쪽 정렬된 부분 */
.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
}

/* 인스턴스 텍스트 */
.header h1 {
    font-size: 1.4rem;
    color: #333;
    margin-right: 1rem;
    font-weight: bold;
}

/* 오른쪽 정렬된 부분 */
.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.avatar {
    width: 30px;
    height: 30px;
    margin: 5px;
    border-radius: 50%;
    object-fit: cover;
}

.username {
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
    line-height: 40px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    height: 40px;
}



/********************** 메인 **********************/


/* 기본 목차 박스 스타일 */
.toc {
    position: fixed;
    height: calc(100vh - 290px);
    overflow-y: auto;
    top: 130px;
    right: 3rem;
    width: 310px;
    padding: 20px;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* 목차 제목 */
.toc h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: #111827;
    border-bottom: 1px solid #d1d5db;
    padding-bottom: 0.5rem;
}

/* 항목 목록 스타일 */
.toc ol {
    list-style: decimal;
    padding-left: 1.5rem;
    margin: 0;
    margin-bottom: -0.8rem;
}

/* 항목 링크 스타일 */
.toc li {
    margin-bottom: 0.8rem;
}

.toc a {
    text-decoration: none;
    color: #2563eb;
    font-weight: 500;
    transition: color 0.2s ease;
}

.toc a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}




.text-content {
    width: calc(100vw - 550px - 10rem);
    line-height: 180%;
    margin-left: 8px;
    margin-top: 3rem;
    margin-bottom: 1rem;
    word-break: keep-all;
    /* 영어는 break-all */
}

/* h2 제목 스타일 */
.text-content h2 {
    font-size: 1.4rem;
    color: #444;
    margin-top: 4rem;
    margin-bottom: 1rem;
    margin-left: -4px;
    font-weight: bold;
    scroll-margin-top: 25vh;
}

/* h3 소제목 스타일 */
.text-content h3 {
    font-size: 1.2rem;
    color: #555;
    margin-top: 2rem;
    margin-bottom: 0.8rem;
    font-weight: 600;
}

/* 볼드 텍스트 */
.text-content b {
    font-weight: 600;
    color: #333;
}

/* 단락 */
.text-content p {
    margin: 1rem 0;
    line-height: 160%;
}

/* 이미지 스타일 */
.text-content img {
    width: calc(50% - 3rem);
    height: auto;
    border-radius: 8px;
    margin: 0.5rem 0.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 순서 없는 리스트 */
.text-content ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

/* 순서 있는 리스트 */
.text-content ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

li {
    margin: 0.5rem 0;
    line-height: 140%;
}

/* 링크 스타일 */
.text-content a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

a:hover {
    text-decoration: underline;
}

/* 구분선 */
.text-content hr {
    border: none;
    height: 1px;
    background-color: #e5e7eb;
    margin: 2rem 0;
}

/* 유튜브 iframe */
.text-content iframe {
    max-width: 100%;
    border-radius: 8px;
    margin: 1.5rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 글 내비게이션 */
.post-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 4rem 0 2rem 0;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
    gap: 1rem;
}

.post-navigation a {
    padding: 0.6rem 1.2rem;
    border-radius: 0.5rem;
    background-color: #f1f5ff;
    color: #2563eb;
    font-weight: 500;
    text-decoration: none;
    transition: 0.2s;
}

.post-navigation a:hover {
    background-color: #e0e7ff;
}



/* blog-post.css */
.blog-post {
    display: flex;
    width: calc(100vw - 550px - 10rem);
    align-items: flex-start;
    gap: 20px;
    margin: 30px 0 40px;
    text-decoration: none;
    transition: background-color 0.2s ease, outline 0.2s ease;
}

.this, .blog-post:hover {
    background-color: #ebf0ff;
    outline: #ebf0ff 12px solid;
    border-radius: 8px;
    text-decoration: none;
}

.post-thumb {
    height: 135px;
    width: 135px;
    /* 이미지 줄임 */
    border-radius: 6px;
    object-fit: cover;
    border: #ddd 1px solid;
    background-color: #eee;
}

.post-content {
    flex: 1;
}

.post-title {
    color: #000;
    font-size: 20px;
    font-weight: bold;
    margin: 9px 0 8px 0;
}

.post-meta {
    font-size: 14px;
    color: #666;
    margin: 0 0 14px 0;
}

.post-desc {
    font-size: 16px;
    color: #333;
}








@media (max-width: 768px) {
    .sidebar {
        width: 70vw;
        height: 100vh;
        background-color: #ecf1ff;
        z-index: 999999999999;
        position: fixed;
        left: -75vw;

        transition: 0.4s;
    }

    .sidebar-backdrop {
        position: fixed;
        width: 100vw;
        height: 100vh;
        background-color: black;
        opacity: 0.5;
        z-index: 99999;
    }

    .toc {
        display: none;
    }

    .header {
        margin-bottom: 0;
    }

    .text-content {
        width: calc(100%);
        margin: 0;
        margin-top: -2rem;
    }
    
    iframe {
        margin-top: -1rem;
        width: calc(100%);
        height: calc((100vw - 64px) / 16 * 9);
    }

    .modal {
        width: 85vw;
    }
}





@font-face {
    font-family: 'Pretendard-Light';
    src: url('/Pretendard-Light.woff') format('woff');
    font-weight: 400;
    font-style: normal;
}