@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;600;700&display=swap');

/* ============================================================
   CSS Variables
   ============================================================ */
:root {
  --primary: #0d1b2a;
  --primary-light: #1a2f47;
  --accent: #c0392b;
  --accent-hover: #e74c3c;
  --blue: #2980b9;
  --text: #1a1a2e;
  --text-secondary: #6c757d;
  --bg: #f0f2f5;
  --bg-white: #ffffff;
  --border: #dee2e6;
  --shadow: 0 2px 8px rgba(0,0,0,.08);
  --shadow-hover: 0 6px 20px rgba(0,0,0,.14);
  --radius: 8px;
  --max: 1200px;
  --font: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ============================================================
   Reset & Base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* ============================================================
   Header & Navigation
   ============================================================ */
.site-header {
  background: var(--primary);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,.35);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--accent);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: white;
  letter-spacing: -1px;
}

.logo-text {
  font-size: 20px;
  font-weight: 700;
  color: white;
}

.logo-text em { color: #f39c12; font-style: normal; }

.site-nav {
  display: flex;
  gap: 2px;
  flex: 1;
  justify-content: center;
}

.site-nav a {
  color: rgba(255,255,255,.75);
  font-size: 14px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 6px;
  transition: all .2s;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a.active {
  color: white;
  background: rgba(255,255,255,.13);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-search {
  color: rgba(255,255,255,.7);
  font-size: 18px;
  padding: 6px 10px;
  border-radius: 6px;
  transition: all .2s;
}

.btn-search:hover { color: white; background: rgba(255,255,255,.12); }

.btn-menu {
  display: none;
  color: white;
  font-size: 22px;
  padding: 4px 8px;
}

/* ============================================================
   Hero Section
   ============================================================ */
.hero {
  background: var(--primary);
  padding-bottom: 40px;
}

.hero-inner {
  padding-top: 8px;
}

.hero-featured {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--primary-light);
  box-shadow: 0 4px 24px rgba(0,0,0,.3);
}

.hero-thumbnail {
  height: 360px;
  background: linear-gradient(135deg, #1a3a5c 0%, #0d1b2a 50%, #2c1010 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  min-width: 0;
}

.hero-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-thumbnail::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 40% 50%, rgba(192,57,43,.25) 0%, transparent 65%);
}

.hero-thumbnail-icon {
  font-size: 90px;
  opacity: .25;
  position: relative;
}

.hero-info {
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .6px;
  text-transform: uppercase;
  width: fit-content;
}

.badge-hardware { background: #c0392b; color: white; }
.badge-game { background: #27ae60; color: white; }
.badge-esports { background: #8e44ad; color: white; }
.badge-mobile { background: #2980b9; color: white; }
.badge-hot {
  background: linear-gradient(135deg, #f39c12, #e74c3c);
  color: white;
}

.hero-title {
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 700;
  color: white;
  line-height: 1.38;
}

.hero-title a:hover { color: #f39c12; }

.hero-excerpt {
  font-size: 14px;
  color: rgba(255,255,255,.62);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: rgba(255,255,255,.45);
}

.hero-meta .dot {
  width: 3px;
  height: 3px;
  background: rgba(255,255,255,.3);
  border-radius: 50%;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: var(--accent);
  color: white;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  transition: background .2s;
  width: fit-content;
}

.hero-cta:hover { background: var(--accent-hover); }

/* ============================================================
   Main Layout
   ============================================================ */
.main-content { padding: 40px 0 64px; }

.content-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
}

/* Section titles */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  position: relative;
  padding-left: 14px;
}

.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 2px;
  bottom: 2px;
  width: 4px;
  background: var(--accent);
  border-radius: 2px;
}

.view-all {
  font-size: 13px;
  color: var(--blue);
  font-weight: 500;
  transition: color .15s;
}
.view-all:hover { color: var(--primary); }

/* ============================================================
   Article Cards (List)
   ============================================================ */
.article-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-white);
}

.article-card {
  display: grid;
  grid-template-columns: 110px 1fr;
  border-bottom: 1px solid var(--border);
  transition: background .15s;
}

.article-card:last-child { border-bottom: none; }
.article-card:hover { background: #fafbfc; }

.card-thumb {
  height: 88px;
  background: linear-gradient(135deg, #1a3a5c, #0d1b2a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: rgba(255,255,255,.25);
  flex-shrink: 0;
}

.card-thumb.hw { background: linear-gradient(135deg, #2c1010, #5a0000); }
.card-thumb.game { background: linear-gradient(135deg, #0a2a0a, #1a5c1a); }
.card-thumb.esports { background: linear-gradient(135deg, #1a0a2c, #3d0d6b); }

.card-body { padding: 12px 16px; }

.card-category {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--accent);
  margin-bottom: 5px;
  display: block;
}

.card-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.48;
  color: var(--text);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-title a:hover { color: var(--accent); }

.card-meta {
  font-size: 11px;
  color: var(--text-secondary);
}

/* Featured cards (top grid) */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.featured-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: box-shadow .2s, transform .2s;
}

.featured-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

.featured-thumb {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  color: rgba(255,255,255,.2);
}

.featured-thumb.hw { background: linear-gradient(135deg, #2c1010, #1a3a5c); }
.featured-thumb.game { background: linear-gradient(135deg, #0d2b0d, #1a3a5c); }

.featured-body { padding: 14px; }
.featured-body .card-category { margin-bottom: 6px; }
.featured-body .card-title { font-size: 14px; -webkit-line-clamp: 3; }

/* ============================================================
   Sidebar
   ============================================================ */
.sidebar { display: flex; flex-direction: column; gap: 20px; }

.widget {
  background: var(--bg-white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}

.widget-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--text-secondary);
  background: #fafafa;
}

.widget-body { padding: 12px 16px; }

.sidebar-article {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.sidebar-article:last-child { border-bottom: none; padding-bottom: 0; }
.sidebar-article:first-child { padding-top: 0; }

.sidebar-thumb {
  width: 56px;
  height: 56px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  color: rgba(255,255,255,.25);
}

.sidebar-thumb.hw { background: linear-gradient(135deg, #2c1010, #1a3a5c); }
.sidebar-thumb.game { background: linear-gradient(135deg, #0d2b0d, #1a3a5c); }
.sidebar-thumb.esports { background: linear-gradient(135deg, #1a0a2c, #1a3a5c); }

.sidebar-article-title {
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text);
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sidebar-article-title a:hover { color: var(--accent); }
.sidebar-article-date { font-size: 11px; color: var(--text-secondary); }

/* Tags widget */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 7px; }

.tag {
  display: inline-block;
  padding: 5px 11px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  background: #eef2ff;
  color: #4338ca;
  transition: all .15s;
  border: 1px solid #c7d2fe;
}

.tag:hover { background: #4338ca; color: white; border-color: #4338ca; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  background: var(--primary);
  color: rgba(255,255,255,.6);
  padding: 48px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}

.footer-brand .logo { margin-bottom: 14px; }
.footer-brand p { font-size: 13px; line-height: 1.75; max-width: 260px; }

.footer-col h4 {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,.9);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 14px;
}

.footer-col ul { display: flex; flex-direction: column; gap: 8px; }

.footer-col ul li a {
  font-size: 13px;
  transition: color .15s;
}

.footer-col ul li a:hover { color: white; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 18px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

.footer-bottom-links { display: flex; gap: 20px; }
.footer-bottom-links a:hover { color: white; }

/* ============================================================
   Article Page — Header
   ============================================================ */
.article-header {
  background: var(--primary);
  padding: 36px 0 40px;
  color: white;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: rgba(255,255,255,.5);
  margin-bottom: 18px;
}

.breadcrumb a { color: rgba(255,255,255,.65); transition: color .15s; }
.breadcrumb a:hover { color: white; }
.breadcrumb .sep { opacity: .4; font-size: 11px; }

.article-page-title {
  font-size: clamp(22px, 3vw, 36px);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 14px;
  max-width: 800px;
}

.article-subtitle {
  font-size: 16px;
  color: rgba(255,255,255,.65);
  line-height: 1.65;
  margin-bottom: 22px;
  max-width: 680px;
}

.article-meta-bar {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 12.5px;
  color: rgba(255,255,255,.5);
  flex-wrap: wrap;
}

.author-chip {
  display: flex;
  align-items: center;
  gap: 8px;
}

.author-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--blue));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.meta-sep { opacity: .35; }

/* ============================================================
   Article Page — Body Layout
   ============================================================ */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 40px;
  padding: 40px 0 64px;
}

/* Cover image area */
.article-cover {
  height: 380px;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 32px;
  background: linear-gradient(135deg, #1a3a5c 0%, #0d1b2a 40%, #2c0a0a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.article-cover::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(192,57,43,.2) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 50%, rgba(41,128,185,.15) 0%, transparent 60%);
}

.article-cover-icon {
  font-size: 100px;
  opacity: .18;
  position: relative;
}

.cover-label {
  position: absolute;
  bottom: 16px;
  left: 16px;
  font-size: 11px;
  color: rgba(255,255,255,.4);
  background: rgba(0,0,0,.4);
  padding: 4px 10px;
  border-radius: 4px;
}

/* Article body text */
.article-body { font-size: 17px; line-height: 1.9; color: var(--text); }

.article-body p { margin-bottom: 1.4em; }

.article-body h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 2.2em 0 .8em;
  padding-bottom: .5em;
  border-bottom: 2px solid var(--border);
  color: var(--primary);
}

.article-body h3 {
  font-size: 19px;
  font-weight: 600;
  margin: 1.8em 0 .6em;
  color: var(--text);
}

.article-body ul,
.article-body ol {
  margin: 1em 0 1.4em 1.5em;
}

.article-body li {
  list-style: disc;
  margin-bottom: .5em;
}

.article-body strong { font-weight: 600; }

.article-body a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.article-body a:hover { color: var(--primary); }

/* Highlight box */
.highlight-box {
  background: linear-gradient(135deg, #0d1b2a, #1a2f47);
  color: white;
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 20px 24px;
  margin: 1.8em 0;
  font-size: 16px;
  line-height: 1.75;
}

.highlight-box strong { color: #f39c12; }

/* Price table */
.price-table-wrap {
  margin: 1.6em 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.price-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.price-table thead tr { background: var(--primary); color: white; }
.price-table th { padding: 12px 16px; text-align: left; font-weight: 600; font-size: 13px; }
.price-table td { padding: 11px 16px; border-bottom: 1px solid var(--border); }
.price-table tr:last-child td { border-bottom: none; }
.price-table tr:nth-child(even) td { background: #f8f9fa; }
.price-table .scalper { color: var(--accent); font-weight: 700; }
.price-table .official { color: #27ae60; font-weight: 600; }

/* Info box */
.info-box {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 1.6em 0;
  font-size: 15px;
  line-height: 1.7;
}

.info-box .icon { font-size: 18px; margin-bottom: 6px; display: block; }
.info-box strong { color: #92400e; }

/* Article inline images */
.article-img-wrap {
  margin: 1.8em 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.article-img-wrap img {
  width: 100%;
  height: auto;
  display: block;
}

.article-img-caption {
  padding: 8px 14px;
  font-size: 12px;
  color: var(--text-secondary);
  background: #f8f9fa;
  line-height: 1.5;
}

.article-img-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 1.8em 0;
}

.article-img-grid .article-img-wrap { margin: 0; }

@media (max-width: 600px) {
  .article-img-grid { grid-template-columns: 1fr; }
}

/* Tags */
.article-tags {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.article-tags-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.article-tags .tag-cloud { gap: 7px; }

/* Source */
.article-source {
  margin-top: 20px;
  padding: 14px 18px;
  background: #f8f9fa;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text-secondary);
}

.article-source a { color: var(--blue); }
.article-source a:hover { text-decoration: underline; }

/* Share bar */
.share-bar {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.share-label { font-size: 13px; font-weight: 600; color: var(--text-secondary); }

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: white;
  transition: opacity .2s;
}

.share-btn:hover { opacity: .85; }
.share-btn.kakao { background: #fee500; color: #3a1d1d; }
.share-btn.twitter { background: #1da1f2; }
.share-btn.copy { background: #6b7280; }

/* Sidebar article widget */
.article-sidebar { display: flex; flex-direction: column; gap: 20px; }

/* ============================================================
   Reading Progress Bar
   ============================================================ */
.reading-progress {
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(192,57,43,.25);
  z-index: 99;
}

.reading-progress-bar {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width .1s linear;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
  .hero-featured { grid-template-columns: 1fr; }
  .hero-thumbnail { height: 200px; }
  .content-grid { grid-template-columns: 1fr; }
  .sidebar { display: grid; grid-template-columns: 1fr 1fr; }
  .article-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
}

@media (max-width: 768px) {
  .site-nav { display: none; }
  .btn-menu { display: block; }
  .featured-grid { grid-template-columns: 1fr; }
  .sidebar { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 20px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .article-cover { height: 220px; }
  .article-body { font-size: 16px; }
  .share-bar { flex-wrap: wrap; }
}

@media (max-width: 540px) {
  .hero-info { padding: 20px 16px; }
  .article-card { grid-template-columns: 90px 1fr; }
  .card-thumb { height: 80px; }
  .article-page-title { font-size: 22px; }
}

/* ============================================================
   Mobile nav overlay
   ============================================================ */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  z-index: 200;
}

.mobile-nav.open { display: flex; }

.mobile-nav-panel {
  background: var(--primary);
  width: 260px;
  height: 100%;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}

.mobile-nav-close {
  color: rgba(255,255,255,.7);
  font-size: 24px;
  padding: 8px;
  align-self: flex-end;
  border-radius: 6px;
  margin-bottom: 8px;
}

.mobile-nav-close:hover { background: rgba(255,255,255,.1); color: white; }

.mobile-nav-panel a {
  color: rgba(255,255,255,.8);
  font-size: 15px;
  font-weight: 500;
  padding: 11px 14px;
  border-radius: 6px;
  transition: all .2s;
}

.mobile-nav-panel a:hover { color: white; background: rgba(255,255,255,.12); }
