/* 제주 4·3 피해신고서 아카이브 - 미디어월 */
/* 흑백 모노크롬, 미니멀 디자인 */

/* 기본 리셋 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 전체 레이아웃 */
html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000000;
    color: #ffffff;
    font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", sans-serif;
    touch-action: pan-x pan-y;
    -webkit-tap-highlight-color: transparent;
}

/* 메인 컨테이너 */
#media-wall {
    width: 100%;
    height: 100%;
    display: flex;
}

/* ========== 좌측 네비게이션 ========== */
#nav-menu {
    width: 250px;
    height: 100%;
    background: #000000;
    border-right: 1px solid rgba(255, 255, 255, 0.03);
    display: none;
    flex-direction: column;
    padding: 3rem 2rem;
    z-index: 100;
}

#nav-header h2 {
    font-size: 1.75rem;
    font-weight: 300;
    line-height: 1.4;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    color: #ffffff;
}

.nav-label {
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 3rem;
    min-height: 1.2em;
}

#nav-items {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-item {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 400;
    background: transparent;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    color: rgba(255, 255, 255, 0.6);
    border: none;
    border-left: 2px solid transparent;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s;
}

.nav-item:hover {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
    color: #ffffff;
    border-left-color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

#nav-footer {
    margin-top: auto;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
}

#total-count {
    font-size: 0.875rem;
    font-weight: 300;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.4);
}

/* ========== 메인 컨테이너 ========== */
#main-container {
    flex: 1;
    position: relative;
    overflow: hidden;
}


/* ========== 우측 상단 컨트롤 ========== */
#top-controls {
    position: absolute;
    top: 2rem;
    right: 2rem;
    display: flex;
    gap: 1rem;
    z-index: 2000;  /* 지도 레이어 위에 표시 */
}

.control-button {
    padding: 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.8);
    color: #ffffff;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    transition: all 0.2s;
    backdrop-filter: blur(10px);
}

.control-button svg {
    width: 40px;
    height: 40px;
    display: block;
    pointer-events: none;
}

.control-button:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: rgba(255, 255, 255, 0.2);
}

.control-button:active {
    transform: scale(0.95);
}


/* ========== 검색 패널 ========== */
.search-panel {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.search-input {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.5);
    color: #ffffff;
    outline: none !important;
    box-shadow: none !important;
    transition: border-color 0.2s;
    height: 40px;
    box-sizing: border-box;
    font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", sans-serif;
}

.search-input:focus,
.search-input:focus-visible,
.search-input:active {
    border-color: rgba(255, 255, 255, 0.2);
    outline: none !important;
    box-shadow: none !important;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.search-button {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    background: #ffffff;
    color: #000000;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none !important;
    box-shadow: none !important;
    font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", sans-serif;
}

.search-button:hover {
    background: rgba(255, 255, 255, 0.8);
}

.search-button:focus,
.search-button:focus-visible,
.search-button:active {
    outline: none !important;
    box-shadow: none !important;
}

#search-panel {
    position: absolute;
    top: 5rem;
    right: 2rem;
    background: rgba(0, 0, 0, 0.9);
    border: none;
    padding: 1.5rem;
    z-index: 50;
    backdrop-filter: blur(10px);
    box-shadow: none;
}

#search-input {
    width: 400px;
}

#close-search {
    background: transparent;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

#close-search:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ========== 배경 뷰 (텍스트/지도) ========== */
#background-view {
    width: 100%;
    height: 100%;
    position: relative;
}

.view-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s, visibility 0.5s;
}

.view-layer.active {
    opacity: 1;
    visibility: visible;
}

/* ========== 텍스트 뷰 ========== */
#text-view {
    background: #000000;
    overflow: hidden;
    perspective: 2000px;
    perspective-origin: center center;
    opacity: 1;
    transition: opacity 0.8s ease;
}

#light-rays {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 1;
    transition: opacity 0.8s ease;
}

.light-glow {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, 
        rgba(255, 255, 255, 0.6) 0%,
        rgba(255, 255, 255, 0.3) 20%,
        rgba(255, 255, 255, 0.15) 40%,
        rgba(255, 255, 255, 0.08) 60%,
        rgba(255, 255, 255, 0) 100%
    );
    filter: blur(80px);
    transform: translate(-50%, -50%);
    opacity: 0.4;
}

#scrolling-texts {
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 2;
    opacity: 1;
    transition: opacity 0.8s ease;
}

#reload-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 10;
    pointer-events: none;
}

#reload-progress-bar {
    height: 100%;
    width: 0%;
    background: #ffffff;
    transition: width 0.05s linear;
}

.touch-instruction {
    position: absolute;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 1.5rem 3rem;
    background: rgba(0, 0, 0, 0.85);
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    z-index: 15;
    pointer-events: none;
    opacity: 1;
    transition: opacity 1.5s ease-out, transform 1.5s ease-out;
    backdrop-filter: blur(10px);
    white-space: nowrap;
}

.touch-instruction.visible {
    opacity: 1;
    transform: translateX(-50%);
}

.touch-instruction.hidden {
    opacity: 1;
    transform: translateX(-50%);
    pointer-events: none;
}

.scrolling-text-line {
    position: absolute;
    white-space: nowrap;
    font-size: 1.5rem;
    line-height: 1;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400;
    letter-spacing: 0;
    padding: 0;
    margin: 0;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    will-change: transform;
    contain: layout style;
}

/* 문장 단위 스타일 */
.scrolling-text-line .sentence {
    cursor: pointer;
    transition: color 0.2s ease-out, background-color 0.2s ease-out;
    opacity: 1;
    color: rgba(255, 255, 255, 0.5);
    background-color: transparent;
    padding: 0;
    margin: 0;
    border-radius: 2px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.scrolling-text-line .sentence:hover,
.scrolling-text-line .sentence.touch-hover {
    color: #000000 !important;
    background-color: #ffffff !important;
    padding: 0.125rem 0.25rem;
    margin: 0 -0.25rem;
    text-shadow: none !important;
}

.scrolling-text-line .sentence.typing {
    position: relative;
    display: inline-block;
    vertical-align: baseline;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.4);
    transition: color 0.2s ease-out, text-shadow 0.2s ease-out, background-color 0.2s ease-out, padding 0.2s ease-out, margin 0.2s ease-out;
}

.scrolling-text-line .sentence.typing:hover {
    color: #000000 !important;
    background-color: #ffffff !important;
    padding: 0.125rem 0.25rem;
    margin: 0 -0.25rem;
    text-shadow: none !important;
}

.scrolling-text-line .sentence.typing .typing-placeholder {
    visibility: hidden;
    white-space: pre;
    display: inline-block;
}

.scrolling-text-line .sentence.typing .typing-visible {
    position: absolute;
    left: 0;
    top: 0;
    white-space: pre;
    pointer-events: none;
    line-height: inherit;
    font-size: inherit;
    font-family: inherit;
    font-weight: inherit;
}

.scrolling-text-line .sentence.typing .typing-visible::after {
    content: '▊';
    opacity: 1;
    animation: blink 1s infinite;
    margin-left: 2px;
}

.scrolling-text-line .sentence.typed-fading {
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.4);
    transition: color 10s ease-out, text-shadow 10s ease-out, background-color 0.2s ease-out, padding 0.2s ease-out, margin 0.2s ease-out;
    animation: fadeToNormal 10s ease-out forwards;
}

@keyframes fadeToNormal {
    from {
        color: rgba(255, 255, 255, 0.9);
        text-shadow: 0 0 12px rgba(255, 255, 255, 0.4);
    }
    to {
        color: rgba(255, 255, 255, 0.5);
        text-shadow: none;
    }
}

.scrolling-text-line .sentence.typed-fading:hover {
    color: #000000 !important;
    background-color: #ffffff !important;
    padding: 0.125rem 0.25rem;
    margin: 0 -0.25rem;
    text-shadow: none !important;
    animation: none;
    transition: color 0.2s ease-out, background-color 0.2s ease-out, padding 0.2s ease-out, margin 0.2s ease-out !important;
}

.scrolling-text-line .sentence.typed {
    color: rgba(255, 255, 255, 0.5);
    text-shadow: none;
    transition: color 0.2s ease-out, text-shadow 0.2s ease-out, background-color 0.2s ease-out, padding 0.2s ease-out, margin 0.2s ease-out;
}

.scrolling-text-line .sentence.typed:hover {
    color: #000000 !important;
    background-color: #ffffff !important;
    padding: 0.125rem 0.25rem;
    margin: 0 -0.25rem;
    text-shadow: none !important;
}

.scrolling-text-line .sentence.typed .typing-placeholder {
    visibility: visible;
}

.scrolling-text-line .sentence.typed .typing-visible {
    display: none;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* ========== 컨텐츠 레이어 (리스트) ========== */
#content-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 20;
}

#list-view {
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    overflow-y: auto;
    padding: 0;
    pointer-events: auto;
    display: flex;
    flex-direction: column;
}

.list-close-button {
    width: 40px;
    height: 40px;
    font-size: 2rem;
    line-height: 1;
    background: transparent;
    color: #ffffff;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.2s;
    font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", sans-serif;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.list-close-button:hover {
    transform: scale(1.1);
}

#list-header {
    position: sticky;
    top: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    padding: 1rem 3rem;
    background: rgba(0, 0, 0, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    z-index: 1000;
    min-height: 60px;
}

#list-search-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#list-search-input {
    width: 300px;
}

#list-info {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    flex: 1;
    min-width: 200px;
}


/* 신고서 리스트 */
#report-list {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    padding: 3rem;
    overflow-y: auto;
}

.report-card {
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.03);
    background: rgba(0, 0, 0, 0.8);
    cursor: pointer;
    transition: all 0.2s;
}

.report-card:hover {
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.05);
}

.report-card-header {
    margin-bottom: 1rem;
}

.report-card-name {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.report-card-meta {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.05em;
}

.report-card-damage {
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 페이지네이션 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.pagination button {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    background: #ffffff;
    color: #000000;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.pagination button:hover {
    background: rgba(255, 255, 255, 0.8);
}

.pagination button:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
}

.pagination button:disabled:hover {
    background: rgba(255, 255, 255, 0.1);
}

.pagination-info {
    margin: 0 1rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
}

/* ========== 팝업 (상세 뷰) ========== */
.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
}

.popup-content {
    width: 90%;
    max-width: 1400px;
    height: 90%;
    background: #000000;
    position: relative;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", sans-serif;
    color: #ffffff;
}


.close-button {
    position: absolute;
    top: 0;
    right: -40px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 10;
    transition: transform 0.2s;
    font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", sans-serif;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.close-button-progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    transform: rotate(-90deg);
}

.close-button-progress-circle {
    stroke-dasharray: 125.6;
    stroke-dashoffset: 125.6;
    transition: stroke-dashoffset 0.1s linear;
}

.close-button-text {
    position: relative;
    font-size: 2rem;
    line-height: 1;
    color: #ffffff;
    z-index: 1;
}

.close-button:hover {
    transform: scale(1.1);
}

.popup.fade-out {
    opacity: 0;
    transition: opacity 0.5s ease-out;
}

.popup-layout {
    width: 100%;
    height: 100%;
    display: flex;
    font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", sans-serif;
}

/* 팝업 좌측 메뉴 */
.popup-nav {
    width: 240px;
    min-width: 240px;
    background: #000000;
    color: #ffffff;
    padding: 3rem 2.5rem;
    display: flex;
    flex-direction: column;
}

.popup-nav-header {
    margin-bottom: 3rem;
}

.popup-nav h3 {
    font-size: 1.25rem;
    font-weight: 300;
    line-height: 1.4;
    margin-bottom: 1rem;
    font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", sans-serif;
}

.popup-label {
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.4);
    min-height: 1.2em;
    font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", sans-serif;
}

.popup-nav-main-items {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.popup-nav-main-item {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 400;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    border: none;
    border-left: 2px solid transparent;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s;
    font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", sans-serif;
}

.popup-nav-main-item:hover {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.05);
}

.popup-nav-main-item.active {
    color: #ffffff;
    border-left-color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.popup-nav-footer {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

#popup-total-count {
    font-size: 0.875rem;
    font-weight: 300;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.4);
    font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", sans-serif;
}

.popup-nav-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 1.5rem 0;
}

.popup-nav-view-items {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.popup-nav-view-header {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
}

.popup-nav-view-item {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 400;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    border: none;
    border-left: 2px solid transparent;
    cursor: pointer;
    text-align: left;
    transition: all 0.15s;
    font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", sans-serif;
}

.popup-nav-view-item:hover {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.05);
}

.popup-nav-view-item.active {
    color: #ffffff;
    border-left-color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.popup-nav-items {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.popup-nav-item {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 400;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    border: none;
    border-left: 2px solid transparent;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s;
    font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", sans-serif;
}

.popup-nav-item:hover {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.05);
}

.popup-nav-item.active {
    color: #ffffff;
    border-left-color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

/* 팝업 중앙 컨텐츠 영역 */
.popup-content-area {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: flex 0.3s ease;
}

.popup-layout.no-details .popup-content-area {
    flex: 1 1 100%;
}

.popup-view {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.popup-view.active {
    display: flex;
    flex-direction: column;
    opacity: 1;
}

/* 팝업 검색 패널 */
.popup-search-panel {
    position: absolute;
    top: 1rem;
    right: -420px;
    background: rgba(0, 0, 0, 0.9);
    border: none;
    padding: 1rem;
    display: flex;
    gap: 0.5rem;
    z-index: 10;
    backdrop-filter: blur(10px);
    outline: none;
    box-shadow: none;
}

#popup-search-input {
    width: 300px;
}

/* 팝업 중앙 이미지 */
.popup-image {
    flex: 1;
    min-width: 0;
    background: #000000;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

/* 팝업 리스트 뷰 */
.popup-list-container {
    width: 100%;
    height: 100%;
    background: #000000;
    padding: 2rem;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.popup-list-container .popup-search-panel {
    position: relative;
    top: auto;
    right: auto;
    margin-bottom: 1.5rem;
    width: 50%;
    max-width: 500px;
    align-items: flex-end;
}

.popup-list-container .search-input {
    flex: 1;
    padding: 0.75rem 0;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    background: transparent;
}

.popup-list-container .search-input:focus,
.popup-list-container .search-input:focus-visible,
.popup-list-container .search-input:active {
    border-bottom-color: rgba(255, 255, 255, 0.6);
}

#popup-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

#popup-list-info {
    font-size: 0.875rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    flex: 1;
}

.search-notice {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    font-size: 0.875rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

.search-notice-icon {
    margin-right: 0.5rem;
    font-size: 1rem;
}

.search-notice strong {
    color: #ffffff;
    font-weight: 500;
}

.search-count-info {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
}

.search-highlight {
    background: rgba(255, 255, 255, 0.3);
    color: #ffffff;
    padding: 0.1em 0.2em;
    border-radius: 2px;
    font-weight: 500;
}

.popup-list-slider {
    position: relative;
    width: 200px;
    height: 2px;
    background: transparent;
    cursor: pointer;
    touch-action: none;
    padding: 8px 0;
    margin: -8px 0;
}

.popup-list-slider-track {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-50%);
}

.popup-list-slider-thumb {
    position: absolute;
    top: 50%;
    left: 0;
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: background 0.2s;
    pointer-events: none;
}

.popup-list-slider:hover .popup-list-slider-thumb {
    background: rgba(255, 255, 255, 0.9);
    width: 10px;
    height: 10px;
}

#popup-report-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex: 1;
    overflow-y: scroll;
    overflow-x: hidden;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    touch-action: pan-y;
    overscroll-behavior: contain;
    contain: strict;
}

#popup-report-list::-webkit-scrollbar {
    display: none;
}

.popup-report-card {
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.8);
    cursor: pointer;
    transition: all 0.2s;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.popup-report-card:hover {
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.popup-report-card-header {
    margin-bottom: 0.75rem;
}

.popup-report-card-name {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: #ffffff;
}

.popup-report-card-meta {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.05em;
}

.popup-report-card-damage {
    font-size: 0.875rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

#popup-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: rgba(255, 255, 255, 0.3);
    position: relative;
    background: #0a0a0a;
}

#popup-image-placeholder p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.3);
    font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", sans-serif;
}

#popup-image-placeholder img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* 스켈레톤 로딩 스타일 */
.image-skeleton {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(90deg, #1a1a1a 0%, #2a2a2a 50%, #1a1a1a 100%);
    background-size: 200% 100%;
    overflow: hidden;
}

.skeleton-shimmer {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.05) 50%,
        transparent 100%
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.loading-text {
    position: relative;
    z-index: 1;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.4);
    font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", sans-serif;
    letter-spacing: 0.05em;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.4;
    }
    50% {
        opacity: 0.7;
    }
}

/* 팝업 우측 세부사항 */
.popup-details {
    width: 420px;
    min-width: 420px;
    background: #000000;
    padding: 3rem 2.5rem;
    overflow-y: auto;
    border-left: 1px solid rgba(255, 255, 255, 0.03);
    color: #ffffff;
    display: flex;
    flex-direction: column;
}

.detail-section {
    display: none;
}

.detail-section.active {
    display: block;
}

.detail-field {
    margin-bottom: 2.5rem;
}

.detail-field:last-child {
    margin-bottom: 0;
}

.detail-field label {
    display: block;
    font-size: 0.75rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
    font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", sans-serif;
}

.detail-field div {
    font-size: 1.125rem;
    line-height: 1.8;
    color: #ffffff;
    font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", sans-serif;
    word-break: keep-all;
}

.detail-section p {
    font-size: 1.125rem;
    line-height: 1.8;
    color: #ffffff;
    font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", sans-serif;
    word-break: keep-all;
    margin: 0;
}

/* 관련 피해자 섹션 */
.detail-related-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.detail-related-header {
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 1.5rem;
}

.detail-related-items {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.detail-related-item {
    width: 100%;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    gap: 0;
    font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", sans-serif;
}

.detail-related-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateX(4px);
}

.related-text {
    width: 100%;
    text-align: left;
    font-weight: 500;
    letter-spacing: -0.01em;
    margin-bottom: 0.5rem;
}

/* ========== 로딩 ========== */
#loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
}

#loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========== 스크롤바 스타일 ========== */
#list-view::-webkit-scrollbar,
.popup-details::-webkit-scrollbar,
.popup-list-container::-webkit-scrollbar {
    display: none;
    width: 0;
}

#list-view::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

#list-view::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

#list-view::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.popup-details::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
}

.popup-details::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.popup-details::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}


/* ========== 필터 뷰 ========== */
.popup-filter-container {
    width: 100%;
    height: 100%;
    background: #000000;
    overflow-y: auto;
    padding: 3rem;
    color: #ffffff;
}

.popup-filter-header {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.popup-filter-header h2 {
    font-size: 2rem;
    font-weight: 300;
    margin-bottom: 1rem;
    color: #ffffff;
    letter-spacing: -0.02em;
}

.popup-filter-total {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.05em;
}

.popup-filter-content {
    display: flex;
    flex-direction: column;
}

.filter-chart {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chart-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    cursor: pointer;
    transition: all 0.2s;
}

.chart-bar:hover {
    transform: translateX(4px);
}

.chart-bar-label {
    min-width: 120px;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    text-align: right;
    font-weight: 400;
}

.chart-bar-visual {
    flex: 1;
    position: relative;
    height: 32px;
    background: rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.chart-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.6) 100%);
    transition: width 0.6s ease-out;
    position: relative;
}

.chart-bar:hover .chart-bar-fill {
    background: linear-gradient(90deg, #ffffff 0%, rgba(255, 255, 255, 0.8) 100%);
}

.chart-bar-value {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.875rem;
    font-weight: 500;
    color: #000000;
    z-index: 1;
}

.chart-bar-count {
    min-width: 80px;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    text-align: right;
    font-weight: 300;
}

.popup-filter-container::-webkit-scrollbar {
    width: 8px;
}

.popup-filter-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
}

.popup-filter-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.popup-filter-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 미니 차트 (관련 피해자 더보기용) */
.mini-chart {
    width: 100%;
    padding: 0.5rem 0;
    background: transparent;
}

.mini-chart-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0;
    width: 100%;
}

.mini-chart-bar.active .mini-chart-label {
    color: rgba(255, 255, 0, 0.9);
    font-weight: 600;
}

.mini-chart-bar.active .mini-chart-fill {
    background: linear-gradient(90deg, rgba(255, 255, 0, 0.9) 0%, rgba(255, 255, 0, 0.6) 100%);
}

.mini-chart-label {
    min-width: 70px;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    text-align: right;
}

.mini-chart-visual {
    flex: 1;
    height: 18px;
    min-height: 18px;
    background: rgba(255, 255, 255, 0.1);
    position: relative;
    border-radius: 2px;
    overflow: hidden;
}

.mini-chart-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    min-height: 18px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.5) 100%);
    transition: width 0.5s ease-out;
    border-radius: 2px;
}

.mini-chart-count {
    min-width: 45px;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
    text-align: right;
}

/* ========== 반응형 ========== */
@media (max-width: 1024px) {
    #nav-menu {
        width: 200px;
        padding: 2rem 1rem;
    }

    #nav-header h2 {
        font-size: 1.5rem;
    }

    #report-list {
        grid-template-columns: 1fr;
    }

    .popup-content {
        width: 95%;
        height: 95%;
    }

    .popup-layout {
        flex-direction: column;
    }

    .popup-nav,
    .popup-details {
        width: 100%;
        min-width: 100%;
    }

    .popup-nav {
        height: auto;
        padding: 2rem 1.5rem;
    }

    .popup-details {
        padding: 2rem 1.5rem;
        border-left: none;
        border-top: 1px solid rgba(0, 0, 0, 0.08);
    }

    .popup-image {
        min-height: 300px;
    }

    .popup-stats-container {
        padding: 2rem;
    }

    .popup-stats-header h2 {
        font-size: 1.5rem;
    }

    .stats-section {
        padding: 1.5rem;
    }

    .chart-bar-label {
        min-width: 100px;
        font-size: 0.75rem;
    }

    .chart-bar-count {
        min-width: 60px;
        font-size: 0.75rem;
    }
}

@media (max-width: 768px) {
    #nav-menu {
        width: 60px;
        padding: 2rem 0.5rem;
    }

    #nav-header h2 {
        font-size: 0.75rem;
        writing-mode: vertical-rl;
        text-orientation: upright;
    }

    .nav-item {
        font-size: 0.75rem;
        padding: 0.75rem 0.5rem;
    }

    #search-input {
        width: 250px;
    }

    #list-view {
        padding: 1.5rem;
    }

    .popup-stats-container {
        padding: 1.5rem;
    }

    .popup-stats-header {
        margin-bottom: 2rem;
    }

    .popup-stats-header h2 {
        font-size: 1.25rem;
    }

    .popup-stats-content {
        gap: 2rem;
    }

    .stats-section {
        padding: 1rem;
    }

    .stats-section-title {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .chart-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .chart-bar-label {
        min-width: auto;
        width: 100%;
        text-align: left;
        font-size: 0.875rem;
    }

    .chart-bar-visual {
        width: 100%;
    }

    .chart-bar-count {
        min-width: auto;
        width: 100%;
        text-align: left;
    }
}

/* ========== 지도 뷰 ========== */
#map-view {
    position: relative;
    background: #000000;
}

#map-region-caption {
    position: absolute;
    top: 3rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 12px;
    border-radius: 9999px;
    background: rgba(0, 0, 0, 0.6);
    color: #ffffff;
    font-size: 14px;
    line-height: 1.2;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
    z-index: 1000;
}

#map-region-caption.show {
    opacity: 1;
}

#map-container {
    width: 100%;
    height: 100%;
    background: #000000;
    /* 하드웨어 가속 활성화 */
    transform: translateZ(0);
    will-change: transform;
}

/* Leaflet 레이어 최적화 */
.leaflet-pane {
    will-change: transform;
}

.leaflet-marker-pane,
.leaflet-overlay-pane {
    transform: translateZ(0);
}

/* Leaflet 다크 테마 오버라이드 */
.leaflet-container {
    background: #000000 !important;
    font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", sans-serif;
}

/* 타일 없이 사용하므로 필터 불필요 */
.leaflet-tile-pane {
    display: none;
}

/* 줌 컨트롤 - 우측 중앙 */
.leaflet-top.leaflet-right {
    top: 50% !important;
    right: 2rem !important;
    transform: translateY(-50%) !important;
}

.leaflet-control-zoom {
    border: none !important;
    box-shadow: none !important;
    margin: 0 !important;
}

.leaflet-control-zoom a {
    background: rgba(0, 0, 0, 0.9) !important;
    color: rgba(255, 255, 255, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    width: 44px !important;
    height: 44px !important;
    line-height: 44px !important;
    font-size: 20px !important;
    transition: all 0.2s;
}

.leaflet-control-zoom a:hover {
    background: rgba(0, 0, 0, 1) !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

.leaflet-control-zoom-in {
    border-radius: 4px 4px 0 0 !important;
}

.leaflet-control-zoom-out {
    border-radius: 0 0 4px 4px !important;
    border-top: none !important;
}

/* 줌 레벨 표시 패널 */
#zoom-display-panel {
    position: absolute;
    right: 2rem;
    top: calc(50% + 55px);
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.5rem 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    font-variant-numeric: tabular-nums;
    z-index: 1000;
    text-align: center;
    min-width: 44px;
}

.leaflet-control-attribution {
    background: rgba(0, 0, 0, 0.8) !important;
    color: rgba(255, 255, 255, 0.4) !important;
    font-size: 10px !important;
    padding: 2px 8px !important;
}

.leaflet-control-attribution a {
    color: rgba(0, 229, 255, 0.6) !important;
}

/* 뷰 전환 버튼 */
#view-toggle-button {
    padding: 0.625rem;
}

/* 지도 레이어 컨트롤 */
#map-layer-controls {
    position: absolute;
    top: 2rem;
    left: 2rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    background: rgba(0, 0, 0, 0.9);
    padding: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    max-width: 360px;
}

.map-layer-description {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.map-layer-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.map-layer-body {
    font-size: 0.9rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.8);
}

.map-layer-control {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.5rem 0;
}

.map-layer-control input[type="checkbox"] {
    display: none;
}

.map-layer-control label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.2s;
    user-select: none;
}

.map-layer-control:hover label {
    color: rgba(255, 255, 255, 0.9);
}

.map-layer-control input[type="checkbox"]:checked + label {
    color: #ffffff;
}

.map-layer-control input[type="checkbox"]:not(:checked) + label {
    color: rgba(255, 255, 255, 0.3);
}

.map-layer-control input[type="checkbox"]:not(:checked) + label .layer-dot,
.map-layer-control input[type="checkbox"]:not(:checked) + label .layer-line {
    opacity: 0.3;
}

.layer-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    box-shadow: 0 0 10px currentColor;
    transition: opacity 0.2s;
}

.layer-dot.bonjuk {
    background: #00ffcc;
    box-shadow: 0 0 8px rgba(0, 255, 204, 0.6);
}

.layer-dot.damage {
    background: #ff66cc;
    box-shadow: 0 0 8px rgba(255, 102, 204, 0.6);
}

.layer-line {
    width: 28px;
    height: 3px;
    background: linear-gradient(90deg, #ff6b6b, #ffa94d, #ffd43b, #69db7c, #4dabf7, #da77f2);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    transition: opacity 0.2s;
}

.layer-particle {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: radial-gradient(circle, #ffffff 0%, #4dabf7 40%, transparent 70%);
    box-shadow: 0 0 10px #4dabf7, 0 0 14px rgba(77, 171, 247, 0.5);
    animation: particle-pulse 1.5s ease-in-out infinite;
}

@keyframes particle-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.9;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
}

.map-layer-control input[type="checkbox"]:not(:checked) + label .layer-particle {
    opacity: 0.3;
    animation: none;
}

/* 지도 통계 패널 - 하단 가로 배치 */
#map-stats-container {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    right: 2rem;
    z-index: 1000;
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    pointer-events: none;
}

#map-stats-container > * {
    pointer-events: auto;
}

#map-stats-panel {
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: stretch;
    height: 165px;
    flex-shrink: 0;
    overflow: hidden;
}

.map-stats-header {
    padding: 1.125rem 1.5rem;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-width: 120px;
}

.map-stats-header h3 {
    font-size: 1.275rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.05em;
    margin: 0 0 0.35rem 0;
}

.map-stats-header .stat-total-value {
    font-size: 2.55rem;
    font-weight: 600;
    color: #ffffff;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.stats-toggle-btn {
    display: none;
}

.map-stats-content {
    padding: 1.125rem 1.5rem;
    display: flex;
    gap: 1.875rem;
    align-items: center;
}

.map-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
    min-width: 108px;
    overflow: hidden;
}

.map-stat-item.highlight {
    padding-bottom: 0;
    border-bottom: none;
    margin-bottom: 0;
}

.stat-label {
    font-size: 1.275rem;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.02em;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-value {
    font-size: 2.025rem;
    font-weight: 600;
    color: #00ffcc;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

.stat-coverage {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.4);
    font-variant-numeric: tabular-nums;
}

/* 바 그래프 섹션 - 우측 확장 */
#stats-bar-graphs {
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: stretch;
    height: 165px;
    flex: 1;
    max-width: 640px;
    overflow: hidden;
}

.bar-graph-section {
    flex: 1;
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    min-width: 0;
}

.bar-graph-section:last-child {
    border-right: none;
}

.bar-graph-title {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 0.5rem;
    letter-spacing: 0.03em;
}

.bar-graph-items {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    flex: 1;
    justify-content: center;
}

.bar-graph-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    height: 18px;
}

.bar-graph-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    min-width: 50px;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bar-graph-track {
    flex: 1;
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    min-width: 50px;
}

.bar-graph-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease-out;
}

.bar-graph-fill.gender-male {
    background: linear-gradient(90deg, #4dabf7 0%, #228be6 100%);
}

.bar-graph-fill.gender-female {
    background: linear-gradient(90deg, #f783ac 0%, #e64980 100%);
}

.bar-graph-fill.damage-death {
    background: linear-gradient(90deg, #ff6b6b 0%, #c92a2a 100%);
}

.bar-graph-fill.damage-missing {
    background: linear-gradient(90deg, #ffa94d 0%, #e8590c 100%);
}

.bar-graph-fill.damage-injury {
    background: linear-gradient(90deg, #69db7c 0%, #2b8a3e 100%);
}

.bar-graph-fill.region {
    background: linear-gradient(90deg, #00ffcc 0%, #00aa88 100%);
}

.bar-graph-fill.age {
    background: linear-gradient(90deg, #da77f2 0%, #9c36b5 100%);
}

.bar-graph-count {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    min-width: 45px;
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* 뷰포트 상세 통계 패널 - 우측 확장 */
#viewport-stats-panel {
    display: none !important;
}

#viewport-stats-panel .viewport-header {
    padding: 0.75rem 1rem;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-width: 80px;
}

#viewport-stats-panel .viewport-header h3 {
    font-size: 0.9rem;
    font-weight: 400;
    color: #ff66cc;
    letter-spacing: 0.03em;
    margin: 0 0 0.35rem 0;
    text-align: center;
    line-height: 1.3;
}

#viewport-stats-panel .viewport-header .stat-value {
    font-size: 1.6rem;
    font-weight: 600;
    color: #ff66cc;
    font-variant-numeric: tabular-nums;
}

#viewport-stats-panel .viewport-content {
    padding: 0.75rem 1rem;
    display: flex;
    gap: 1rem;
    align-items: center;
}

#viewport-stats-panel .viewport-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    min-width: 64px;
}

#viewport-stats-panel .viewport-stat .stat-label {
    font-size: 0.8rem;
}

#viewport-stats-panel .viewport-stat .stat-value {
    font-size: 1.2rem;
    color: #ff66cc;
}

.viewport-regions {
    padding: 0.5rem 0.75rem;
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.25rem;
    max-width: 110px;
}

.viewport-region-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.viewport-region-name {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.viewport-region-count {
    font-size: 0.875rem;
    font-weight: 600;
    color: #ff66cc;
    font-variant-numeric: tabular-nums;
}

/* 상세 통계 영역 - 숨김 (가로 배치에서 불필요) */
.map-stats-detail {
    display: none !important;
}

.stats-tabs, .stats-tab, .stats-tab-content {
    display: none !important;
}

.map-stats-footer {
    display: none;
}

#map-zoom-level {
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.4);
    font-variant-numeric: tabular-nums;
}

.stats-note {
    display: none;
}

/* 지도 안내 */
.map-instruction {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 1rem 2rem;
    background: rgba(0, 0, 0, 0.85);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.875rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.5s ease-out;
    backdrop-filter: blur(10px);
    white-space: nowrap;
}

.map-instruction.visible {
    opacity: 1;
}

.map-instruction.hidden {
    opacity: 0;
}

/* Canvas 글로우 효과를 위한 커스텀 Leaflet 레이어 */
.leaflet-overlay-pane canvas {
    filter: none;
}

/* 마커 스타일 (글로우 효과) */
.map-glow-marker {
    border-radius: 50%;
    filter: blur(0);
}

.map-glow-marker.bonjuk {
    background: radial-gradient(circle,
        rgba(0, 255, 204, 0.9) 0%,
        rgba(0, 255, 204, 0.5) 30%,
        rgba(0, 255, 204, 0.2) 60%,
        rgba(0, 255, 204, 0) 100%
    );
    box-shadow: 0 0 15px rgba(0, 255, 204, 0.6),
                0 0 30px rgba(0, 255, 204, 0.3);
}

.map-glow-marker.damage {
    background: radial-gradient(circle,
        rgba(255, 102, 204, 0.9) 0%,
        rgba(255, 102, 204, 0.5) 30%,
        rgba(255, 102, 204, 0.2) 60%,
        rgba(255, 102, 204, 0) 100%
    );
    box-shadow: 0 0 20px rgba(255, 102, 204, 0.6),
                0 0 40px rgba(255, 102, 204, 0.3);
}

/* 팝업 스타일 (지도용) */
.leaflet-popup-content-wrapper {
    background: rgba(0, 0, 0, 0.95) !important;
    color: #ffffff !important;
    border-radius: 0 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5) !important;
}

.leaflet-popup-content {
    margin: 1rem 1.25rem !important;
    font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", sans-serif !important;
    line-height: 1.6 !important;
}

.leaflet-popup-tip {
    background: rgba(0, 0, 0, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: none !important;
}

.leaflet-popup-close-button {
    color: rgba(255, 255, 255, 0.6) !important;
    font-size: 20px !important;
    padding: 8px !important;
}

.leaflet-popup-close-button:hover {
    color: #ffffff !important;
}

/* 지도 팝업 컨텐츠 */
.map-popup-title {
    font-size: 1rem;
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.map-popup-count {
    font-size: 0.875rem;
    color: #00ffcc;
    margin-bottom: 0.5rem;
}

.map-popup-detail {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
}

/* 지도 뷰 반응형 */
@media (max-width: 1200px) {
    #stats-bar-graphs {
        max-width: 400px;
    }
}

@media (max-width: 900px) {
    #map-stats-container {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    #stats-bar-graphs {
        display: none;
    }

    #viewport-stats-panel {
        max-width: 200px;
    }
}

@media (max-width: 768px) {
    #map-layer-controls {
        top: 1rem;
        left: 1rem;
        padding: 0.875rem;
    }

    .map-layer-control label {
        font-size: 0.8rem;
    }

    #map-stats-container {
        bottom: 0.75rem;
        left: 0.75rem;
        right: 0.75rem;
    }

    #map-stats-panel {
        height: 120px;
    }

    .map-stats-header {
        padding: 0.75rem 1.125rem;
        min-width: 98px;
    }

    .map-stats-header h3 {
        font-size: 1.05rem;
    }

    .map-stats-header .stat-total-value {
        font-size: 1.875rem;
    }

    .map-stats-content {
        padding: 0.75rem 1.125rem;
        gap: 1.5rem;
    }

    .map-stat-item {
        min-width: 83px;
    }

    .stat-label {
        font-size: 0.975rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .stat-coverage {
        display: none;
    }

    #viewport-stats-panel {
        height: 80px;
        max-width: 180px;
    }

    #viewport-stats-panel .viewport-header {
        padding: 0.5rem 0.75rem;
        min-width: 60px;
    }

    #viewport-stats-panel .viewport-header h3 {
        font-size: 0.6rem;
    }

    #viewport-stats-panel .viewport-header .stat-value {
        font-size: 1.1rem;
    }

    #viewport-stats-panel .viewport-content {
        display: none;
    }

    .viewport-regions {
        display: none;
    }

    .map-instruction {
        font-size: 0.75rem;
        padding: 0.75rem 1.5rem;
    }
}

/* ========== 가상 키보드 ========== */
.virtual-keyboard {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(20, 20, 20, 0.98);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 2rem 2rem;
    z-index: 3000;
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    animation: slideUp 0.2s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.virtual-keyboard.hiding {
    animation: slideDown 0.2s ease-out forwards;
}

@keyframes slideDown {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(100%);
    }
}

.vk-row {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
}

.vk-key {
    min-width: 60px;
    height: 60px;
    font-size: 1.25rem;
    font-weight: 500;
    background: rgba(60, 60, 60, 0.9);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.1s;
    font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", sans-serif;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.vk-key:hover {
    background: rgba(80, 80, 80, 0.9);
}

.vk-key:active {
    background: rgba(100, 100, 100, 0.9);
    transform: scale(0.95);
}

.vk-shift,
.vk-backspace {
    min-width: 80px;
    font-size: 1.5rem;
}

.vk-shift.active {
    background: rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

.vk-space {
    flex: 1;
    max-width: 400px;
    font-size: 1rem;
}

.vk-enter {
    min-width: 100px;
    background: rgba(255, 255, 255, 0.9);
    color: #000000;
    font-weight: 600;
}

.vk-enter:hover {
    background: rgba(255, 255, 255, 1);
}

.vk-close {
    min-width: 80px;
    background: rgba(100, 100, 100, 0.5);
}

.vk-close:hover {
    background: rgba(120, 120, 120, 0.6);
}

.search-input.vk-active {
    border-color: rgba(255, 255, 255, 0.5) !important;
    background: rgba(0, 0, 0, 0.8) !important;
}
