/* ============================================
   MMOGrounds — pages.css
   Shared styles for lists, news, utility
   and user pages
   ============================================ */

/* PAGE HERO */
.page-hero {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 48px 0;
}
.page-hero-inner {
  max-width: var(--max-w); margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
  width: 100%;
}
.filter-bar-inline {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
}
.page-hero-eyebrow {
  font-family: var(--font-display); font-size: 12px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--accent);
  margin-bottom: 8px;
}
.page-hero-title {
  font-family: var(--font-display); font-size: clamp(28px, 3.5vw, 48px);
  font-weight: 700; color: var(--text); line-height: 1.05;
  letter-spacing: -.01em; margin-bottom: 10px;
}
.page-hero-desc {
  font-size: 16px; color: var(--muted2); max-width: 560px; line-height: 1.7;
}
.page-hero-meta {
  font-family: var(--font-display); font-size: 13px; color: var(--muted);
  margin-top: 12px; display: flex; align-items: center; gap: 16px;
}
.page-hero-meta span { display: flex; align-items: center; gap: 5px; }

/* PAGE BODY */
.page-body {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 48px var(--gutter) 80px;
}
.page-layout {
  display: grid; grid-template-columns: 1fr 320px; gap: 40px; align-items: start;
}
.page-main { min-width: 0; }
.page-sidebar { min-width: 0; }

/* ============================================
   LISTS PAGE
   ============================================ */
.list-grid {
  display: flex; flex-direction: column; gap: 0;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-xl); overflow: hidden;
}
.list-item {
  display: grid; grid-template-columns: 56px 80px 1fr auto;
  align-items: center; gap: 16px;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background .15s;
  text-decoration: none; color: inherit;
}
.list-item:last-child { border-bottom: none; }
.list-item:hover { background: rgba(255,255,255,.03); }
.list-rank {
  font-family: var(--font-display); font-size: 28px; font-weight: 700;
  color: var(--border2); text-align: center; line-height: 1;
  min-width: 40px;
}
.list-rank.top3 { color: var(--accent); }
.list-cover {
  width: 72px; height: 96px; border-radius: 8px; overflow: hidden;
  background: var(--bg3); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.list-cover img { width: 100%; height: 100%; object-fit: cover; }
.list-cover-placeholder {
  font-family: var(--font-display); font-size: 18px; font-weight: 700;
  color: var(--border3);
}
.list-info { min-width: 0; }
.list-name {
  font-family: var(--font-display); font-size: 18px; font-weight: 700;
  color: var(--text); margin-bottom: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.list-dev { font-size: 14px; color: var(--muted2); margin-bottom: 6px; }
.list-desc {
  font-size: 14px; color: var(--muted2); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.list-tags { display: flex; gap: 5px; margin-top: 8px; flex-wrap: wrap; }
.list-tag {
  font-family: var(--font-display); font-size: 12px; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 4px;
  background: rgba(255,255,255,.05); color: var(--muted2);
  border: 1px solid var(--border);
}
.list-rating {
  font-family: var(--font-display); font-size: 24px; font-weight: 700;
  color: var(--accent); text-align: right; flex-shrink: 0;
}
.list-rating::before { content: '★ '; font-size: 16px; }

/* ============================================
   NEWS PAGE — Grouped by game
   ============================================ */
.news-grid {
  display: flex; flex-direction: column; gap: 16px;
}

/* Game group card */
.news-group {
  display: flex; gap: 20px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px;
  transition: border-color .2s;
}
.news-group:hover { border-color: var(--border2); }

/* Game cover (left column) */
.news-group-cover {
  flex-shrink: 0; width: 100px; height: 133px;
  border-radius: 8px; overflow: hidden; background: var(--bg3);
}
.news-group-cover img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.news-group-cover-abbr {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 24px; font-weight: 700;
}

/* Right column: game name + article list */
.news-group-body {
  flex: 1; min-width: 0; display: flex; flex-direction: column;
}
.news-group-header {
  display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap;
}
.news-group-name {
  font-family: var(--font-display); font-size: 18px; font-weight: 700;
  color: var(--text); text-decoration: none;
}
.news-group-name:hover { color: var(--accent); }
.news-group-badge {
  font-family: var(--font-display); font-size: 11px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 10px;
  background: rgba(240,192,64,.1); color: var(--accent);
}

/* Article bullet list */
.news-article-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 0;
}
.news-article-item {
  padding: 8px 0; border-top: 1px solid var(--border);
}
.news-article-item:first-child { border-top: none; padding-top: 0; }
.news-article-link {
  display: flex; align-items: flex-start; gap: 8px;
  text-decoration: none; color: var(--muted2);
  font-size: 14px; line-height: 1.5;
  transition: color .15s;
}
.news-article-link:hover { color: var(--text); }
.news-article-dot {
  flex-shrink: 0; width: 6px; height: 6px; border-radius: 50%;
  margin-top: 7px;
}
.news-article-text {
  flex: 1; min-width: 0;
}
.news-article-meta {
  display: flex; align-items: center; gap: 8px; margin-top: 2px;
  font-size: 11px; color: var(--muted);
}
.news-source-badge {
  display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: var(--muted);
}
.news-source-icon {
  display: inline-block; width: 14px; height: 14px; border-radius: 3px;
  font-size: 7px; font-weight: 700; line-height: 14px; text-align: center;
}
.news-cat-label {
  font-family: var(--font-display); font-size: 10px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  padding: 1px 6px; border-radius: 4px;
  background: rgba(255,255,255,.05); border: 1px solid var(--border);
}

/* ============================================
   SIDEBAR WIDGETS (shared)
   ============================================ */
.sidebar-widget {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 20px;
}
.sidebar-widget-title {
  font-family: var(--font-display); font-size: 13px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  background: var(--bg3);
}
.sidebar-widget-body { padding: 16px; }
.sidebar-game-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid var(--border);
  cursor: pointer; transition: padding-left .15s;
  text-decoration: none; color: inherit;
}
.sidebar-game-row:last-child { border-bottom: none; }
.sidebar-game-row:hover { padding-left: 4px; }
.sidebar-game-icon {
  width: 36px; height: 36px; border-radius: 6px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 12px; font-weight: 700;
}
.sidebar-game-name {
  font-size: 14px; font-weight: 500; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  flex: 1; min-width: 0;
}
.sidebar-game-rating {
  font-family: var(--font-display); font-size: 14px; font-weight: 700;
  color: var(--accent); flex-shrink: 0;
}
.lists-nav-link {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid var(--border);
  font-size: 14px; color: var(--muted2); cursor: pointer;
  text-decoration: none; transition: color .15s, padding-left .15s;
}
.lists-nav-link:last-child { border-bottom: none; }
.lists-nav-link:hover { color: var(--accent); padding-left: 4px; }

/* ============================================
   UTILITY PAGES (About, Contact etc.)
   ============================================ */
.util-body {
  max-width: 820px; margin: 0 auto;
  padding: 56px var(--gutter) 80px;
}
.util-section { margin-bottom: 40px; }
.util-h2 {
  font-family: var(--font-display); font-size: 22px; font-weight: 700;
  color: var(--text); margin-bottom: 14px;
  padding-bottom: 10px; border-bottom: 1px solid var(--border);
}
.util-p {
  font-size: 16px; color: var(--muted2); line-height: 1.8; margin-bottom: 14px;
}
.util-p a { color: var(--accent); }
.util-list {
  list-style: none; padding: 0; margin: 0 0 14px;
}
.util-list li {
  font-size: 16px; color: var(--muted2); line-height: 1.7;
  padding: 6px 0 6px 20px; position: relative;
}
.util-list li::before {
  content: '→'; position: absolute; left: 0;
  color: var(--accent); font-family: var(--font-display); font-weight: 700;
}
.contact-form { display: flex; flex-direction: column; gap: 16px; }
.contact-form label { font-size: 14px; font-weight: 500; color: var(--muted2); margin-bottom: 4px; display: block; }
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%; background: var(--bg2); border: 1px solid var(--border2);
  border-radius: var(--radius); color: var(--text);
  font-family: var(--font-body); font-size: 15px;
  padding: 10px 14px; outline: none; transition: border-color .2s;
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus { border-color: var(--accent); }
.contact-form textarea { resize: vertical; min-height: 120px; line-height: 1.6; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-submit {
  font-family: var(--font-display); font-size: 14px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  background: var(--accent); color: var(--bg);
  padding: 12px 28px; border: none; border-radius: var(--radius);
  cursor: pointer; transition: background .15s; align-self: flex-start;
}
.form-submit:hover { background: var(--accent2); }

/* ============================================
   USER PAGES (Login, Register, Profile)
   ============================================ */
.auth-wrap {
  min-height: calc(100vh - 120px);
  display: flex; align-items: center; justify-content: center;
  padding: 40px var(--gutter);
}
.auth-card {
  background: var(--bg2); border: 1px solid var(--border2);
  border-radius: var(--radius-xl); padding: 40px;
  width: 100%; max-width: 440px;
  box-shadow: 0 24px 60px rgba(0,0,0,.4);
}
.auth-logo {
  font-family: var(--font-display); font-size: 22px; font-weight: 700;
  text-align: center; margin-bottom: 6px;
}
.auth-logo span { color: var(--accent); }
.auth-tagline { font-size: 14px; color: var(--muted2); text-align: center; margin-bottom: 28px; }
.auth-title {
  font-family: var(--font-display); font-size: 24px; font-weight: 700;
  color: var(--text); margin-bottom: 24px; text-align: center;
}
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-form label { font-size: 14px; font-weight: 500; color: var(--muted2); display: block; margin-bottom: 5px; }
.auth-form input {
  width: 100%; background: var(--bg3); border: 1px solid var(--border2);
  border-radius: var(--radius); color: var(--text);
  font-family: var(--font-body); font-size: 15px;
  padding: 11px 14px; outline: none; transition: border-color .2s;
}
.auth-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(240,192,64,.08); }
.auth-btn {
  font-family: var(--font-display); font-size: 14px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  background: var(--accent); color: var(--bg);
  padding: 12px; border: none; border-radius: var(--radius);
  cursor: pointer; transition: background .15s; width: 100%;
  margin-top: 4px;
}
.auth-btn:hover { background: var(--accent2); }
.auth-divider {
  display: flex; align-items: center; gap: 12px;
  font-size: 13px; color: var(--muted); margin: 4px 0;
}
.auth-divider::before,
.auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.auth-alt {
  font-size: 14px; color: var(--muted2); text-align: center; margin-top: 20px;
}
.auth-alt a { color: var(--accent); font-weight: 500; }
.auth-social-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-display); font-size: 13px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
  background: var(--bg3); color: var(--text);
  border: 1px solid var(--border2); border-radius: var(--radius);
  padding: 10px; cursor: pointer; transition: border-color .15s, background .15s;
  width: 100%;
}
.auth-social-btn:hover { border-color: var(--accent); background: rgba(240,192,64,.05); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .page-layout { grid-template-columns: 1fr; }
  .page-sidebar { order: -1; }
  .list-item { grid-template-columns: 40px 64px 1fr; }
  .list-rating { display: none; }
  .page-body { padding: 36px var(--gutter) 60px; }
}
@media (max-width: 640px) {
  .page-hero { padding: 32px 0; }
  .page-hero-inner { gap: 16px; }
  .page-hero-desc { font-size: 14px; }
  .page-hero-meta { font-size: 12px; gap: 8px; flex-wrap: wrap; }
  .news-group { padding: 14px; gap: 14px; }
  .news-group-cover { width: 72px; height: 96px; }
  .news-group-cover-abbr { font-size: 18px; }
  .news-group-name { font-size: 15px; }
  .news-article-link { font-size: 13px; }
  .news-article-meta { font-size: 10px; }
  .contact-grid { grid-template-columns: 1fr; }
  .list-item { grid-template-columns: 36px 1fr; gap: 10px; padding: 12px 14px; }
  .list-cover { display: none; }
  .list-name { font-size: 16px; }
  .list-desc { font-size: 13px; }
  .list-tags { gap: 4px; }
  .list-tag  { font-size: 11px; padding: 2px 6px; }
  .sidebar-widget { margin-bottom: 16px; }
  .util-body { padding: 40px var(--gutter) 60px; }
  .util-h2 { font-size: 20px; }
  .util-p { font-size: 15px; }
  .filter-bar-inline { gap: 6px; }
}
@media (max-width: 380px) {
  .page-body { padding: 28px var(--gutter) 48px; }
  .list-item { grid-template-columns: 28px 1fr; gap: 8px; padding: 10px 12px; }
  .list-rank { font-size: 20px; }
  .list-name { font-size: 15px; }
  .news-group { padding: 12px; gap: 10px; }
  .news-group-cover { width: 60px; height: 80px; }
  .news-group-cover-abbr { font-size: 16px; }
  .news-group-name { font-size: 14px; }
  .news-group-header { margin-bottom: 8px; }
  .news-article-link { font-size: 12px; gap: 6px; }
}

