/* === CSS 변수 === */
:root {
    --accent: #ff4500;
    --primary: #2c3e50;
    --primary-dark: #1a252f;
    --link: #0066cc;
    --border: #ddd;
}

/* === 기본 === */
html, body { overflow-x: hidden; max-width: 100vw; }
body { margin: 4px; padding: 0; font-size: 14px; line-height: 1.5; }

/* === 테이블 === */
table { width: 100%; max-width: 100%; border-collapse: collapse; text-align: center; font-size: 12px; }
th, td { border: 1px solid #ddd; padding: 7px; }
th { background-color: #f2f2f2; color: black; }
tr:nth-child(even) { background-color: #f9f9f9; }
tr:hover { background-color: #ddd; }

/* === 색상 유틸 === */
.positive { color: red; }
.negative { color: blue; }
.neutral { color: black; }
.black-link { color: black; text-decoration: underline; }
.black-link:hover { color: black; }

/* === 배너 === */
.banner-container { text-align: center; margin-bottom: 1px; background-color: rgba(0,0,0,0.75); padding: 10px 15px; }
.banner-link { display: block; text-decoration: none; color: #fff; }
.banner-link:visited { color: #fff; }
.banner-image { max-width: 25%; height: auto; cursor: pointer; }
.banner-title { display: block; font-size: 11px; color: rgba(255,255,255,0.65); font-weight: normal; margin: 2px 0 0; letter-spacing: 0.5px; }

/* === 메뉴 === */
.menu-container { display: flex; justify-content: center; align-items: center; background-color: rgba(0,0,0,0.85); padding: 10px 0; margin-bottom: 10px; border-bottom: 1px solid #ddd; }
.menu-item { margin: 0 15px; text-decoration: none; color: white; font-weight: bold; font-size: 12px; display: inline-flex; align-items: center; }
.menu-item:hover { color: #ff4500; }

/* === 드롭다운 === */
.user-menu { position: relative; display: inline-flex; align-items: center; }
.dropdown-content { display: none; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); background: #fff; min-width: 110px; box-shadow: 0 8px 16px rgba(0,0,0,.2); z-index: 1000; border-radius: 4px; margin-top: 5px; }
.dropdown-content a { color: #333; padding: 10px; text-decoration: none; display: block; font-size: 12px; text-align: center; font-weight: bold; }
.dropdown-content a:hover { background: #f1f1f1; color: #ff4500; }
.show { display: block; }

/* === 버튼 === */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px; border-radius: 6px; font-size: 14px; font-weight: bold; text-decoration: none; cursor: pointer; border: none; white-space: nowrap; box-sizing: border-box; }
.btn-primary { background: #2c3e50; color: white; }
.btn-primary:hover { background: #1a252f; }
.btn-outline { background: #fff; color: #333; border: 1px solid #ccc; }
.btn-outline:hover { background: #f5f5f5; }
.btn-danger { background: #fff; color: #cc0000; border: 1px solid #fcc; }
.btn-danger:hover { background: #fff5f5; }

/* === 배지 === */
.tag-ticker { display: inline-block; background: #e8f4fd; color: #0066cc; border-radius: 4px; padding: 2px 6px; font-size: 11px; text-decoration: none; white-space: nowrap; }
.tag-ticker:hover { background: #cce4f7; }
.cmt-count { color: #0066cc; font-size: 11px; margin-left: 3px; }

/* === 에러 메시지 === */
.error-msg { color: red; background: #fff5f5; border: 1px solid #fcc; border-radius: 6px; padding: 10px 12px; margin-bottom: 12px; font-size: 13px; }

/* === 스크롤 버튼 === */
#scrollToTopBtn { position: fixed; right: 20px; bottom: 80px; z-index: 1000; background-color: #808080; color: white; border: none; border-radius: 5px; padding: 7px 11px; cursor: pointer; font-size: 11px; font-weight: bold; white-space: nowrap; display: none; text-decoration: none; text-align: center; opacity: 0; transition: opacity 0.4s; }
#scrollToTopBtn:hover { background-color: #555; }

/* === 로그인 모달 === */
.login-modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 3000; align-items: center; justify-content: center; }
.login-modal-overlay.active { display: flex; }
.login-modal { background: #fff; border-radius: 12px; padding: 28px 24px; width: 90%; max-width: 300px; text-align: center; box-shadow: 0 8px 32px rgba(0,0,0,0.2); }
.login-modal h3 { margin: 0 0 18px; font-size: 16px; color: #222; }
.login-modal-btn { display: block; width: 100%; padding: 13px; border-radius: 7px; font-size: 15px; font-weight: bold; margin-bottom: 10px; text-decoration: none; box-sizing: border-box; white-space: nowrap; }
.login-modal-btn.naver { background: #03C75A; color: white; }
.login-modal-btn.kakao { background: #FEE500; color: #3C1E1E; }
.login-modal-btn.google { background: #fff; color: #444; border: 1px solid #ddd; display: flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; }
.login-modal-close { margin-top: 4px; background: none; border: 1px solid #ccc; border-radius: 7px; padding: 11px; width: 100%; cursor: pointer; font-size: 14px; color: #555; }
.login-modal-close:hover { background: #f5f5f5; }
.badge-recent { display: inline-block; font-size: 10px; font-weight: 700; background: rgba(0,0,0,0.42); color: #fff; padding: 2px 7px; border-radius: 10px; margin-left: 6px; vertical-align: middle; white-space: nowrap; line-height: 1.6; }

/* === 푸터 === */
footer { background: #f2f2f2; text-align: center; border-top: 1px solid #ddd; padding: 20px 0; margin-top: 20px; }
footer p { margin: 0; font-size: 12px; color: #555; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0 8px; padding: 0 12px; }
footer a { color: #0066cc; text-decoration: none; }
footer a:hover { text-decoration: underline; }
footer .sep { color: #ccc; }
@media (max-width: 600px) { footer .sep { display: none; } }

/* === 포커스 접근성 === */
:focus-visible { outline: 2px solid #0066cc; outline-offset: 2px; }

/* === 태블릿 (601px–900px) === */
@media (min-width: 601px) and (max-width: 900px) {
    table { font-size: 11px; }
    th, td { padding: 6px; }
}

/* === 모바일 (≤600px) === */
@media (max-width: 600px) {
    body { font-size: 12px; }
    table { font-size: 10px; table-layout: fixed; }
    th, td { word-wrap: break-word; }
    .menu-item { font-size: 11px; margin: 0 6px; white-space: nowrap; }
    #scrollToTopBtn { padding: 6px 9px; font-size: 10px; bottom: 70px; }
}
