@charset "UTF-8";

/* --- 1. BASIC SETUP & FONTS --- */
@font-face {
    font-family: 'dungGeunMo';
    src: url('/font/DungGeunMo.woff2') format('woff2');
    font-display: swap;
}

:root {
    --primary-color: #58a6ff;
    --primary-glow: rgba(88, 166, 255, 0.3);
    --bg-dark: #0d1117;
    --card-bg: #161b22;
    --success-color: var(--primary-color);
    --danger-color: #f85149;
    --text-main: #c9d1d9;
    --text-dim: #8b949e;
    --border-dim: #5e5e5e;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-blur: 15px;
}

* {
    font-family: 'dungGeunMo', monospace;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    margin: 0;
    line-height: 1.6;
    overflow-x: hidden;
    animation: flicker 0.15s infinite;
}

/* --- 2. CRT EFFECTS --- */
body::before {
    content: " ";
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(rgba(0, 0, 0, 0.1) 50%, transparent 50%);
    background-size: 100% 4px;
    z-index: 9999;
    pointer-events: none;
}

body::after {
    content: " ";
    display: block;
    position: fixed;
    top: -100%;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(to bottom, transparent 0%, rgba(88, 166, 255, 0.03) 50%, transparent 100%);
    pointer-events: none;
    z-index: 10000;
    animation: scanline 8s linear infinite;
}

/* --- 3. COMMON LAYOUT (Nav, Footer, Container) --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.container img, .container video {
    max-width: 100%;
    height: auto;
}

.console-nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 30px 0;
    border-bottom: 1px solid var(--text-dim);
    gap: 20px;
}

.nav-brand {
    color: var(--primary-color);
    display: flex;
    gap: 5px;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
    align-items: center;
    transition: all 1s ease;
}

.nav-brand:hover {
    color: #fff;
    text-shadow: 0 0 10px var(--text-main);
}

.nav-brand > h1 {
    margin: 0;
    padding: 0;
    height: fit-content;
    font-size: min(8vw, 2rem);
}

.nav-brand > img {
    width: 3.5rem;
    height: 3.5rem;
}

.nav-links {
    display: flex;
    text-align: center;
    gap: 20px;
}

.nav-links a {
    color: var(--text-dim);
    text-decoration: none;
    transition: 0.2s;
}

.nav-links a.active, .nav-links a:hover {
    color: var(--primary-color);
}

main.container {
    min-height: 70vh;
    border-left: 1px solid var(--text-dim);
    border-right: 1px solid var(--text-dim);
    padding: 20px;
}

.console-footer {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
    border-top: 1px solid var(--text-dim);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
    font-size: 1rem;
    color: #484f58;
}

/* --- 4. SHARED COMPONENTS (Card, Table, Pagination) --- */
.content-card {
    background: transparent;
    border: 1px solid var(--text-dim);
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    overflow: auto;
}

.console-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 20px;
}

.console-table th {
    background: rgba(88, 166, 255, 0.05);
    color: var(--primary-color);
    font-size: 0.85rem;
    padding: 15px;
    border-bottom: 2px solid var(--text-dim);
    text-transform: uppercase;
    text-align: left;
}

.console-table td {
    padding: 15px;
    border-bottom: 1px solid var(--text-dim);
}

.console-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.table-link {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
}

.table-link:hover {
    color: var(--primary-color);
    text-shadow: 0 0 5px var(--primary-glow);
}

/* --- 5. ANIMATIONS & UTILS --- */
@keyframes flicker {
    0% {
        opacity: 0.97;
    }
    100% {
        opacity: 1;
    }
}

@keyframes scanline {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(100vh);
    }
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.4;
    }
}

.status-indicator {
    color: var(--success-color);
    animation: blink 2s infinite;
    text-shadow: 0 0 8px var(--success-color);
    margin-right: 5px;
}

.text-center {
    text-align: center !important;
}

.badge {
    display: inline-flex;
    flex-direction: column;
    justify-content: space-evenly;
    text-align: center;
    align-items: center;
    padding: 10px;
    background: rgba(88, 166, 255, 0.1); /* 연한 파란색 배경 */
    border: 1px solid rgba(88, 166, 255, 0.3); /* 반투명 테두리 */
    color: var(--primary-color);
    font-weight: bold;
    border-radius: 4px; /* 살짝 굴린 사각형 */
    font-family: 'dungGeunMo', monospace;
    text-shadow: 0 0 5px rgba(88, 166, 255, 0.5); /* 미세한 발광 효과 */
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}

.badge img {
    width: auto;
    height: 30px;
    max-width: 30px;
    max-height: 30px;
}

/* 뱃지 호버 효과 (선택사항) */
.badge:hover {
    background: rgba(88, 166, 255, 0.2);
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(88, 166, 255, 0.3);
}

@media (max-width: 1200px) {
    .console-nav {
        justify-content: space-around !important;
    }

    .console-footer {
        justify-content: space-around !important;
        text-align: center;
    }

    .nav-links {
        gap: 15px !important;
        font-size: 0.8rem !important;
    }
}

.btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.btn-group.end {
    justify-content: end;
}

.btn {
    background: var(--glass-bg);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid var(--glass-border);
    color: var(--text-dim);
    padding: 8px 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px; /* 살짝 둥글게 해서 세련미 추가 */
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
}

.btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(88, 166, 255, 0.1);
    box-shadow: 0 0 15px var(--primary-glow);
    transform: translateY(-2px);
}

.btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #000; /* 활성화 시 글자색 반전 */
    font-weight: 800;
    box-shadow: 0 0 20px var(--primary-glow);
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.page-link.active {
    color: var(--primary-color);
}

.page-link.disabled {
    color: var(--text-dim);
}

.system-info {
    color: var(--text-main);
}

.keyword-filter-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    padding: 20px;
}

.filter-label {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: 1px;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-tag-wrapper {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 4px;
    transition: all 0.3s;
}

.filter-tag {
    padding: 4px 12px;
    font-size: 0.85rem;
    color: var(--text-dim);
    text-decoration: none;
}

.filter-tag.active {
    color: #000;
    background: var(--primary-color);
    font-weight: bold;
}

.kw-del-btn {
    background: none;
    border: none;
    color: #ff4d4d;
    cursor: pointer;
    padding: 0 8px;
    font-size: 1.1rem;
    line-height: 1;
    border-left: 1px solid var(--glass-border);
}

.kw-del-btn:hover {
    background: rgba(255, 77, 77, 0.2);
}


/* 검색 폼 컨테이너 */
.search-flex-container {
    display: flex;
    flex-wrap: wrap; /* 창이 좁아지면 다음 줄로 */
    gap: 12px;
    align-items: center;
    padding: 15px;
}

/* 입력창을 감싸는 박스 (최대한 넓게 차지) */
.search-input-wrapper {
    flex: 1;
    min-width: 250px; /* 최소 너비 확보 */
}

.search-input-wrapper .search-input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 24px;
    background: transparent;
    border: none;
}

/* 버튼 그룹 */
.search-btn-group {
    display: flex;
    gap: 8px;
    flex-shrink: 0; /* 버튼이 찌그러지지 않게 */
}

.search-btn-group .search-btn {
    padding: 10px 24px;
    min-width: 100px;
    white-space: nowrap;
    cursor: pointer;
    text-align: center;
}

/* 리셋 버튼 디테일 */
.reset-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-dim);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.reset-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* (선택) Tagify가 input을 대체하므로 발생하는 스타일 간섭 수정 */
.tagify.search-input {
    border: none;
    padding: 0;
    --tags-border-color: var(--glass-border);
}

.search-input-wrapper {
    position: relative; /* 드롭다운 위치 기준 */
}

.search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--primary-color);
    border-top: none;
    z-index: 1001;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

.dropdown-item {
    padding: 10px 15px;
    cursor: pointer;
    color: var(--text-main);
    font-size: 0.9rem;
}

.dropdown-item:hover {
    background: var(--primary-color);
    color: #000;
}

/* 본문 내의 링크 강조 */
.bundle-text a {
    color: var(--primary-color);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.bundle-text a:hover {
    text-shadow: 0 0 8px var(--primary-glow);
}

.editor img, .editor video {
    display: inline-block;
    vertical-align: middle;
    transition: outline 0.2s;
    position: relative;
    border-radius: 4px;
    height: auto;
    max-width: 100%;
    cursor: pointer;
}

.file-preview-box {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.file-preview-box img, .file-preview-box video {
    max-width: 10vw;
    max-height: 10vw;
    width: 100%;
    height: auto;
}

.upload-item {
    position: relative;
}

.delete-btn {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    background: var(--danger-color, #ff4d4d);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
    border: 2px solid #fff;
    z-index: 10;
    opacity: 0.8;
}

.delete-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none; /* JS로 제어 */
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-content {
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
}

/* 1. 전체 스크롤바 영역 설정 */
.modal-content::-webkit-scrollbar {
    width: 8px; /* 세로 스크롤바 폭 */
    height: 8px; /* 가로 스크롤바 높이 */
}

/* 2. 스크롤바 트랙(바탕) - 투명하게 설정 */
.modal-content::-webkit-scrollbar-track {
    background: transparent;
}

/* 3. 스크롤바 막대(Thumb) - 둥글고 깔끔하게 */
.modal-content::-webkit-scrollbar-thumb {
    background: rgba(88, 166, 255, 0.3); /* 살짝 투명한 기본 색상 */
    border-radius: 10px; /* 막대 끝을 둥글게 */
    transition: background 0.2s ease;
}

/* 4. 마우스를 올렸을 때 막대 색상 강조 */
.modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(88, 166, 255, 0.6); /* 포커스 시 더 진하게 */
}

/* 5. 화살표(Button) 제거 - 사실 Webkit은 기본적으로 화살표가 없지만 명시적 처리 */
.modal-content::-webkit-scrollbar-button {
    display: none;
}

.modal-content::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    border: 2px solid transparent; /* 투명 테두리를 주고 */
    background-clip: padding-box; /* 배경이 테두리 안쪽까지만 그려지게 함 */
}

/* 문의하기 폼 */
.modern-form {
    max-width: 100%;
    margin: 0 auto;
    background: var(--card-bg);
    transition: transform 0.2s, border-color 0.2s;
    padding: 40px;
    border-radius: 12px;
    border: 1px solid var(--text-dim);
}


.modern-form input[type="text"],
.modern-form input[type="password"],
.modern-form-input {
    width: 100%;
    background: #0d1117;
    border: 1px solid var(--text-dim);
    border-radius: 6px;
    padding: 12px;
    color: #fff;
    outline: none;
    font-family: 'dungGeunMo';
}

.modern-form input:focus, .modern-form-input:focus {
    border-color: var(--primary-color);
}

/* 에디터 기본 스타일 및 플레이스홀더 설정 */
.modern-form-input {
    position: relative; /* 기준점 설정 */
    cursor: text;
}

/* 에디터가 비어있고 포커스가 없을 때(또는 있을 때도 가능) */
.modern-form-input:empty::before {
    content: attr(placeholder); /* HTML의 placeholder 속성값을 가져옴 */
    color: var(--text-dim); /* 연한 회색 계열 추천 */
    position: absolute;
    left: 15px; /* 패딩값에 맞춰 조절 */
    top: 15px; /* 패딩값에 맞춰 조절 */
    pointer-events: none; /* 플레이스홀더 클릭 시에도 에디터가 클릭되게 함 */
    display: block; /* 명시적 표시 */
}

/* 포커스가 갔을 때 플레이스홀더를 숨기고 싶다면 추가 */
.modern-form-input:focus::before {
    content: "";
}

/* 파일 업로드 드롭존 */
.drop-zone-container {
    text-align: center;
    width: 100%;
    min-height: 180px;
    background-color: #0d1117;
    border: 2px dashed var(--text-dim);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.drop-zone-container:hover, .drop-zone-container.drag-over {
    border-color: var(--primary-color);
    background: rgba(88, 166, 255, 0.03);
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background: #238636;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    font-family: 'dungGeunMo';
}

.submit-btn:hover {
    background: #2ea043;
}


.form-section {
    border-bottom: 1px solid var(--text-dim);
    padding-bottom: 30px;
    margin-bottom: 30px;
}

.form-section.no-border {
    border: none;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-main);
}

.sys-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 50px;
    padding: 12px 24px;
    background: transparent;
    color: var(--primary-color, #58a6ff);
    border: 1px solid var(--primary-color, #58a6ff);
    border-radius: 6px;
    font-family: 'dungGeunMo', monospace;
    font-size: 0.95rem;
    font-weight: bold;
    text-decoration: none;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    box-sizing: border-box;
}

/* 배경 슬라이드 효과 (공통) */
.sys-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(88, 166, 250, 0.1);
    transition: all 0.4s;
    z-index: -1;
}

/* 호버 상태 (공통) */
.sys-btn:hover {
    color: #fff;
    border-color: #fff;
    box-shadow: 0 0 20px rgba(88, 166, 255, 0.5);
    transform: translateY(-3px);
}

.btn-back:hover::before,
.feedback-trigger-btn:hover::before {
    left: 0;
}

.sys-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 0 10px rgba(88, 166, 255, 0.3);
}

/* 피드백 버튼 아이콘 효과 */
.feedback-trigger-btn .icon {
    font-size: 1.1rem;
    filter: drop-shadow(0 0 2px var(--primary-color));
}

.feedback-container {
    margin-top: 50px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
}

.feedback-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.count-badge {
    background: var(--primary-color);
    color: #000;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: bold;
}

/* 리스트 카드 레이아웃 */
.feedback-card {
    display: flex;
    gap: 15px;
    background: #1a1a1a;
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: 0.2s;
}

.feedback-card:hover {
    background: #252525;
    transform: translateY(-2px);
}

/* 썸네일 스타일 */
.fb-thumb-wrapper {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    background: #333;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fb-thumb-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fb-thumb-placeholder {
    font-size: 24px;
    color: #555;
}

/* 상세 보기 모달 바 */
.fb-meta-bar {
    font-size: 13px;
    color: #888;
    margin-bottom: 10px;
}

.modal-content.wide {
    width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    background: #111;
    color: #eee;
}

.editor-content-view {
    line-height: 1.6;
    padding: 10px 0;
}

.fb-meta {
    font-size: 12px;
    color: #888;
    margin-bottom: 8px;
}

.fb-title {
    margin: 0;
    font-size: 18px;
}

.fb-title a {
    color: #fff;
    text-decoration: none;
}

.fb-preview {
    margin-top: 10px;
    color: #ccc;
    font-size: 14px;
    max-height: 60px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* 두 줄만 보여주기 */
    -webkit-box-orient: vertical;
}

#feedbackViewModal {
    display: none; /* JS에서 flex로 변경 */
    transition: opacity 0.3s ease;
}

/* 모달 등장 애니메이션 */
@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-content.wide {
    animation: modalFadeIn 0.3s ease-out;
}

.target-link-badge {
    display: inline-flex;
    align-items: center;
    margin-right: 10px;
    padding: 2px 8px;
    background: rgba(var(--primary-color), 0.1);
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    font-size: 1.1em;
}

.target-link-badge a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.target-link-badge a:hover {
    text-decoration: underline;
    filter: brightness(1.2);
}

/* 제목과 겹치지 않게 간격 조절 */
.qna-title {
    vertical-align: middle;
}