* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
    background-color: #1a1a1a;
    color: #e0e0e0;
}

/* 최상단 헤더 바 */
.top-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: #1e1e1e;
    border-bottom: 2px solid #333;
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 15px;
    z-index: 1600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.admin-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* 햄버거 메뉴 */
.hamburger-menu {
    position: relative;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    padding: 8px;
    background-color: #2d2d2d;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.hamburger-menu:hover {
    background-color: #3d3d3d;
}

.hamburger-menu span {
    width: 100%;
    height: 3px;
    background-color: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* 관리자 아이콘 버튼 */
.admin-icon-btn,
.logout-btn {
    width: 40px;
    height: 40px;
    background-color: #2d2d2d;
    border: none;
    border-radius: 8px;
    color: #e0e0e0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.admin-icon-btn:hover,
.logout-btn:hover {
    background-color: #3d3d3d;
    color: #4a9eff;
}

.admin-icon-btn.active {
    background-color: #4a9eff;
    color: white;
}

/* 공지사항 버튼 - 초록색 */
#noticeManageBtn {
    background-color: #2e7d32;
}

#noticeManageBtn:hover {
    background-color: #388e3c;
    color: white;
}

/* 진행도 버튼 - 보라색 */
#progressManageBtn {
    background-color: #7b1fa2;
}

#progressManageBtn:hover {
    background-color: #8e24aa;
    color: white;
}

.logout-btn {
    background-color: #d32f2f;
}

.logout-btn:hover {
    background-color: #c62828;
    color: white;
}

/* 사이드바 */
.sidebar {
    position: fixed;
    top: 60px;
    left: -320px;
    width: 320px;
    height: calc(100vh - 60px);
    background-color: #242424;
    box-shadow: 2px 0 10px rgba(0,0,0,0.5);
    transition: left 0.3s ease;
    z-index: 1700;
    overflow-y: auto;
    overflow-x: hidden;
}

/* 사이드바 스크롤바 스타일 */
.sidebar::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-track {
    background: #1e1e1e;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #4a9eff;
    border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #6ab7ff;
}

.sidebar.active {
    left: 0;
}

.sidebar-header {
    padding: 20px;
    background-color: #1e1e1e;
    color: #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-icons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.admin-btn {
    background: none;
    border: none;
    color: #e0e0e0;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.admin-btn:hover {
    background-color: #2d2d2d;
    color: #4a9eff;
}

.admin-btn.active {
    color: #4a9eff;
}

.sidebar-header h2 {
    font-size: 20px;
    font-weight: 600;
}

/* 사이드바 홈 버튼 */
.sidebar-home-btn {
    cursor: pointer;
    transition: color 0.2s;
}

.sidebar-home-btn:hover {
    color: #4a9eff;
}

.close-btn {
    background: none;
    border: none;
    color: #e0e0e0;
    font-size: 32px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    opacity: 0.8;
}

/* 대단원 리스트 */
.main-chapters {
    list-style: none;
    padding: 0;
}

.main-chapters > li {
    border-bottom: 1px solid #333;
}

.chapter-title {
    padding: 16px 20px;
    cursor: pointer;
    font-weight: 500;
    color: #e0e0e0;
    transition: all 0.2s ease;
    position: relative;
}

.chapter-title:hover {
    background-color: #2d2d2d;
    color: #4a9eff;
}

.chapter-title::after {
    content: '▶';
    position: absolute;
    right: 20px;
    transition: transform 0.3s ease;
    font-size: 12px;
    color: #666;
}

.main-chapters > li.expanded .chapter-title::after {
    transform: rotate(90deg);
}

/* 소단원 리스트 */
.sub-chapters {
    list-style: none;
    background-color: #1e1e1e;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.main-chapters > li.expanded .sub-chapters {
    max-height: 2500px;
}

.sub-chapters li {
    padding: 12px 20px 12px 40px;
    cursor: pointer;
    color: #b0b0b0;
    border-bottom: 1px solid #2a2a2a;
    transition: all 0.2s ease;
}

.sub-chapters li:hover {
    background-color: #2a2a2a;
    color: #e0e0e0;
    padding-left: 45px;
}

.sub-chapters li:last-child {
    border-bottom: none;
}

/* 메인 콘텐츠 */
.content {
    margin-left: 0;
    padding: 80px 40px 40px;
    min-height: 100vh;
    transition: margin-left 0.3s ease, padding-top 0.3s ease;
}

/* 관리자 모드일 때 콘텐츠 상단 패딩 추가 */
body.admin-mode .content {
    padding-top: 180px;
}

.welcome-message {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 30px;
}

/* 대시보드 헤더 */
.dashboard-header {
    text-align: center;
    margin-bottom: 40px;
}

.dashboard-header h1 {
    font-size: 42px;
    color: #e0e0e0;
    margin-bottom: 10px;
    font-weight: 700;
}

.dashboard-subtitle {
    font-size: 18px;
    color: #888;
}

/* 빠른 시작 카드 */
.quick-start-card {
    text-align: center;
    margin: 40px 0;
    padding: 0;
}

.quick-start-card p {
    font-size: 24px;
    color: #ffffff;
    margin: 0;
    font-weight: 500;
    line-height: 1.5;
}

.quick-start-card .menu-icon {
    color: #ffffff;
    font-size: 28px;
    font-weight: 700;
    display: inline-block;
    margin: 0 5px;
}

/* 대시보드 진행도 버튼 */
.dashboard-progress-btn {
    display: inline-block;
    background: transparent;
    color: #4a9eff;
    border: 1px solid #4a9eff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-left: 10px;
    vertical-align: middle;
}

.dashboard-progress-btn:hover {
    background: #4a9eff;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(74, 158, 255, 0.3);
}

/* 진행도 그래프 바 */
.progress-chart-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.progress-chart-label {
    min-width: 150px;
    color: #e0e0e0;
    font-size: 14px;
    text-align: right;
}

.progress-chart-bar-bg {
    flex: 1;
    height: 30px;
    background: #1e1e1e;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.progress-chart-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
}

.progress-chart-count {
    color: white;
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
}

/* 진행도 테이블 */
.progress-table-item {
    background: #1e1e1e;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    border: 1px solid #3a3a3a;
}

.progress-table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.progress-table-title {
    color: #e0e0e0;
    font-weight: 600;
    font-size: 15px;
}

.progress-table-actions {
    display: flex;
    gap: 8px;
}

.progress-add-btn {
    background: #7b1fa2;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.progress-add-btn:hover {
    background: #8e24aa;
}

.progress-table-dates {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.progress-date-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background: #2a2a2a;
    border-radius: 6px;
}

.progress-date-text {
    flex: 1;
    color: #b0b0b0;
    font-size: 14px;
}

.progress-date-row button {
    padding: 4px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
}

.progress-edit-btn {
    background: #2e7d32;
    color: white;
}

.progress-edit-btn:hover {
    background: #388e3c;
}

.progress-delete-btn {
    background: #d32f2f;
    color: white;
}

.progress-delete-btn:hover {
    background: #c62828;
}

/* 대시보드 섹션 */
.dashboard-section {
    background: #1e1e1e;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid #333;
}

.dashboard-section h2 {
    font-size: 22px;
    color: #e0e0e0;
    margin-bottom: 20px;
    font-weight: 600;
}

/* 진행도 그리드 */
.progress-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.progress-card {
    background: #2a2a2a;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid #3a3a3a;
}

.progress-icon {
    font-size: 32px;
}

.progress-info {
    flex: 1;
}

.progress-label {
    font-size: 13px;
    color: #888;
    margin-bottom: 5px;
}

.progress-value {
    font-size: 24px;
    color: #4a9eff;
    font-weight: 700;
}

/* 진행률 바 */
.progress-bar-container {
    background: #2a2a2a;
    border-radius: 10px;
    height: 30px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    height: 100%;
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
}

/* 공지사항 */
.notice-list {
    color: #b0b0b0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.notice-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border-left: 3px solid #4a9eff;
}

.notice-date {
    font-size: 12px;
    color: #888;
    font-weight: 500;
}

.notice-content {
    color: #e0e0e0;
    line-height: 1.6;
    white-space: pre-wrap; /* 엔터 반영 */
    word-wrap: break-word;
}

.notice-empty {
    text-align: center;
    padding: 20px;
    color: #666;
}

/* 업데이트 리스트 */
.update-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.update-item {
    display: flex;
    gap: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #333;
    align-items: center;
}

.update-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.update-date {
    font-size: 13px;
    color: #4a9eff;
    font-weight: 600;
    min-width: 130px;
    flex-shrink: 0;
}

.update-content {
    flex: 1;
}

.update-content strong {
    display: block;
    font-size: 16px;
    color: #e0e0e0;
    margin-bottom: 10px;
}

.update-content ul {
    margin: 0;
    padding-left: 20px;
}

.update-content li {
    color: #b0b0b0;
    margin-bottom: 5px;
    line-height: 1.6;
}

.welcome-message h1 {
    font-size: 48px;
    color: #e0e0e0;
    margin-bottom: 20px;
    font-weight: 700;
}

.welcome-message p {
    font-size: 18px;
    color: #888;
}

/* 반응형 */
@media (max-width: 768px) {
    .welcome-message {
        padding: 0 20px;
        margin: 20px auto;
    }
    
    .dashboard-header h1 {
        font-size: 32px;
    }
    
    .progress-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .update-item {
        flex-direction: column;
        gap: 10px;
    }
}

/* 반응형 */
@media (max-width: 768px) {
    .sidebar {
        width: 280px;
        left: -280px;
    }
    
    .content {
        padding: 80px 15px 20px;
    }
    
    .welcome-message h1 {
        font-size: 32px;
    }
    
    .welcome-message p {
        font-size: 16px;
    }
    
    .chapter-main-title {
        font-size: 28px;
    }
    
    .content-section {
        padding: 20px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .content-section h2 {
        font-size: 22px;
    }
}

/* 스크롤바 스타일 */
.sidebar::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-track {
    background: #1e1e1e;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 챕터 콘텐츠 */
.chapter-content {
    max-width: 1200px;
    margin: 0 auto;
}

.chapter-main-title {
    font-size: 42px;
    color: #e0e0e0;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 3px solid #4a9eff;
}

.content-section {
    background: #242424;
    padding: 30px;
    margin-bottom: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    scroll-margin-top: 80px;
    overflow-x: auto;
}

.content-section h2 {
    font-size: 28px;
    color: #e0e0e0;
    margin-bottom: 20px;
}

.section-content {
    line-height: 1.8;
    color: #ffffff;
}

.section-content p {
    margin-bottom: 15px;
}

/* 편집 가능 콘텐츠 */
.section-content[contenteditable="true"] {
    border: 2px dashed #4a9eff;
    padding: 20px;
    min-height: 200px;
    cursor: text;
}

.section-content[contenteditable="true"]:focus {
    outline: none;
    border-color: #6ab7ff;
    background-color: #1e1e1e;
}

/* 삽입된 이미지 스타일 */
.section-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 10px 0;
    display: block;
}

.section-content img.selected {
    outline: 3px solid #4a9eff;
}

/* 이미지 크기 조절 핸들 */
.image-resizer {
    position: relative;
    display: inline-block;
    max-width: 100%;
}

.image-resizer img {
    display: block;
}

.image-resizer.resizing {
    outline: 2px solid #4a9eff;
}

.resize-handle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #4a9eff;
    border: 1px solid white;
    border-radius: 50%;
    cursor: nwse-resize;
}

.resize-handle.bottom-right {
    bottom: -5px;
    right: -5px;
}

/* 표 스타일 */
.section-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 15px 0;
}

.section-content table td, 
.section-content table th {
    border: 1px solid #444;
    padding: 10px;
    color: #e0e0e0;
    word-wrap: break-word;
    vertical-align: top;
}

.section-content table th {
    background-color: #2d2d2d;
    font-weight: 600;
}

@media (max-width: 768px) {
    .chapter-main-title {
        font-size: 32px;
    }
    
    .content-section {
        padding: 20px;
    }
    
    .content-section h2 {
        font-size: 22px;
    }
    
    /* 모바일에서 표를 60%로 축소 */
    .section-content table {
        transform-origin: left top;
        transform: scale(0.6);
        margin-bottom: 20px;
    }
    
    /* 표 안의 글자는 95%로 축소 */
    .section-content table td,
    .section-content table th,
    .section-content table p,
    .section-content table div,
    .section-content table font {
        font-size: 0.95em !important;
    }
}

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

.modal.active {
    display: flex;
}

.modal-content {
    background-color: #242424;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    max-width: 400px;
    width: 90%;
}

/* 모달 닫기 버튼 */
.modal-close-btn {
    background: none;
    border: none;
    color: #888;
    font-size: 32px;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    line-height: 1;
}

.modal-close-btn:hover {
    background: #3a3a3a;
    color: #fff;
}

/* 진행도 체크 아이템 */
.progress-check-item {
    background: #2a2a2a;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #3a3a3a;
}

.progress-check-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.progress-check-header input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.progress-check-header label {
    flex: 1;
    color: #e0e0e0;
    font-weight: 600;
    cursor: pointer;
}

.progress-dates {
    margin-top: 10px;
    padding-left: 30px;
}

.progress-dates select {
    width: 100%;
    padding: 8px;
    background: #1e1e1e;
    border: 1px solid #3a3a3a;
    border-radius: 6px;
    color: #e0e0e0;
    margin-bottom: 8px;
}

.progress-date-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px;
    background: #1e1e1e;
    border-radius: 6px;
    margin-bottom: 5px;
}

.progress-date-item span {
    color: #b0b0b0;
    font-size: 14px;
}

.progress-date-item button {
    background: #d32f2f;
    border: none;
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.progress-date-item button:hover {
    background: #c62828;
}

/* 공지사항 아이템 */
.notice-manage-item {
    background: #2a2a2a;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #3a3a3a;
}

.notice-manage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.notice-manage-date {
    color: #4a9eff;
    font-size: 13px;
    font-weight: 600;
}

.notice-manage-actions {
    display: flex;
    gap: 8px;
}

.notice-manage-actions button {
    padding: 4px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.notice-edit-btn {
    background: #7b1fa2;
    color: white;
}

.notice-edit-btn:hover {
    background: #8e24aa;
}

.notice-delete-btn {
    background: #d32f2f;
    color: white;
}

.notice-delete-btn:hover {
    background: #c62828;
}

.notice-manage-content {
    color: #b0b0b0;
    line-height: 1.6;
    white-space: pre-wrap;
}

.notice-manage-content textarea {
    width: 100%;
    min-height: 60px;
    padding: 10px;
    background: #1e1e1e;
    border: 1px solid #3a3a3a;
    border-radius: 6px;
    color: #e0e0e0;
    font-family: inherit;
    resize: vertical;
}

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

.modal.active {
    display: flex;
}

.modal-content {
    background-color: #242424;
    padding: 30px;
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.modal-content h3 {
    color: #e0e0e0;
    margin-bottom: 10px;
    font-size: 24px;
}

.modal-content p {
    color: #888;
    margin-bottom: 20px;
}

.modal-content input[type="password"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #444;
    border-radius: 6px;
    background-color: #1a1a1a;
    color: #e0e0e0;
    font-size: 16px;
    margin-bottom: 20px;
}

.modal-content input[type="password"]:focus {
    outline: none;
    border-color: #4a9eff;
}

.modal-buttons {
    display: flex;
    gap: 10px;
}

.btn-primary, .btn-secondary {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background-color: #4a9eff;
    color: white;
}

.btn-primary:hover {
    background-color: #3a8eef;
}

.btn-secondary {
    background-color: #444;
    color: #e0e0e0;
}

.btn-secondary:hover {
    background-color: #555;
}

/* 에디터 툴바 */
.editor-toolbar {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background-color: #1e1e1e;
    padding: 12px 20px;
    border-bottom: 2px solid #333;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
    z-index: 1500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.toolbar-group {
    display: flex;
    gap: 5px;
    align-items: center;
    padding: 4px;
    border-radius: 6px;
    background-color: #242424;
}

.toolbar-label {
    font-size: 13px;
    color: #888;
    margin-right: 5px;
}

.toolbar-btn {
    background-color: #2d2d2d;
    border: 1px solid #444;
    color: #e0e0e0;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toolbar-btn:hover {
    background-color: #3d3d3d;
    border-color: #4a9eff;
}

.toolbar-btn.active {
    background-color: #4a9eff;
    border-color: #4a9eff;
}

.highlight-btn {
    width: 28px;
    height: 28px;
    border: 2px solid #444;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.highlight-btn:hover {
    transform: scale(1.1);
    border-color: #e0e0e0;
}

/* 셀 배경색 버튼 */
.cell-bg-btn {
    width: 28px;
    height: 28px;
    border: 2px solid #444;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.cell-bg-btn:hover {
    transform: scale(1.1);
    border-color: #e0e0e0;
}

#fontFamily, #fontSize {
    background-color: #2d2d2d;
    border: 1px solid #444;
    color: #e0e0e0;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

#fontFamily:focus, #fontSize:focus {
    outline: none;
    border-color: #4a9eff;
}

.btn-save {
    background-color: #4caf50;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-save:hover {
    background-color: #45a049;
}

/* 편집 가능 콘텐츠 */
.section-content[contenteditable="true"] {
    border: 2px dashed #4a9eff;
    padding: 20px;
    min-height: 200px;
    cursor: text;
}

.section-content[contenteditable="true"]:focus {
    outline: none;
    border-color: #6ab7ff;
    background-color: #1e1e1e;
}

/* 삽입된 이미지 스타일 */
.section-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 10px 0;
}

.section-content img.selected {
    outline: 3px solid #4a9eff;
}

/* 표 스타일 */
.section-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 15px 0;
}

.section-content table td, 
.section-content table th {
    border: 1px solid #444;
    padding: 10px;
    color: #e0e0e0;
}

.section-content table th {
    background-color: #2d2d2d;
    font-weight: 600;
}

/* 폰트 색상 버튼 */
.color-btn {
    width: 28px;
    height: 28px;
    border: 2px solid #444;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.color-btn:hover {
    transform: scale(1.1);
    border-color: #e0e0e0;
}

/* 화살표/기호 버튼 */
.arrow-btn {
    background: #2d2d2d;
    color: #e0e0e0;
    border: 1px solid #444;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 15px;
    transition: all 0.2s;
    min-width: 32px;
}

.arrow-btn:hover {
    background: #3d3d3d;
    border-color: #4a9eff;
    transform: translateY(-1px);
}

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

/* 로그인 유지 체크박스 */
.remember-login {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.remember-login input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.remember-login label {
    color: #e0e0e0;
    font-size: 14px;
    cursor: pointer;
    user-select: none;
}


.content-section h2 {
    font-size: 28px;
    color: #e0e0e0;
    margin-bottom: 20px;
}


.section-content table th,
.section-content table td {
    position: relative;
    cursor: text;
}


body.admin-mode .section-content table th,
body.admin-mode .section-content table td {
    min-width: 20px;
    box-sizing: border-box;
    white-space: normal;
    word-break: break-all;
    overflow-wrap: anywhere;
}

/* 간단한 표 편집 모드 */
body.admin-mode .section-content table {
    cursor: default;
}

body.admin-mode .section-content table th,
body.admin-mode .section-content table td {
    min-width: 30px;
    cursor: text;
}

/* 표 셀 호버 시 강조 */
body.admin-mode .section-content table th:hover,
body.admin-mode .section-content table td:hover {
    background-color: rgba(74, 158, 255, 0.05);
    outline: 1px solid rgba(74, 158, 255, 0.3);
}

/* 관리자 모드에서 표 셀 position */
body.admin-mode .section-content table th,
body.admin-mode .section-content table td {
    position: relative !important;
}
/* 표 수정 아이콘 버튼 스타일 */
.table-edit-btn,
button[contenteditable="false"] {
    display: inline-block !important;
    user-select: none;
    -webkit-user-select: none;
    pointer-events: auto !important;
    background: transparent !important;
}

/* contenteditable 영역 내에서도 버튼이 독립적으로 동작 */
[contenteditable="true"] button[contenteditable="false"] {
    outline: none !important;
}

/* 버튼 클릭 시 효과 */
.table-edit-btn:active,
button[contenteditable="false"]:active {
    transform: scale(0.95) !important;
    opacity: 0.7;
}

/* 정상수치 버튼 */
.normal-values-btn {
    display: inline-block;
    background: #4a9eff;
    color: white;
    border: 1px solid #2d7dd2;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    margin-left: 10px;
    vertical-align: middle;
    transition: all 0.2s;
}

.normal-values-btn:hover {
    background: #3a8eef;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(74, 158, 255, 0.3);
}

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