@import "tokens.css";

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* overflow-x: hidden; */
}

img {
    max-width: 100%;
    height: auto;
}

html{
    width: 100%;
    height: 100%;
    overflow-y: scroll;
}
a{
    text-decoration: none;
}
li{
    list-style: none;
}


/* 首页 */
.ootoon-m{
    position: relative;
}
/* 菜单 */
.otoon-top{
    position: sticky;
    top: 61px;
    z-index: 999;
    background-color: white;
    border-bottom: 1px solid rgb(229, 229, 229);
}
html[data-theme="dark"] .otoon-top{ background-color: var(--color-bg); border-bottom-color: var(--color-border) }

/* 로그인 팝업 스타일 */
.login-container {
    position: relative;
}
.login-container a{
    color: black;
}

.login-popup {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 300ms ease, visibility 300ms ease;
}
.login-popup.open{ opacity:1; visibility:visible; pointer-events:auto }

.login-popup-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 26px 20px;
    width: min(90vw, 400px);
    max-height: 80vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}
.login-close{ position:absolute; top:8px; right:10px; background:none; border:none; font-size:32px; line-height:1; cursor:pointer }



.login-logo {
    width: 140px; /* 로고 크기 적당히 조절 */
    height: auto;
    object-fit: contain;
}

.login-header h3 {
    font-family: 'Pretendard', sans-serif;
    font-weight: 700;
    font-size: 20px;
    color: var(--color-text);
    margin: 0;
}

.login-form {
    width: 100%;
}

.form-group {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 10px;
}

.form-group.input-with-icon {
    gap: 10px;
}

.login-popup .form-group.input-with-icon {
    border-bottom: 1px solid #e5e5e5;
}

.input-icon {
    color: #888;
    flex-shrink: 0;
}

.form-group input {
    width: 100%;
    border: none;
    outline: none;
    font-family: 'Pretendard', sans-serif;
    font-weight: 400;
    font-size: 14px;
    background: transparent;
    color: var(--color-text);
}

.login-buttons {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 8px;
}

.login-submit-btn, .register-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 10px;
    border-radius: 6px;
    font-family: 'Pretendard', sans-serif;
    font-size: 16px;
    cursor: pointer;
}
.login-buttons a{
    padding: 10px;
    border-radius: 6px;
    font-family: 'Pretendard', sans-serif;
    font-size: 14px;
}

.login-submit-btn {
    background-color: var(--brand-action);
    color: #FFFFFF;
    border: 1px solid var(--brand-action);
    font-weight: 700;
}

.register-btn {
    background-color: #FFFFFF;
    color: #000000;
    border: 1px solid #000000;
    font-weight: 400;
}

.login-welcome {
    padding: 0px 10px;
}

.login-welcome p {
    font-family: 'Pretendard', sans-serif;
    font-weight: 400;
    font-size: 14px;
    color: #474747;
}

/* 알림 아이콘 및 팝업 스타일 */
.notification-btn-container {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text);
}

.notification-icon {
    transition: color 0.2s ease;
}
.notification-btn-container:hover .notification-icon {
    color:var(--brand-text);
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -6px;
    background: var(--brand-action);
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--color-bg);
}

.notification-dropdown {
    position: absolute;
    top: calc(100% + 15px);
    right: -50px;
    width: 360px;
    background: var(--color-bg);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity 300ms ease, visibility 300ms ease, transform 300ms ease;
    border: 1px solid var(--color-border);
}

.notification-dropdown.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

/* 화살표 꼬리 */
.notification-dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 56px;
    width: 12px;
    height: 12px;
    background: var(--color-bg);
    transform: rotate(45deg);
    border-top: 1px solid var(--color-border);
    border-left: 1px solid var(--color-border);
    z-index: -1;
}

.noti-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border);
}

.noti-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: 6px;
}

.noti-count {
    background: var(--brand-action);
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 10px;
}

.noti-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.noti-action-btn {
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}
.noti-action-btn:hover {
    color: var(--color-text);
}

.noti-close-btn {
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
    margin-left: 4px;
}
.noti-close-btn:hover {
    color: var(--color-text);
}

.noti-tabs {
    display: flex;
    padding: 12px 20px;
    gap: 8px;
    border-bottom: 1px solid var(--color-border);
}

.noti-tab-btn {
    flex: 1;
    padding: 8px 0;
    border-radius: 20px;
    background: var(--color-bg-alt);
    border: none;
    color: var(--color-text);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
}

.noti-tab-btn.active {
    background: var(--brand-action);
    color: #fff;
}

.noti-tab-badge {
    background: #fff;
    color:var(--brand-text);
    font-size: 14px;
    padding: 2px 6px;
    border-radius: 10px;
}

.noti-content-list {
    max-height: 300px;
    overflow-y: auto;
    padding: 12px 0;
}

.noti-item {
    display: flex;
    padding: 12px 20px;
    gap: 12px;
    border-bottom: 1px solid var(--color-border);
    cursor: pointer;
    transition: background 0.2s;
}
.noti-item:last-child {
    border-bottom: none;
}
.noti-item:hover {
    background: var(--color-hover);
}

.noti-item-dot {
    width: 6px;
    height: 6px;
    background: transparent;
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0;
}
.noti-item.unread .noti-item-dot {
    background: #10b981; /* 초록색 점 */
}

.noti-item-content {
    flex: 1;
}

.noti-item-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.noti-item-type {
    font-size: 14px;
    font-weight: 700;
    color:var(--brand-text);
}

.noti-item-time {
    font-size: 14px;
    color: var(--color-text-muted);
}

.noti-item-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 4px;
}

.noti-item-desc {
    font-size: 14px;
    color: var(--color-text-secondary);
}

/* 사용자 UI 팝업 스타일 */
/* 새 사용자 UI 드롭다운 컨테이너 (기존 팝업 모달 대신 absolute 드롭다운) */
.user-dropdown-container {
    position: absolute;
    top: calc(100% + 15px);
    right: -10px; /* 오른쪽 정렬 */
    width: 320px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity 300ms ease, visibility 300ms ease, transform 300ms ease;
    border: 1px solid var(--color-border);
}

.user-dropdown-container.open { 
    opacity: 1; 
    visibility: visible; 
    pointer-events: auto; 
    transform: translateY(0);
}

/* 화살표 꼬리 */
.user-dropdown-container::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 25px;
    width: 12px;
    height: 12px;
    background: #fff;
    transform: rotate(45deg);
    border-top: 1px solid var(--color-border);
    border-left: 1px solid var(--color-border);
    z-index: -1;
}

.user-dropdown-container .user-content { 
    position: relative; 
    width: 100%; 
    padding: 24px; 
}

/* 프로필 헤더 영역 */
.user-profile-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.user-avatar-large {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin-right: 15px;
    object-fit: cover;
    cursor: pointer;
    background: var(--brand-tint); /* 예시 이미지의 배경색 느낌 */
    padding: 2px;
}

.user-profile-info {
    display: flex;
    flex-direction: column;
}

.user-name-row {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
}

.user-level-badge {
    background: #e2e8f0;
    color: #475569;
    font-size: 14px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
    margin-right: 8px;
}

.user-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-color);
}

.user-id {
    font-size: 14px;
    color: #8b95a1;
}

/* 아바타 설명 텍스트 */
.user-avatar-desc {
    font-size: 14px;
    color: #94a3b8;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* 레벨 프로그레스 바 */
.user-level-progress {
    margin-bottom: 24px;
}

.progress-bar-bg {
    width: 100%;
    height: 6px;
    background: #f1f5f9;
    border-radius: 3px;
    margin-bottom: 8px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--brand-action); /* 빨간색 채우기 */
    border-radius: 3px;
}

.progress-text-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

.progress-current {
    color: #94a3b8;
}

.progress-percent {
    color:var(--brand-text);
    font-weight: 700;
}

/* 출석체크 섹션 */
.attendance-check {
    text-align: center;
    margin-bottom: 20px;
}

.attendance-btn {
    width: 100%;
    padding: 8px !important;
    display: block;
    background-color: #DFFFDE;
    border: 1px solid #4CAF50;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    color: #4CAF50;
    cursor: pointer;
    margin-bottom: 10px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.attendance-btn:hover {
    background-color: #c8f5c7;
}

.attendance-check p {
    font-size: 14px;
    color: var(--text-secondary-color, #64748b);
    margin: 0;
}

.attendance-check p a {
    color: #FFC107;
    text-decoration: none;
    font-weight: bold;
}

/* 포인트 섹션 */
.user-points-section {
    padding: 16px 0;
    border-top: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 16px;
}

.points-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.points-left {
    display: flex;
    align-items: center;
}

.points-left img {
    width: 20px;
    height: 20px;
    margin-right: 8px;
}

.points-label {
    font-size: 15px;
    color: #64748b;
    margin-right: 8px;
}

.points-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-color);
}

.points-history-link {
    font-size: 14px;
    color:var(--brand-text);
    text-decoration: none;
}

.points-need {
    text-align: end;
    font-size: 14px;
    margin-bottom: 10px;
    color: #64748b;
}

.points-need-val {
    color:var(--brand-text);
    font-weight: 700;
}

/* 세로형 메뉴 리스트 */
.user-menu-list {
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
}

.menu-list-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    text-decoration: none;
    color: var(--text-color);
    border-radius: 8px;
    transition: background-color 0.2s;
}

.menu-list-item:hover {
    background-color: #f8fafc;
}

.menu-list-item img {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    margin-right: 12px;
    object-fit: contain;
}

.menu-list-item span {
    font-size: 15px;
    font-weight: 500;
}

/* 로그아웃 버튼 */
.logout-section {
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: center;
}

.logout-button {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #64748b;
    font-size: 14px;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 6px;
}

.logout-button:hover {
    background-color: #f1f5f9;
}

.logout-button img {
    width: 16px;
    height: 16px;
    margin-right: 6px;
    filter: grayscale(100%) opacity(0.6); /* 회색 톤으로 통일 */
}
.ootoon-log {
    display: block;
    width: 60px;
    height: 60px;
    background: url(../image/toonnyam-logo.svg) no-repeat 50%;
    background-size: contain;
    border-radius: var(--radius-sm);
}
html[data-theme="dark"] .ootoon-log{ background: url(../image/toonnyam-logo.svg) no-repeat 50%; background-size: contain; }

.ot-menu{
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    height: 52px;
    gap: 20px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 30px;
}
.top-header-right{
    display: flex;
    align-items: center;
    gap: 10px;
}
.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.otm-nav {
    display: block;
}

.otm-list{
    position: relative;
    gap: 10px;
    display: flex;
}
.otm-list::after{
    content: '';
    display: block;
    clear: both;
}
.otm-list li{
    padding: 0 4px;
}
@media (max-width:980px){
    .otm-list{
        position: relative;
        width: 100%;
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
        flex-wrap: nowrap;
    }
    .otm-list li{
        padding: 10px 0;
        margin: 0 16px;
    }
}
.otm-list li a{
    font-size: 15px;
    font-weight: 500;
    display: block;
    white-space: nowrap;
    color: #000;
    padding: 6px 10px;
    border-radius: 20px;
    transition: all 0.3s ease;
}
.otm-list li a:hover {
    color: #888888;
    background-color: transparent;
}
.otm-list li a.active {
    background-color: var(--brand-action);
    color: #fff;
    font-weight: 600;
}
.ot-login{
    position: relative;
    float: right;
    margin-top: 18px;
}
@media (max-width:980px){
    .ot-login{
        position: absolute;
        right: 0;
        margin-top: 10px;
        margin-right: 10px;
    }
}
.ot-login::after{
    content: '';
    display: block;
    clear: both;
}
.ot-srk{
    position: relative;
    float: left;
}
.ot-srk input{
    padding: 10px 40px 10px 20px;
    width: 260px;
    background: #f1f1f1;
    outline: none;
    border: none;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.ot-srk input:focus {
    border-color: 2px solid #f1f1f1;
    
}
.ot-srk img{
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
}
.ot-bnt{
    float: left;
    margin-top: 8px;
}
.ot-bnt button{
    border: none;
    cursor: pointer;
    background: none;
}

/* Theme toggle button (Single Icon with Tooltip) */
.theme-toggle {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    outline: none;
    background: transparent;
    border: none;
    color: #333;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.theme-toggle:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.theme-toggle svg {
    position: absolute;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Light mode icon visibility */
.theme-toggle .icon-sun {
    opacity: 0;
    transform: rotate(-90deg) scale(0.5);
}
.theme-toggle .icon-moon {
    opacity: 1;
    transform: rotate(0) scale(1);
}

/* Tooltip (말풍선) */
.theme-tooltip {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #e0e0e0;
    color: #333;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
    z-index: 1000;
}

.theme-tooltip::before {
    content: "어두운 테마";
}

.theme-toggle:hover .theme-tooltip {
    opacity: 1;
    visibility: visible;
}

.theme-toggle:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

/* Global text/background via tokens */
body {
    font-family: var(--font-family-base);
    background: var(--color-bg);
    color: var(--color-text);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Dark theme overrides */
html[data-theme="dark"] .top-menu-bar {
    background: #121212;
    border-bottom-color: var(--color-border);
}
html[data-theme="dark"] .category-btn {
    color: var(--color-text-muted);
}
html[data-theme="dark"] .category-btn:hover {
    color: var(--color-text);
    background: var(--color-hover);
}
html[data-theme="dark"] .category-btn.active {
    color:var(--brand-text);
    background: none;
    box-shadow: none;
}
html[data-theme="dark"] .lang-btn {
    background: var(--color-bg);
    border-color: var(--color-border);
    color: var(--color-text);
}
html[data-theme="dark"] .lang-dropdown {
    background: var(--color-bg);
    border-color: var(--color-border);
}
html[data-theme="dark"] .lang-dropdown button {
    color: var(--color-text);
}
html[data-theme="dark"] .ot-srk input {
    background: #2e2e2e;
    color: var(--color-text);
    border-color: var(--color-border);
}
html[data-theme="dark"] .otm-list li a {
    color: var(--color-text);
}

html[data-theme="dark"] .theme-toggle {
    color: #fff;
}
html[data-theme="dark"] .theme-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}
html[data-theme="dark"] .theme-toggle .icon-sun {
    opacity: 1;
    transform: rotate(0) scale(1);
}
html[data-theme="dark"] .theme-toggle .icon-moon {
    opacity: 0;
    transform: rotate(90deg) scale(0.5);
}
html[data-theme="dark"] .theme-tooltip {
    background: #333;
    color: #fff;
}
html[data-theme="dark"] .theme-tooltip::before {
    content: "밝은 테마";
}

/* Extended dark theme component overrides */
html[data-theme="dark"] body{ background: var(--color-bg); color: var(--color-text) }
html[data-theme="dark"] .global-top-banner{ background:#000 }
html[data-theme="dark"] .global-banner-close{ background: var(--color-bg-alt); border-color: var(--color-border); color: var(--color-text) }
html[data-theme="dark"] .sidebar{ background: transparent }
html[data-theme="dark"] .ranking-container{ background: var(--color-bg); border-color: var(--color-border) }
html[data-theme="dark"] .ranking-header h2{ color: var(--color-text) }
html[data-theme="dark"] .ranking-tabs{ border-bottom-color: var(--color-border) }
html[data-theme="dark"] .tab-btn{ color: var(--color-text-muted) }
html[data-theme="dark"] .tab-btn.active{ color:var(--brand-text) }
html[data-theme="dark"] .ranking-item a{ color: var(--color-text) }
html[data-theme="dark"] .item-meta{ color: var(--color-text-secondary) }
html[data-theme="dark"] .navigation-buttons .nav-btn{ background: var(--color-bg); border-color: var(--color-border); color: var(--color-text-muted) }
html[data-theme="dark"] .nav-btn:hover{ background: var(--color-hover); border-color: var(--color-border); color: var(--color-text) }
html[data-theme="dark"] .indicator{ border-color: rgba(255,255,255,0.6) }
html[data-theme="dark"] .indicator.active, html[data-theme="dark"] .indicator:hover{ background:#fff; border-color:#fff }
html[data-theme="dark"] .section-header a{ border-color: var(--color-border); color: var(--color-text) }
html[data-theme="dark"] .section-header a:hover{ background: var(--color-hover) }
html[data-theme="dark"] .view-all-btn a{ background: var(--color-bg); color: var(--color-text); border-color: var(--color-border) }
html[data-theme="dark"] .view-all-btn a:hover{ background: var(--color-hover); border-color: var(--color-border); color:var(--brand-text) }
html[data-theme="dark"] .top-ranking-link{ background: var(--color-primary); color: #fff; border-color: var(--color-primary) }
html[data-theme="dark"] .top-ranking-link:hover{ background: var(--color-primary-dark); border-color: var(--color-primary-dark); color: #fff }
html[data-theme="dark"] .mobile-backdrop{ background: rgba(0,0,0,0.5) }
html[data-theme="dark"] .mobile-drawer{ background: var(--color-bg); border-color: var(--color-border) }
html[data-theme="dark"] .mobile-menu-list li{ border-top-color: var(--color-border) }
html[data-theme="dark"] .mobile-menu-list a{ color: var(--color-text) }
html[data-theme="dark"] .mobile-menu-list a:hover,
html[data-theme="dark"] .mobile-menu-list a.active { background: var(--color-hover); color:var(--brand-text) }
html[data-theme="dark"] .mobile-controls{ border-top-color: var(--color-border) }
html[data-theme="dark"] .theme-option, html[data-theme="dark"] .lang-option{ background: var(--color-bg); color: var(--color-text); border-color: var(--color-border) }
html[data-theme="dark"] .theme-option[aria-checked="true"], html[data-theme="dark"] .lang-option[aria-checked="true"]{ background: var(--color-hover) }
html[data-theme="dark"] .login-popup-content{ background: var(--color-bg); box-shadow: 0 8px 24px rgba(0,0,0,0.5) }
html[data-theme="dark"] .user-dropdown-container { background: var(--color-bg); box-shadow: 0 8px 24px rgba(0,0,0,0.5); border-color: #333; }
html[data-theme="dark"] .user-dropdown-container::before { background: var(--color-bg); border-color: #333; }
html[data-theme="dark"] .user-name { color: #fff; }
html[data-theme="dark"] .user-id { color: #aaa; }
html[data-theme="dark"] .user-level-badge { background: #334155; color: #cbd5e1; }
html[data-theme="dark"] .progress-bar-bg { background: #334155; }
html[data-theme="dark"] .progress-current { color: #aaa; }
html[data-theme="dark"] .attendance-check p { color: #aaa; }
html[data-theme="dark"] .user-points-section { border-color: #334155; }
html[data-theme="dark"] .points-label { color: #aaa; }
html[data-theme="dark"] .points-value { color: #fff; }
html[data-theme="dark"] .points-history-link { color: #fff; }
html[data-theme="dark"] .points-need { color: #aaa; }
html[data-theme="dark"] .menu-list-item { color: #eee; }
html[data-theme="dark"] .menu-list-item:hover { background-color: #1e293b; color: #fff; }
html[data-theme="dark"] .logout-section { border-color: #334155; }
html[data-theme="dark"] .logout-button { color: #aaa; }
html[data-theme="dark"] .logout-button:hover { background-color: #1e293b; color: #fff; }
html[data-theme="dark"] .attendance-btn{ background: #243824; border-color: #4CAF50; color: #4CAF50 }
html[data-theme="dark"] .ot-to-lt a{ color: var(--color-text) }
html[data-theme="dark"] .top-li-tt-title h4{ color: var(--color-text) }
 
#scroll-to-top {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 60px;
    height: 60px;
    background-color: #fff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e0e0e0;
    cursor: pointer;
    z-index: 999;
    transition: opacity 0.3s, visibility 0.3s, transform 0.2s ease, background-color 0.2s ease;
    opacity: 0;
    visibility: hidden;
}
 
#scroll-to-top:hover {
    background-color: #f5f5f5;
    transform: scale(1.05);
}
 
#scroll-to-top .floating-icon-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
}
 
#scroll-to-top .floating-icon-text {
    font-size: 14px;
    font-weight: 600;
    color: #666;
    line-height: 1;
}
 
#scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}
 
#scroll-to-top img {
    width: 24px;
    height: 24px;
}
 
@media (max-width: 768px) {
    #scroll-to-top {
        bottom: 90px;
        right: 50%;
        transform: translateX(50%);
    }
}
html[data-theme="dark"] #scroll-to-top{ background: var(--color-bg); border-color: var(--color-border) }
html[data-theme="dark"] #scroll-to-top img{ filter: invert(1) }
html[data-theme="dark"] .login-header h3{ color:#fff }
html[data-theme="dark"] .login-close{ color:#fff }
html[data-theme="dark"] .form-group{ background: #121212; border-color: var(--color-border) }
html[data-theme="dark"] .form-group input{ background: transparent; color: var(--color-text); border-color: var(--color-border) }
html[data-theme="dark"] .form-group input::placeholder{ color: var(--color-text-muted) }
html[data-theme="dark"] .section-header_top a{ color:#fff }
html[data-theme="dark"] .comic-card{ background: #2C2C2C; border-color: var(--color-border) }
html[data-theme="dark"] .comic-info{ background: transparent }
html[data-theme="dark"] .comic-title h3{ color:#fff }
html[data-theme="dark"] .comic-image{ border-color: var(--color-hover) }
html[data-theme="dark"] .game-card {
    background-color: #2C2C2C;
}
html[data-theme="dark"] .game-card .game-title{ color:#fff }
html[data-theme="dark"] .comic-rank{ background: var(--color-gray-800) }



html[data-theme="dark"] .login-submit-btn {
    background-color: var(--brand-action);
    color: #FFFFFF;
    border-color: var(--brand-action);
}

html[data-theme="dark"] .register-btn {
    background-color: transparent;
    color: var(--color-text);
    border-color: var(--color-border);
}

html[data-theme="dark"] .register-btn:hover {
    background-color: var(--color-hover);
}



/* main-banner */
.oot-main{
    position: relative;
    
}
.banner-container-back{
    display: none;
    position: absolute;
    top: 0;    
}
.bannerbackbanner{
    position: fixed;
    width: 100%;
    height: auto;
}
.banner-left{
    left: 0;
    position: fixed;
    top: 56%;
    transform: translateY(-50%);
    z-index: 1000;
}
.banner-left a{
    display: block;
    width: 100%;
    height: 100%;
}
.top-menu-left{
    position: relative;
    display: flex;
    align-items: center;
}

.banner-right{
    right: 0;
    position: fixed;
    top: 56%;
    transform: translateY(-50%);
    z-index: 1000;
}
.ot-main-width{
    margin: 0 auto;
    width: 100%;
    max-width: 1180px;
}

/* Banner Slider Wrapper (Full Width) */
.banner-slider-wrapper {
    position: relative;
    z-index: 0;
    width: 100%;
    margin-bottom: 20px; /* 다음 섹션과의 간격 */
    padding: 20px 16px 34px 16px; /* 위 여백과 아래 인디케이터 공간 포함 */
    overflow: hidden; /* Prevent horizontal scroll */
    box-sizing: border-box;
}

.banner-slider-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 1) 100%);
    z-index: 0;
    pointer-events: none;
}

html[data-theme="dark"] .banner-slider-wrapper::before {
    background: linear-gradient(to bottom, rgba(18, 18, 18, 0.1) 0%, rgba(18, 18, 18, 1) 100%);
}

.banner-bg-blur {
    position: absolute;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(25px) brightness(0.7);
    opacity: 0.7;
    z-index: -1;
    transition: background-image 0.6s ease;
    pointer-events: none;
}

html[data-theme="dark"] .banner-bg-blur {
    filter: blur(25px) brightness(0.4);
}

/* Banner Slider */
.banner-slider {
    position: relative;
    z-index: 1;
    width: 100%;
    /* max-width: 1180px; 삭제: 화면 전체를 채우기 위해 */
    /* margin-left: auto; */
    /* margin-right: auto; */
    --banner-transition-ms: 600ms;
    --banner-auto-interval: 3000ms;
    --banner-gap: 12px;
}

.banner-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    touch-action: pan-y;
}

.banner-track {
    display: flex;
    transition: transform var(--banner-transition-ms) cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
    column-gap: var(--banner-gap);
}

.banner-slide {
    flex: 0 0 calc((100% - 4 * var(--banner-gap)) / 5); /* 5 slides visible on PC */
    position: relative;
}

.banner-slide a {
    display: block;
    width: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 16px;
}

.banner-slide img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    aspect-ratio: 16 / 9; /* Ensure uniform size */
    transition: transform 0.3s ease;
}

/* Navigation Buttons */
.banner-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7); /* Dark semi-transparent background */
    border: 1px solid #ffffffb0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    color: #fff;
}

.banner-nav:hover {
    background: rgba(0, 0, 0, 0.9);
}

.banner-prev {
    left: 24px; /* Inside the slider, considering the wrapper padding */
}

.banner-next {
    right: 24px; /* Inside the slider, considering the wrapper padding */
}

.banner-next img {
    transform: rotate(180deg);
}

.banner-nav img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    filter: brightness(0) invert(1); /* Make existing icon white */
}

/* Indicators */
.banner-indicators {
    position: absolute;
    bottom: -20px; /* Moved below the slides */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 10;
}

.indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ccc;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    width: 24px;
    height: 6px;
    border-radius: 3px;
    background: #888888;
}

html[data-theme="dark"] .indicator {
    background: #666;
}

html[data-theme="dark"] .indicator.active {
    background: #fff;
}
@media (max-width: 1440px) {
    .banner-slide {
        flex: 0 0 calc((100% - 3 * var(--banner-gap)) / 4);
    }
}

@media (max-width: 1024px) {
    .banner-slide {
        flex: 0 0 calc((100% - 2 * var(--banner-gap)) / 3);
    }
}

@media (max-width: 768px) {
    .banner-slide {
        flex: 0 0 calc((100% - 1.5 * var(--banner-gap)) / 2.5); /* 2.5 slides */
    }
    .banner-nav {
        width: 32px;
        height: 32px;
    }
    .banner-nav img {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 640px) {
    .banner-slide {
        flex: 0 0 calc((100% - 1 * var(--banner-gap)) / 2); /* 2 slides */
    }
}

@media (max-width: 480px) {
    .banner-slide {
        flex: 0 0 calc((100% - 0.5 * var(--banner-gap)) / 1.5); /* 1.5 slides */
    }
}

@media (prefers-reduced-motion: reduce) {
    .banner-track { transition: none; }
}
/* Responsive Design */
@media (min-width: 768px) and (max-width: 1199px) {
    .ot-main-width, .oot-main {
        width: 100%;
    }
    
    .banner-slider { margin: 0; border-radius: 8px; }
    .banner-slide { flex: 0 0 calc((100% - 2 * var(--banner-gap)) / 3); }
    
    
    
    .banner-nav {
        width: 40px;
        height: 40px;
    }
    
    .banner-prev {
        left: -20px;
    }
    
    .banner-next {
        right: -20px;
    }
    
    .banner-nav img {
        width: 16px;
        height: 16px;
    }
    
    .banner-indicators {
        bottom: 15px;
        gap: 8px;
    }
    
    .indicator {
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 640px) {
    .banner-slider {
        border-radius: 6px;
    }
    
    .banner-nav {
        width: 35px;
        height: 35px;
    }
    
    
    .banner-prev {
        left: -17px;
    }
    
    .banner-next {
        right: -17px;
    }
    
    .banner-nav img {
        width: 14px;
        height: 14px;
    }
    
    .banner-indicators {
        bottom: 10px;
        gap: 6px;
    }
    
    .indicator {
        width: 8px;
        height: 8px;
        border-width: 1px;
    }
}





/* 最新漫画 */
.oot-newmana{
    position: relative;
}
.newm-title{
    position: relative;
    margin-top: 44px;
}

.newm-title h2{
    position: relative;
    margin-top: 44px;
}

.newm-tth{
    float: left;
    font-size: 24px;
}
.newm-tth h1{
    display: flex;
    align-items: center;
    font-size: 24px;
}
.newm-tth h1 svg{
    margin-right: 10px;
}

.newm-rtbnt{
    position: relative;
    float: right;
    margin-top: 6px;
    
}
.newm-rtbnt::after{
    content: '';
    clear: both;
    display: block;
}
.newm-bnt-ic{
    float: left;
}
.newm-al-ck{
    float: left;
}
.newm-al-ck a{
    display: block;
    color: rgb(34, 34, 34);
    font-size: 14px;
    margin-left: 20px;
}
.newm-bnt-ic img{
    margin: 0 6px;
    cursor: pointer;
}
.newm-bnt-ic span{
    display: inline-block;
    cursor: pointer;
    margin: 4px;
    width: 6px;
    height: 6px;
    border-radius: 100%;
    background-color: rgb(196, 196, 196);
}
.newm-bnt-ic span:nth-child(2){
    background-color: rgb(34, 34, 34);
}
@media (max-width:980px){
    .newm-title{
        position: relative;
        margin: 0;
        padding: 20px 10px;
    }
    .newm-tth h1{
        font-size: 20px;
    }
    .newm-rtbnt{
        position: relative;
    }
    .newm-al-ck a{
        position: absolute;
        right: 10px;
        white-space: nowrap;
    }
    .newm-bnt-ic img{
        display: none;
    }
    .newm-bnt-ic span{
        display: none;
    }
    
}


/* 漫画排列 */
.newm-list{
    position: relative;
}
.newm-boxo{
    padding-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px 17px;
}
.newm-boxo li{
    flex: 0 0 calc(100% / 7 - 14.57px);
    white-space: nowrap;
}
.newm-box-img{
    /* position: relative; */
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    width: 100%;
    display: block;
    height: 254px;
}
.newm-box-img img{
    display: block;
}
.newm-box-bg{
    position: absolute;
    padding: 8px;
    top: 192px;
    width: 100%;
    background:  linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.5) 59.37%);
    border-radius: 0px 0px 2px 2px;
}
.new-box-tt{
    position: relative;
}
.new-box-tt span{
    position: relative;
    color: white;
    font-size: 14px;
}
.new-box-tt div span{
    position: absolute;
    color: white;
    font-size: 16px;
    width: 40px;
    height: 40px;
    top: -188px;
    font-weight: bold;
    padding-left: 9px;
    padding-top: 9px;
    background: var(--brand-action);
    border-radius: 100%;
}
.new-box-ttt{
    position: relative;
    display: flex;
    align-items: center;
}
.new-box-ttt img{
    display: block;
    padding-right: 4px;
}
.new-box-ttt span{
    color: white;
    font-size: 18px;
    font-weight: bolder;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    max-width: 180px;
}
@media (max-width:980px){
    .newm-list{
        width: 100%;
    }
    .newm-boxo{
        padding: 0 10px;
        /* padding-top: 20px; */
    }
    .newm-boxo li{
        flex: 0 0 calc(33.333% - 10px);
        margin-bottom: 20px;
    }
    .newm-box-img{
        width: 110px;
        height: 152px;
        border-radius: 2px;
    }
    .newm-box-bg{
        width: 110px;
        border-radius: 0 0 2px 2px;
        top: 107px;
        padding: 4px;
    }
    .new-box-tt div span{
        top: -106px;
        width: 30px;
        font-size: 14px;
        height: 30px;
        padding-left: 5px;
        padding-top: 5px;
    }
    .new-box-ttt span{
        font-size: 14px;
    }
    
}








/* 페이지네이션 */
.pagination,
.up-do-li {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 40px;
}

.pagination > :is(a, button),
.up-do-li > :is(a, button) {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 52px;
    height: 52px;
    padding: 0;
    margin: 0;
    border: 1px solid rgba(196, 196, 196, 0.5);
    border-radius: 2px;
    background: #fff;
    color: #222;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.pagination > :is(a, button):hover,
.up-do-li > :is(a, button):hover,
.pagination > .active,
.up-do-li > .active {
    border-color: #222;
    background: #f8f8f8;
}

.pagination > :is(a, button):focus-visible,
.up-do-li > :is(a, button):focus-visible {
    outline: 2px solid var(--brand-action);
    outline-offset: 2px;
}

.pagination > :is(a, button):disabled,
.up-do-li > :is(a, button):disabled {
    opacity: 0.4;
    cursor: default;
    border-color: rgba(196, 196, 196, 0.5);
    background: #fff;
}

.pagination > .page-ellipsis {
    border: 0;
    width: auto;
    padding: 0 2px;
    color: #666;
}

html[data-theme="dark"] .pagination > :is(a, button),
html[data-theme="dark"] .up-do-li > :is(a, button) {
    background: #2c2c2c;
    border-color: #555;
    color: #fff;
}
html[data-theme="dark"] .pagination > .active,
html[data-theme="dark"] .up-do-li > .active {
    background: #424242;
    border-color: #eee;
}

@media (max-width: 600px) {
    .pagination,
    .up-do-li { gap: 6px; }
    .pagination > :is(a, button),
    .up-do-li > :is(a, button) { width: 40px; height: 40px; }
}

/* 第几话，留言 */
.new-box-tttt{
    position: relative;
    padding-top: 8px;
}
.new-box-tttt::after{
    content: '';
    display: block;
    clear: both;
}
.new-box-tttt span{
    color: rgb(34, 34, 34);
    font-size: 14px;
}
.new-box-tttt span:first-child{
    font-weight: 600;
    float: left;
}
.new-box-tttt span:last-child{
    float: right;
    display: flex;
    align-items: center;
}
.new-box-tttt span:last-child svg{
    margin-right: 4px;
}
@media (max-width:980px){
    .new-box-tttt span{
        font-size: 14px;
    }
    .new-box-tttt span:last-child{
        display: none;
    }
}




/* 漫画分类排行 */
.oot-top{
    position: relative;
    margin-top: 44px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
/* Section header horizontal alignment */






.section-header a:hover {
    border-color: #999;
    background-color: #f8f9fa;
}

.oot-t-list{
    position: relative;
    width: 100%;
}

.oot-t-list h2 font{
    color:var(--brand-text);
}
.oot-t-list div a{
    color: rgb(34, 34, 34);
    font-size: 14px;
    padding: 8px 16px;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    transition: all 0.3s ease;
}
.oot-t-list div a:hover{
    border-color: #999;
    background-color: #f8f9fa;
}
.ot-to-lt{
    position: relative;
    box-sizing: border-box;
}
.banner-slide a picture source{
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}
.ot-to-lt li{
    margin: 0;
    padding: 0;
    padding-bottom: 10px;
}
.ot-to-lt a{
    position: relative;
    display: flex;
    gap: 20px;
    align-items: center;
    color: rgb(34, 34, 34);
}
.top-li-tt-num {
    position: relative;
    display: flex;
    align-items: center;
}
.top-li-tt-num h3{
    width: 50px;
    text-align: center;
}
.top-li-tt-title h4{
    font-size: 16px;
    white-space: nowrap;
    font-weight: 500;
    overflow: hidden;
    padding-bottom: 10px;
    text-overflow: ellipsis;
    max-width: 210px;
}
.top_new_light{
    position: relative;
    display: flex;
    align-items: center;
}
.top_new_light span{
    font-size: 14px;
    display: flex;
    align-items: center;
    padding-right: 20px;
}
.top_new_light span svg{
    margin-right: 10px;
}

.ot-to-bg{
    width: clamp(72px, 22vw, 70px);
    aspect-ratio: 3 / 4;
    border-radius: 4px;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    overflow: hidden;
}
.ot-to-bg img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}
.top-li-tt{
    display: flex;
    gap: 10px;
    align-items: center;
}
.top-li-tt h3{
    font-size: 20px;
    padding-bottom: 14px;
}
.top-li-tt p:nth-child(2){
    padding-bottom: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 240px;
}
.top-li-tt p:nth-child(3){
    font-size: 14px;
    padding-bottom: 3px;
}
.top_menu_icons,
.mobile-menu-toggle{
    display: none;
}
.top-li-tt span svg{
    margin-right: 4px;
}
@media (max-width: 1200px) {
    .newm-title{
        display: none;
    }
    
    .category-nav { display: flex; align-items: center;}
    .category-nav .category-list { display: none;}
    .otm-nav { display: none; }
    .language-menu { display: none; }
    .ot-srk { position: relative; }    
    .ot-srk.search-open input { display:block; position:absolute; right:0; top:100%; width:min(90vw, 320px); background:#fff; border:1px solid #ddd; border-radius:8px; padding:8px 12px; margin-top:6px; box-shadow:0 8px 24px rgba(0,0,0,0.12); }

    .mobile-menu-toggle { display: none !important; }
    .mobile-menu { position: fixed; inset: 0; z-index: 1000; pointer-events: none; }
    .mobile-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.35); opacity: 0; transition: opacity 300ms ease; }
    .mobile-drawer { position: absolute; left: 0; top: 0; bottom: 0; width: min(85vw, 360px); background: #fff; border-right: 1px solid #e5e5e5; transform: translateX(-100%); transition: transform 300ms ease; display: flex; flex-direction: column; }
    .mobile-menu.open { pointer-events: auto; }
    .mobile-menu.open .mobile-backdrop { opacity: 1; }
    .mobile-menu.open .mobile-drawer { transform: translateX(0); }
    .mobile-drawer-header { display:flex; justify-content:flex-end; align-items:center; padding:10px; border-bottom:1px solid #eee; }
    .mobile-menu-close { width:36px; height:36px; border:none; background:#fff; border-radius:6px; cursor:pointer; font-size:20px; line-height:1; }
    .mobile-drawer-body { overflow-y:auto; padding:8px 0 16px; }
    .mobile-menu-list { list-style:none; padding:8px 0; margin:0; }
    .mobile-menu-list li { border-top:1px solid #f0f0f0; }
    .mobile-menu-list li:first-child { border-top:none; }
    .mobile-menu-list a { display:flex; align-items:center; min-height:48px; padding:12px 16px; color:#222; text-decoration:none; font-size:15px; }
    .mobile-menu-list a:hover,
    .mobile-menu-list a.active { background:#f7f7f7; color:var(--brand-text); font-weight: 600; }
    .mobile-controls { padding:12px 16px; border-top:1px solid #eee; display:flex; gap:12px; align-items:center; }
    .theme-switch { display:inline-flex; border:1px solid #ddd; border-radius:8px; overflow:hidden; }
    .theme-option { display:inline-flex; align-items:center; justify-content:center; width:44px; height:44px; background:#fff; border:none; cursor:pointer; }
    .theme-option[aria-checked="true"], .theme-option.active { background:#f0f0f0; }
    .lang-switch { display:inline-flex; border:1px solid #ddd; border-radius:8px; overflow:hidden; }
    .lang-option { display:inline-flex; align-items:center; justify-content:center; width:44px; height:44px; background:#fff; border:none; cursor:pointer; font-weight:600; }
    .lang-option[aria-checked="true"], .lang-option.active { background:#f0f0f0; }
    .ot-menu{ display: none; }
    .top_menu_icons{
        display: block;
    }
    .category-nav h1{ margin-left: 12px; }
    .banner-container{
        margin-left: 0;
    }
    
}

    


@media (max-width:980px){
    .oot-top{
        display: grid;
        grid-template-columns: 1fr;
        gap: 20px;
        width: 100%;
        position: relative;
        overflow-x: visible;
    }
    .category-nav h1{
        margin-left: 12px;
    }
    .oot-t-list{
        width: 100%;
        padding: 0 10px;
    }
    .oot-t-list h2{
        font-size: 20px;
    }
    .oot-t-list div a{
        right: -20px;
        font-size: 14px;
    }
    .oot-tlast{
        /* margin-right: 7%; - Grid에서는 불필요 */
    }
    .ot-to-bg{
        border-radius: 2px;
    }

}




/* Arcade Games Section */
.arcade-games {
    position: relative;
    margin-top: 50px;
}

.arcade-games .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.arcade-games .section-header h2 {
    font-size: 22px;
    font-weight: 700;
}

.arcade-games .section-header .view-all {
    color: rgb(34, 34, 34);
    font-size: 14px;
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.arcade-games .section-header .view-all:hover {
    border-color: #999;
    background-color: #f8f9fa;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
}

.game-card {
    background-color: transparent;
    border-radius: 8px;
    overflow: hidden;
}

.game-img-box {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1; /* 정사각형 비율 */
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 10px;
}

.game-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}



.game-badge {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    text-align: center;
    padding: 4px 0;
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    z-index: 2;
}

.game-badge.bg-red {
    background-color: var(--brand-action); /* 강렬한 빨간색 */
}

.game-card a {
    color: black;
    text-decoration: none;
}

.game-card .game-info {
    padding: 8px 10px;
}

.game-card .game-title {
    font-size: 14px;
    font-weight: 500;
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #111;
}

.game-card .game-category {
    font-size: 14px;
    color: #aaa;
    margin: 0;
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 1200px) {
    .game-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .arcade-games .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        position: relative;
    }
    .arcade-games .header-left {
        width: 100%;
        flex-direction: column;
        align-items: flex-start !important;
        gap: 10px !important;
    }
    .arcade-games .ranking-category-tabs {
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 4px;
    }
    .arcade-games .section-header .view-all {
        position: absolute;
        top: 0;
        right: 0;
    }
    .game-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .game-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }
    .game-card .game-title {
        font-size: 14px;
    }
    .game-card .game-category {
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .game-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .language-menu { display: none; }
    
}

@media (max-width: 480px) {
    .game-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 底部 */
.oot-m-f{
    position: relative;
    width: 100%;
    margin-top: 80px;
    background: #FAFAFA;
    border-top: 1px solid #E5E5E5;
    padding: 20px 0;
}
.oot-down{
    margin: 0 auto;
    width: 1180px;
}
.oot-height{
    display: flex;
    align-items: center;
}

.footer-left-section {
    width: 60%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}



.inquiry-board h3 {
    font-size: 14px;
    font-weight: 500;
    padding: 0 10px;
}

.inquiry-board .form-group {
    margin-bottom: 10px;
}

.inquiry-board input[type="text"],
.inquiry-board textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #E5E5E5;
    border-radius: 4px;
    font-size: 14px;
}

.inquiry-board textarea {
    height: 80px;
    resize: vertical;
}

.inquiry-board .submit-btn {
    background-color: #333;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}

.footer-right-section {
    width: 40%;
    display: flex;
    justify-content: flex-end;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}


@media (max-width:980px){
    .oot-m-f, .oot-down{
        width: 100%;
    }
    .oot-height{
        flex-direction: column;
        align-items: center;
        gap: 30px;
        padding: 20px;
    }
    .footer-left-section,
    .footer-right-section {
        width: 100%;
        align-items: center;
        text-align: center;
    }
    .footer-right-section {
        justify-content: center;
    }
}
.oot-height::after{
    content: '';
    display: block;
    clear: both;
}

.oot-height div:first-child a{
    display: block;
}

.oot-height div:last-child a{
    color: white;
    font-size: 14px;
}
.inquiry-board{
    display: flex;
    align-items: center;
    margin-left: 10px;
    justify-content: center;
}
.oot-height div:last-child a font{
    color: rgb(110, 110, 110);
}
@media (max-width:980px){
    .oot-m-f, .oot-down{
        width: 100%;
    }
    .oot-height{
        padding-top: 30px;
    }
    .oot-height div:first-child{
        width: 100%;
        text-align: center;
    }
    .oot-height div:last-child{
        text-align: center;
        width: 100%;
        padding: 10px 0;
        
    }

}

/* Footer dark mode overrides */
html[data-theme="dark"] .oot-m-f{ background: var(--color-bg); border-top-color: var(--color-border) }
html[data-theme="dark"] .oot-down{ color: var(--color-text) }
html[data-theme="dark"] .inquiry-board h3{ color: var(--color-text) }
html[data-theme="dark"] .inquiry-board input[type="text"],
html[data-theme="dark"] .inquiry-board textarea{ background: var(--color-bg); border-color: var(--color-border); color: var(--color-text) }
html[data-theme="dark"] .inquiry-board .submit-btn{ background-color: var(--color-primary); color:#fff }
html[data-theme="dark"] .oot-height div:last-child a{ color: var(--color-text) }
html[data-theme="dark"] .oot-height div:last-child a font{ color: var(--color-text-muted) }



/* 上下一页标签 */
.up-down-bnt{
    position: relative;
    margin-top: 40px;
}
.up-down-bnt .up-do-li { margin-top: 0; }

/* 새로운 상단 메뉴 바 스타일 */
.top-menu-bar {
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    position: sticky;
    top: 0px;
    z-index: 1000;
    background-color: white;
}

.top-menu-container {
    max-width: 1180px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 상단 전체 배너 (사용 안함) */
/* .global-top-banner{ position:sticky; top:0; width:100%; height:60px; background:#000; z-index:1100 }
.global-banner-container{ position:relative; max-width:1180px; margin:0 auto; height:100% }
.global-banner-image{ display:block; width:100%; height:100%; object-fit:cover }
.global-banner-video{ display:block; width:100%; height:100%; object-fit:cover }
.global-banner-overlay{ position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); max-height:50%; width:auto }
.global-banner-close{ position:absolute; right:12px; top:50%; transform:translateY(-50%); width:28px; height:28px; border:1px solid #444; border-radius:14px; background:#111; color:#fff; cursor:pointer }
body.banner-hidden .global-top-banner{ display:none }
body.banner-hidden .top-menu-bar{ top:0 }
body.banner-hidden .otoon-top{ top:71px } */

/* 좌측 카테고리 메뉴 스타일 */
.category-nav {
    display: flex;
    position: relative;
    align-items: center;
}
.category-nav h1{
    margin-right: 20px;
}

.category-list {
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.category-btn {
    background: none;
    border: none;
    padding: 24px 8px; /* 좌우 패딩을 줄여 간격 축소 */
    font-size: 16px;
    font-weight: 600;
    font-family: var(--font-family-base);
    color: #000;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 0; /* 테두리 둥글기 제거 */
    position: relative;
    display: flex;
    align-items: center;
    height: 60px; /* .top-menu-container 높이와 맞춤 (메뉴바 높이에 따라 조절) */
}



.category-btn:active {
    transform: translateY(1px);
    box-shadow: none;
}

.category-btn.active {
    color:var(--brand-text);
    background: #fff;
    font-weight: 600;
    font-size: 16px;
    /* border: 1px solid var(--brand-action); */
    /* box-shadow: 0 2px 4px rgba(0,0,0,0.1); */
}

.category-btn:focus {
    outline: none;
}

.category-btn:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Language Selector */
.language-selector {
    position: relative;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: 1px solid #ddd;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    max-width: 60px;
}

.current-lang {
    display: flex;
    align-items: center;
    gap: 8px;
}

.current-lang img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.lang-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    list-style: none;
    padding: 5px 0;
    margin: 0;
    min-width: 100%;
    z-index: 1000;
}

.lang-dropdown.show {
    display: block;
}

.lang-dropdown li button {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 12px;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
}

.lang-dropdown li button:hover {
    background-color: #f5f5f5;
}

.lang-dropdown li button img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

/* 반응형 디자인 */
@media (max-width: 980px) {
    .top-menu-container {
        padding: 0 10px;
    }
    
    .category-nav {
        width: 100%;
    }
    
    .category-list {
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .category-btn {
        padding: 8px 16px;
        font-size: 14px;
    }
    
    
    
}

@media (max-width: 768px) {
   
    
    .category-nav { width: 100%; }
    .category-list { width: 100%; justify-content: space-between; flex-wrap: nowrap; }
    .category-list li { flex: 1; }

    .category-btn {
        padding: 10px 12px;
        display: block;
        text-align: center;
        width: 100%;
        font-size: 14px;
    }
    
    .lang-btn {
        padding: 6px 10px;
    }
    .header-right{
        align-items: center;
        padding-bottom: 10px;
    }
}
/* Click focus ring control: hide on mouse click, show for keyboard */
.category-btn:focus {
    outline: none;
}
.category-btn:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}
/* Click focus ring control for language button */
.lang-btn:focus {
    outline: none;
}
.lang-btn:focus-visible {
    outline: 2px solid var(--focus-ring-color, #0d6efd);
    outline-offset: 2px;
}

/* 최신만화 & 인기만화 섹션 - Figma 디자인 스타일 */
.latest-comics-section,
.popular-comics-section {
    position: relative;
    margin-top: 15px; /* 서브페이지(newmana 등) 기준 축소된 마진 */
}

/* index.html(메인페이지) 전용 마진 복구 */
.home-page .latest-comics-section,
.home-page .popular-comics-section {
    margin-top: 30px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
}
.section-header_top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--color-border);
}
.section-header_top h2{
    font-size: 22px;
}
.section-title h2 {
    font-size: 22px;
    font-weight: 600;
    color: #000;
    margin: 0;
}
html[data-theme="dark"] #latest-comics-section .section-title h2 { color: #fff }
html[data-theme="dark"] .popular-comics-section .section-title h2 { color: #fff }
html[data-theme="dark"] .section-header h2 { color: #fff }
html[data-theme="dark"] .section-header {
    background-color: transparent;
    padding: 0;
    border-radius: 0;
}
html[data-theme="dark"] .nr-slider-container {
    background-color: transparent;
}
html[data-theme="dark"] .nr-item {
    background-color: #2C2C2C;
    border-radius: 8px;
}
html[data-theme="dark"] .hc-right {
    background-color: transparent;
}
html[data-theme="dark"] .hc-list li {
    background-color: #2C2C2C;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 10px;
}
html[data-theme="dark"] .ranking-category-tabs .rc-tab {
    background-color: transparent;
    color: #fff;
    border-color: #555;
}
html[data-theme="dark"] .ranking-category-tabs .rc-tab.active {
    background-color: #2C2C2C;
    color:var(--brand-text);
    border-color: var(--brand-action);
}
html[data-theme="dark"] .view-all {
    background-color: #2C2C2C;
    color: #fff;
    border-color: #555;
}



.view-all-btn a {
    color: #222222;
    background: white;
    font-size: 14px;
    text-decoration: none;
    font-weight: 500;
    position: static;
    padding: 0 16px;
    height: 36px; /* 좌우 버튼과 동일한 높이로 설정 */
    display: flex;
    align-items: center; /* 텍스트 수직 중앙 정렬 */
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    transition: all 0.2s ease;
}

/* 만화 슬라이더 스타일 */
.comics-slider-container {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.comics-slider {
    display: flex;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.comics-page {
    flex-shrink: 1;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.comics-page.active {
    display: block;
    opacity: 1;
}

/* 페이지 인디케이터 스타일 */
.page-indicator {
    font-size: 14px;
    font-weight: 500;
    color: #666;
    line-height: 36px;
    width: 32px;
    text-align: center;
    user-select: none;
    font-variant-numeric: tabular-nums;
}

/* 네비게이션 버튼 비활성화 상태 */
.navigation-buttons .prev-btn.disabled,
.navigation-buttons .next-btn.disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    pointer-events: none;
}

.navigation-buttons .prev-btn.disabled svg,
.navigation-buttons .next-btn.disabled svg {
    opacity: 0.5;
}

.view-all-btn a:hover {
    background: #f9f9f9;
    border-color: #d0d0d0;
}

.comics-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
}



/* UP 배지 (제목 앞) */
.up-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    color: #d32f2f;
    border: 1px solid #d32f2f;
    font-size: 14px;
    font-weight: 800;
    padding: 0 3px;
    border-radius: 4px;
    margin-right: 6px;
    vertical-align: middle;
    height: 18px;
    line-height: 1;
    box-sizing: border-box;
}

html[data-theme="dark"] .up-badge {
    background-color: transparent;
    color: #ff8b83;
    border-color: #ff8b83;
}

.new-icon {
    position: absolute;
    top: 0;
    right: 0;
    width: 38px !important;
    height: 26px !important;
    padding: 0 6px;
    background-color: var(--brand-action);
    color: #fff;
    font-size: 14px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 8px 0 8px;
    overflow: hidden;
    z-index: 2;
}
.new-icon.cat-manga { background-color: #3b82f6 !important; }
.new-icon.cat-webtoon { background-color: #10b981 !important; }
.new-icon.cat-novel { background-color: #8b5cf6 !important; }

/* 빛이 지나가는(Shine) 애니메이션 효과 */
.new-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.8) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-30deg);
    animation: shine 2s infinite;
}

@keyframes shine {
    0% {
        left: -100%;
    }
    20% {
        left: 200%;
    }
    100% {
        left: 200%;
    }
}
.new_comics-grid{
    padding-bottom: 20px;
}

.comic-card {
    position: relative;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

html[data-theme="dark"] .comic-card {
    background: #2C2C2C;
}



.comic-card a {
    display: block;
    text-decoration: none;
    color: inherit;
    width: 100%;
}

.comic-image {
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
    /* border: 1px solid #e5e5e5; */
    border-radius: 8px;
}

/* 파피콘(로고) 뱃지 - 이미지 좌측 상단 */
.favicon-badge {
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.favicon-badge img {
    border-radius: 8px 0 8px 0 !important;
    object-fit: contain;
}

html[data-theme="dark"] .favicon-badge {
    background-color: rgba(30, 30, 30, 0.9);
    border: 1px solid #333;
}

.comic-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    display: block; /* 인라인 요소 여백 제거 */
    transition: transform 0.3s ease;
}

/* .comic-card:hover .comic-image img {
    transform: scale(1.05);
} */

.comic-info {
    padding: 10px;
    background: transparent;
}
.comic-title{
    position: relative;
    display: flex;
    align-items: center;
    margin: 0 0 8px 0;
}

.comic-title h3 {
    font-size: 14px;
    font-weight: 500;
    color: #000;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.comic-rank{
    position: absolute;
    bottom: 6px;
    left: 6px;
    width: max-content;
    min-width: 52px;
    height: 44px;
    padding: 0 8px;
    box-sizing: border-box;
    background: #ffffff;
    border: 1.5px solid #000000;
    border-radius: 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    z-index: 10;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.4);
}

.comic-rank span {
    flex-shrink: 0;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    color: #000000;
    font-weight: 900;
    font-size: 20px;
    font-family: 'Arial Black', Impact, sans-serif;
    line-height: 1;
}

.comic-episode {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.comic-episode > span {
    font-size: 14px;
    margin-right: 10px;
    font-weight: 600;
    color: #000000;
}

.comic-stats {
    display: flex;
    align-items: center;
    gap: 4px;
}

.comic-stats span {
    font-size: 14px;
    color: #141414;
}

.comic-tags {
    display: flex;
    gap: 2px;
    flex-wrap: nowrap;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.comic-tags .tag:nth-child(n+4) {
    display: none;
}

.tag {
    display: inline-block;
    color: #2f2f2f;
    font-size: 14px;
    border-radius: 12px;
    flex-shrink: 0;
}



/* 반응형 디자인 */
@media (max-width: 1200px) {
    .comics-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 14px;
    }
    .top-menu-container {
        padding: 0 10px;
    }
    .ranking-slide{
        width: 100% !important;
    }
    .latest-comics-section{
        padding: 0 10px;
    }
    .attendance-main{
        margin: 20px 10px !important;
    }
}
@media (max-width: 1150px) and (min-width: 1100px) {
    .comics-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 14px;
    }
    
}
@media (max-width: 980px) {
    .latest-comics-section,
    .popular-comics-section {
        margin-top: 20px;
        padding: 0 10px;
    }
    
    .section-header {
        margin-bottom: 16px;
    }
    
    .section-title h2 {
        font-size: 20px;
    }
    
    .view-all-btn a {
        font-size: 14px;
        padding: 6px 12px;
    }
    
    .comics-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    
    .comic-image { border-radius: 4px 4px 0 0; }
    
    
    
    
    .comic-title h3 {
        font-size: 14px;
    }
    
    .comic-episode > span {
        font-size: 14px;
    }
    
    .comic-stats span {
        font-size: 14px;
    }
    
    .tag {
        font-size: 14px;
        padding: 3px 6px;
    }
}

@media (max-width: 756px) {
    .comics-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    
    
    
    
    
    .comic-title h3 {
        font-size: 14px;
        margin-bottom: 6px;
    }
    
    .comic-episode {
        margin-bottom: 8px;
    }
    
    /* 모바일에서 슬라이더 조정 */
    .comics-slider {
        /* JS에서 동적으로 설정됨 */
    }
    
    .comics-page {
        /* JS에서 동적으로 설정됨 */
    }
    
    .page-indicator {
        font-size: 14px;
        min-width: 35px;
    }
}


@media (max-width: 480px) {
    .section-header {
    }
    .section-actions{
        display: flex;
        align-items: center;
    }
    .comic-title{
        margin-bottom: 0;
    }
    
    .comics-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
    
    .comic-card {
        
        height: 100%;
        width: 100%;
    }
    
    .comic-image {
        width: 100%;
        height: auto;
        aspect-ratio: 3 / 4;
        border-radius: 4px 0 0 4px;
    }
    
    
    
    .comic-title h3 {
        font-size: 14px;
        line-height: 1.3;
        margin-bottom: 4px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .comic-episode {
        margin-bottom: 6px;
    }
}

/* 추천만화 섹션 */
.recommended-manga-section {
    display: flex;
    align-items: center;
    background-color: var(--brand-text);
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    position: relative;
}

.left-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-right: 20px;
}

.read-more-tag {
    background-color: var(--brand-text);
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 10px;
    position: relative;
    width: 120px;
    text-align: center;
}

.read-more-tag::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    width: 10px;
    height: 10px;
    background-color: #fff;
    transform: rotate(45deg);
}

.read-more-text {
    color: #fff;
    font-weight: bold;
}

.view-all-button {
    background-color: #fff;
    color: var(--brand-text);
    padding: 10px 20px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: bold;
}

.manga-thumbnail {
    margin-right: 20px;
}

.manga-thumbnail img {
    width: 150px;
    border-radius: 10px;
}

.right-content {
    flex-grow: 1;
}


/* Sidebar and Ranking List Styles */
.main-and-sidebar {
    display: flex;
}

.main-content {
    flex: 1;
}

.sidebar {
    width: 300px;
    position: absolute;
    top: 100%;
    padding-top: 15px;
    z-index: 999;
    right: 0;
    pointer-events: none; /* 방해 방지 */
}

.sidebar.active {
    pointer-events: auto; /* 활성화 시 클릭 및 호버 허용 */
}

.ranking-container {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 14px;
}

.ranking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.ranking-header h2 {
    font-size: 18px;
    font-weight: bold;
}

.top-ranking-link {
    color: #fff;
    background: var(--color-primary);
    font-size: 14px;
    text-decoration: none;
    font-weight: 500;
    position: static;
    padding: 8px 16px;
    border: 1px solid var(--color-primary);
    border-radius: 6px;
    transition: all 0.2s ease;
    display: inline-block;
}
.top-ranking-link:hover { background: var(--color-primary-dark); border-color: var(--color-primary-dark); color: #fff }

.ranking-tabs {
    display: flex;
    justify-content: space-between; /* 탭 간격을 넓이에 맞게 균등하게 분배 */
    margin-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.tab-btn {
    flex: 1; /* 탭들이 가로 공간을 동일하게 차지하도록 설정 */
    background: none;
    border: none;
    padding: 10px 0; /* 좌우 패딩을 없애고 텍스트를 중앙에 정렬 */
    cursor: pointer;
    font-size: 14px;
    color: #888;
    border-bottom: 2px solid transparent;
    text-align: center; /* 텍스트 중앙 정렬 */
}

.tab-btn.active {
    color:var(--brand-text);
    border-bottom: 2px solid var(--brand-action);
}

.ranking-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 400px;
    overflow-y: auto;
    transition: opacity 0.3s ease-in-out;
    padding-right: 5px; /* 스크롤바와 콘텐츠 사이 여백 */
}

/* Webkit (Chrome, Edge, Safari) 스크롤바 스타일링 */
.ranking-list::-webkit-scrollbar {
    width: 6px; /* 스크롤바 두께 얇게 */
}

.ranking-list::-webkit-scrollbar-track {
    background: transparent; /* 트랙 배경 투명하게 */
}

.ranking-list::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2); /* 스크롤바 색상 */
    border-radius: 10px; /* 둥근 모서리 */
}

.ranking-list::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.4); /* 호버 시 색상 진하게 */
}

/* Firefox용 스크롤바 스타일링 (선택 사항) */
.ranking-list {
    scrollbar-width: thin; /* 스크롤바 얇게 */
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent; /* thumb과 track 색상 */
}

.no-data {
    text-align: center;
    padding: 20px;
    color: #888;
}

.ranking-item {
    margin-bottom: 10px;
}

.ranking-item a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
}

.item-thumbnail {
    width: 40px;
    height: 40px;
    border-radius: 5px;
    object-fit: cover;
    margin-right: 10px;
}

.item-rank {
    font-size: 18px;
    font-weight: bold;
    width: 30px;
    text-align: center;
}

.item-info {
    flex: 1;
}

.item-title {
    font-size: 14px;
    margin: 0 0 5px 0;
    font-weight: 400;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    max-width: 150px;
}

.item-meta {
    font-size: 14px;
    color: #888;
    margin: 0;
}

.item-change {
    font-size: 14px;
}

.item-change.up {
    color:var(--brand-text);
}

.item-change.down {
    color: #1e88e5;
}

.item-change.new {
    color:var(--brand-text);
    font-weight: bold;
}

.ranking-pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.page-btn {
    background-color: #f0f0f0;
    border: 1px solid #e0e0e0;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 14px;
}

.page-btn.active {
    background-color: #fff;
    border-bottom: 1px solid #fff;
    color:var(--brand-text);
}

.sidebar.sticky {
    position: fixed;
    top: 20px;
    width: 300px; /* 너비를 명시적으로 지정해야 레이아웃이 깨지지 않습니다. */
}

.sidebar.at-bottom {
    position: absolute;
    bottom: 0;
    top: auto;
}

/* Navigation Buttons Styles */
.navigation-buttons {
    display: flex;    
    align-items: center; /* 추가: 내부 요소 수직 중앙 정렬 */
    margin-right: 8px;
    gap: 8px;
}

.nav-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #e0e0e0;
    background: #ffffff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #666666;
}

.page-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    font-size: 14px;
    color: #666;
    height: 36px; /* 좌우 버튼과 높이 맞춤 */
}

.nav-btn:hover {
    background: #f5f5f5;
    border-color: #d0d0d0;
    color: #333333;
}

.nav-btn:active {
    background: #e8e8e8;
    transform: scale(0.95);
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f9f9f9;
}

.nav-btn svg {
    width: 20px;
    height: 20px;
}

/* Update section-actions to use flexbox for proper alignment */
.section-actions {
    display: flex;
    align-items: center;
}



.view-all-btn a:hover {
    color: #000000;
}































@media (max-width: 980px) {
    .latest-comics-section,
    .popular-comics-section {
        margin-top: 20px !important;
        padding: 0 10px;
    }
    
    .section-header {
        margin-bottom: 16px;
    }
    
    .section-title h2 {
        font-size: 20px;
    }
    
    .view-all-btn a {
        font-size: 14px;
    }
    
    
    
    
    
    .comic-card {
        /* border-radius: 4px; */
    }
    
    
    
    .comic-title h3 {
        font-size: 14px;
    }
    
    .comic-episode > span {
        font-size: 14px;
    }
    
    .comic-stats span {
        font-size: 14px;
    }
    
    .tag {
        font-size: 14px;
        padding: 3px 6px;
    }
}

@media (max-width: 768px) {
    .comics-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    
    
    
    .arcade-games{
        padding: 0 10px;
    }
    
    .comic-title h3 {
        font-size: 14px;
        margin-bottom: 6px;
    }
    
    .comic-episode {
        margin-bottom: 8px;
    }
}

@media (max-width: 480px) {
    
    
    .comics-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 4px;
    }
    
    
    
    
    
    .comic-info {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
    
    .comic-title h3 {
        font-size: 14px;
        line-height: 1.3;
        margin-bottom: 4px;
        white-space: normal;
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
    }
    
    .comic-episode {
        margin-bottom: 6px;
    }
}
.otm-nav{ display:block; }
@media (max-width:768px){
    .otm-nav{ width:100%; }
    .otm-list{ overflow-x:auto; -webkit-overflow-scrolling:touch; padding:0 10px; }
    .otm-list li{ margin:0 12px; }
    .filter-row{
        flex-direction: column;
        gap: 10px;
        margin-bottom: 0 !important;
    }
    .webtoon-filter-container{
        padding: 10px !important;
    }
}
@media (max-width:480px){
    .otm-list{ overflow-x:auto; -webkit-overflow-scrolling:touch; padding:0 8px; }
    .otm-list li{ margin:0; }
}
@media (max-width: 1200px) {
    .category-list{
        display: none;
    }
}
.ranking-inline-header{display:none}
.ranking-title{font-size:16px;font-weight:600}
.ranking-view-toggle{background-color:var(--brand-action);color:#fff;border:none;border-radius:16px;padding:8px 12px;font-size:14px;cursor:pointer}
.ranking-modal{position:fixed;inset:0;width:100%;height:100%;background:rgba(0,0,0,0.7);display:flex;justify-content:center;align-items:center;z-index:10000;opacity:0;visibility:hidden;pointer-events:none;transition:opacity 300ms ease, visibility 300ms ease}
.ranking-modal.open{opacity:1;visibility:visible;pointer-events:auto}
.ranking-modal-content{position:relative;display:flex;flex-direction:column;gap:12px;padding:18px;width:min(90vw,560px);max-height:80vh;overflow-y:auto;background:#fff;border-radius:10px;box-shadow:0 8px 24px rgba(0,0,0,0.2)}
.ranking-modal-close{position:absolute;top:8px;right:10px;background:none;border:none;font-size:32px;line-height:1;cursor:pointer}
.ranking-modal-body{overflow-y:auto}
@media (max-width: 1200px){
  .sidebar{position:static;width:100%;margin:10px 0}
  .ranking-container{display:none}
  .ranking-container.active{display:block}
  .ranking-inline-header{display:flex;justify-content:space-between;align-items:center;margin:10px 5px}
  .ranking-view-toggle{background:none;color:#666;border:none;padding:0;font-size:14px;cursor:pointer}
  .ranking-view-toggle::after{content:' \25BE';color:#999}
  .ranking-slide{display:none}
  .ranking-item a{padding:4px 0;border-top:1px solid #eee}
  .item-thumbnail{width:48px;height:48px;border-radius:6px;margin-right:12px}
  .item-rank{font-size:18px;font-style:italic;color:#bbb;width:auto;margin-right:12px}
  .item-info{min-width:0}
  .item-title{font-size:15px;font-weight:500;margin:0 0 4px 0;max-width:none}
  .item-meta{font-size:14px;color:#999}
  .item-change{margin-left:auto;display:flex;align-items:center;gap:6px;font-size:14px}
  .mobile-ranking{display:block;margin:30px 0;padding:0 10px;width:100%}
  .mobile-ranking-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:20px;
    padding: 10px 0;
    border-bottom: 1px solid #e5e5e5;
}
  .mobile-ranking-open{background:none;color:#666;border:none;padding:0;font-size:14px;cursor:pointer}
  .mobile-ranking-open::after{content:' \25BE';color:#999}
  .mobile-ranking-viewport{width:100%;margin:0;padding:0;overflow:hidden;min-height:60px}
  .mobile-ranking-preview{width:100%;margin:0;padding:0;list-style:none;transition:transform .5s ease-in-out, opacity .5s ease-in-out}
  .mobile-ranking-preview li{
    display:flex;
    align-items:center;
    gap:12px;
    width:100%;
    opacity:.6;
    transition:opacity .5s ease-in-out;
    padding:10px 0;
}
  .mobile-ranking-preview li.active{opacity:1}
  .mobile-ranking-preview li a{display:flex;align-items:center;gap:12px;width:100%;margin:0;padding:0}
  .mobile-ranking .item-info{flex:1;min-width:0}
  
  .mobile-ranking .item-thumbnail{width:48px;height:48px;border-radius:6px;object-fit:cover;margin-right:0}
  .mobile-ranking .item-title{max-width:none;
    overflow:hidden;
    white-space:nowrap;
    text-overflow:ellipsis;
    color:#333;
}
}
/* Scroll to top button */

/* --- New Real-time Manga Ranking Section --- */
.ranking-section {
    display: flex;
    gap: 30px;
    margin: 40px 0;
    width: 100%;
}

.ranking-sidebar {
    width: 140px;
    flex-shrink: 0;
}

.ranking-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ranking-sidebar li a {
    display: block;
    padding: 12px 16px;
    color: #666;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.ranking-sidebar li.active a,
.ranking-sidebar li a:hover {
    background-color: #222;
    color: #fff;
}

.ranking-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    column-gap: 40px;
    row-gap: 20px;
}

.ranking-card a {
    display: flex;
    align-items: center;
    gap: 20px;
    text-decoration: none;
    color: #333;
    padding: 10px;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.ranking-card a:hover {
    background-color: #f9f9f9;
}

.r-thumb {
    position: relative;
    width: 90px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.r-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.r-num {
    position: absolute;
    top: 0;
    left: 0;
    background-color: #333;
    color: #fff;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 800;
    border-bottom-right-radius: 8px;
    z-index: 2;
}

.rank-top .r-num {
    background-color: var(--brand-action);
}

.r-pick {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 133, 62, 0.95);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    padding: 4px 0;
    z-index: 2;
    letter-spacing: 0.5px;
}

.r-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.r-title {
    font-size: 17px;
    font-weight: 600;
    margin: 0 0 10px 0;
    line-height: 1.4;
    color: #222;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.r-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.r-tags .tag {
    font-size: 14px;
    color: #888;
    background-color: #f5f5f5;
    padding: 4px 8px;
    border-radius: 4px;
}

@media (max-width: 980px) {
    .ranking-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .ranking-section {
        flex-direction: column;
        gap: 16px;
    }
    
    .ranking-sidebar {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .ranking-sidebar ul {
        flex-direction: row;
        width: max-content;
        padding-bottom: 4px;
    }
    
    .ranking-sidebar li a {
        white-space: nowrap;
        padding: 8px 16px;
        font-size: 15px;
    }
    
    .ranking-card a {
        gap: 16px;
    }
    
    .r-thumb {
        width: 80px;
        height: 106px;
    }
    
    .r-title {
        font-size: 15px;
    }
}





/* 월드텁 팝업창 스타일First Visit Popup */
.first-visit-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.fv-popup-content {
    background-color: #b0ea02; /* 연두색 배경 */ 
    border-radius: 30px;
    overflow: hidden;
    width: 320px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.fv-popup-img {
    width: 100%;
    height: auto;
    display: block;
}

.fv-popup-link {
    text-decoration: none;
    display: block;
    padding-bottom: 10px;
    text-align: center;
}

.fv-popup-text {
    position: relative;
    margin-top: -160px; /* 텍스트 영역을 이미지 위로 더 끌어올림 */
    padding-top: 80px; /* 자연스러운 그라데이션 페이드 효과를 위한 공간 확보 */
    background: linear-gradient(to bottom, rgba(176, 234, 2, 0) 0%, #b0ea02 60%, #b0ea02 100%);
    z-index: 2;
}

.fv-text-sub {
    color: #ffffff;
    font-size: 14px;
    margin: 0 0 5px 0;
    font-weight: 300;
    letter-spacing: -0.5px;
}

.fv-text-main {
    font-size: 46px;
    font-weight: 900;
    margin: 0 0 5px 0;
    line-height: 1;
    letter-spacing: -2px;
}

.fv-text-main .text-white {
    color: #fff;
}

.fv-text-main .text-red {
    color:var(--brand-text);
}

.fv-text-click {
    color: #000; /* 파란색/보라색 톤 */
    font-size: 20px;
    font-weight: 300;
    margin: 0;
    letter-spacing: -0.5px;
}

.fv-click-anim {
    display: inline-block;
    font-weight: 700;
    animation: click-bounce 0.5s infinite alternate ease-in-out;
}

@keyframes click-bounce {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(-4px) scale(1.1); }
}

.fv-img-wrapper {
    position: relative;
    width: 100%;
}

.fv-live-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--brand-action);
    color: #fff;
    font-size: 14px;
    font-weight: 900;
    padding: 4px 10px;
    border-radius: 4px;
    letter-spacing: 1px;
    overflow: hidden;
    z-index: 10;
}

.fv-live-badge::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.8) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg);
    animation: live-shine 2s infinite;
}

@keyframes live-shine {
    0% { left: -100%; }
    20% { left: 200%; }
    100% { left: 200%; }
}

.fv-close-btn {
    background-color: #000;
    color: #fff;
    border: none;
    padding: 15px 0;
    font-size: 14px;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.2s;
}

.fv-close-btn:hover {
    background-color: #222;
}

/* 모바일 화면 대응: 하단에서 슬라이드 업 */
@media (max-width: 768px) {
    .fv-popup-content {
        width: 100%;
        border-radius: 30px 30px 0 0; /* 상단 모서리만 둥글게 */
        position: absolute;
        bottom: 0;
        transform: translateY(100%);
        transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    
    .fv-popup-content.slide-up {
        transform: translateY(0);
    }
    .middle-banner{
        padding: 10px;
    }
}

/* Home Community Section (화제의 게시글) */
.home-community-section {
    margin-top: 50px;
}

.home-community-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.home-community-section .section-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: #111;
    margin: 0;
}

.hc-refresh-btn {
    background: none;
    border: none;
    font-size: 14px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: color 0.2s;
}

.hc-refresh-btn:hover {
    color: #111;
}

.hc-content {
    display: flex;
    border-radius: 8px;
    overflow: hidden;
}

.hc-left {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 0 24px 0 0;
    border-right: 1px solid #eaeaea;
}

.hc-card {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    display: block;
    aspect-ratio: 16 / 9;
    text-decoration: none;
}

.hc-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.hc-card:hover img {
    transform: scale(1.05);
}

.hc-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    z-index: 1;
}

.hc-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    z-index: 2;
}

.hc-badge.bg-gray { background-color: rgba(0, 0, 0, 0.5); }
.hc-badge.bg-dark { background-color: rgba(30, 30, 30, 0.9); }

.hc-card-title {
    position: absolute;
    bottom: 12px;
    left: 12px;
    right: 12px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    z-index: 2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hc-right {
    flex: 1;
    padding: 0 0 0 24px;
    display: flex;
    background: #fff;
    flex-direction: column;
}

.hc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.hc-list li {
    border-bottom: 1px solid #f0f0f0;
}

.hc-list li:last-child {
    border-bottom: none;
}

.hc-list a {
    display: flex;
    align-items: center;
    padding: 14px 0;
    text-decoration: none;
    gap: 16px;
}

.hc-list a:hover .hc-list-title {
    color: #111;
    text-decoration: underline;
}

.hc-badge-outline {
    padding: 4px 12px;
    border: 1px solid #ddd;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #555;
    white-space: nowrap;
    min-width: 60px;
    text-align: center;
}

.hc-list-title {
    font-size: 16px;
    color: #333;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 992px) {
    .hc-content {
        flex-direction: column;
    }
    .hc-left {
        border-right: none;
        border-bottom: 1px solid #eaeaea;
    }
}

@media (max-width: 576px) {
    .home-community-section {
        padding: 0 10px; /* 모바일 좌우 여백 */
    }
    .home-community-section .section-header {
        flex-direction: row;
        align-items: center;
    }
    .home-community-section .section-header h2 {
        font-size: 20px;
    }
    .hc-left {
        grid-template-columns: 1fr; /* 1열로 변경 */
        padding: 16px;
    }
    .hc-right {
        padding: 16px;
    }
    .hc-list a {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 12px 0;
    }
    .hc-badge-outline {
        font-size: 14px;
        padding: 3px 10px;
    }
    .hc-list-title {
        font-size: 15px;
    }
}

/* Arcade Game Styles */
.arcade-category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
}

.arcade-cat-btn {
    padding: 10px 24px;
    border-radius: 30px;
    border: none;
    background-color: #ffffff;
    color: #333;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.arcade-cat-btn:hover {
    background: #eee;
}

.arcade-cat-btn.active {
    background-color: var(--brand-action);
    color: #fff;
    border-color: #222;
}

.arcade-banners {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.arcade-banner-item {
    display: block;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #eaeaea;
    height: 80px;
}

.arcade-banner-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.arcade-banner-item.text-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    text-decoration: none;
}

.text-banner-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.text-banner-title {
    font-size: 18px;
    font-weight: 800;
    color: #b0b0b0;
    letter-spacing: -0.5px;
}

.text-banner-sub {
    font-size: 16px;
    font-weight: bold;
    color: #b0b0b0;
}

.arcade-game-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px 15px;
}

.arcade-game-item[hidden] { display: none; }

.arcade-game-art {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 16px;
    background:
        radial-gradient(circle at 85% 15%, hsl(var(--arcade-hue) 90% 65% / 0.7), transparent 38%),
        linear-gradient(140deg, hsl(var(--arcade-hue) 68% 42%), #121725 78%);
    color: #fff;
    isolation: isolate;
}

.arcade-game-art::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: repeating-linear-gradient(0deg, transparent 0 11px, rgba(255,255,255,.06) 12px 13px);
}

.arcade-game-art__badge {
    align-self: flex-start;
    padding: 4px 6px;
    border: 1px solid rgba(255,255,255,.65);
    border-radius: 3px;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .12em;
}

.arcade-game-art__name {
    font-size: clamp(16px, 1.8vw, 25px);
    line-height: 1.1;
    font-weight: 900;
    letter-spacing: -.04em;
    overflow-wrap: anywhere;
    text-shadow: 0 3px 12px rgba(0,0,0,.4);
}

.arcade-game-item {
    display: flex;
    flex-direction: column;
    background: white;
    text-decoration: none;
    border-radius: 16px;
    color: inherit;
}

.game-img-wrapper {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 16px 16px 0 0;
    background-color: #f5f5f5;
}

.game-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.arcade-game-item:hover .game-img-wrapper img {
    transform: scale(1.05);
}

.arcade-game-item .game-info {
    padding: 12px 10px;
}

.game-title {
    font-size: 14px;
    font-weight: 600;
    color: #222;
    margin: 0 0 4px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-meta {
    font-size: 14px;
    color: #999;
    margin: 0;
}

@media (max-width: 1200px) {
    .arcade-game-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .arcade-banners {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .arcade-game-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .arcade-banners {
        grid-template-columns: repeat(1, 1fr);
    }
}

/* Filter Section Styles */
.filter-section {
    padding: 20px 0;
    margin-bottom: 20px;
}

.filter-row {
    margin-bottom: 15px;
}

.filter-row:last-child {
    margin-bottom: 0;
}

.filter-row.sort-row {
    border-bottom: 1px solid var(--color-border);
}

/* Search Row */
.search-row {
    display: flex;
    justify-content: flex-start;
}

.category-search-form {
    display: flex;
    width: 100%;
    max-width: 400px;
    position: relative;
}

.category-search-input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-size: 14px;
    background: var(--color-bg);
    color: var(--color-text);
    outline: none;
}

.category-search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--brand-action);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
}

/* Genre Category */
.mana-category {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-item {
    display: inline-block;
    padding: 6px 12px;
    border: 1px solid var(--color-border);
    border-radius: 20px;
    font-size: 14px;
    color: var(--color-text);
    background: var(--color-bg);
    transition: all 0.2s ease;
}

.category-item:hover {
    border-color: var(--brand-action);
    color:var(--brand-text);
}

.category-item.active {
    background: var(--brand-action);
    color: white;
    border-color: var(--brand-action);
}

/* Sort Category */
.sort-category {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.sort-item {
    font-size: 14px;
    color: var(--color-text-muted);
    font-weight: 500;
    padding: 10px 14px;
    position: relative;
}

.sort-item:hover {
    color: var(--color-text);
}

.sort-item.active {
    color:var(--brand-text);
    font-weight: bold;
    border-bottom: 2px solid var(--brand-action);    
}

/* Dark mode overrides for filter */
html[data-theme="dark"] .category-search-input {
    background: var(--color-bg-alt);
    border-color: var(--color-border);
    color: var(--color-text);
}

html[data-theme="dark"] .category-item {
    background: var(--color-bg-alt);
    border-color: var(--color-border);
    color: var(--color-text);
}

html[data-theme="dark"] .category-item:hover {
    border-color: var(--brand-action);
    color:var(--brand-text);
}

html[data-theme="dark"] .category-item.active {
    background: var(--brand-action);
    color: white;
    border-color: var(--brand-action);
}

html[data-theme="dark"] .sort-item {
    color: var(--color-text-muted);
}

html[data-theme="dark"] .sort-item:hover {
    color: var(--color-text);
}

html[data-theme="dark"] .sort-item.active {
    color:var(--brand-text);
    border-bottom: 2px solid var(--brand-action);
}

/* 須岇洂臧€鞛?韺濎梾 韽?鞀ろ儉鞚?(鞚鸽澕鞚?鞀ろ儉鞚?攵勲Μ) */
.auth-section.register-section-content {
    width: 100%;
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 5px;
    text-align: left;
}

.auth-section.register-section-content::-webkit-scrollbar {
    width: 6px;
}
.auth-section.register-section-content::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}
html[data-theme="dark"] .auth-section.register-section-content::-webkit-scrollbar-thumb {
    background: #555;
}

.regi-int-wrap {
    padding: 5px 0;
}

.regi-int-group {
    padding-top: 10px;
}

.regi-int-group.spaced {
    padding: 15px 0;
}

.regi-int-group.spaced-bottom {
    padding: 10px 0 20px 0;
}

.regi-input-field {
    width: 100%;
    height: 36px;
    border: none;
    border-bottom: 1px solid var(--color-border, #ebebeb);
    outline: none;
    background: transparent;
    color: var(--color-text, #000);
}

.regi-input-field.mb-5 {
    margin-bottom: 5px;
}

.regi-desc-text {
    font-size: 14px;
    padding-top: 4px;
    color: #888;
    margin: 0;
}

.regi-section-title {
    font-size: 15px;
    padding: 5px 0;
    margin: 0;
    color: var(--color-text, #000);
}

.regi-setting-row {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.regi-setting-row.no-mb {
    margin-bottom: 0;
}

.regi-setting-label-title {
    font-size: 14px;
    width: 90px;
    margin: 0;
    color: var(--color-text, #333);
    font-weight: 500;
}

.regi-checkbox-label {
    font-size: 14px;
    color: #666;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.regi-checkbox-input {
    margin-right: 6px;
}

.regi-checkbox-text {
    color: var(--color-text, #666);
}

.regi-setting-desc {
    font-size: 14px;
    padding-top: 4px;
    margin: 0 0 0 90px;
    color: #888;
}

.regi-btn-group {
    display: flex;
    gap: 10px;
}

.regi-submit-btn {
    flex: 1;
    margin-top: 0;
}

.regi-cancel-btn {
    flex: 1;
    background: #888;
    margin-top: 0;
}/* --- New Footer Styles --- */
.modern-footer {
    background-color: #ffffff;
    border-top: 1px solid #eaeaea;
    padding: 40px 0 20px;
    margin-top: 40px;
    font-family: 'Pretendard', sans-serif;
    color: #333;
}

.modern-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.modern-footer-top {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 40px;
    gap: 20px;
}

.footer-brand {
    flex: 0 0 35%;
    max-width: 400px;
}

.footer-logo-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.footer-logo-wrap img {
    width: 32px;
    height: auto;
}

.footer-logo-text {
    font-size: 20px;
    font-weight: 800;
    color: #1e293b;
    letter-spacing: -0.5px;
}

.footer-desc {
    font-size: 14px;
    color: #868e96;
    line-height: 1.6;
    margin-bottom: 20px;
}

.footer-buttons {
    display: flex;
    gap: 10px;
}

.footer-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background-color: #ffffff;
    color: #495057;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.footer-btn:hover {
    background-color: #f8f9fa;
    border-color: #ced4da;
}

.footer-btn svg {
    width: 16px;
    height: 16px;
}

.footer-links-group {
    flex: 1;
    min-width: 120px;
}

.footer-links-group h4 {
    font-size: 14px;
    font-weight: 700;
    color: #212529;
    margin-bottom: 15px;
}

.footer-links-group ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links-group li {
    margin-bottom: 10px;
}

.footer-links-group a {
    color: #868e96;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links-group a:hover {
    color: #495057;
}

.modern-footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid #f1f3f5;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-copyright {
    font-size: 14px;
    color: #adb5bd;
}

.footer-bottom-links {
    display: flex;
    gap: 15px;
}

.footer-bottom-links a {
    font-size: 14px;
    color: #adb5bd;
    text-decoration: none;
}

.footer-bottom-links a:hover {
    color: #495057;
}

@media (max-width: 768px) {
    .modern-footer-top {
        flex-direction: column;
        gap: 30px;
    }
    
    .footer-brand {
        flex: 1 1 100%;
        max-width: 100%;
        
    }
    .modern-footer{
        margin-top: 0;
    }
/*     
    .footer-brand .footer-desc {
        display: none;
    } */
    
    .footer-brand .footer-buttons {
        display: none;
    }
    
    .footer-logo-wrap {
        margin-bottom: 0;
    }
}

/* Dark mode support */
html[data-theme="dark"] .modern-footer {
    background-color: #1e1e1e;
    border-top-color: #333;
}
html[data-theme="dark"] .modern-footer-bottom {
    border-top-color: #333;
}
html[data-theme="dark"] .footer-logo-text,
html[data-theme="dark"] .footer-links-group h4 {
    color: #e9ecef;
}
html[data-theme="dark"] .footer-btn {
    background-color: #2c2c2c;
    border-color: #444;
    color: #ced4da;
}
html[data-theme="dark"] .footer-btn:hover {
    background-color: #3a3a3a;
}
html[data-theme="dark"] .footer-desc,
html[data-theme="dark"] .footer-links-group a {
    color: #adb5bd;
}
html[data-theme="dark"] .footer-links-group a:hover {
    color: #f8f9fa;
}

/* Comic Rating Styles */
.comic-rating {
    position: absolute;
    bottom: 6px;
    left: 6px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 2;
}

.comic-rating svg {
    flex-shrink: 0;
}


.comic-episode {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.update-time {
    font-size: 14px;
    color: #888888;
    margin-left: auto;
}

/* 에피소드 뱃지 스타일 */
.comic-episode .ep-badge {
    margin-right: 0 !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    color: #fff !important;
    padding: 2px 5px !important;
    border-radius: 4px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 18px;
    font-family: 'Arial', sans-serif;
}
.comic-episode .ep-badge.n-badge {
    background-color: var(--brand-action);
}
.comic-episode .ep-badge.plus-badge {
    background-color: transparent;
    color:var(--brand-text) !important;
}

/* 모바일 하단 고정 네비게이션 바 (만화, 웹툰, 소설, 랭킹, 채팅창) */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #fff;
    border-top: 1px solid #e5e5e5;
    z-index: 9999; /* z-index를 1000에서 9999로 올려 다른 요소에 가리지 않게 함 */
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

.mobile-bottom-nav-list {
    display: flex;
    justify-content: space-around;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
    height: 60px;
}

.mobile-bottom-nav-item {
    flex: 1;
    text-align: center;
}

.mobile-bottom-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #666;
    font-size: 14px;
    height: 100%;
    gap: 4px;
}

.mobile-bottom-nav-link.active {
    color:var(--brand-text);
}

.mobile-bottom-nav-icon {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

html[data-theme="dark"] .mobile-bottom-nav {
    background: #121212;
    border-top-color: #333;
}
html[data-theme="dark"] .mobile-bottom-nav-link {
    color: #aaa;
}
html[data-theme="dark"] .mobile-bottom-nav-link.active {
    color:var(--brand-text);
}

@media (max-width: 980px) {
    .mobile-bottom-nav {
        display: block !important;
    }
    .otoon-top{
        top: 0 !important;
    }
    .oot-main {
        padding-bottom: 20px; /* 네비게이션 바 높이만큼 여백 확보 */
    }
    #scroll-to-top {
        bottom: 80px; /* 네비게이션 바 위로 올리기 */
        right: 20px;
        transform: none; /* 중앙 정렬 해제 */
    }
    .ot-menu {
        display: block !important; /* 헤더 아래 서브메뉴 표시 */
        overflow-x: auto;
        white-space: nowrap;
        padding: 0 0 10px 0;
        border-bottom: none;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .ot-menu::-webkit-scrollbar {
        display: none;
    }
    .otm-nav {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .otm-nav::-webkit-scrollbar {
        display: none;
    }
    .otm-list {
        display: flex;
        flex-wrap: nowrap;
        gap: 8px;
        padding: 0 15px;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .otm-list::-webkit-scrollbar {
        display: none;
    }
    .otm-list li {
        flex: 0 0 auto;
    }
    .otm-list a {
        font-size: 16px;
        padding: 5px 2px;
        background: transparent;
        border-radius: 0;
        color: #333;
        font-weight: 500;
    }
    html[data-theme="dark"] .ot-menu {
        border-bottom-color: #333;
    }
    html[data-theme="dark"] .otm-list a {
        background: transparent;
        color: #ddd;
    }
    .header-right {
        display: none; /* 텔레그램 배너 등 모바일 헤더에서 숨김 */
    }
    /* 모바일 헤더 레이아웃 수정 */
    .top-menu-left {
        width: auto;
    }
    .mobile-menu-toggle {
        display: none; /* 햄버거 메뉴 숨김 */
    }
    .category-nav h1 {
        margin-left: 0;
    }
    .category-list {
        display: none; /* 상단 카테고리 숨김 (하단 네비게이션으로 대체) */
    }
    .top-header-right {
        gap: 10px;
    }
   
    /* 섹션 헤더 좌우 정렬 강제 */
    .section-header {
        display: flex !important;
        justify-content: space-between !important;
    }
    .section-actions {
        display: flex;
        gap: 10px;
        align-items: center;
    }
    /* 만화 좌우 스크롤로 나오게 (메인페이지 한정) */
    .home-page .comics-grid {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        /* gap: 12px !important; */
        padding-bottom: 15px;
    }
    .home-page .comics-grid::-webkit-scrollbar {
        display: none;
    }
    .home-page .comic-card {
        flex: 1 !important; /* 화면에 꽉 차게 3등분 */
        flex-direction: column !important;
        border: none !important;
        padding-bottom: 0 !important;
    }
    /* 모바일에서 만화 3개만 표시 (4번째부터 숨김) */
    .home-page .comics-grid .comic-card:nth-child(n+4) {
        display: none !important;
    }
    .comic-card a {
        display: block !important;
        width: 100%;
    }
    .comic-image {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 3 / 4 !important;
        object-fit: cover !important;
        border-radius: 6px !important;
    }
    .comic-info {
        width: 100% !important;
        padding: 10;
        align-items: flex-start !important;
    }
    /* 숨길 요소들 */
    .navigation-buttons {
        display: none !important;
    }
    #chat-icon {
        display: none !important;
    }
    .comic-title h3 {
        font-size: 14px; /* 글자 크기를 살짝 줄임 */
        white-space: nowrap; /* 줄바꿈 방지 */
        overflow: hidden;
        text-overflow: ellipsis; /* 말줄임표 처리 */
        display: block; /* 한 줄로 표시하기 위해 block으로 변경 */
        line-height: 1.3;
    }
    /* 푸터 간소화 */
    .footer-links-group, .footer-bottom-links {
        display: none !important;
    }
    .modern-footer-inner {
        padding-bottom: 20px;
    }
}

/* 배너 슬라이더 양쪽 보이기 설정 */
@media (max-width: 980px) {
    .banner-container {
        overflow: visible;
        padding: 0 10%;
    }
    .banner-slider {
        overflow: visible;
    }
    .banner-track {
        display: flex;
        transition: transform 0.4s ease;
    }
    .banner-slide {
        flex: 0 0 100%;
        padding: 0; /* 양옆 간격은 column-gap으로 처리 */
        box-sizing: border-box;
    }
    .banner-slide a {
        display: block;
        border-radius: 12px;
        overflow: hidden;
    }
    .banner-slide img {
        width: 100%;
        height: auto;
        display: block;
        aspect-ratio: 16 / 9;
        object-fit: cover;
    }
}

/* 모바일 헤더 레이아웃 추가 수정 */
@media (max-width: 980px) {
    .top-menu-container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 15px;
    }
    .top-menu-left {
        flex: 1;
        display: flex;
        align-items: center;
    }
    .top-header-right {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        gap: 6px;
    }
    .ot-srk {
        display: flex !important;
        align-items: center !important;
    }
    .ot-srk input {
        display: block !important;
        width: 120px !important; /* 모바일에서 프로필 아이콘과 알림 아이콘 공간 확보를 위해 검색창 넓이 축소 */
        padding: 6px 26px 6px 12px !important;
        font-size: 14px !important;
        border-radius: 20px !important;
    }
    .ot-srk img {
        width: 16px !important;
        height: 16px !important;
        cursor: pointer;
        position: absolute;
        right: 8px;
    }
    .login-container {
        display: flex !important;
        align-items: center;
        gap: 8px !important; /* 간격을 살짝 줄여 공간 절약 */
    }
    .login-icon-container span {
        font-size: 14px;
    }
    .mobile-menu-toggle {
        display: none !important;
    }
    .category-list {
        display: none !important;
    }
}

/* 모바일 디테일 조정 추가 */
@media (max-width: 980px) {
    /* 로고 크기 조정 */
    .ootoon-log {
        background-size: contain !important;
        width: 100px !important;
        height: 30px !important;
        background-position: left center !important;
    }
    
    /* 서브메뉴 여백 조정 */
    .otm-list {
        padding: 0 10px !important;
        gap: 10px !important;
    }
    .otm-list a {
        font-size: 16px !important;
        padding: 6px 12px !important;
    }

    

    .comic-title h3 {
        font-size: 14px !important;
        margin-bottom: 5px !important;
    }

    .update-time {
        margin-top: 5px !important;
        margin-left: 0 !important;
    }
    
    .ep-badge {
        margin-bottom: 5px !important;
    }
    
    /* 불필요한 데스크탑 메뉴 숨김 처리 보완 */
    .header-right {
        display: none !important;
    }
}

@media (min-width: 981px) {
    .submenu-manga li:nth-child(n+5) {
        display: none !important;
    }
}


/* 서브페이지 만화 리스트 모바일 연속 그리드 배치 (3개씩) */
@media (max-width: 980px) {
    body:not(.home-page) .comics-page.active,
    body:not(.home-page) .comics-page {
        display: block !important;
    }
    body:not(.home-page) .comics-grid.new_comics-grid {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 12px !important;
        padding-bottom: 20px;
    }
}
@media (max-width: 768px) {
    .banner-nav {
        display: none;
    }
}
@media (max-width: 768px) {
    body:not(.home-page) .comics-grid.new_comics-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 10px !important;
    }
}
@media (max-width: 480px) {
    body:not(.home-page) .comics-grid.new_comics-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 6px !important;
    }
}


/* 서브페이지 만화 리스트 PC 7개, 모바일 3개 강제 배치 */


@media (max-width: 980px) {
    
    body:not(.home-page) .comic-stats span {
        font-size: 14px !important;
    }
}


/* 다크모드 공통 추가 속성 */
/* 실시간 만화 랭킹, 커뮤니티 화제의 게시글 다크모드 */
html[data-theme="dark"] .new-ranking-section { background: transparent; }
html[data-theme="dark"] .new-ranking-section .section-header h2 { color: #fff; }
html[data-theme="dark"] .nr-info h4 { color: #fff; }
html[data-theme="dark"] .nr-author { color: #aaa; }
html[data-theme="dark"] .nr-tags .tag { background-color: #333; color: #fff; }
html[data-theme="dark"] .nr-num { color: #fff; }
html[data-theme="dark"] .nr-thumb { border-color: var(--color-border); background-color: var(--color-bg-alt); }
html[data-theme="dark"] .rc-tab { color: #aaa; background-color: transparent; border-color: #555; }
html[data-theme="dark"] .rc-tab.active { background-color: #2C2C2C; color:var(--brand-text); border-color: var(--brand-action); }
html[data-theme="dark"] .rc-tab:hover { background-color: #333; color: #fff; }
html[data-theme="dark"] .view-all { background-color: #2C2C2C !important; border-color: #555 !important; color: #fff !important; }
html[data-theme="dark"] .view-all:hover { background-color: #333 !important; color: #fff !important; }

html[data-theme="dark"] .home-community-section { background: transparent; }
html[data-theme="dark"] .home-community-section .section-header h2 { color: #fff; }
html[data-theme="dark"] .hc-content { background: transparent; }
html[data-theme="dark"] .hc-list li { border-bottom-color: var(--color-border); }
html[data-theme="dark"] .hc-left { border-right-color: var(--color-border); }
html[data-theme="dark"] .hc-list-title { color: #eee; }
html[data-theme="dark"] .hc-list a:hover .hc-list-title { color: #eee; text-decoration: none; }
html[data-theme="dark"] .hc-card-title { color: #fff; }
html[data-theme="dark"] .hc-refresh-btn { color: #aaa; }
html[data-theme="dark"] .hc-refresh-btn:hover { color: #fff; }
html[data-theme="dark"] .hc-badge-outline { border-color: var(--color-border); color: #aaa; }

/* 에피소드 글자, 랭킹 숫자 다크모드 (index.html, top-list.html 등) */
html[data-theme="dark"] .comic-episode span { color: #fff; }
html[data-theme="dark"] .comic-tags .tag { color: #fff; }
html[data-theme="dark"] .comic-rank span { color: #fff; }
html[data-theme="dark"] .de-mn-list-text p { color: #00C853; } /* 기존 색상 유지 혹은 변경시 활용 */

/* 아케이드 게임 섹션 다크모드 (index.html) */
html[data-theme="dark"] .arcade-cat-btn {
    background-color: transparent;
    color: #fff;
    border: 1px solid #555;
}
html[data-theme="dark"] .arcade-cat-btn.active {
    background-color: #2C2C2C;
    color:var(--brand-text);
    border-color: var(--brand-action);
}
html[data-theme="dark"] .arcade-cat-btn:hover {
    background-color: #333;
}
html[data-theme="dark"] .arcade-banner-item.text-banner {
    background-color: #2C2C2C;
    border-color: #444;
}
html[data-theme="dark"] .arcade-game-item {
    background-color: #2C2C2C;
}

/* Home featured titles showcase */
.banner-slider-wrapper {
    padding: 30px 24px 38px;
    margin-bottom: 28px;
    background: #f6f7f9;
    overflow: hidden;
}

.banner-slider-wrapper::before,
.banner-slider-wrapper .banner-bg-blur {
    display: none;
}

.banner-showcase-header,
.banner-slider-wrapper .banner-slider {
    width: 100%;
    max-width: 1180px;
    margin-right: auto;
    margin-left: auto;
}

.banner-showcase-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 20px;
}

.banner-showcase-header h2 {
    margin: 0;
    color: #17181a;
    font-size: clamp(22px, 2vw, 30px);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.04em;
}

.banner-showcase-header p {
    margin: 7px 0 0;
    color: #74777d;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: -0.02em;
}

.banner-showcase-controls {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
}

.banner-counter {
    display: inline-flex;
    align-items: baseline;
    min-width: 62px;
    margin-right: 4px;
    color: #a2a5aa;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}

.banner-counter strong {
    margin-right: 4px;
    color: #17181a;
    font-size: 16px;
    font-weight: 800;
}

.banner-slider-wrapper .banner-slider {
    --banner-gap: 16px;
    --banner-transition-ms: 500ms;
    --banner-auto-interval: 5000ms;
}

.banner-slider-wrapper .banner-container {
    width: 100%;
    padding: 0;
    overflow: hidden;
    border-radius: 16px;
}

.banner-slider-wrapper .banner-track {
    column-gap: var(--banner-gap);
}

.banner-slider-wrapper .banner-slide {
    flex: 0 0 calc((100% - 3 * var(--banner-gap)) / 4);
    padding: 0;
}

.banner-slider-wrapper .banner-slide a {
    display: block;
    overflow: hidden;
    border: 1px solid rgba(22, 24, 28, 0.08);
    border-radius: 16px;
    background: #e7e8eb;
    box-shadow: 0 8px 24px rgba(23, 25, 30, 0.08);
    transition: transform 220ms ease, box-shadow 220ms ease;
}

.banner-slider-wrapper .banner-slide a:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 34px rgba(23, 25, 30, 0.16);
}

.banner-slider-wrapper .banner-slide img {
    width: 100%;
    height: auto;
    aspect-ratio: 380 / 422;
    object-fit: cover;
    transform: none;
}

.banner-slider-wrapper .banner-nav {
    position: static;
    display: inline-flex;
    width: 38px;
    height: 38px;
    padding: 0;
    transform: none;
    align-items: center;
    justify-content: center;
    border: 1px solid #dfe1e5;
    border-radius: 50%;
    background: #fff;
    color: #25272b;
    box-shadow: none;
}

.banner-slider-wrapper .banner-nav:hover {
    border-color: var(--brand-action);
    background: var(--brand-action);
    color: #fff;
}

.banner-slider-wrapper .banner-nav:focus-visible,
.banner-slider-wrapper .indicator:focus-visible {
    outline: 3px solid rgba(0, 133, 62, 0.28);
    outline-offset: 2px;
}

.banner-slider-wrapper .banner-nav svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.banner-slider-wrapper .banner-indicators {
    position: static;
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 20px;
    transform: none;
}

.banner-slider-wrapper .indicator {
    width: 6px;
    height: 6px;
    background: #c7c9cd;
}

.banner-slider-wrapper .indicator.active {
    width: 28px;
    height: 6px;
    border-radius: 999px;
    background: var(--brand-action);
}

html[data-theme="dark"] .banner-slider-wrapper {
    background: #1d1e20;
}

html[data-theme="dark"] .banner-showcase-header h2,
html[data-theme="dark"] .banner-counter strong {
    color: #fff;
}

html[data-theme="dark"] .banner-showcase-header p {
    color: #a9abb0;
}

html[data-theme="dark"] .banner-slider-wrapper .banner-nav {
    border-color: #44464b;
    background: #292b2f;
    color: #f4f4f5;
}

html[data-theme="dark"] .banner-slider-wrapper .banner-nav:hover {
    border-color: var(--brand-hover);
    background: var(--brand-hover);
}

@media (max-width: 1024px) {
    .banner-slider-wrapper .banner-slide {
        flex-basis: calc((100% - 2 * var(--banner-gap)) / 3);
    }
}

@media (max-width: 768px) {
    .banner-slider-wrapper {
        padding: 24px 16px 30px;
        margin-bottom: 20px;
    }

    .banner-showcase-header {
        align-items: center;
        margin-bottom: 16px;
    }

    .banner-showcase-header p,
    .banner-counter {
        display: none;
    }

    .banner-slider-wrapper .banner-slide {
        flex-basis: calc((100% - var(--banner-gap)) / 2);
    }

    .banner-slider-wrapper .banner-nav {
        display: inline-flex;
        width: 34px;
        height: 34px;
    }
}

@media (max-width: 480px) {
    .banner-slider-wrapper {
        padding-right: 14px;
        padding-left: 14px;
    }

    .banner-slider-wrapper .banner-slider {
        --banner-gap: 12px;
    }

    .banner-slider-wrapper .banner-slide {
        flex-basis: 100%;
    }

    .banner-slider-wrapper .banner-slide a,
    .banner-slider-wrapper .banner-container {
        border-radius: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .banner-slider-wrapper .banner-slide a {
        transition: none;
    }
}

/* Android-friendly touch, tab and motion behavior. */
html {
    -webkit-text-size-adjust: 100%;
}

html.motion-paused *,
html.motion-paused *::before,
html.motion-paused *::after {
    animation-play-state: paused !important;
}

@media (max-width: 768px), (hover: none), (pointer: coarse) {
    :root {
        --banner-transition-ms: 320ms;
    }

    a[href],
    button,
    input,
    select,
    textarea,
    [role="button"],
    [role="tab"] {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }

    button,
    [role="button"],
    [role="tab"],
    .filter-btn,
    .board-tab,
    .library-subtab,
    .mobile-bottom-nav-link {
        min-height: 44px;
    }

    .board-tabs,
    .filter-group,
    .sidebar-tabs,
    .library-subtabs,
    .ranking-tabs,
    .main-ranking-tabs,
    .arcade-category-filter,
    .search-tabs,
    .noti-tabs {
        max-width: 100%;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        scroll-snap-type: x proximity;
    }

    .board-tabs::-webkit-scrollbar,
    .filter-group::-webkit-scrollbar,
    .sidebar-tabs::-webkit-scrollbar,
    .library-subtabs::-webkit-scrollbar,
    .ranking-tabs::-webkit-scrollbar,
    .main-ranking-tabs::-webkit-scrollbar,
    .arcade-category-filter::-webkit-scrollbar,
    .search-tabs::-webkit-scrollbar,
    .noti-tabs::-webkit-scrollbar {
        display: none;
    }

    .board-tab,
    .filter-btn,
    .sidebar-tab,
    .library-subtab,
    .ranking-tab,
    .main-ranking-tab,
    .arcade-cat-btn,
    .search-tabs .tab-btn,
    .noti-tab-btn {
        flex: 0 0 auto;
        scroll-snap-align: center;
    }

    .mobile-drawer,
    .mobile-backdrop,
    .ranking-modal,
    .login-popup,
    .notification-popup,
    .chat-window {
        transition-duration: 220ms !important;
    }

    .android-pressing {
        filter: brightness(0.96);
        transform: scale(0.98) !important;
        transition-duration: 80ms !important;
    }

    .mobile-bottom-nav {
        padding-bottom: env(safe-area-inset-bottom, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto !important;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
html[data-theme="dark"] .arcade-game-item .game-title,
html[data-theme="dark"] .game-card .game-title {
    color: #fff;
}
html[data-theme="dark"] .arcade-game-item .game-meta,
html[data-theme="dark"] .game-card .game-category {
    color: #aaa;
}

.live-catalog[hidden],
.live-catalog-grid[hidden],
.live-catalog-pages[hidden],
.webtoon-filter-container[hidden] {
    display: none !important;
}

.live-catalog-status {
    margin: 12px 0 20px;
    color: var(--color-text-secondary, #666);
    font-size: 14px;
}

.live-catalog-grid {
    width: 100%;
}

.live-catalog-pages {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
    margin: 28px 0 44px;
    color: var(--color-text, #222);
    font-weight: 700;
}

.live-catalog-pages button {
    min-width: 70px;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid var(--color-border, #ddd);
    border-radius: 8px;
    background: var(--color-bg, #fff);
    color: var(--color-text, #222);
    cursor: pointer;
}

.live-catalog-pages button:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.live-catalog-append { overflow-anchor: none; }
/* Temporarily paused: keep language controls and handlers available for re-enabling. */
.language-menu, .lang-switch { display: none !important; }
.live-catalog-append [data-page-action="more"] { width: min(100%, 400px); min-height: 48px; font: inherit; border-radius: 10px; background: #fff; color: #222; }
.live-catalog-append [data-page-action="more"][hidden] { display: none; }
