/* ============================================
   Best Chat Room Sites - Main Stylesheet
   Modern, clean design for chat room reviews
   ============================================ */

/* --- CSS Variables --- */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #dbeafe;
  --secondary: #0891b2;
  --secondary-dark: #0e7490;
  --accent: #f59e0b;
  --accent-dark: #d97706;
  --success: #10b981;
  --danger: #ef4444;
  --bg: #f1f5f9;
  --bg-white: #ffffff;
  --text: #1e293b;
  --text-light: #64748b;
  --text-lighter: #94a3b8;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --max-width: 1200px;
  --header-height: 64px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-dark); }
ul, ol { padding-left: 1.5em; }
h1, h2, h3, h4, h5, h6 { line-height: 1.3; color: var(--text); font-weight: 700; }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }
p { margin-bottom: 1rem; }

/* --- Header / Navigation --- */
.site-header {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
}
.site-logo:hover { color: var(--primary); }
.site-logo .logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.1rem;
}
.main-nav { display: flex; align-items: center; gap: 0.25rem; }
.main-nav a {
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius);
  color: var(--text-light);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
  white-space: nowrap;
}
.main-nav a:hover, .main-nav a.active {
  background: var(--primary-light);
  color: var(--primary);
}
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--text);
  font-size: 1.5rem;
}

/* --- Ad Slots --- */
.ad-slot {
  background: var(--border-light);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-lighter);
  font-size: 0.8rem;
  overflow: hidden;
  margin: 1rem 0;
  min-height: 90px;
}
.ad-slot-header {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
}
.ad-slot-sidebar {
  min-height: 250px;
  margin: 0 0 1.5rem 0;
}
.ad-slot-content {
  margin: 1.5rem 0;
  min-height: 100px;
}
.ad-slot-footer {
  min-height: 90px;
  margin: 0;
}

/* --- Hero Section (Homepage) --- */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  padding: 3rem 1.5rem;
  text-align: center;
}
.hero-inner {
  max-width: 800px;
  margin: 0 auto;
}
.hero h1 {
  font-size: 2.25rem;
  color: white;
  margin-bottom: 1rem;
  font-weight: 800;
}
.hero p {
  font-size: 1.15rem;
  opacity: 0.9;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}
.hero-badge {
  background: rgba(255,255,255,0.2);
  padding: 0.375rem 0.875rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  backdrop-filter: blur(4px);
}

/* --- Main Layout --- */
.page-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
  flex: 1;
}
.page-wrapper.full-width {
  grid-template-columns: 1fr;
}
.main-content { min-width: 0; }

/* --- Breadcrumbs --- */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.85rem;
  color: var(--text-lighter);
  margin-bottom: 1.5rem;
}
.breadcrumbs a { color: var(--text-light); }
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs .sep { margin: 0 0.25rem; }

/* --- Post Cards (Listing Pages) --- */
.posts-grid {
  display: grid;
  gap: 1.5rem;
}
.post-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}
.post-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.post-card-body { padding: 1.5rem; }
.post-card-category {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
  background: var(--primary-light);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
}
.post-card h2 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}
.post-card h2 a { color: var(--text); }
.post-card h2 a:hover { color: var(--primary); }
.post-card .excerpt {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}
.post-card .read-more {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.post-card .read-more:hover { gap: 0.5rem; }

/* --- Featured Post Card --- */
.post-card.featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.post-card.featured .post-card-img { min-height: 250px; }

/* --- Rating Badge --- */
.rating-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--accent);
  color: white;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius);
}
.rating-stars {
  color: var(--accent);
  font-size: 0.9rem;
  letter-spacing: 1px;
}

/* --- Article / Single Post --- */
.article-header { margin-bottom: 2rem; }
.article-header h1 {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-light);
}
.article-meta span { display: inline-flex; align-items: center; gap: 0.25rem; }
.article-body {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 2rem;
}
.article-body h2 {
  font-size: 1.4rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary-light);
}
.article-body h3 {
  font-size: 1.15rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}
.article-body p { margin-bottom: 1rem; line-height: 1.8; }
.article-body ul, .article-body ol {
  margin-bottom: 1rem;
  line-height: 1.8;
}
.article-body li { margin-bottom: 0.25rem; }
.article-body img {
  border-radius: var(--radius);
  margin: 1rem 0;
}
.article-body blockquote {
  border-left: 4px solid var(--primary);
  background: var(--primary-light);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--text);
}
.article-body a { text-decoration: underline; text-decoration-color: var(--primary-light); text-underline-offset: 2px; }
.article-body a:hover { text-decoration-color: var(--primary); }

/* --- Info Box / Callout --- */
.info-box {
  background: var(--primary-light);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}
.info-box.warning {
  background: #fef3c7;
  border-color: #fde68a;
}
.info-box.success {
  background: #d1fae5;
  border-color: #a7f3d0;
}
.info-box h4 {
  margin-bottom: 0.5rem;
  font-size: 1rem;
}
.info-box p:last-child { margin-bottom: 0; }

/* --- Quick Info Table --- */
.quick-info {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 1.5rem 0;
}
.quick-info-title {
  background: var(--primary);
  color: white;
  padding: 0.75rem 1rem;
  font-weight: 600;
  font-size: 0.95rem;
}
.quick-info table { width: 100%; border-collapse: collapse; }
.quick-info td {
  padding: 0.625rem 1rem;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.9rem;
}
.quick-info tr:last-child td { border-bottom: none; }
.quick-info td:first-child {
  font-weight: 600;
  color: var(--text-light);
  width: 40%;
  background: var(--border-light);
}

/* --- Pros/Cons --- */
.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}
.pros, .cons {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 1.25rem;
  border: 1px solid var(--border);
}
.pros { border-top: 3px solid var(--success); }
.cons { border-top: 3px solid var(--danger); }
.pros h4, .cons h4 { margin-bottom: 0.75rem; font-size: 1rem; }
.pros li, .cons li { margin-bottom: 0.375rem; font-size: 0.9rem; }

/* --- CTA Button --- */
.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.cta-button:hover {
  background: var(--primary-dark);
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.cta-button.secondary {
  background: var(--bg-white);
  color: var(--primary);
  border: 2px solid var(--primary);
}
.cta-button.secondary:hover {
  background: var(--primary-light);
}
.cta-button.accent {
  background: var(--accent);
}
.cta-button.accent:hover {
  background: var(--accent-dark);
}

/* --- Sidebar --- */
.sidebar { display: flex; flex-direction: column; gap: 1.5rem; }
.sidebar-widget {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.sidebar-widget-title {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.sidebar-widget-body { padding: 1rem 1.25rem; }
.sidebar-links { list-style: none; padding: 0; }
.sidebar-links li {
  border-bottom: 1px solid var(--border-light);
}
.sidebar-links li:last-child { border-bottom: none; }
.sidebar-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.625rem 1.25rem;
  color: var(--text);
  font-size: 0.9rem;
  transition: all 0.15s;
}
.sidebar-links a:hover {
  background: var(--primary-light);
  color: var(--primary);
}
.sidebar-links .badge {
  font-size: 0.75rem;
  background: var(--border-light);
  color: var(--text-light);
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
}

/* --- Featured Box (for toprandomchat promo) --- */
.featured-box {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  color: white;
  text-align: center;
}
.featured-box h3 { color: white; margin-bottom: 0.5rem; font-size: 1.1rem; }
.featured-box p { opacity: 0.9; font-size: 0.9rem; margin-bottom: 1rem; }
.featured-box .cta-button {
  background: white;
  color: var(--primary);
  font-size: 0.9rem;
  padding: 0.5rem 1.25rem;
}
.featured-box .cta-button:hover {
  background: var(--primary-light);
  transform: translateY(-1px);
}

/* --- Comparison Table --- */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}
.comparison-table th {
  background: var(--primary);
  color: white;
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
}
.comparison-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}
.comparison-table tr:nth-child(even) { background: var(--border-light); }
.comparison-table tr:hover { background: var(--primary-light); }

/* --- Video Embed --- */
.video-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius);
  margin: 1.5rem 0;
  background: #000;
}
.video-embed iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}

/* --- Table of Contents --- */
.toc {
  background: var(--border-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}
.toc h4 { margin-bottom: 0.75rem; font-size: 0.95rem; color: var(--text-light); }
.toc ol { padding-left: 1.25rem; }
.toc li { margin-bottom: 0.375rem; font-size: 0.9rem; }
.toc a { color: var(--text); }
.toc a:hover { color: var(--primary); }

/* --- Pagination --- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.pagination a, .pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 0.75rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
}
.pagination a {
  background: var(--bg-white);
  color: var(--text);
  border: 1px solid var(--border);
}
.pagination a:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}
.pagination .current {
  background: var(--primary);
  color: white;
  border: 1px solid var(--primary);
}

/* --- Footer --- */
.site-footer {
  background: var(--text);
  color: #cbd5e1;
  margin-top: auto;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem 1.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-col h4 {
  color: white;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}
.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 0.5rem; }
.footer-links a { color: #94a3b8; font-size: 0.9rem; }
.footer-links a:hover { color: white; }
.footer-bottom {
  border-top: 1px solid #334155;
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: #64748b;
}

/* --- Related Posts --- */
.related-posts { margin-top: 2.5rem; }
.related-posts h3 { margin-bottom: 1rem; }
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.related-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 1.25rem;
  border: 1px solid var(--border);
  transition: all 0.2s;
}
.related-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.related-card h4 { font-size: 0.95rem; margin-bottom: 0.375rem; }
.related-card h4 a { color: var(--text); }
.related-card h4 a:hover { color: var(--primary); }
.related-card p { font-size: 0.8rem; color: var(--text-light); margin: 0; }

/* --- Category/Tag Labels --- */
.category-label {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--primary);
  background: var(--primary-light);
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
}

/* --- Search Form --- */
.search-form {
  display: flex;
  gap: 0;
}
.search-form input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-right: none;
  border-radius: var(--radius) 0 0 var(--radius);
  font-size: 0.9rem;
  outline: none;
}
.search-form input:focus { border-color: var(--primary); }
.search-form button {
  padding: 0.5rem 1rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 0 var(--radius) var(--radius) 0;
  cursor: pointer;
  font-size: 0.9rem;
}

/* --- Top Sites List --- */
.top-sites-list {
  counter-reset: site-counter;
  list-style: none;
  padding: 0;
}
.top-site-item {
  counter-increment: site-counter;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  position: relative;
  padding-left: 4.5rem;
}
.top-site-item::before {
  content: "#" counter(site-counter);
  position: absolute;
  left: 1.25rem;
  top: 1.5rem;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
}
.top-site-item h3 { margin-bottom: 0.5rem; }
.top-site-item .site-rating {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

/* --- Responsive --- */
@media (max-width: 960px) {
  .page-wrapper {
    grid-template-columns: 1fr;
  }
  .sidebar { order: 2; }
  .main-content { order: 1; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .post-card.featured { grid-template-columns: 1fr; }
  .pros-cons { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  :root { --header-height: 56px; }
  .main-nav { display: none; }
  .main-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--header-height);
    left: 0; right: 0;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem;
    box-shadow: var(--shadow-md);
  }
  .mobile-menu-btn { display: block; }
  .hero h1 { font-size: 1.75rem; }
  .hero p { font-size: 1rem; }
  .article-header h1 { font-size: 1.5rem; }
  .article-body { padding: 1.25rem; }
  .related-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
  .comparison-table { font-size: 0.8rem; }
  .comparison-table th, .comparison-table td { padding: 0.5rem 0.625rem; }
}

@media (max-width: 480px) {
  h1 { font-size: 1.5rem; }
  .hero { padding: 2rem 1rem; }
  .page-wrapper { padding: 1rem; }
  .article-body { padding: 1rem; }
  .top-site-item { padding-left: 3.5rem; }
  .top-site-item::before { font-size: 1rem; left: 1rem; }
}
