/* ===================================================================
   Shared Styles — ScreenResolution
   Global variables, layout, typography, navigation, footer, responsive
   =================================================================== */

:root {
  --bg: #0a0a0f;
  --card: #12121a;
  --border: #1e1e2e;
  --text: #e2e2ef;
  --muted: #6e6e8a;
  --accent: #6ee7b7;
  --accent-dim: rgba(110, 231, 183, 0.1);
  --accent-glow: rgba(110, 231, 183, 0.06);
  --label: #3b82f6;
  --label-dim: rgba(59, 130, 246, 0.08);
  --font-body: 'DM Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-serif: Georgia, 'Times New Roman', serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Animated grid background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(110, 231, 183, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(110, 231, 183, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: gridScroll 20s linear infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes gridScroll {
  0% { transform: translate(0, 0); }
  100% { transform: translate(60px, 60px); }
}

/* Radial glow behind hero */
body::after {
  content: '';
  position: fixed;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(110, 231, 183, 0.05) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ========== Container ========== */
.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
  position: relative;
  z-index: 1;
}

/* ========== Navbar ========== */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0 2rem;
  gap: 1rem;
}

.logo {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.logo span { color: var(--accent); }

/* Nav page links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}

.nav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.nav-link.active {
  color: var(--accent);
  background: var(--accent-dim);
}

/* Separator between nav links */
.nav-link + .nav-link {
  border-left: 1px solid var(--border);
  margin-left: 0.25rem;
  padding-left: 1rem;
}

/* Language switcher */
.lang-switcher {
  position: relative;
  margin-left: 0.5rem;
  padding-left: 0.75rem;
  border-left: 1px solid var(--border);
}

.lang-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 0.35rem 0.7rem;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: color 0.2s, border-color 0.2s;
}

.lang-btn:hover {
  color: var(--text);
  border-color: var(--muted);
}

.lang-btn .arrow {
  font-size: 0.6rem;
  transition: transform 0.2s;
}

.lang-btn.open .arrow {
  transform: rotate(180deg);
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.35rem;
  min-width: 140px;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.lang-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  background: none;
  border: none;
  color: var(--text);
  padding: 0.5rem 0.75rem;
  border-radius: 5px;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.15s;
}

.lang-option:hover {
  background: rgba(255, 255, 255, 0.05);
}

.lang-option.active {
  color: var(--accent);
  background: var(--accent-dim);
}

.lang-option .check {
  margin-left: auto;
  opacity: 0;
}

.lang-option.active .check {
  opacity: 1;
}

/* Refresh button (hero) — shared style */
.btn-refresh {
  background: var(--accent-dim);
  border: 1px solid rgba(110, 231, 183, 0.2);
  color: var(--accent);
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  font-size: 0.82rem;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
}

.btn-refresh:hover {
  background: rgba(110, 231, 183, 0.18);
  border-color: rgba(110, 231, 183, 0.4);
}

/* ========== Hero (Tool homepage) ========== */

.hero-refresh-row { display: flex; justify-content: center; margin-top: 0.5rem; }
.hero {
  text-align: center;
  padding: 3rem 0 2.5rem;
}

.hero-label {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.hero-resolution {
  font-family: var(--font-mono);
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  animation: fadeUp 0.6s ease-out;
}

.hero-resolution .x-sign {
  color: var(--muted);
  margin: 0 0.15em;
  font-weight: 400;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Width / Height pills */
.metrics-row {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin: 2rem 0 1rem;
  flex-wrap: wrap;
}

.metric-pill {
  background: var(--label-dim);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 8px;
  padding: 0.5rem 1rem;
  text-align: center;
  animation: fadeUp 0.6s ease-out backwards;
}

.metric-pill:nth-child(2) { animation-delay: 0.1s; }

.metric-pill-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--label);
  color: #fff;
  border-radius: 4px;
  padding: 0.15rem 0.55rem;
  display: inline-block;
}

.metric-pill-value {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-top: 0.35rem;
}

.metric-pill-arrow {
  font-size: 0.8rem;
}

.total-pixels {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 1rem;
}

.total-pixels strong {
  color: var(--text);
  font-weight: 700;
}

.unit-note {
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 0.5rem;
}

/* Divider */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

/* ========== Info table (homepage) ========== */
.info-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text);
}

.info-table {
  width: 100%;
  border-collapse: collapse;
}

.info-table tr {
  border-bottom: 1px solid var(--border);
}

.info-table tr:last-child { border-bottom: none; }

.info-table td {
  padding: 0.85rem 0;
  vertical-align: middle;
}

.info-table td:first-child {
  color: var(--muted);
  font-size: 0.9rem;
  width: 45%;
}

.info-table td:last-child {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  text-align: right;
}

/* Widescreen badge */
.badge {
  display: inline-block;
  padding: 0.15rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.badge-yes {
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(110, 231, 183, 0.2);
}

.badge-no {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ========== Blog article styles ========== */
.article-header {
  padding: 2.5rem 0 1.5rem;
  text-align: center;
}

.article-header h1 {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 0.75rem;
}

.article-header .article-meta {
  color: var(--muted);
  font-size: 0.85rem;
}

.article-content {
  max-width: 760px;
  margin: 0 auto;
}

.article-content h2 {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 2.5rem 0 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.article-content h2:first-of-type {
  padding-top: 0;
  border-top: none;
}

.article-content h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 1.5rem 0 0.5rem;
  color: var(--text);
}

.article-content p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #c0c0d0;
  margin-bottom: 1.25rem;
}

.article-content a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(110, 231, 183, 0.3);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s;
}

.article-content a:hover {
  text-decoration-color: var(--accent);
}

.article-content figure {
  margin: 2rem 0;
  text-align: center;
}

.article-content figure img,
.article-content figure svg {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.article-content figcaption {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 0.75rem;
  font-style: italic;
}

.article-content ul,
.article-content ol {
  margin: 0.75rem 0 1.25rem 1.5rem;
  color: #c0c0d0;
  line-height: 1.8;
}

.article-content li {
  margin-bottom: 0.4rem;
}

/* Data tables in articles */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

.data-table thead th {
  text-align: left;
  padding: 0.7rem 0.75rem;
  border-bottom: 2px solid var(--border);
  color: var(--text);
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.data-table tbody td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
  color: #c0c0d0;
}

.data-table tbody tr:last-child td { border-bottom: none; }

.data-table .mono {
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

/* CTA Box */
.cta-box {
  background: var(--accent-dim);
  border: 1px solid rgba(110, 231, 183, 0.2);
  border-radius: 12px;
  padding: 1.75rem 2rem;
  text-align: center;
  margin: 2rem 0;
}

.cta-box p {
  color: var(--text) !important;
  font-weight: 500;
  font-size: 1.05rem !important;
  margin-bottom: 1rem !important;
}

.cta-button {
  display: inline-block;
  background: var(--accent);
  color: var(--bg) !important;
  text-decoration: none !important;
  padding: 0.65rem 1.75rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(110, 231, 183, 0.25);
}

/* FAQ details/summary */
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::before {
  content: '+';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.faq-item[open] summary::before {
  content: '−';
}

.faq-item > p,
.faq-item > div {
  margin-top: 0.75rem;
  padding-left: 2rem;
}

/* ========== Footer ========== */
.footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
}

/* ========== Responsive ========== */
@media (max-width: 540px) {
  .hero-resolution { font-size: 2rem; }
  .metrics-row { flex-direction: column; align-items: center; }
  .info-table td:first-child { width: 50%; font-size: 0.8rem; }
  .info-table td:last-child { font-size: 0.75rem; }

  .article-header h1 { font-size: 1.6rem; }
  .article-content h2 { font-size: 1.3rem; }
  .article-content p { font-size: 0.98rem; }
  .cta-box { padding: 1.25rem; }

  .navbar { flex-wrap: wrap; gap: 0.5rem; }
}

/* ========== Kakao Ads ========== */
.kakao-ad-left,
.kakao-ad-right {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 9999;
}
.kakao-ad-left { left: 10px; }
.kakao-ad-right { right: 10px; }
@media (max-width: 1200px) {
  .kakao-ad-left, .kakao-ad-right { display: none !important; }
}
