﻿/* 기본 스타일 */
*, *:before, *:after {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

body {
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    overflow-x: hidden;
}

div, span, p {
    margin: 0;
}

/* 메인 프레임 스타일링 */
html {
    font-family: 'Nanum Gothic', Gulim, sans-serif;
    font-size: 12px;
}

body {
    max-width: 1280px;
    width: 100%;
    font-family: 'Nanum Gothic', Gulim, sans-serif;
    background: #393658;
    letter-spacing: -0.5px;
    padding: 0;
}

header, footer {
    width: 100%;
    color: #eee;
    text-align: center;
    margin: 5px auto 20px;
}

footer p {
    margin: 4px 0;
}

section {
    margin-top: 80px;
}

/* 스크롤바 커스텀 */
::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-track {
    box-shadow: inset 0 0 5px white;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.7);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.9);
}

/* 헤더 */
.header-title {
    width: 100%;
}

.header-title #title {
    font-size: 2em;
    margin-top: 25px;
}

/* 네비게이션 */
nav {
    width: 100%;
    background: #2f2c46;
    position: fixed;
    top: 0;
    left: 0;
    text-align: left;
    padding: 5px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.15);
    margin: 0 auto;
}

nav div {
    display: inline-block;
    vertical-align: middle;
}

/* 네비게이션 로고 */
nav div.nav-logo {
    margin-right: 10px;
}

/* 검색창 */
div.header-search {
    width: 520px;
}

div.header-search #search-input {
    width: 100%;
    background: #28283c;
    color: #fff;
    font-size: 13px;
    padding: 10px;
    border: 0;
    outline: 0;
}

div.header-search #search-input:focus {
    background: #fff;
    color: #000;
}

/* 메뉴 */
div.header-menu {}

div.header-menu button {
    display: inline-block;
    color: #ccc;
    background:transparent;
    font-size: 1.32em;
    font-weight: bold;
    text-decoration: none;
    padding: .2em;
    border:0;
    cursor:pointer;
}

div.header-menu button:nth-child(1) {
    margin-left: .2em;
}

div.header-menu button:last-child {
}

div.header-menu button:hover {
    color: #fff;
}

/* 정보 모달 */
.popup-overlay {
    display: none; /* 기본적으로 숨김 */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    overflow: auto;
}

.popup {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    width: 80%;
    max-width: 600px;
    box-shadow: 0px 2px 10px rgba(0,0,0,0.5);
}

.popup .header{
    background: #2c4176;
    font-size: 1.5em;
    font-weight: bold;
    color: #fff;
    padding: .6em;
}

.popup .content{
    font-size: 1.05em;
    margin: 10px;
    line-height: 1.5;
    }

.popup .content p span {
    display: inline-block;
    width: 15px;
    font-weight: bolder;
    text-align: center;
    margin-right: 4px;
}

.popup .content p span.info{
    background-color: #33b5e5;
    color: #ffffff;}

.popup .content p span.caution {
    background-color: #ecf0f1;
    color: #c0392b;
}

.close-popup {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    color: #aaa;
    font-size: 1.5em;
    text-decoration: none;
}

.close-popup:hover {
    color: #fff;
}

/* 메인 */
div#dccon-lists {
    margin-bottom: 15px;
}

div#dccon-lists .con-group {
    margin-bottom: 15px;
}

div#dccon-lists .con-group:last-child {
    margin-bottom: 0;
}

div#dccon-lists .con-group .group-category {
    display: inline-block;
    background: #28283c;
    color: white;
    font-weight: bold;
    font-size: 1.2em;
    padding: 0.5em 1em;
}

div#dccon-lists .con-group .group-category span {
    font-size: 0.9em;
    opacity: 0.7;
}

div#dccon-lists .con-group .group-caution {
    background: #1e1e25;
    color: white;
    text-align: center;
    font-size: 13px;
    padding: 10px;
}

div#dccon-lists .con-group .group-caution b {
    color: #9d7aa9;
}

div#dccon-lists .con-group .group-dccons {
    background: #28283c;
    padding: 10px;
}

div#dccon-lists .con-group .group-dccons .dccon-box {
    display: inline-block;
    max-width: 100px;
    width: 100px;
    overflow: hidden;
    cursor: pointer;
}

div#dccon-lists .con-group .group-dccons .dccon-box img {
    width: 100%;
    max-height: 100px;
}

div#dccon-lists .con-group .group-dccons .dccon-box span#dccon-command {
    display: inline-block;
    width: 100%;
    min-height: 38px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 1em;
    text-align: center;
    padding: 0.4em 0;
    counter-increment: con-counts;
}

div#dccon-lists .con-group .group-dccons .dccon-box:hover span#dccon-command,
div#dccon-lists .con-group .group-dccons .dccon-box:focus span#dccon-command {
}

/* 검색 결과 없음 메시지 */
section #no-results-message {
    text-align: center;
    color: #fefefe;
    font-size: 2em;
    padding: 2em 0;
}

/* 토스트 메시지 스타일 */
section .toast {
    visibility: hidden;
    min-width: 250px;
    margin-left: -125px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 2px;
    position: fixed;
    z-index: 9999;
    left: 50%;
    bottom: 30px;
    padding: 16px;
    font-size: 17px;
    box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.2);
}

/* 토스트 메시지 표시 스타일 */
section .toast.show {
    visibility: visible;
    -webkit-animation: fadein 0.5s, fadeout 0.5s 2.5s;
    animation: fadein 0.5s, fadeout 0.5s 2.5s;
}

/* 애니메이션 */
@-webkit-keyframes fadein {
    from { opacity: 0; }
    to { opacity: 1; }
}

@-webkit-keyframes fadeout {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes fadein {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeout {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* 반응형 디자인 */
@media (max-width: 1200px) {
    .header-title #title {
        font-size: 1.5em;
    }

    div.header-search {
        width: 400px;
    }
}

@media (max-width: 992px) {
    section{margin-top:100px}
    
    div.header-search {
        display: inline-block;
        width: calc(100% - 50%);
    }

    nav {
        padding: 10px;
    }

    .header-title #title {
        font-size: 1.3em;
    }

    div.header-menu a {
        font-size: 1.2em;
    }
}

@media (max-width: 768px) {
    .header-title #title {
        font-size: 1.2em;
    }

    div.header-search {
        display: inline-block;
        width: calc(100% - 50%);
    }

    nav {
        padding: 8px;
    }

    nav input#search-input{
    }
    
    div.header-menu a {
        font-size: 1.1em;
        display: inline-block;
        margin: 5px 0;
    }

    div#dccon-lists .con-group .group-dccons .dccon-box {
        max-width: 80px;
        width: 80px;
    }

    section #no-results-message {
        font-size: 1.5em;
    }
}

@media (max-width: 576px) {
    .header-title #title {
        font-size: 1em;
    }

    nav {
        padding: 5px;
    }

    div.header-menu a {
        font-size: 1em;
    }

    div#dccon-lists .con-group .group-dccons .dccon-box {
        max-width: 60px;
        width: 60px;
    }

    section #no-results-message {
        font-size: 1.2em;
    }
}

/* 로더 래퍼: 화면 전체 중앙 배치 */
#dccon-loader-wrap {
  position: fixed;        /* 화면 중앙 고정 */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 9999;          /* 항상 위에 보이도록 */
}

/* 로딩 스피너 */
.loader {
  width: 48px;
  height: 48px;
  border: 5px solid #FFF;
  border-bottom-color: #FF3D00;
  border-radius: 50%;
  box-sizing: border-box;
  animation: rotation 1s linear infinite;
}

/* 로딩 텍스트 */
.loader-text {
  margin-top: 12px;
  font-size: 1rem;
  font-weight: bold;
  color: #555;
}

@keyframes rotation {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .loader { animation: none; }
}
