:root {
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --badge-pink: #f43f5e;
    --badge-blue: #0284c7;
    --badge-purple: #8b5cf6;
    --border-color: #e2e8f0;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Pretendard', sans-serif; }
body { background-color: var(--bg-main); color: var(--text-main); line-height: 1.6; }

/* Header */
.site-header { background: #ffffff; border-bottom: 1px solid var(--border-color); position: sticky; top: 0; z-index: 50; }
.header-container { max-width: 1240px; margin: 0 auto; padding: 0 20px; height: 70px; display: flex; align-items: center; justify-content: space-between; }
.site-logo { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text-main); font-size: 1.25rem; font-weight: 800; }
.logo-mark { font-size: 1.4rem; }
.logo-badge { background: #fee2e2; color: #e11d48; font-size: 0.72rem; font-weight: 800; padding: 3px 8px; border-radius: 4px; border: 1px solid #fecdd3; }
.site-nav .nav-list { display: flex; list-style: none; gap: 24px; }
.nav-link { color: #475569; text-decoration: none; font-weight: 600; font-size: 0.95rem; transition: color 0.2s; }
.nav-link:hover, .nav-link.active { color: var(--primary); }

/* Portal Hero Section */
.portal-hero-section { background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%); color: #ffffff; padding: 50px 20px 42px; text-align: center; }
.hero-container { max-width: 860px; margin: 0 auto; }
.hero-pill { display: inline-flex; align-items: center; gap: 6px; background: rgba(244, 63, 94, 0.2); border: 1px solid rgba(244, 63, 94, 0.4); color: #fda4af; padding: 4px 14px; border-radius: 20px; font-size: 0.82rem; font-weight: 800; margin-bottom: 16px; }
.hero-title { font-size: 2.2rem; font-weight: 900; line-height: 1.3; margin-bottom: 12px; letter-spacing: -0.5px; }
.hero-desc { font-size: 1rem; color: #cbd5e1; line-height: 1.6; }

/* Page Wrapper */
.main-content { min-height: calc(100vh - 350px); }
.page-wrapper { max-width: 1240px; margin: 0 auto; padding: 36px 20px 60px; }

/* 🌟 포털 2열 대시보드 레이아웃 (본문 72% + 사이드바 28%) 🌟 */
.portal-main-grid { display: grid; grid-template-columns: 1fr 340px; gap: 24px; margin-bottom: 40px; align-items: start; }

/* 🌟 레퍼런스 스타일 뱃지형 카드 그리드 (2열) 🌟 */
.curation-cards-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.curation-badge-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 10px; padding: 16px; display: flex; flex-direction: column; justify-content: space-between; box-shadow: var(--card-shadow); }
.card-header-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid #f1f5f9; }
.rank-badge-title { display: flex; align-items: center; gap: 8px; font-size: 1rem; font-weight: 800; color: #0f172a; }
.rank-pill { font-size: 0.75rem; font-weight: 800; padding: 2px 7px; border-radius: 4px; }
.rank-pill.top-1 { background: #ffe4e6; color: #e11d48; }
.rank-pill.top-2 { background: #fef3c7; color: #d97706; }
.rank-pill.top-3 { background: #dcfce7; color: #16a34a; }
.rank-pill.top-etc { background: #f1f5f9; color: #64748b; }
.btn-card-link { font-size: 0.78rem; font-weight: 700; color: #64748b; text-decoration: none; padding: 3px 8px; border: 1px solid var(--border-color); border-radius: 4px; }
.btn-card-link:hover { background: var(--primary); color: #ffffff; border-color: var(--primary); }

.card-body-row { display: flex; gap: 14px; align-items: center; }
.card-logo-box { width: 110px; height: 50px; border: 1px solid var(--border-color); border-radius: 6px; display: flex; align-items: center; justify-content: center; padding: 3px; flex-shrink: 0; background: #fff; }
.card-logo-box img { max-width: 100%; max-height: 100%; object-fit: contain; }
.card-meta-list { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.meta-item { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; color: #334155; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meta-pill { font-size: 0.68rem; font-weight: 800; padding: 1px 6px; border-radius: 3px; color: #ffffff; flex-shrink: 0; }
.meta-pill.pink { background: var(--badge-pink); }
.meta-pill.blue { background: var(--badge-blue); }
.meta-pill.purple { background: var(--badge-purple); }

/* 🌟 우측 사이드바 위젯 🌟 */
.portal-sidebar { display: flex; flex-direction: column; gap: 20px; }
.sidebar-widget { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 10px; padding: 18px; box-shadow: var(--card-shadow); }
.widget-title { font-size: 0.95rem; font-weight: 800; color: #0f172a; margin-bottom: 12px; display: flex; align-items: center; gap: 6px; }

/* 위젯 1: 인기 콘텐츠 리스트 */
.hot-content-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.hot-content-list li { background: #f8fafc; padding: 8px 12px; border-radius: 6px; font-size: 0.82rem; font-weight: 600; color: #334155; border: 1px solid var(--border-color); }

/* 위젯 2: 실시간 클릭 순위 */
.click-ranking-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.click-ranking-item { display: flex; justify-content: space-between; align-items: center; padding: 7px 10px; border-radius: 6px; font-size: 0.82rem; }
.click-ranking-item:nth-child(even) { background: #f8fafc; }
.cr-left { display: flex; align-items: center; gap: 8px; font-weight: 700; color: #0f172a; }
.cr-pill { font-size: 0.72rem; font-weight: 800; padding: 1px 6px; border-radius: 3px; }
.cr-pill.rank-1 { background: #ffe4e6; color: #e11d48; }
.cr-pill.rank-2 { background: #fef3c7; color: #d97706; }
.cr-pill.rank-3 { background: #dcfce7; color: #16a34a; }
.cr-pill.rank-etc { background: #f1f5f9; color: #64748b; }
.cr-count { color: #64748b; font-size: 0.75rem; font-weight: 600; }

/* 🌟 스펙 4각 비교 테이블 🌟 */
.section-block { margin-top: 40px; margin-bottom: 40px; }
.section-heading { font-size: 1.35rem; font-weight: 800; color: #0f172a; margin-bottom: 14px; letter-spacing: -0.5px; }
.spec-matrix-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--border-color); border-radius: 10px; overflow: hidden; box-shadow: var(--card-shadow); }
.spec-matrix-table th { background: #f1f5f9; padding: 14px 16px; font-size: 0.85rem; font-weight: 700; color: #334155; border-bottom: 1px solid var(--border-color); }
.spec-matrix-table td { padding: 13px 16px; font-size: 0.88rem; border-bottom: 1px solid #f1f5f9; color: #334155; text-align: center; }
.spec-matrix-table td:nth-child(2) { text-align: left; font-weight: 700; color: #0f172a; }

/* 🌟 Q&A 아코디언 컴포넌트 (구글 신뢰도 극대화) 🌟 */
.faq-accordion-wrap { display: flex; flex-direction: column; gap: 12px; }
.faq-item { background: #ffffff; border: 1px solid var(--border-color); border-radius: 8px; overflow: hidden; box-shadow: var(--card-shadow); }
.faq-question { padding: 16px 20px; font-weight: 800; font-size: 0.95rem; color: #0f172a; cursor: pointer; display: flex; justify-content: space-between; align-items: center; background: #ffffff; }
.faq-question:hover { background: #f8fafc; }
.faq-answer { padding: 0 20px 16px; font-size: 0.88rem; color: #475569; line-height: 1.7; border-top: 1px solid #f8fafc; display: none; }
.faq-item.active .faq-answer { display: block; }
.faq-toggle-icon { font-size: 0.8rem; color: #64748b; transition: transform 0.2s; }
.faq-item.active .faq-toggle-icon { transform: rotate(180deg); }

/* 클린 게시판 테이블 (슬러그 태그 제거) */
.clean-board-wrap { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 10px; overflow: hidden; box-shadow: var(--card-shadow); }
.clean-board-table { width: 100%; border-collapse: collapse; text-align: left; }
.clean-board-table th { background: #f1f5f9; padding: 14px 18px; font-size: 0.88rem; font-weight: 700; color: #475569; border-bottom: 1px solid var(--border-color); }
.clean-board-table td { padding: 14px 18px; font-size: 0.92rem; border-bottom: 1px solid #f1f5f9; color: var(--text-main); }
.clean-board-table tbody tr:last-child td { border-bottom: none; }
.clean-board-table tbody tr:hover { background: #f8fafc; }
.td-board-num { width: 60px; text-align: center; color: var(--primary); font-weight: 700; }
.td-board-title a { color: var(--text-main); text-decoration: none; font-weight: 600; display: block; }
.td-board-title a:hover { color: var(--primary); text-decoration: underline; }
.td-board-date { width: 110px; text-align: center; color: var(--text-muted); font-size: 0.82rem; }

/* Detailed Footer */
.site-footer { background: #0f172a; color: #94a3b8; padding: 50px 20px 30px; border-top: 1px solid #1e293b; }
.footer-container { max-width: 1240px; margin: 0 auto; }
.footer-top { display: flex; justify-content: space-between; gap: 40px; margin-bottom: 40px; flex-wrap: wrap; }
.footer-brand h3 { color: #ffffff; font-size: 1.2rem; font-weight: 800; margin-bottom: 8px; }
.footer-slogan { font-size: 0.88rem; color: #cbd5e1; margin-bottom: 8px; }
.footer-desc { max-width: 400px; font-size: 0.82rem; line-height: 1.5; color: #64748b; }
.footer-links-grid { display: flex; gap: 50px; }
.footer-col h4 { color: #ffffff; font-size: 0.92rem; font-weight: 700; margin-bottom: 12px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: #94a3b8; text-decoration: none; font-size: 0.85rem; transition: color 0.2s; }
.footer-col a:hover { color: #ffffff; }
.footer-bottom { border-top: 1px solid #1e293b; padding-top: 24px; font-size: 0.8rem; text-align: center; color: #64748b; }
.disclaimer-text { margin-top: 6px; font-size: 0.74rem; color: #475569; }

/* Mobile */
@media screen and (max-width: 1024px) {
    .portal-main-grid { grid-template-columns: 1fr; }
    .curation-cards-grid { grid-template-columns: 1fr; }
}
@media screen and (max-width: 640px) {
    .header-container { height: auto; padding: 12px 16px; flex-direction: column; align-items: flex-start; gap: 12px; }
    .site-nav { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .site-nav .nav-list { display: flex; gap: 16px; white-space: nowrap; padding-bottom: 4px; }
    
    .portal-hero-section { padding: 36px 16px 30px; }
    .hero-title { font-size: 1.45rem; }
    .page-wrapper { padding: 20px 14px 40px; }
    
    .card-body-row { flex-direction: column; align-items: flex-start; gap: 10px; }
    .card-logo-box { width: 100%; height: 46px; }
    .clean-board-wrap, .spec-matrix-table { overflow-x: auto; }
    .clean-board-table { min-width: 440px; }
    .spec-matrix-table { min-width: 480px; }
}