:root {
  --primary: #e07b00;
  --primary-dark: #b85f00;
  --accent: #1a56db;
  --text: #1f2937;
  --text-light: #6b7280;
  --bg-light: #f9fafb;
  --border: #e5e7eb;
  --max-width: 1100px;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  font-size: 16px;
  line-height: 1.8;
  background: #fff;
}
.site-header {
  background: var(--primary) !important;
  box-shadow: 0 2px 12px rgba(0,0,0,0.25) !important;
  padding: 0 !important;
}
.site-title a,
.site-title a:hover {
  color: #fff !important;
  font-weight: 700;
  font-size: 1.4rem;
}
.main-navigation a {
  color: rgba(255,255,255,0.9) !important;
  font-size: 0.9rem;
}
.main-navigation a:hover {
  color: #fff !important;
}
.container, .grid-container {
  max-width: var(--max-width);
}
.content-area { width: 70%; }
.widget-area { width: 28%; }
.entry-title {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.4;
  color: var(--text);
  border-left: 5px solid var(--primary);
  padding-left: 16px;
  margin-bottom: 20px;
}
.post-thumbnail img {
  border-radius: 8px;
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  object-fit: cover;
}
.entry-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 20px;
}
#toc_container {
  background: #fff3e0;
  border: 1px solid #e07b00;
  border-radius: 8px;
  padding: 20px 24px;
  margin: 28px 0;
}
#toc_container .toc_title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
}
#toc_container ul li a {
  color: var(--primary);
  text-decoration: none;
  font-size: 0.92rem;
}
.entry-content h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #e07b00 0%, #b85f00 100%);
  padding: 12px 20px;
  border-radius: 6px;
  margin: 40px 0 20px;
  line-height: 1.4;
}
.entry-content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  border-left: 4px solid #1a56db;
  padding: 4px 0 4px 14px;
  margin: 28px 0 14px;
}
.entry-content h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  border-bottom: 2px dotted var(--border);
  padding-bottom: 6px;
  margin: 20px 0 10px;
}
.tablepress { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 0.92rem; box-shadow: 0 1px 8px rgba(0,0,0,0.08); border-radius: 8px; overflow: hidden; }
.tablepress thead th { background: var(--primary); color: #fff; padding: 12px 16px; text-align: center; font-weight: 700; }
.tablepress tbody tr:nth-child(even) td { background: #f5f9f5; }
.tablepress tbody td { padding: 11px 16px; border-bottom: 1px solid var(--border); text-align: center; }
.tablepress tbody tr:hover td { background: #e8f0e8; }
.cta-button {
  display: block;
  width: fit-content;
  margin: 20px auto;
  padding: 14px 36px;
  background: #1a56db;
  color: #fff !important;
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: 50px;
  text-decoration: none !important;
  text-align: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
  transition: transform 0.2s, box-shadow 0.2s;
}
.cta-button:hover { transform: translateY(-2px); }
.cta-button::after { content: ' →'; }
.ad-unit-in-content {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px;
  margin: 32px 0;
  text-align: center;
  position: relative;
}
.ad-unit-in-content::before {
  content: 'Ad';
  position: absolute;
  top: -10px;
  left: 12px;
  background: var(--border);
  color: var(--text-light);
  font-size: 0.7rem;
  padding: 1px 8px;
  border-radius: 10px;
}
.summary-box {
  background: linear-gradient(135deg, #f0f9f0 0%, #f9f0f0 100%);
  border: 2px solid #e07b00;
  border-radius: 10px;
  padding: 24px 28px;
  margin: 36px 0;
}
.summary-box h3 { color: var(--primary); font-size: 1.1rem; margin-bottom: 14px; border: none; padding: 0; }
.sidebar .widget { margin-bottom: 28px; }
.sidebar .widget-title {
  font-size: 1rem;
  font-weight: 700;
  border-bottom: 3px solid var(--primary);
  padding-bottom: 8px;
  margin-bottom: 16px;
}
.site-footer {
  background: #1f2937;
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
  padding: 32px 0 16px;
}
.site-footer a { color: rgba(255,255,255,0.6); text-decoration: none; }
.site-footer a:hover { color: #fff; }

/* ===================================================
   3-Layer Header
   =================================================== */
.top-info-bar {
  background: #0f172a;
  padding: 5px 0;
  font-size: 0.75rem;
}
.top-info-bar .inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.top-info-bar a, .top-info-bar span {
  color: rgba(255,255,255,0.45);
  text-decoration: none;
  transition: color 0.15s;
}
.top-info-bar a:hover { color: rgba(255,255,255,0.85); }
.top-info-bar .divider { margin: 0 10px; opacity: 0.2; }
.top-info-bar .new-badge {
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 3px;
  margin-right: 10px;
}
.top-info-bar .today-date { color: rgba(255,255,255,0.3); font-size: 0.7rem; }
.header-main-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.logo-block {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none !important;
  flex-shrink: 0;
}
.logo-icon-box {
  width: 38px;
  height: 38px;
  background: #fff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.logo-texts .site-name {
  display: block;
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  letter-spacing: -0.02em;
}
.logo-texts .site-tagline {
  display: block;
  font-size: 0.62rem;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.08em;
  margin-top: 3px;
}
.header-search-form {
  flex: 1;
  max-width: 380px;
  margin: 0 auto;
  position: relative;
}
.header-search-form input[type="search"] {
  width: 100%;
  padding: 9px 16px 9px 38px;
  border: none;
  border-radius: 50px;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 0.87rem;
  outline: none;
}
.header-search-form input[type="search"]::placeholder { color: rgba(255,255,255,0.5); }
.header-search-form input[type="search"]:focus { background: rgba(255,255,255,0.25); }
.header-search-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.6);
  pointer-events: none;
}
.header-cta-area {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-left: auto;
  flex-shrink: 0;
}
.header-cta-btn {
  padding: 7px 15px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  white-space: nowrap;
  transition: transform 0.15s;
}
.header-cta-btn:hover { transform: translateY(-1px); }
.header-cta-btn.filled {
  background: #fff;
  color: #e07b00 !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.category-nav-bar {
  background: #b85f00;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.category-nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
}
.category-nav-inner::-webkit-scrollbar { display: none; }
.cat-nav-item {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 11px 14px;
  color: rgba(255,255,255,0.75);
  font-size: 0.85rem;
  text-decoration: none !important;
  position: relative;
  white-space: nowrap;
  transition: color 0.15s;
  flex-shrink: 0;
}
.cat-nav-item:hover { color: #fff; }
.cat-nav-item.current-cat { color: #fff; font-weight: 700; }
.cat-nav-item.current-cat::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 8px;
  right: 8px;
  height: 3px;
  background: #ff6b35;
  border-radius: 3px 3px 0 0;
}
.cat-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.cat-dot.vpn       { background: #60a5fa; }
.cat-dot.saas      { background: #34d399; }
.cat-dot.ai-tools  { background: #fbbf24; }
.cat-dot.hosting   { background: #a78bfa; }
.cat-dot.security  { background: #f87171; }
.cat-dot.ranking   { background: #94a3b8; }
.cat-new-badge {
  font-size: 0.62rem; font-weight: 700;
  padding: 1px 5px; border-radius: 3px;
  background: #ff6b35; color: #fff; margin-left: 2px;
}
.cat-count-label { font-size: 0.7rem; color: rgba(255,255,255,0.35); }

/* ===================================================
   Mobile Optimization - v2.1 (2026-03-23)
   =================================================== */

/* --- 768px and below: Tablet / Smartphone --- */
@media (max-width: 768px) {
  /* Hide top info bar to save space */
  .top-info-bar { display: none; }

  /* Main header */
  .header-main-inner {
    height: auto;
    min-height: 52px;
    padding: 8px 12px;
    gap: 8px;
    flex-wrap: nowrap;
  }

  /* Logo */
  .logo-icon-box { width: 32px; height: 32px; }
  .logo-icon-box svg { width: 20px; height: 20px; }
  .logo-texts .site-name { font-size: 1.05rem; }
  .logo-texts .site-tagline { display: none; }

  /* Search bar */
  .header-search-form {
    flex: 1;
    min-width: 0;
    max-width: none;
    margin: 0;
  }
  .header-search-form input[type="search"] {
    padding: 7px 12px 7px 32px;
    font-size: 0.82rem;
  }

  /* CTA buttons */
  .header-cta-btn.outline { display: none; }
  .header-cta-btn.filled {
    padding: 6px 10px;
    font-size: 0.72rem;
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* Category nav */
  .category-nav-inner { padding: 0 8px; }
  .cat-nav-item { padding: 9px 10px; font-size: 0.8rem; }
  .cat-count-label { display: none; }

  /* Content columns */
  .content-area, .widget-area { width: 100% !important; }

  /* Article typography */
  .entry-title { font-size: 1.3rem; padding-left: 12px; }
  .entry-content h2 { font-size: 1.15rem; padding: 10px 14px; }
  .entry-content h3 { font-size: 1.05rem; }

  /* Comparison tables */
  .tablepress { font-size: 0.82rem; }
  .tablepress thead th, .tablepress tbody td { padding: 8px 10px; }

  /* CTA button in content */
  .cta-button { width: 100%; box-sizing: border-box; }

  /* Related posts */
  .related-posts-grid { grid-template-columns: 1fr; }

  /* Author box */
  .author-box { flex-direction: column; text-align: center; gap: 12px; padding: 16px; }
  .author-avatar img { width: 64px; height: 64px; }

  /* Category cards */
  .cat-cards-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .cat-card-item { padding: 12px 6px; }
  .cat-card-icon { font-size: 1.4rem; }
  .cat-card-name { font-size: 0.76rem; }

  /* GeneratePress default nav hide */
  .main-navigation { display: none !important; }

  /* GeneratePress sidebar below content */
  .generate-columns-wrapper { display: block !important; }
  .generate-columns-wrapper .widget-area {
    width: 100% !important;
    margin-top: 32px;
  }

  /* Grid container padding */
  .grid-container { padding: 0 12px; }
}

/* --- 480px and below: Smartphones only --- */
@media (max-width: 480px) {
  /* Hide search in header on very small screens */
  .header-search-form { display: none; }
  .header-cta-btn.filled {
    padding: 7px 12px;
    font-size: 0.78rem;
  }

  /* Category cards: 2 columns */
  .cat-cards-grid { grid-template-columns: repeat(2, 1fr); }

  /* Smaller title */
  .entry-title { font-size: 1.2rem; }

  /* Body font */
  body { font-size: 15px; }
  .entry-content p { line-height: 1.75; }

  /* Table scroll */
  .tablepress-table-wrapper, .entry-content table {
    overflow-x: auto;
    display: block;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
  }
  .tablepress { min-width: 460px; }

  /* Summary box */
  .summary-box { padding: 14px 14px; margin: 24px 0; }
  .summary-box h3 { font-size: 1rem; }
}
