/* 데스크탑 프로그램 기본 스타일 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Malgun Gothic', '맑은 고딕', Arial, sans-serif;
    background-color: #f5f5f5;
}

/* Topbar 스타일 */
.topbar-pc {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 5px 20px 7px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.topbar-pc-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 한/한자 전환 버튼 */
.ganzhi-toggle-btn {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ecf0f1;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 4px 10px;
    font-size: 12px;
    cursor: pointer;
    border-radius: 3px;
    transition: background-color 0.2s, border-color 0.2s;
    font-family: 'Malgun Gothic', '맑은 고딕', Arial, sans-serif;
}

.ganzhi-toggle-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.ganzhi-toggle-btn:active {
    background-color: rgba(255, 255, 255, 0.15);
}

.topbar-pc-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    flex: 1;
    justify-content: flex-end;
}

.topbar-pc a {
    color: #ecf0f1;
    text-decoration: none;
    font-size: 13px;
    padding: 3px 10px;
}

.topbar-pc a:hover {
    background-color: #34495e;
}

.topbar-pc .topbar-pc-right .user-info {
    color: #ecf0f1;
    font-size: 13px;
    font-weight: 300;
}

.topbar-pc .user-level {
    color: #f39c12;
    font-weight: 300;
}

/* 모바일 메뉴 토글 버튼 */
.topbar-mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: #ecf0f1;
    font-size: 24px;
    cursor: pointer;
    padding: 5px 10px;
    line-height: 1;
    z-index: 1001;
}

.topbar-mobile-toggle-icon {
    display: block;
}

/* 모바일 메뉴 오버레이 */
.topbar-mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.topbar-mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 모바일 메뉴 레이어 */
.topbar-mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background-color: #2c3e50;
    color: #ecf0f1;
    z-index: 2000;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.3);
    transition: right 0.3s ease;
    overflow-y: auto;
    visibility: hidden;
}

.topbar-mobile-menu.active {
    right: 0;
    visibility: visible;
}

.topbar-mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background-color: #34495e;
}

.topbar-mobile-menu-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: bold;
    color: #ecf0f1;
}

.topbar-mobile-menu-close {
    background: none;
    border: none;
    color: #ecf0f1;
    font-size: 32px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.topbar-mobile-menu-close:hover {
    color: #e74c3c;
}

.topbar-mobile-menu-content {
    padding: 20px;
}

.topbar-mobile-user-info {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.topbar-mobile-user-info .user-info {
    color: #ecf0f1;
    font-size: 14px;
    font-weight: 500;
}

.topbar-mobile-menu-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.topbar-mobile-menu-list li {
    position: relative;
    margin-bottom: 10px;
}

.topbar-mobile-menu-list li a {
    display: block;
    padding: 12px 15px;
    color: #ecf0f1;
    text-decoration: none;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    transition: background-color 0.2s;
    font-size: 14px;
    position: relative;
}

.topbar-mobile-menu-list li a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.topbar-mobile-menu-list li a i {
    margin-right: 8px;
    color: #7f8c8d;
    font-size: 1.1em;
}

.topbar-mobile-menu-list li a:hover i {
    color: #3498db;
}

.topbar-mobile-menu-list li a strong {
    position: absolute;
    top: 12px;
    right: 15px;
    font-size: 0.75em;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: normal;
    white-space: nowrap;
    display: inline-block;
    margin-top: 0;
    font-size: 12px;
}

/* 포인트 배지 스타일 */
.topbar-mobile-menu-list li .win_point strong {
    background: #37bc9b;
    color: #fff;
}

/* 메시지 배지 스타일 */
.topbar-mobile-menu-list li .win_memo strong {
    background: #ff8b77;
    color: #fff;
}

/* 내 글 배지 스타일 */
.topbar-mobile-menu-list li a[href*="search.php"] strong {
    background: #3498db;
    color: #fff;
}

/* 스크랩 배지 스타일 (향후 사용 가능) */
.topbar-mobile-menu-list li .win_scrap strong {
    background: #8cc152;
    color: #fff;
}

.topbar-mobile-menu-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.topbar-mobile-menu-link {
    display: block;
    padding: 12px 15px;
    color: #ecf0f1;
    text-decoration: none;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    text-align: center;
    transition: background-color 0.2s;
    font-size: 14px;
}

.topbar-mobile-menu-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* 반응형 (1100px 이하) */
@media (max-width: 1100px) {
    .topbar-mobile-toggle {
        display: block !important;
    }
    
    .topbar-pc-right {
        display: none !important;
    }
    
    .topbar-mobile-overlay,
    .topbar-mobile-menu {
        display: block !important;
    }
    
    .topbar-pc {
        padding: 5px 15px 7px 15px;
    }
    
    .topbar-pc-left {
        flex: 1;
    }
    
    .topbar-pc-left a {
        font-size: 12px;
        padding: 3px 8px;
    }
    
    .ganzhi-toggle-btn {
        font-size: 11px;
        padding: 3px 8px;
        margin-left: 5px;
    }
}

/* ol_after_private 스타일 (포인트, 쪽지, 스크랩) */
#ol_after_private {
    clear: both;
    margin: 5px;
    padding: 0;
    list-style: none;
    display: flex;
    gap: 0;
    width: 100%;
    /* min-width: 200px; */
    max-width: 400px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

#ol_after_private:after {
    display: block;
    visibility: hidden;
    clear: both;
    content: "";
}

#ol_after_private li {
    position: relative;
    flex: 1;
    text-align: left;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 0;
}

#ol_after_private li:last-child {
    border-right: none;
}

#ol_after_private li a {
    display: block;
    color: #ecf0f1;
    padding: 8px 12px;
    text-decoration: none;
    transition: background-color 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 12px;
}

#ol_after_private li i {
    margin-right: 8px;
    color: #7f8c8d;
    font-size: 1.1em;
}

#ol_after_private li a:hover i {
    color: #3498db;
}

#ol_after_private strong {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 0.75em;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: normal;
    white-space: nowrap;
}

#ol_after_pt strong {
    background: #37bc9b;
    color: #fff;
}

#ol_after_memo strong {
    background: #ff8b77;
    color: #fff;
}

#ol_after_scrap strong {
    background: #8cc152;
    color: #fff;
}

#ol_after_write strong {
    background: #3498db;
    color: #fff;
}

/* 메인 컨테이너 */
#pro-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: calc(100vh - 60px);
}

/* 윈도우 스타일 패널 */

.chk_box .tooltip_icon {
    margin-left: auto;
    flex-shrink: 0;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    display: inline-block;
}

.chk_box .tooltip {
    display: none;
    position: absolute;
    background: #333;
    color: #fff;
    padding: 5px 10px;
    font-size: 12px;
    z-index: 1000;
    white-space: nowrap;
    top: 100%;
    right: 0;
    margin-top: 5px;
}

.chk_box .tooltip_icon:hover + .tooltip {
    display: block;
}

/* 필수 표시 */
.required::after {
    content: " *";
    color: #c00;
}

/* 입력 필드 레이블 */
.register_form_inner label,
#login_fs label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    font-weight: normal;
    position: relative;
    color: var(--text-secondary);
}

.register_form_inner label .tooltip_icon {
    display: inline-block;
    margin-left: 5px;
    vertical-align: middle;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
}

.register_form_inner label .tooltip {
    display: none;
    position: absolute;
    background: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 12px;
    z-index: 1000;
    white-space: nowrap;
    margin-top: 5px;
}

.register_form_inner label .tooltip_icon:hover + .tooltip {
    display: block;
}

/* 회원가입 약관 영역 */
#fregister_term,
#fregister_private {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid var(--bg-tertiary);
    background-color: var(--bg-secondary);
    color: var(--text-secondary);
}

#fregister_term textarea {
    width: 100%;
    height: 150px;
    padding: 8px;
    border: 1px solid var(--bg-tertiary);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 13px;
    resize: vertical;
    box-sizing: border-box;
}

#fregister_private table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

#fregister_private table th,
#fregister_private table td {
    padding: 8px;
    border: 1px solid var(--bg-tertiary);
    text-align: left;
    color: var(--text-secondary);
}

#fregister_private table th {
    background-color: var(--bg-secondary);
    color: var(--text-secondary);
    font-weight: normal;
}

/* 체크박스 좌측 정렬 및 sound_only 메시지 표시 */
.fregister_agree {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-top: 10px;
    border: none;
    padding: 0;
}

.fregister_agree input[type="checkbox"] {
    margin-right: 5px;
    order: 1;
}

.fregister_agree label {
    margin: 0;
    display: flex;
    align-items: center;
    order: 2;
}

.fregister_agree label .sound_only {
    display: inline !important;
    position: static !important;
    width: auto !important;
    height: auto !important;
    font-size: 14px !important;
    line-height: normal !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    font-weight: normal;
}

.fregister_agree label span {
    display: none;
}

#fregister_chkall {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-top: 15px;
    margin-bottom: 15px;
}

#fregister_chkall input[type="checkbox"] {
    margin-right: 5px;
    order: 1;
}

#fregister_chkall label {
    margin: 0;
    display: flex;
    align-items: center;
    order: 2;
}

#fregister_chkall label span {
    display: none;
}

/* 회원가입 완료 페이지 */
#reg_result {
    text-align: center;
    padding: 30px 20px;
}

#reg_result .reg_result_p {
    margin-bottom: 20px;
    font-size: 16px;
}

#reg_result .result_txt {
    margin: 15px 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
}

#result_email {
    margin: 20px 0;
    padding: 15px;
    background-color: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--bg-tertiary);
}

#result_email span {
    display: inline-block;
    width: 100px;
    font-weight: normal;
    color: var(--text-secondary);
}

#result_email strong {
    font-weight: normal;
    color: var(--text-secondary);
}

.btn_confirm_reg {
    margin-top: 30px;
}

/* 비밀번호 확인 페이지 */
#mb_confirm {
    max-width: 400px;
    margin: 0 auto;
    padding: 20px;
}

#mb_confirm fieldset {
    border: 1px solid var(--bg-tertiary);
    padding: 20px;
    background-color: var(--bg-secondary);
    color: var(--text-secondary);
}

#mb_confirm #confirm_mb_password {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--bg-tertiary);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    box-sizing: border-box;
    margin-top: 10px;
}

.confirm_id {
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
    color: var(--text-secondary);
}

#mb_confirm_id {
    display: block;
    margin-bottom: 15px;
    font-size: 14px;
    color: var(--text-secondary);
}


/* 비밀번호 찾기 페이지 */
#find_info {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

#find_info fieldset {
    border: 1px solid var(--bg-tertiary);
    padding: 20px;
    background-color: var(--bg-secondary);
    color: var(--text-secondary);
}

#find_info input[type="text"] {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--bg-tertiary);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    box-sizing: border-box;
}

.win_btn {
    margin-top: 15px;
    text-align: center;
}

/* 우하단 고정 버튼 */
.fixed-bottom-buttons {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 9999;
}

.fixed-btn {
    width: 50px;
    height: 50px;
    padding-bottom: 5px;
    border-radius: 50%;
    border: none;
    background-color: #3498dbcc;
    color: #ffffff;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    text-decoration: none;
}

.fixed-btn:hover {
    background-color: #2980b988;
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.fixed-btn:active {
    transform: scale(0.95);
}

.scroll-top-btn {
    background-color: #849496dd;
}

.scroll-top-btn:hover {
    background-color: #9ba8aadd;
}

.contact-btn {
    background-color: #288fd3cc;
}

.contact-btn:hover {
    background-color: #4ba6e2cc;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .fixed-bottom-buttons {
        bottom: 20px;
        right: 20px;
        gap: 12px;
    }
    
    .fixed-btn {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}
