/* Bebas Neue 폰트 import */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&display=swap');

/* Mont 폰트 by Fontfabric */
@font-face {
    font-family: 'Mont';
    src: url('/fonts/Mont-Regular.woff2') format('woff2'),
         url('/fonts/Mont-Regular.woff') format('woff'),
         url('/fonts/Mont-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Mont';
    src: url('/fonts/Mont-Bold.woff2') format('woff2'),
         url('/fonts/Mont-Bold.woff') format('woff'),
         url('/fonts/Mont-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

/* 기본 스타일 초기화 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    touch-action: pan-y;
    -ms-content-zooming: none;
    -ms-touch-action: pan-y;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    transition: background-color 0.3s ease, color 0.3s ease;
    touch-action: pan-y;
    -ms-content-zooming: none;
    -ms-touch-action: pan-y;
}

/* 다크 모드 기본 스타일 */
.dark-mode body {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

.dark-mode {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

.dark-mode .header {
    background-color: #2d2d2d;
    border-bottom: 1px solid #444;
}

/* 미디어박스 초기 숨김 처리 */
.media-box {
    display: none !important;
}

.media-box.show {
    display: block !important;
}

/* 헤더 스타일 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: #f5f5f5;
    z-index: 3000;
}

.convertingColorsRadialGradient {
    background-image: radial-gradient(circle farthest-corner at center, rgba(255, 226, 204, 1) 45%, rgba(255, 255, 255, 1) 100%);
}

.header > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    margin: 0 auto;
    flex-wrap: nowrap;
    gap: 1rem;
    height: 56px;
    box-sizing: border-box;
}

.logo {
    color: #FF6F00;
    text-decoration: none;
    font-size: 2.4rem;
    font-family: 'Mont', sans-serif;
    font-weight: bold;
    white-space: nowrap;
    flex-shrink: 0;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    line-height: 1;
    padding-top: 2px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
    flex-shrink: 0;
    display: block;
    align-self: center;
    margin-bottom: 2px;
}

/* 검색 컨테이너 */
.search-container {
    display: flex;
    align-items: center;
    flex: 1;
    max-width: 700px;
    transition: all 0.3s ease;
}

.search-input {
    flex: 1;
    height: 40px;
    padding: 0 1rem;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
    font-size: 1rem;
    min-width: 0;
    transition: all 0.3s ease;
}

.search-button {
    background: none;
    border: none;
    padding: 5.5px;
    cursor: pointer;
    margin-left: -35px;
    color: #FF6F00;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.search-button:hover {
    color: #F4511E;
}

.auth-buttons {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.language-selector {
    position: relative;
    flex-shrink: 0;
}

.language-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background-color: transparent;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.language-button i {
    font-size: 24px;
}

.language-button:hover,
.language-button[aria-expanded="true"] {
    background-color: #FFECB3;
    color: #FF6F00;
}

.language-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    padding: 8px 0;
    z-index: 3100;
}

.language-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.language-list li {
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
}

.language-list li:hover {
    background-color: #f5f5f5;
}

.language-list li.active {
    font-weight: 600;
    color: #FF6F00;
}

/* 메뉴 선택기 스타일 */
.menu-selector {
    position: relative;
    flex-shrink: 0;
}

.menu-button {
    width: auto;
    height: auto;
    border: none;
    background-color: transparent;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 8px;
    transition: color 0.3s ease;
}

.menu-button i {
    font-size: 24px;
}

.menu-button:hover,
.menu-button[aria-expanded="true"] {
    color: #FF6F00;
}

.menu-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    padding: 12px 0;
    z-index: 3100;
}

.menu-section {
    padding: 0 0 12px 0;
}

.menu-section:last-child {
    padding-bottom: 0;
}

.menu-section-title {
    padding: 0 16px 8px 16px;
    font-size: 12px;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.menu-language-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: calc(5 * 36px); /* 5개 항목 높이 (각 항목 약 36px) */
    overflow-y: auto;
    overflow-x: hidden;
}

/* 스크롤바 스타일 */
.menu-language-list::-webkit-scrollbar {
    width: 6px;
}

.menu-language-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.menu-language-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.menu-language-list::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.menu-language-list li {
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.2s ease;
    min-height: 36px;
    display: flex;
    align-items: center;
}

.menu-language-list li:hover {
    background-color: #f5f5f5;
}

.menu-language-list li.active {
    font-weight: 600;
    color: #FF6F00;
    background-color: #FFF3E0;
}

.theme-toggle {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 8px;
}

.theme-button {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 12px;
    border: none;
    background-color: transparent;
    color: #333;
    font-size: 14px;
    cursor: pointer;
    border-radius: 6px;
    transition: background-color 0.2s ease, color 0.2s ease;
    text-align: left;
}

.theme-button i {
    font-size: 20px;
    color: #666;
}

.theme-button:hover {
    background-color: #f5f5f5;
}

.theme-button.active {
    background-color: #FFF3E0;
    color: #FF6F00;
    font-weight: 600;
}

.theme-button.active i {
    color: #FF6F00;
}

/* 다크 모드 스타일 */
.dark-mode .menu-dropdown {
    background-color: #2d2d2d;
    border-color: #444;
}

.dark-mode .menu-section-title {
    color: #aaa;
}

.dark-mode .menu-language-list li {
    color: #e0e0e0;
}

.dark-mode .menu-language-list li:hover {
    background-color: #3d3d3d;
}

/* 다크 모드 스크롤바 스타일 */
.dark-mode .menu-language-list::-webkit-scrollbar-track {
    background: #3d3d3d;
}

.dark-mode .menu-language-list::-webkit-scrollbar-thumb {
    background: #666;
}

.dark-mode .menu-language-list::-webkit-scrollbar-thumb:hover {
    background: #888;
}

.dark-mode .menu-language-list li.active {
    color: #FF6F00;
    background-color: #3d2d1a;
}

.dark-mode .theme-button {
    color: #e0e0e0;
}

.dark-mode .theme-button i {
    color: #aaa;
}

.dark-mode .theme-button:hover {
    background-color: #3d3d3d;
}

.dark-mode .theme-button.active {
    background-color: #3d2d1a;
    color: #FF6F00;
}

.dark-mode .theme-button.active i {
    color: #FF6F00;
}

.write-button {
    width: 40px;
    height: 40px;
    background-color: #FF6F00;
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.write-button i {
    font-size: 24px;
}

.write-button:hover {
    background-color: #F4511E;
}

.login-button {
    height: 40px;
    padding: 0 16px;
    border: none;
    border-radius: 20px;
    background-color: #FF6F00;
    color: white;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background-color 0.3s;
}

.login-button:hover {
    background-color: #F4511E;
}

.profile-button-container {
    display: none;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    object-fit: cover;
    display: block;
}

/* 공통: 이미지 저장/선택/콜아웃 방지 (프로필/썸네일 등) */
.profile-button,
.profile-image,
.author-profile-image,
.author-profile,
.post-thumbnail,
.thumbnail-background {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* 일부 브라우저의 이미지 드래그 방지 힌트 */
.profile-button,
.profile-image,
.author-profile-image,
.author-profile,
.post-thumbnail,
.thumbnail-background {
    -webkit-user-drag: none;
}

/* 모바일 반응형 스타일 */
@media (max-width: 578px) {
    .header > div {
        padding: 0.5rem;
        gap: 0.5rem;
        height: 56px;
    }

    .search-input {
        height: 35px;
        padding: 0 0.9rem;
        font-size: 0.9rem;
    }

    .auth-buttons {
        gap: 0.5rem;
    }

    .login-button {
        height: 35px;
        padding: 0 12px;
        font-size: 0.9rem;
    }

    .write-button {
        width: 35px;
        height: 35px;
    }

    .profile-button-container {
        width: 35px;
        height: 35px;
    }

    .profile-button {
        width: 35px;
        height: 35px;
    }

    .header-right {
        gap: 8px;
    }

    .header-right .profile-image {
        width: 35px;
        height: 35px;
        margin: 0;
    }

    .header-right button {
        height: 35px;
    }
}

@media (max-width: 500px) {
    .search-container {
        min-width: auto;
        margin: 0;
        position: relative;
        margin-left: auto;
    }

    .search-container:not(.expanded) {
        flex: 0;
    }

    .search-container:not(.expanded) .search-input {
        width: 0;
        padding: 0;
        border: none;
    }

    .search-container:not(.expanded) .search-button {
        width: 35px;
        height: 35px;
        background-color: #FF6F00;
        border-radius: 50%;
        margin: 0;
        color: white;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .search-container:not(.expanded) .search-button:hover {
        background-color: #F4511E;
    }

    .search-container.expanded {
        position: absolute;
        left: 0.5rem;
        right: 0.5rem;
        top: 0.5rem;
        bottom: 0.5rem;
        width: calc(100% - 1rem);
        max-width: none;
        z-index: 1001;
        margin: 0;
        display: flex;
        align-items: center;
    }

    .search-container.expanded .search-input {
        height: 35px;
        width: 100%;
        background: white;
        font-size: 16px;
        padding: 0 40px 0 16px;
    }

    .search-container.expanded + .auth-buttons {
        opacity: 0;
        visibility: hidden;
    }

    .search-container.expanded ~ .logo {
        opacity: 0;
        visibility: hidden;
    }

    .search-button {
        margin-left: 0;
        width: 35px;
        height: 35px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .search-container.expanded .search-button {
        margin-left: -35px;
        background: none;
        width: 35px;
        height: 35px;
        position: relative;
        z-index: 1002;
        color: #FF6F00;
    }
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-right .profile-image {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-font-smoothing: subpixel-antialiased;
    contain: paint;
}

.header-right button {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    padding: 0 12px;
    border: none;
    border-radius: 4px;
    background-color: #f0f0f0;
    color: #333;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.header-right button:hover {
    background-color: #e0e0e0;
}

@media (max-width: 768px) {
    .header-right .profile-image {
        width: 35px;
        height: 35px;
        contain: strict;
    }
}

.material-icons {
    vertical-align: middle;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Google Translate 기본 UI 숨김 처리 */
#google_translate_element {
    position: fixed;
    left: -9999px;
    top: -9999px;
    visibility: hidden;
}

.goog-te-banner-frame.skiptranslate {
    display: none !important;
}

body {
    top: 0 !important;
}

/* Google 번역 iframe 완전 숨김 */
iframe.skiptranslate,
.VIpgJd-ZVi9od-ORHb-OEVmcd {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Google 번역 원본 텍스트/평가 패널 숨김 */
#goog-gt-vt,
.VIpgJd-yAWNEb-hvhgNd {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Google 번역 로딩 오버레이/스피너 완전 숨김 */
[class^="VIpgJd-"],
[class*=" VIpgJd-"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* 상태 알림 스타일 (댓글 작성 시와 동일) */
.status-alert {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    z-index: 10000;
    background: #fff;
    border: 2px solid #ff6b6b;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    min-width: 300px;
    max-width: 90vw;
    opacity: 0;
    transition: all 0.3s ease;
}

.status-alert.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.status-alert-content {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    gap: 12px;
}

.status-alert-icon {
    color: #ff4444;
    font-size: 24px;
    flex-shrink: 0;
}

.status-alert-message {
    flex: 1;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
}

.status-alert-close {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.status-alert-close:hover {
    background: #f5f5f5;
    color: #666;
}

/* 공유 모달 스타일 */
.share-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.share-modal-content {
    background-color: white;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.share-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
}

.share-modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.share-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.share-modal-body {
    padding: 20px;
}

.share-url-container {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.share-url-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}

.copy-url-button {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    background-color: #ff6f00;
    color: white;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.copy-url-button:hover {
    background-color: #E65100;
}

.share-social-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.social-share-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.social-share-button:hover {
    background-color: #f5f5f5;
    border-color: #ccc;
}

.social-share-button .social-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.social-share-button svg.social-logo {
    display: block;
}

.social-share-button span {
    font-size: 12px;
    color: #333;
}

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