@charset "utf-8";

/* ====== 전용화면적용(admin-dashboard.html) ====== */
body.dashboard-page {
    font-family: Arial, sans-serif;
    text-align: center;
    background: radial-gradient(circle, #FFDF00 0%, #D4AF37 25%, #CFB53B 50%, #C5B358 75%, #b8860b 100%);
    background-attachment: fixed;
    background-size: 200% 200%;
    animation: goldGlow 6s infinite alternate;
}

/* ====== 첫화면(index.html) ====== */
body.index-page .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

body.index-page .firework {
    position: fixed;
    pointer-events: none;
    z-index: 2000;
}

body.index-page .particle {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    animation: explode 0.9s ease-out forwards;
    transform-origin: center;
}

body.index-page #index-page #fireworksCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    /* 모든 요소 위에 */
    pointer-events: none;
}

body.index-page .magic-circle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9000;
    /* fireworksCanvas(9999) 바로 아래 */
    pointer-events: none;
}

body.index-page .glow-circle {
    position: absolute;
    width: 50px;
    height: 50px;
    background-color: #cbcbcbe8;
    border-radius: 50%;
    filter: blur(10px);
    animation: pulse 3s infinite alternate ease-in-out;
    cursor: pointer;
}

/* ✨ 빛 퍼짐 전용 레이어 */
body.index-page .glow-circle::after {
    content: "";
    position: absolute;
    inset: -15px;
    border-radius: 50%;
    background: radial-gradient(circle,
            rgba(0, 220, 255, 0.6) 0%,
            rgba(0, 200, 255, 0.3) 40%,
            transparent 70%);
    filter: blur(12px);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

/* 클릭 후 */
body.index-page .glow-circle.clicked::after {
    opacity: 1;
}

body.index-page .glow-effect {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 1) 100%);
    animation: glowAnimation 2.0s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 9999;
}

/* 제목 스타일 */
body.index-page #mainTitle {
    font-size: 36px;
    margin-bottom: 20px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
}

body.index-page .popup-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);

    z-index: 1500;
}

body.index-page .popup-box {
    background-color: white;
    color: #000;
    padding: 20px;
    border-radius: 5px;
    text-align: center;
    width: 350px;
}

body.index-page .popup-image {
    max-height: 200px;
    margin-top: 10px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

body.index-page .popup-message {
    margin-top: 10px;
}

body.index-page .popup-confirm-button {
    background-color: #fff;
    color: #000;
    padding: 10px 20px;
    margin-top: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    border: none;
}

/* 버튼을 감싸는 컨테이너 */
body.index-page .button_container {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    background-color: #f1f1f1;
    width: 300px;
    height: 200px;
    padding: 20px;
    margin: 0 auto;
    border-radius: 8px;
    border: 5px solid #0066cc;
    gap: 15px;
}

body.index-page #modeSelection {
    position: relative;
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

body.index-page #adminModeButton {
    background: #ff0000;
    color: white;
    display: none;
    /* 초기에는 숨김 */
    border: none;
}

body.index-page #adminModeButton:hover {
    background: #cca000;
}

body.index-page #userModeButton {
    background: rgba(0, 0, 0, 0.75);
    color: white;
    border: none;
}

body.index-page #userModeButton:hover {
    background: rgba(128, 128, 128, 0.348);
}

body.index-page button {
    width: 200px;
    margin: 10px auto;
    padding: 15px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    text-align: center;
    white-space: nowrap;
    transition: background-color 0.3s;
}

body.index-page canvas {
    width: 100%;
    height: 100%;
    pointer-events: none;
    /* 캔버스가 클릭을 방해하지 않도록 설정 */
}

/* 문 애니메이션 */
body.index-page #door-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    /* 초기에는 숨김 */
    z-index: 10;
}

body.index-page .door {
    position: absolute;
    width: 50%;
    height: 100%;
    background-color: #555;
    border: 2px solid #333;
    transition: transform 2s ease-in-out;
}

body.index-page .door.left {
    left: 0;
    transform-origin: left center;
    /* Left edge for right door */
    transform: rotateY(0deg);
    /* 초기 상태 */
    transition: transform 2s ease-in-out;
}

body.index-page .door.right {
    right: 0;
    transform-origin: right center;
    /* Right edge for left door */
    transform: rotateY(0deg);
    /* 초기 상태 */
    transition: transform 2s ease-in-out;
}

/* ====== 로그인 페이지(admin-login.html ====== */

body.login-page h1 {
    margin-bottom: 10px;
    font-size: 25px;
    text-align: center;
}

body.login-page .popup-message {
    position: fixed;
    width: 210px;
    top: 35%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
    text-align: center;
    opacity: 0;
    transition: all 0.3s ease-in-out;
    font-size: 15px;
    z-index: 1000;
}

body.login-page .popup-button {
    display: block;
    margin: 15px auto 0;
    padding: 8px 16px;
    background-color: #fff;
    color: #000;
    border: none;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.2);
    border-radius: 5px;
    cursor: pointer;
}

body.login-page .login-container {
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: aliceblue;
    width: 75%;
    margin: 65px auto;
    padding: 5px 10px;
    box-sizing: border-box;
    transition: width 0.5s ease-in-out;
}

body.login-page #loginForm {
    margin: 0 auto;
}

body.login-page #loginButton {
    background-color: #000000;
    color: white;
    padding: 7px 15px;
    margin: 15px auto;
    transition: transform 0.3s ease-in-out;
    border-radius: 5px;
}

body.login-page .login-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 20px;
}

body.login-page .login-row input[type="password"] {
    flex: 1;
    min-width: 45%;
    border-radius: 5px;
    background: #fff;
    padding: 10px 0;
}

body.login-page .login-row button {
    flex-shrink: 0;
    border-radius: 0 5px 5px 0;
}

body.login-page .floating-input {
    position: relative;
    width: 100%;
}

body.login-page .floating-input input {
    width: 100%;
    padding: 14px 12px;
    font-size: 16px;
    border: 2px solid #bfcfe0;
    border-radius: 4px;
    outline: none;
    background: transparent;
}

body.login-page .floating-input label {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #8a9bb0;
    font-size: 14px;
    pointer-events: none;
    padding: 0 6px;
    transition: 0.2s ease;
}

body.login-page input[type="password"] {
    flex: 1;
    /* 입력창이 버튼보다 넓게 */
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px 0 0 5px;
    /* 왼쪽 모서리 둥글게 */
}

/* 문 애니메이션 */
body.login-page #door-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    /* 초기에는 숨김 */
    z-index: 10;
}

body.login-page .door {
    position: absolute;
    width: 50%;
    height: 100%;
    background-color: #555;
    border: 2px solid #333;
    transition: transform 2s ease-in-out;
}

body.login-page .door.left {
    left: 0;
    transform-origin: left center;
    /* Left edge for right door */
    transform: rotateY(0deg);
    /* 초기 상태 */
    transition: transform 2s ease-in-out;
}

body.login-page .door.right {
    right: 0;
    transform-origin: right center;
    /* Right edge for left door */
    transform: rotateY(0deg);
    /* 초기 상태 */
    transition: transform 2s ease-in-out;
}

/* 관리자 버튼을 원형으로 스타일링 (3D 효과 적용) */
body.login-page .admin-styled-button {
    display: block;
    justify-content: center;
    align-items: center;
    position: relative;
    font-size: 16px;
    font-weight: bold;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle at 30% 30%, #ff4444, #d40000 70%);
    border-radius: 50%;
    color: white;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0px 9px 0px #7a0000, 0px 15px 20px rgba(0, 0, 0, 0.5);
    margin: 20px auto;

}

/* 호버 효과: 내부 그림자로 오목하게 표현 */
body.login-page .admin-styled-button:hover {
    transform: scale(1.05);
    /* 오목해 보이도록 inset 그림자 적용 */
    box-shadow: inset 3px 3px 8px rgba(0, 0, 0, 0.3),
        inset -3px -3px 8px rgba(255, 255, 255, 0.2),
        0px 6px 0px #a00000,
        0px 10px 15px rgba(0, 0, 0, 0.5);
}

/* 클릭(눌림) 효과: 더 깊게 오목해 보이도록 inset 그림자 강화 */
body.login-page .admin-styled-button:active {
    transform: scale(0.92);
    box-shadow: inset 5px 5px 12px rgba(0, 0, 0, 0.4),
        inset -5px -5px 12px rgba(255, 255, 255, 0.25),
        0px 3px 0px #a00000,
        0px 6px 10px rgba(0, 0, 0, 0.3);
}

/* ====== 대시보드(admin-dashboard.html) ====== */
body.dashboard-page h1 {
    margin-bottom: 20px;
}

/* 🔥 왼쪽 버튼 그룹 (뒤로가기 + 메뉴 버튼) */
body.dashboard-page .left-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* 🔥 사이드바 열기 버튼 */
body.dashboard-page .sidebar-toggle {
    position: relative;
    background-color: #00000000;
    color: black;
    padding: 15px 19px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.5s, transform 0.5s ease-in-out;
    /* ✅ 다른 요소에 가려지지 않도록 변경 */
    z-index: 1000;
    /* ✅ 다른 요소 위에 배치 */
}

body.dashboard-page .sidebar-toggle:hover {
    background-color: #666;
}

/* 🔥 사이드바 스타일 */
body.dashboard-page .sidebar {
    position: fixed;
    top: 0;
    left: -250px;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 40px 70px 0 30px;
    transition: left 0.5s ease-in-out;
    z-index: 9999;
}

/* 🔥 사이드바 열렸을 때 */
body.dashboard-page .sidebar.open {
    left: 0;
}

/* 🔥 닫기 버튼 */
body.dashboard-page .close-sidebar {
    display: block;
    position: absolute;
    color: white;
    font-size: 20px;
    top: 50px;
    right: 15px;
    background: none;
    border: none;
    cursor: pointer;
    margin-bottom: 20px;
}

/* 🔥 사이드바 메뉴 */
body.dashboard-page .sidebar ul {
    list-style: none;
    padding: 0;
}

body.dashboard-page .sidebar ul li {
    margin: 15px 0;
}

body.dashboard-page .sidebar ul li a {
    color: white;
    text-decoration: none;
    font-size: 18px;
}

body.dashboard-page .sidebar ul li a:hover {
    text-decoration: underline;
}

/* 🟡 투명 배경을 포함한 컨테이너 스타일 */
body.dashboard-page .adminbar-container {
    display: flex;
    align-items: center;
    position: absolute;
    /* 📌 고정 위치 */
    top: 0;
    left: 0;
    right: 0;
    width: 100vw;
    /* 🔥 전체 너비 확장 */
    height: 110px;
    background: rgba(255, 255, 255, 0.2);
    /* 🔥 반투명 흰색 */

    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
    /* 🔥 살짝 입체감 */
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
    /* 🔥 부드러운 이동 효과 */
}

/* 🔥 사이드바 열리면 adminbar-container 내부 요소들이 위로 사라짐 */
body.dashboard-page .adminbar-container.hidden {
    transform: translateY(-100px);
    /* 🔥 위로 이동 */
    opacity: 0;
    /* 🔥 투명하게 */
}

/* 🟡 중앙 텍스트 스타일 */
body.dashboard-page .adminbar-container h1 {
    flex-grow: 1;
    text-align: center;
    color: white;
}

body.dashboard-page .back-button {
    background: rgba(255, 255, 255, 0.2);
    color: black;
    border: 1px solid #ccc;
    border-radius: 5px;
    cursor: pointer;
}

body.dashboard-page .logout-button {
    background: rgba(255, 255, 255, 0.2);
    color: black;
    padding: 10px 20px;
    border: 1px solid #ccc;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    position: absolute;
    top: 10px;
    right: 25px;
}

/* 🔥 텍스트 모드 - 버튼 */
body.dashboard-page .post-item .buttons {
    display: flex;
    gap: 5px;
}

body.dashboard-page .edit-modal {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);

    z-index: 10000;
}

body.dashboard-page .edit-modal-content {
    background: #c0c0c065;
    padding: 20px;
    border-radius: 5px;
    width: 85%;
}

body.dashboard-page .editor-buttons {
    margin: 0 10px;
}

body.dashboard-page .editor-buttons button {
    border: none;
    background: none;
    cursor: pointer;
    font-size: 22px;
    padding: 5px;
    color: black;
}

body.dashboard-page .edit-content {
    min-height: 150px;
    background: #fff;
    box-shadow: none;
    outline: none;
    text-shadow: none;
    text-decoration: none;
    font-style: normal;
    overflow-y: auto;
    text-align: left;
    padding: 8px;
}

body.dashboard-page .edit-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;

    width: 100%;
    height: 100%;
    border-radius: 8px;
}

body.dashboard-page hr {
    width: 80%;
    margin: 5px 0;
    /* 상하 간격 */
}

/* ✅ 점선 스타일 */
body.dashboard-page .dashed-line {
    width: 100%;
    border: none;
    border-top: 1px dashed #000;
    /* 점선 스타일 적용 */
}

body.dashboard-page .edit-button-group {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 20px;

}

body.dashboard-page #descriptionCounter {
    font-size: 14px;
    color: gray;
    text-align: right;
    margin-top: 5px;
    display: block;
    /* 🔥 인라인 요소가 아닌 블록 요소로 설정 */
    width: 100%;
    /* 🔥 부모 요소의 전체 너비 사용 */
}

body.dashboard-page .button-separator {
    width: 10px;
}

/* 오버레이 (showpopup) */
body.dashboard-page .popup-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);

    z-index: 1500;
}

/* 일반 팝업 컨테이너 */
body.dashboard-page .popup-container {
    background-color: white;
    color: #000;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

/* 일반 팝업 버튼 */
body.dashboard-page .popup-container button {
    border-radius: 5px;
    border: none;
    padding: 7px 15px;
    margin-top: 10px;
    cursor: pointer;
}

/* 수정/삭제 확인 팝업 컨테이너 */
body.dashboard-page .popup-edit-container {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 250px;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 20px;
    border: 1px solid #ccc;
    border-radius: 10px;
    z-index: 10001;
    text-align: center;
}

/* edit 팝업 내부 문단 여백 */
body.dashboard-page .popup-edit-container p {
    margin-bottom: 20px;
}

/* edit 팝업 버튼 */
body.dashboard-page .popup-edit-container button {
    border-radius: 5px;
    padding: 7px 15px;
    cursor: pointer;
}

/* 팝업 확인 버튼 스타일 */
body.dashboard-page .popup-confirm-button {
    border-radius: 5px;
    padding: 7px 15px;
    margin-top: 10px;
    /* 기존 inline 마진 */
    background: none;
    color: #000;
    /* 필요시 글자색 지정 */
    cursor: pointer;
    font-size: 1rem;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.2);
    transition: background-color 0.2s;
}

/* edit 팝업 취소 버튼 간격 */
body.dashboard-page .popup-edit-cancel {
    margin-left: 10px;
}


body.dashboard-page .edit-button {
    background-color: #007bff;
}

body.dashboard-page #popup-ok:hover {
    background-color: #adf5dfb2;
    transition-duration: 0.5s
}

body.dashboard-page #popup-cancel:hover {
    background-color: #f5adadb2;
    transition-duration: 0.5s
}

body.dashboard-page .delete-button {
    background-color: #dc3545;
}

body.dashboard-page .delete-button:hover {
    background-color: #dcc335a7;
    transition-duration: 0.5s
}

body.dashboard-page #saveEdit {
    background-color: #00000000;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 5px;
    border: none;
    color: white;
}

body.dashboard-page .button-separator {
    width: 2px;
    height: 30px;
    background-color: #ccc;
    margin: 0 10px;
    align-self: center;
}

body.dashboard-page #closeEdit {
    background-color: #00000000;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 5px;
    border: none;
    color: white;

}

/* 🔥 버튼을 일렬로 배치 */
body.dashboard-page .button-group {
    display: flex;
    justify-content: center;
    gap: 10px;
    /* ✅ 버튼 사이 간격 */
    max-width: 100%;
    width: 100%;

}

body.dashboard-page .change-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    transition: color 0.3s ease-in-out;
}

/* 🔥 버튼 기본 아이콘 색상 */
body.dashboard-page .change-button i {
    font-size: 24px;
    color: #444;
    /* ✅ 기본 아이콘 색상 */
    transition: color 0.3s ease-in-out, transform 0.1s ease-out;
}

/* 🔥 클릭 후 아이콘 색상 변경 */
body.dashboard-page .change-button.active i {
    color: #007bff;
    /* ✅ 아이콘 색상 변경 */
}

body.dashboard-page .post-form-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    max-height: 400px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    background-color: #ffffff;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: all 0.3s ease-in-out;
    overflow-x: hidden;
}

/* 🔥 이미지 스타일 */
body.dashboard-page .post-image {
    display: flex;
    width: 30px;
    height: 30px;
    object-fit: cover;
    border-radius: 5px;
    transition: transform 0.2s ease-in-out;
}

body.dashboard-page .post-image:hover {
    border: 4px solid #007bff;
}

/* 텍스트 모드 내부 아이템 */
body.dashboard-page .post-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    border-bottom: 1px solid #ccc;
    width: 100%;
    max-width: 100%;
}

/* 텍스트 모드(이미지) */
body.dashboard-page .post-item img {
    width: 80px;
    height: 80px;
    border-radius: 5px;
}

/* 텍스트 모드(파일명) */
body.dashboard-page .post-item .file-name {
    flex-grow: 1;
    text-align: center;
    font-weight: bold;
}

body.dashboard-page .post-chart-container {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    position: relative;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    height: auto;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #ffffff;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);

    overflow-x: hidden;
    transition: all 0.3s ease-in-out;
    /* ✅ 크기 변화가 부드럽게 적용 */
}

body.dashboard-page .chart-area {
    display: flex;
    flex-wrap: wrap;
    /* ✅ 내부 요소 줄바꿈 허용 */
    flex-direction: row;
    justify-content: center;
    align-items: center;
    /* ✅ 중앙 정렬로 변경 */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    gap: 20px;
}

body.dashboard-page #post-chart-container {
    position: relative;
    width: 400px;
    height: 400px;
}

body.dashboard-page canvas {
    width: 400px;
    height: 400px;
}

body.dashboard-page #chart-controls {
    position: absolute;
    top: 10px;
    /* 위쪽 여백 조절 */
    right: 10px;
    /* 오른쪽 여백 조절 */
    z-index: 10;
    /* 다른 요소보다 위에 표시 */
}

/* 이미지 표시기 container부분 */
body.dashboard-page .function-container {
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #ffffff;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
}

body.dashboard-page .function-container img {
    width: auto;
    max-width: 100%;
    height: 10vw;
    justify-self: center;
    object-fit: cover;
    border-radius: 5px;
    transition: transform 0.3s ease;
}

body.dashboard-page .function-container img:hover {
    transform: scale(1.1);
}

body.dashboard-page .sorting-wrapper {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    align-items: center;
    gap: 10px;
    padding: 15px 0;
}

body.dashboard-page .custom-button {
    border: none;
}

body.dashboard-page .custom-chart-button {
    border: 1px solid #ccc;
}

body.dashboard-page .button-group {
    margin: 20px 0;
    padding: 20px 0;
}

body.dashboard-page .popup-footer button {
    border-radius: 5px;
    padding: 8px 12px;
    margin: 5px;
    border: none;
    cursor: pointer;
}

body.dashboard-page #clearCanvas {
    background: #00000000;
    border: none;
    color: black;
}

/* 🔥 제목과 버튼을 한 줄로 정렬 */
body.dashboard-page .section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

body.dashboard-page .change-button-group {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

/* 🔥 h2를 가운데 정렬하기 위해 flex-grow 사용 */
body.dashboard-page .section-title {
    flex-grow: 1;
    font-size: 24px;
    text-align: center;
}

body.dashboard-page #devide {
    display: flex;
    flex-direction: row;
    margin: 0 auto;
    padding-top: 110px;
    justify-content: center;
}

body.dashboard-page .section {
    display: flex;
    position: relative;
    flex-direction: column;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;

    box-sizing: border-box;
    overflow-x: hidden;
    padding: 0 10px;
    margin: 10px;

    font-weight: bold;
    min-height: 450px;
    height: auto;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 15px;
    transition: transform 0.3s ease-in-out, left 0.3s ease-in-out;
}

body.dashboard-page #loadToggleBtn {
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
}

body.dashboard-page .section:first-child,
body.dashboard-page .section:nth-child(2) {
    width: 50%;
}

body.dashboard-page .section-row {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 15px;
    padding: 10px 10px;
    margin: 15px 10px;

}

/* 🔥 만약 내부 요소를 중앙 정렬하려면 추가 */
body.dashboard-page .section.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}


/* 🔥 사이드바 열릴 때 section-container 이동 */
body.dashboard-page .section.shifted {
    margin: 0 210px;
    width: calc(100% - 210px);
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

body.dashboard-page .subcategory-wrapper {
    min-width: 220px;
    align-self: center;
    /* ✅ 개별 중앙 정렬 */
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    background-color: #fff;
    margin-left: 15px;

}

body.dashboard-page #editModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    background: rgba(0, 0, 0, 0.5);

    display: flex;
    justify-content: center;
    align-items: center;

    z-index: 10000;
}

/* 기본은 숨김 */
body.dashboard-page #editModal.hidden {
    display: none;
}

/* 텍스트 모드일 때 갤러리 */
body.dashboard-page .post-form-container.text-mode #textGallery {
    display: flex;
    gap: 15px;
}

/* 텍스트 모드 컨테이너 */
body.dashboard-page .post-form-container.text-mode {
    margin-bottom: 20px;
    min-height: 400px;
    overflow-y: auto;
    padding-left: 7px;
    box-sizing: border-box;
}

/* 텍스트 모드 전용 레이아웃 */
body.dashboard-page .post-form-container.text-mode .gallery-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 이미지 모드일 때 컨테이너 스타일 */
body.dashboard-page .post-form-container.image-mode {
    object-fit: cover;
    overflow-y: auto;
    width: 100%;
    padding: 10px 0;
}

/* 이미지 모드 전용 레이아웃 */
body.dashboard-page .post-form-container.image-mode .gallery-container {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    justify-items: center;
    align-items: center;
}

/* 갤러리 기본 컨테이너 */
body.dashboard-page .gallery-container {
    width: 100%;
}

/* 게시물 아이템 */
body.dashboard-page .post-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}

/* 썸네일 이미지 */
body.dashboard-page .post-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
}

/* 제목 영역 */
body.dashboard-page .file-name {
    display: block;
    color: #333;
    font-size: 11px;
    flex: 1;
}

/* 버튼 영역 */
body.dashboard-page .buttons {
    display: flex;
    gap: 6px;
}


body.dashboard-page #categoryInfoTable {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    font-size: 14px;
}

body.dashboard-page #categoryInfoTable th {
    padding: 8px;
    background-color: #e6ffe6;
}

body.dashboard-page #categoryInfoTable td {
    padding: 8px;
}

body.dashboard-page #categoryInfoTable tr:not(:last-child) {
    border-bottom: 1px dashed #ccc;
}

body.dashboard-page #donutChart {
    width: 350px !important;
    height: 350px !important;
    max-width: 100%;
    display: block;
    margin: 0 auto;
}

body.dashboard-page #radarChart {
    width: 100% !important;
    height: 100% !important;
    max-width: 500px;
    max-height: 400px;
    display: block;
    margin: 0 auto;
}

body.dashboard-page #lineChart {
    width: 350px !important;
    height: 350px !important;
    max-width: 100%;
    display: none;
    margin: 0 auto;
    background: transparent;
}

body.dashboard-page .chart-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 350px;
    height: 350px;
    min-height: 300px;
    /* ✅ 최소 높이 지정 */

}

body.dashboard-page .chart-legend-right .chartjs-legend {
    display: flex !important;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding-left: 10px;
}

/* ====== 모드선택 페이지(mode-selection.html) ====== */

/* 제목 스타일 */
body.mode-page h1 {
    font-size: 36px;
    margin-bottom: 20px;
    /* 제목과 버튼 간의 간격 */
    white-space: nowrap;
    overflow: hidden;
}

/* ✅ container를 화면 정중앙으로 이동 */
body.mode-page .container {
    position: absolute;
    width: 90vw;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 1;
}

body.mode-page .mode-selection-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    background-color: #ffffff;
    width: 500px;
    border-radius: 8px;
    gap: 30px;
}

/* 버튼 그룹 스타일 */
body.mode-page .button-group {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    width: 90%;
    box-sizing: border-box;
}

body.mode-page .logout-button {
    background-color: #ff0000;
    color: white;
    padding: 10px 15px;
    width: 150px;
    height: 50px;
    transition: transform 0.3s ease-in-out;
    border-radius: 5px;
    cursor: pointer;
    border: none;
    font-size: 16px;
    margin-bottom: 30px;
}

/* 🔹 팝업 오버레이 (배경) */
body.mode-page .popup-overlay {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);

    z-index: 1000;
}

/* 🔹 팝업 창 */
body.mode-page .popup {
    background: white;
    padding: 20px;
    border-radius: 5px;
    text-align: center;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3);
    min-width: 300px;
}

/* 🔹 팝업 메시지 */
body.mode-page .popup p {
    font-size: 18px;
    margin-bottom: 30px;
}

/* 🔹 확인 버튼 */
body.mode-page .popup-confirm {
    padding: 10px 20px;
    background-color: #fff;
    color: #000;
    border: none;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.2);
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

/* ====== 업로드 페이지(upload.html) ====== */

body.upload-page .category_container {
    display: flex;
    flex-direction: column;
    width: 90%;
}

body.upload-page #title_name {
    width: 75%;
    padding: 8px;
    font-size: 16px;
    border-radius: 5px;
    margin-bottom: 10px;

}

body.upload-page hr {
    width: 80%;
    margin: 10px 0;
    /* 상하 간격 */
}

/* ✅ 점선 스타일 */
body.upload-page .dashed-line {
    width: 100%;
    border: none;
    border-top: 1px dashed #000;
    /* 점선 스타일 적용 */
}

body.upload-page .upload-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 50%;
    margin: 0 auto;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    background-color: #f3f3f3;
}

body.upload-page .upload-container input[type="file"] {
    margin: 10px 0;
}

body.upload-page .upload-button {
    background-color: #000000;
    color: white;
    padding: 10px 15px;
    margin: 10px 0;
    transition: transform 0.3s ease-in-out;
    border-radius: 5px;
    cursor: pointer;
}

body.upload-page .popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

body.upload-page .popup-content {
    text-align: center;
}

body.upload-page .popup-buttons {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

body.upload-page .popup-buttons button {
    margin: 0 10px;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

body.upload-page .preview-container img {
    border: 3px solid #000000;
    border-radius: 5px;
    margin: 25px auto;
    padding: 15px;
    width: 85%;

}

body.upload-page .description-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #ffffff;

    width: fit-content;

    border-radius: 8px;
    width: 85%;
    padding: 10px;
}

body.upload-page .text-editor {
    width: 100%;
    min-height: 100px;
    border: none;
    outline: none;
    font-size: 16px;
    text-align: left;
    /* ✅ 기본값을 왼쪽 정렬로 설정 */
}

body.upload-page .description-box {
    min-height: 100px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    overflow-y: auto;
}

/* ✅ 글자 수 표시 스타일 (오른쪽 정렬) */
body.upload-page #descriptionCounter {
    font-size: 14px;
    color: gray;
    text-align: right;
    margin-top: 5px;
    display: block;
    /* 🔥 인라인 요소가 아닌 블록 요소로 설정 */
    width: 100%;
    /* 🔥 부모 요소의 전체 너비 사용 */
}

body.upload-page .editor-buttons {
    display: flex;
    justify-content: center;
    color: black;
    gap: 10px;
}

body.upload-page .editor-buttons button {
    border: none;
    background: none;
    cursor: pointer;
    font-size: 22px;
    padding: 5px;
    transition: color 0.3s;
}

body.upload-page .editor-buttons i {
    color: #000000;
    font-size: 22px;
}

body.upload-page select {
    width: 55%;
    padding: 8px;
    font-size: 16px;
    border-radius: 5px;
    margin-bottom: 10px;
}

/* ====== 클릭 페이지(click.html) ====== */

body.click-page h1 {
    text-align: center;
}

body.click-page .explan-container {
    max-width: 85%;
    margin: 70px auto;
    padding-bottom: 15px;
    background-color: #f5f5f5;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

body.click-page .plus_container {
    padding: 15px;
}

body.click-page .explan-detail-container {
    border: 1px solid #ccc;
    border-radius: 8px;
    margin: 18px;
}

body.click-page #exper_font {
    text-align: center;
}

body.click-page #exper_container {
    padding: 0 20px;
    text-align: left;
}


body.click-page .detail-toggle {
    margin-left: 10px;
    font-size: 12px;
    padding: 4px 8px;
    cursor: pointer;
    background: none;
    color: black;
}

body.click-page .detail-content {
    margin: 10px auto;
    padding-left: 10px;
    display: none;
}

/* ====== 게임 페이지(killing_game.html) ====== */

body.game-page h1 {
    text-align: center;
    margin: 20px 0;
}

body.game-page .game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

body.game-page .selected-image {
    max-width: 100px;
    border: 2px solid #000;
    border-radius: 10px;
    transition: transform 0.3s ease-in-out;
}

body.game-page .hidden-number {
    position: absolute;
    font-size: 20px;
    font-weight: bold;
    color: rgb(0, 0, 0);
}

body.game-page #playerNumber {
    position: absolute;
    font-size: 18px;
    font-weight: bold;
    color: blue;
    display: none;
}

body.game-page #foundNumbers {
    display: none;
    position: fixed;
    top: 10px;
    left: 10px;
    font-size: 20px;
    font-weight: bold;
    color: green;
    background: rgba(255, 255, 255, 0.8);
    padding: 5px 10px;
    border: 2px solid black;
    border-radius: 5px;
}

body.game-page #hints-container {
    display: flex;
    position: fixed;
    top: 3%;
    /* 화면 중앙 */
    right: 5px;
    /* 오른쪽 정렬 */
    transform: translateY(-50%);

    gap: 10px;
}

body.game-page .game-hint {
    display: block !important;
    /* 힌트가 무조건 표시되도록 설정 */
    opacity: 1 !important;
    width: 50px;
    height: auto;
}

body.game-page #victoryScreen {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 20px;
    border: 2px solid black;
    text-align: center;
    z-index: 9999;
    border-radius: 8px;
}

body.game-page #victoryScreen button {
    margin-top: 10px;
    padding: 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

/* 팝업창 스타일 */
body.game-page #instructionsPopup {
    display: block;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 8px;
    padding: 20px;
    z-index: 9999;
    text-align: center;
    width: 400px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
    pointer-events: auto;
    /* 클릭 이벤트 활성화 */
}

body.game-page #instructionsPopup h2 {
    margin-top: 0;
}

body.game-page #instructionsPopup button {
    border-radius: 5px;
    margin-top: 20px;
    padding: 8px 16px;
    cursor: pointer;
}

body.game-page #gameControlsPopup {
    display: none;
    /* ✅ 게임 시작 전에 숨김 */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 8px;
    padding: 20px;
    z-index: 9999;
    text-align: center;
    width: 400px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
    pointer-events: auto;
    /* 클릭 이벤트 활성화 */
}

body.game-page #gameControlsPopup h2 {
    margin-top: 0;
}

/* ====== 게시글 보기(post.html) ====== */
body.post-page .ptitle {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    gap: 10px;
}

body.post-page #picture {
    padding: 0;
    border: none;
    background: none;
}

body.post-page #picture img {
    width: 40px;
    height: 40px;
}

body.post-page h1 {
    text-align: center;
    margin: 20px 0;
}

/* 🔥 그림 그리기 팝업창 스타일 */
body.post-page .drawing-popup {
    display: none;
    border-radius: 5px;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 85%;
    height: 400px;
    background: #c0c0c065;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    text-align: center;
    padding: 10px;
    border: 1px solid #ccc;
}

body.post-page .post-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
    border-radius: 10px;
    margin: 0 auto;
    padding: 30px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    width: 65%;
}

body.post-page .postcategory-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    border: 1px solid #ccc;
    border-radius: 5px;
    height: auto;
    padding: 10px;
    margin: 10px 0 5px;
}

body.post-page .postcategory-container>div {
    margin: 0 10px;
}

body.post-page .postcategory-container>div>img {
    width: 30px;
    height: 30px;
    margin-right: 5px;
}

body.post-page .postcategory-container>div>span {
    font-size: 16px;
}

body.post-page .popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 10px;
}

body.post-page .popup-title {
    flex-grow: 1;
    text-align: center;
    font-weight: bold;
    font-size: 18px;
}

body.post-page .close-popup {
    color: red;
    border: none;
    cursor: pointer;
    font-size: 18px;
    background: none;
    padding: 5px;
}

body.post-page .close-popup:hover {
    color: aqua;
    background: none;
}

body.post-page .popup-footer {
    margin-top: 10px;
}

body.post-page #drawingCanvas {
    width: 100%;
    height: 300px;
    background: #fff;
    border: 1px solid #000;
    border-radius: 8px;
    cursor: crosshair;
    display: block;
}

/* ✅ 클릭 가능한 스타일 추가 */
body.post-page .clickable-category {
    cursor: pointer;
    color: black;
}

body.post-page .clickable-category:hover {
    color: darkblue;
}

body.post-page .popup-message {
    position: fixed;
    width: 300px;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fff;
    color: #000;
    padding: 18px 20px;
    border-radius: 8px;
    box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    text-align: center;
    display: none;
}

body.post-page .popup-button {
    margin-top: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

body.post-page .custom-button {
    transition: background-color 0.3s;
}

/* ✅ 게시물 이미지 */
body.post-page .post-image {
    max-width: 100%;
    max-height: 50vh;
    object-fit: contain;
}

body.post-page #postTitle {
    font-size: 28px;
    font-weight: bold;
}

/* ✅ 게시물 설명 */
body.post-page .post-description {
    font-size: 18px;
    text-align: left;
    white-space: pre-wrap;
}

body.post-page .post-desc {
    padding: 10px 0 80px;
}

body.post-page .post-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

body.post-page .button {
    font-size: 15px;
    border-radius: 12px;
    transition: background-color 0.3s;
    background-color: rgba(255, 255, 255, 0.75);
    color: #333;
}

body.post-page .hastag {
    margin-top: 10px;
    font-size: 18px;
}

body.post-page .hashtag-link {
    display: inline-block;
    white-space: nowrap;
    word-break: keep-all;
    color: #1da1f2;
    text-decoration: none;
    padding: 5px 6px;
    background: aliceblue;
    border-radius: 20px;
    border: 1px solid #eee;
    margin: 8px 6px;
    line-height: 1.0;
}


/* ====== 미리보기 페이지(preview.html) ====== */

body.preview-page .popup-message {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

body.preview-page .menubar-container {
    display: flex;
    align-items: center;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100vw;
    height: 110px;

}

/* 🔥 왼쪽 버튼 그룹 (뒤로가기 + 메뉴 버튼) */
body.preview-page .left-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* 🔥 닫기 버튼 */
body.preview-page .close-sidebar {
    position: absolute;
    top: 50px;
    right: 15px;
    background: none;
    border: none;
    color: #333;
    font-size: 30px;
    cursor: pointer;
    display: block;
}


/* 사이드바 열기 버튼 */
body.preview-page .sidebar-toggle {
    position: fixed;
    background-color: #00000000;
    top: 45px;
    padding: 15px 19px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.5s, transform 0.5s ease-in-out;
    z-index: 1000;
}

body.preview-page .sidebar-toggle:hover {
    border: none;
}

/* 사이드바 스타일 */
body.preview-page .sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    height: 100vh;
    background: rgba(255, 255, 255, 0.8);
    color: #333;
    padding: 100px 100px 0 100px;
    transition: left 0.5s ease-in-out;
    z-index: 9999;
}

body.preview-page .sidebar.open {
    left: 0;
}

body.preview-page .view-switch {
    display: flex;
    gap: 8px;
    margin: 10px 0 10px 80%;
}

body.preview-page .view-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s ease;
}

body.preview-page .view-icon-btn i {
    font-size: 16px;
}

body.preview-page .view-icon-btn:hover {
    color: #fff352;
}

body.preview-page .view-icon-btn.active {
    color: #4caf50;
}

/* ✅ 이미지 갤러리 (4x5 배열) */
body.preview-page .image-gallery {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: auto;
    padding: 15px;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    justify-content: center;
    align-items: center;
    width: 85%;
}

body.preview-page .image-container img {
    width: 13vw;
    height: 13vw;
    object-fit: cover;
    border: none;
    border-radius: 8px;
    filter: grayscale(80%) brightness(0.5) blur(10px);
    transition: transform 0.3s ease, border-color 0.3s, width 0.3s, height 0.3s;
}

body.preview-page .image-container img:hover {
    cursor: pointer;
    background: #f7f7f7;
    border: 3px solid #0066cc;
}

/* 사진 모드 */
body.preview-page .image-gallery.image-view {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

/* 텍스트 모드 */
body.preview-page .image-gallery.text-view {
    display: flex;
    flex-direction: column;
    padding: 5px;
}

/* 텍스트뷰 전용 */
body.preview-page .text-row {
    display: flex;
    justify-content: space-between;
    width: 100%;
    border-bottom: 1px solid #eee;
    transition: background 0.2s ease;
    padding: 5px;
}

body.preview-page .text-row:hover {
    background: #f7f7f7;
    border: 3px solid #0066cc;
    cursor: pointer;
    border-radius: 10px;
}

body.preview-page .text-thumb {
    width: 80px;
    height: 80px;
    filter: blur(10px);
    object-fit: cover;
    border-radius: 20px;
    padding: 5px;
}

body.preview-page .text-content {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
}

body.preview-page .text-preview {
    font-size: 18px;
    font-weight: bold;
}

body.preview-page .text-hashtags {
    margin-top: 40px;
    font-size: 15px;
}

/* 카드 기본 설정 */
body.preview-page .gallery-item,
body.preview-page .text-row {
    perspective: 1000px;
}

body.preview-page .page-exit {
    opacity: 0;
    transition: opacity 0.5s ease;
}

body.preview-page .flip-inner {
    display: flex;
    /* 🔥 중요 */
    width: 100%;
    transition: transform 0.6s ease;
    transform-style: preserve-3d;
}

body.preview-page .flip-inner.flipped {
    transform: rotateY(180deg);
}

body.preview-page .text-hashtag {
    margin-right: 6px;
    color: #6dbf9f;
}

/* 사이드바 타이틀 */
body.preview-page .menu-title {
    background: none;
    border: none;
    color: #333;
    font-size: 25px;
    cursor: pointer;
}

body.preview-page .sub-menu {
    display: none;
}

body.preview-page .sub-menu.open {
    display: block;
}

/* 사이드바 메뉴 */
body.preview-page .sidebar ul {
    list-style: none;
    padding: 0;
}

body.preview-page .sidebar ul li {
    margin: 15px 0;
}

body.preview-page .sidebar ul li a {
    color: #333;
    text-decoration: none;
    font-size: 18px;
}

body.preview-page .sidebar ul li a:hover {
    text-decoration: underline;
}

/* ✅ 중앙 정보 팝업 (inforPopupMessage용) */
body.preview-page .infor-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    background: #fff;
    color: black;
    border: 1px solid #ccc;
    padding: 25px 30px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    text-align: left;
}

body.preview-page .info-popup .table-wrapper {
    display: flex;
    justify-content: center;
    padding: 10px;
    box-sizing: border-box;
}

body.preview-page .info-popup .table-wrapper .inner {
    max-width: 1150px;
    /* 필요시 조정 */
    width: 100%;
    overflow: auto;
    /* 가로 스크롤 방지(작은 화면 대비) */
}

body.preview-page .info-popup .table-wrapper table {
    width: 100%;
    margin: 0 auto;
    border-collapse: collapse;
    text-align: center;
}

/* ✅ 닫기 버튼 스타일 */
body.preview-page .infor-popup-close {
    position: absolute;
    top: 3px;
    right: 8px;
    cursor: pointer;
    font-size: 25px;
    color: #666;
}

/* ✅ 중앙 정보 팝업 (inforPopupMessage용) */
body.preview-page .app-infor-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.6);
    /* 더 어두운 반투명 배경 */
    ;
    color: black;
    z-index: 1000;
    text-align: center;
}

/* ✅ 닫기 버튼 스타일 */
body.preview-page .app-infor-popup-close {
    position: absolute;
    top: 3px;
    right: 8px;
    cursor: pointer;
    font-size: 25px;
    color: #666;
}


body.preview-page #welcomeMessage {
    text-align: center;
    font-weight: bold;
    font-size: 30px;
    cursor: pointer;
    text-decoration: none;
}

body.preview-page .opacitybtn {
    height: 30px;
    cursor: pointer;
}

body.preview-page .function-infor {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

body.preview-page .message-container {
    margin-top: 20px;
    text-align: center;
}

body.preview-page #opacitySlider {
    display: inline-flex;
}

body.preview-page .opacityControl {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 표시기이미지 배치 */
body.preview-page .preview-images {
    display: flex;
    align-items: center;
    position: absolute;
    top: -105px;
    right: 10px;
    cursor: grab;
    margin-left: 80%;
}

body.preview-page .preview-images img {
    display: block;
    width: auto;
    height: 85px;
    border-radius: 5px;
    object-fit: cover;
    transition: transform 0.3s ease;
    z-index: 9999;
}

/* 메인 탭 컨테이너 (큰 카테고리) */
body.preview-page .tab-design {
    display: flex;
    text-align: center;
    position: relative;
    margin: 0 auto;
    padding-top: 20px;
    border-radius: 8px;
    width: 95%;
}

/* 새로 추가한 래퍼로 남은 공간을 채우고 중앙 정렬 */
body.preview-page .sub-tab-wrapper {
    flex-wrap: wrap;
    flex: 1;
    text-align: center;
}

/* 서브 탭 컨테이너 (작은 카테고리) */
body.preview-page .sub-tab-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    gap: 5px;
    padding-top: 65px;
    margin-bottom: 10px;
}

body.preview-page .preview-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 10000;
}

body.preview-page .preview-popup {
    position: relative;
    padding: 30px;
    width: 85%;
    max-width: 900px;
    height: 80vh;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
}

body.preview-page .preview-popup iframe {
    width: 100%;
    height: 100%;
    border: none;
}

body.preview-page .preview-popup iframe #previewFrame {
    background: #fff;
}

body.preview-page .preview-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: none;
    font-size: 20px;
    color: black;
    cursor: pointer;
    z-index: 10;
}

body.preview-page .marge-container {
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    max-width: 95%;
    margin: 0 auto;
    gap: 25px;
    background-color: #c2f7f1;
    border-radius: 0 0 25px 25px;
}

body.preview-page .category-subtab-container {
    display: flex;
    align-items: center;
    width: 100%;
    height: auto;
    margin-bottom: 20px;
}

/* 큰 카테고리 탭 디자인 */
body.preview-page .tab-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #dedede;
    background-color: #e9ecef;

    gap: 6px;
    padding: 12px 0;
    font-size: 16px;
    font-weight: 500;

    box-sizing: border-box;
    cursor: pointer;

    border: none;
    border-right: 1px solid #ddd;
    border-radius: 20px 25px 0 0;

    transition:
        flex 0.35s ease,
        background-color 0.3s,
        color 0.3s;
}

body.preview-page .tab-btn:hover {
    background-color: #c2f7f165;
}

body.preview-page .tab-btn.active {
    flex: 2;
    background-color: #c2f7f1;
    color: #333;
    font-weight: 500;
    border: none;
}

body.preview-page .tab-btn svg {
    opacity: 0;
    width: 0;
    overflow: hidden;
    transition:
        opacity 0.3s ease,
        width 0.3s ease,
        transform 0.3s ease;
}

body.preview-page .tab-btn.active svg {
    opacity: 1;
    width: 18px;
    transform: scale(1.05);
}

body.preview-page .tab-btn:last-child {
    border-right: none;
}

/* 작은 카테고리 탭 디자인 */
body.preview-page .sub-tab {
    flex-shrink: 0;
    font-size: 14px;
    padding: 8px 12px;
    text-align: center;
    align-items: center;
    color: #555;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 15px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
}

body.preview-page .sub-tab.active {
    flex-wrap: wrap;
    background-color: #00ff95e8;
    color: #ffffff;
    font-weight: bold;
}

body.preview-page .sub-tab:hover {
    flex-wrap: wrap;
    background-color: #00ff953c;
}

/* ✅ 이미지 갤러리 중앙 정렬 */
body.preview-page .image-gallery-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    height: auto;
    margin: 40px auto;
    width: 95%;
    overflow-x: hidden;
}

/* 카테고리 제목 스타일 */
body.preview-page #currentCategory {
    font-size: 30px;
    color: #00cc8f;
    margin: 25px 0 15px;
    padding-left: 20px;
}

body.preview-page #currentCategory:hover {
    color: cyan;
    text-shadow: 0 0 20px black;
}


/* ✅ 이미지가 있을 때 (4x5 그리드) */
body.preview-page .grid-layout {
    display: grid;
    gap: 10px;
    padding: 10px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    max-width: 90%;
}

/* ✅ 이미지가 없을 때 (중앙 정렬) */
body.preview-page .flex-center {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    height: 300px;
}

/* ✅ 이미지가 없을 때 메시지 스타일 */
body.preview-page .no-image-message {
    font-size: 18px;
    font-weight: bold;
    color: #555;
    text-align: center;
    width: 100%;
}

body.preview-page .preview-page {
    overflow-x: hidden;
}

/* 페이지 제네레이터 디자인 관련*/
body.preview-page #pagination-container {
    text-align: center;
    margin: 10px 0;
}

body.preview-page .pagination-button {
    background: none;
    color: black;
    border: 1px solid #333;
    padding: 6px 10px;
}

body.preview-page .pagination-button:hover {
    background: yellowgreen;
    color: aqua;
    transform: scale(1.03);
}

/* footer */
body.preview-page .page-footer a {
    color: #007bff;
    text-decoration: none;
    margin: 0 10px;
}

body.preview-page .page-footer a:hover {
    text-decoration: underline;
}

/* 아이콘페이지(ai_icon.html) */
body.icon-page h1 {
    padding-bottom: 30px;
}

body.icon-page h3 {
    padding: 10px;
    border-bottom: 2px solid #333;
    width: 100%;
}


body.icon-page .icon-studio-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    background-color: #fff;
    min-height: 100vh;
    box-sizing: border-box;
    margin-bottom: 30px;
}



/* 소개팝업페이지(preview_popup.html */
body.preview-popup-page {
    width: 100%
}

body.preview-popup-page h2 {
    text-align: center;
    margin-top: 0;
}

body.preview-popup-page ul {
    font-size: 17px;
    list-style: none;
}

body.preview-popup-page table {
    border-collapse: collapse;
}

body.preview-popup-page caption.title {
    font-size: 20px;
    font-weight: bold;
    margin: 10px 5px;
}

body.preview-popup-page table.function_box {
    width: 95%
}

body.preview-popup-page p.appfunction {
    text-align: left;
    font-size: 20px;
    margin: 10px 5px;
}

body.preview-popup-page hr {
    margin: 24px 0;
}

/* ====== 태그 검색 결과(tagResult.html) ====== */

body.tag-page h2 {
    color: #1da1f2;
    margin-bottom: 20px;
    font-size: 1.2rem;
    text-align: center;
}

body.tag-page h4 {
    text-align: left;
    color: black;
}

body.tag-page hr {
    width: 100%;
    margin: 5px 0;
    /* 상하 간격 */
}

body.tag-page .post-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    background: #f9f9f9;
    padding: 12px;
    margin-bottom: 15px;
    border-left: 4px solid #1da1f2;
    border-radius: 8px;
    gap: 15px;
    width: 75%;
}

body.tag-page .post-item img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

body.tag-page .post-meta {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;

}

body.tag-page .category {
    font-weight: bold;
    font-size: 1rem;
    margin-bottom: 6px;
}

body.tag-page .desc {
    color: #444;
    font-size: 0.95rem;
    line-height: 1.4;
}

body.tag-page .post-meta a {
    text-decoration: none;
    color: inherit;
}

body.tag-page div.tag_title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 15px 0;
}

body.tag-page .tag_post {
    display: none;
    margin: 30px auto;
    text-align: center;
}


body.tag-page #postList.post-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    list-style: none;
    margin: 20px 0;

}

body.tag-page .post-list li {
    background: #f7f7f7;
    padding: 15px;
    margin-bottom: 10px;
    border-left: 5px solid #1da1f2;
    border-radius: 4px;
}

body.tag-page .post-list li a {
    color: #333;
    text-decoration: none;
}

body.tag-page #resetTagButton {
    font-size: 0.8rem;
    margin: 0 0 20px 5px;
    padding: 4px 10px;
    cursor: pointer;
    background-color: #e1f5fe;
    border: 1px solid #90caf9;
    border-radius: 4px;
    color: black;
}

body.tag-page #tag-container {
    padding-top: 10px;
    border-radius: 5px;
    background-color: rgba(255, 255, 255, 0.7);
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 10px;
}

body.tag-page #koreanTagList button {
    margin: 5px;
    padding: 5px 10px;
    font-size: 0.85rem;
    background: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    color: black;
}

body.tag-page #koreanTagList button:hover {
    cursor: pointer;
    color: aqua;
}