@charset "utf-8";

:root {
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --input-bg: #161e2e;
    --accent-color: #38bdf8;
    --text-main: #f1f5f9;
    --text-dim: #94a3b8;
    --border-color: #334155;
    --radius: 6px;
}

/* 스크롤바 */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-color); }
::-webkit-scrollbar-thumb { background: #334155; border-radius: 10px; }

#bo_w {
    background: var(--bg-color);
    color: var(--text-main);
    font-family: 'Noto Sans KR', sans-serif;
    padding: 40px 50px;
    min-height: 100vh;
}

/* 가로형 레이아웃 */
.frm_row { 
    display: flex; 
    align-items: flex-start; 
    margin-bottom: 20px; 
    gap: 20px;
}
.frm_label { 
    width: 140px; 
    padding-top: 12px;
    font-size: 0.95rem; 
    color: var(--accent-color); 
    font-weight: 500;
    flex-shrink: 0;
}
.frm_content { flex-grow: 1; }

/* 분류 그룹 */
.cat-group { display: flex; gap: 15px; }

/* 글내용 textarea (에디터 미사용 시) */
#wr_content {
    background-color: var(--input-bg) !important;
    color: #ffffff !important;
    padding: 20px !important;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    line-height: 1.6;
    outline: none;
    width: 100%;
    box-sizing: border-box;
}

/* 입력창 공통 스타일 */
.frm_input, .frm_select, .frm_textarea {
    background: var(--input-bg) !important;
    border: 1px solid var(--border-color) !important;
    color: #fff !important;
    border-radius: var(--radius);
    padding: 12px 15px !important;
    width: 100%;
    box-sizing: border-box;
    transition: 0.3s;
}
.frm_textarea { padding: 20px !important; line-height: 1.6; }
.frm_input:focus, .frm_select:focus, .frm_textarea:focus { border-color: var(--accent-color) !important; outline: none; }

/* 토글 스위치 */
.switch { position: relative; display: inline-block; width: 40px; height: 20px; margin-left: 10px; vertical-align: middle; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #334155; transition: .4s; border-radius: 20px; }
.slider:before { position: absolute; content: ""; height: 14px; width: 14px; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: var(--accent-color); }
input:checked + .slider:before { transform: translateX(20px); }

/* 메모 토글 영역 */
.memo-toggle-wrap { min-width: 100px; padding-top: 10px; }
.memo-toggle-wrap span { font-size: 0.85rem; color: var(--text-dim); }
.slider-delete { background-color: #450a0a !important; }

/* 커스텀 파일 업로드 UI */
.file-slot {
    display: none;
    margin-bottom: 15px;
    background: rgba(255, 255, 255, 0.03);
    padding: 15px;
    border-radius: var(--radius);
}
.file-slot.active { display: block; }
.file-custom-wrapper { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.file-btn-label { 
    background: var(--accent-color); 
    color: #0f172a; 
    padding: 10px 20px; 
    border-radius: var(--radius); 
    cursor: pointer; 
    font-weight: 600; 
    font-size: 0.85rem;
    display: inline-block;
}
.file-name-display { color: var(--text-dim); font-size: 0.85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-hidden { display: none; }
.btn-file-add {
    background: transparent !important;
    border: 1px solid var(--accent-color) !important;
    color: var(--accent-color) !important;
}

/* 링크 입력창 간격 */
.link-input-item { margin-bottom: 10px; }

/* 슬라이딩 섹션 */
#memo_section { display: none; }
#extra_section { display: none; margin-top: 20px; border-top: 1px solid var(--border-color); padding-top: 30px; }

.btn-toggle-main {
    width: 100%; padding: 15px; background: var(--card-bg); border: 1px dashed var(--accent-color);
    color: var(--accent-color); border-radius: var(--radius); cursor: pointer; font-weight: 600; margin: 20px 0;
}

/* 하단 버튼 */
.write-foot { display: flex; justify-content: center; gap: 12px; margin-top: 50px; }
.btn-submit { background: var(--accent-color); color: #0f172a; border: none; padding: 15px 60px; border-radius: var(--radius); font-weight: 700; cursor: pointer; }
.btn-back { background: #334155; color: #fff; text-decoration: none; padding: 15px 30px; border-radius: var(--radius); }

/* 에디터 배경색 강제 조정 */
.cke_inner, .cke_wysiwyg_frame, .cke_wysiwyg_div { background-color: var(--input-bg) !important; color: #fff !important; }