/* ==========================================================================
   Wargaming Club — Frontend Styles
   Dark fantasy aesthetic, mobile-first
   ========================================================================== */

/* ── Custom Properties ─────────────────────────────────────────────────── */
:root {
  --wgc-bg:         #0f0f13;
  --wgc-bg-card:    #181820;
  --wgc-bg-input:   #12121a;
  --wgc-border:     #2a2a3a;
  --wgc-border-glow:#c0392b;
  --wgc-gold:       #c9a84c;
  --wgc-gold-light: #e8c97a;
  --wgc-red:        #c0392b;
  --wgc-red-dark:   #96220f;
  --wgc-green:      #27ae60;
  --wgc-blue:       #2980b9;
  --wgc-text:       #d0cfe0;
  --wgc-text-muted: #6b6b80;
  --wgc-text-dim:   #4a4a5a;
  --wgc-radius:     6px;
  --wgc-radius-lg:  12px;
  --wgc-shadow:     0 4px 24px rgba(0,0,0,0.6);
  --wgc-font:       'Segoe UI', system-ui, -apple-system, sans-serif;
  --wgc-font-title: 'Cinzel Decorative', 'Palatino Linotype', serif;
  --wgc-transition: 0.2s ease;
}

/* ── Base ──────────────────────────────────────────────────────────────── */
.wgc-wrap * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.wgc-wrap {
  font-family: var(--wgc-font);
  color: var(--wgc-text);
  background: var(--wgc-bg);
  min-height: 100vh;
  padding: 1rem;
  box-sizing: border-box;
  width: 100%;
}

.wgc-wrap a {
  color: var(--wgc-gold);
  text-decoration: none;
  transition: color var(--wgc-transition);
}
.wgc-wrap a:hover { color: var(--wgc-gold-light); }

.wgc-title {
  font-family: var(--wgc-font-title);
  color: var(--wgc-gold);
  font-size: 1.4rem;
  letter-spacing: 0.04em;
  margin-bottom: 1.25rem;
  text-align: center;
}

/* ── Auth Pages ────────────────────────────────────────────────────────── */
.wgc-auth-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.wgc-card {
  background: var(--wgc-bg-card);
  border: 1px solid var(--wgc-border);
  border-radius: var(--wgc-radius-lg);
  padding: 2rem;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--wgc-shadow);
}

/* ── Form Fields ───────────────────────────────────────────────────────── */
.wgc-field {
  margin-bottom: 1rem;
}

.wgc-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--wgc-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.35rem;
}

.wgc-field .req { color: var(--wgc-red); }

.wgc-field input[type="text"],
.wgc-field input[type="email"],
.wgc-field input[type="password"],
.wgc-field input[type="number"],
.wgc-field select,
.wgc-field textarea {
  width: 100%;
  background: var(--wgc-bg-input);
  border: 1px solid var(--wgc-border);
  border-radius: var(--wgc-radius);
  color: var(--wgc-text);
  padding: 0.65rem 0.85rem;
  font-size: 0.95rem;
  font-family: var(--wgc-font);
  transition: border-color var(--wgc-transition), box-shadow var(--wgc-transition);
  appearance: none;
  -webkit-appearance: none;
}

.wgc-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M0 0l6 8 6-8z' fill='%236b6b80'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  padding-right: 2.2rem;
}

.wgc-field input:focus,
.wgc-field select:focus,
.wgc-field textarea:focus {
  outline: none;
  border-color: var(--wgc-gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.15);
}

/* ── Buttons ───────────────────────────────────────────────────────────── */
.wgc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  border-radius: var(--wgc-radius);
  font-size: 0.9rem;
  font-weight: 700;
  font-family: var(--wgc-font);
  cursor: pointer;
  border: none;
  transition: all var(--wgc-transition);
  text-decoration: none;
  line-height: 1;
}

.wgc-btn-primary {
  background: linear-gradient(135deg, var(--wgc-red), var(--wgc-red-dark));
  color: #fff;
  border: 1px solid var(--wgc-red-dark);
}
.wgc-btn-primary:hover {
  background: linear-gradient(135deg, #d44, var(--wgc-red));
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(192,57,43,0.4);
  color: #fff;
}

.wgc-btn-secondary {
  background: transparent;
  color: var(--wgc-gold);
  border: 1px solid var(--wgc-gold);
}
.wgc-btn-secondary:hover {
  background: rgba(201,168,76,0.1);
  color: var(--wgc-gold-light);
}

.wgc-btn-full { width: 100%; }
.wgc-btn-big  { font-size: 1.05rem; padding: 0.9rem 1.4rem; letter-spacing: 0.03em; }

.wgc-link-btn {
  background: none;
  border: none;
  color: var(--wgc-gold);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 0;
  font-family: var(--wgc-font);
}
.wgc-link-btn:hover { color: var(--wgc-gold-light); text-decoration: underline; }

.wgc-icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0.4rem;
  border-radius: var(--wgc-radius);
  color: var(--wgc-text-muted);
  transition: all var(--wgc-transition);
  position: relative;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.wgc-icon-btn:hover { background: var(--wgc-border); color: var(--wgc-text); }

/* ── Spinner ───────────────────────────────────────────────────────────── */
.wgc-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: wgc-spin 0.6s linear infinite;
}
@keyframes wgc-spin { to { transform: rotate(360deg); } }

/* ── Messages ──────────────────────────────────────────────────────────── */
.wgc-msg {
  padding: 0.75rem 1rem;
  border-radius: var(--wgc-radius);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
.wgc-msg.success { background: rgba(39,174,96,0.15); border: 1px solid var(--wgc-green); color: #5dbb85; }
.wgc-msg.error   { background: rgba(192,57,43,0.15); border: 1px solid var(--wgc-red);   color: #e07060; }

.wgc-notice { text-align: center; padding: 1rem; color: var(--wgc-text-muted); }
.wgc-error  { color: var(--wgc-red); }
.wgc-empty  { text-align: center; color: var(--wgc-text-dim); font-style: italic; padding: 1.5rem 0; }

.wgc-auth-footer {
  text-align: center;
  font-size: 0.85rem;
  color: var(--wgc-text-muted);
  margin-top: 1.25rem;
}

/* ── Dashboard ─────────────────────────────────────────────────────────── */
.wgc-dashboard { max-width: 1100px; margin: 0 auto; }
.wgc-page-title { font-size: 1.6rem; font-weight: 700; color: var(--wgc-gold); margin: 0 0 2.5rem 0; letter-spacing: 0.02em; }

/* Top bar */
.wgc-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--wgc-bg-card);
  border-radius: var(--wgc-radius-lg);
  border: 1px solid var(--wgc-border);
  margin-bottom: 1.25rem;
}
.wgc-topbar-right { display: flex; gap: 0.5rem; align-items: center; }
.wgc-nickname { font-weight: 700; font-size: 1rem; color: var(--wgc-gold); margin-right: 0.5rem; }

/* Stats grid */
.wgc-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.wgc-stat-card {
  background: var(--wgc-bg-card);
  border: 1px solid var(--wgc-border);
  border-radius: var(--wgc-radius-lg);
  padding: 1rem 1.25rem;
  text-align: center;
  transition: border-color var(--wgc-transition);
}
.wgc-stat-card:hover { border-color: var(--wgc-gold); }
.wgc-stat-xp { border-color: rgba(201,168,76,0.3); }

.wgc-stat-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--wgc-text-muted); margin-bottom: 0.3rem; }
.wgc-stat-value { font-size: 1.8rem; font-weight: 800; color: var(--wgc-text); line-height: 1; }
.wgc-stat-sub   { font-size: 0.78rem; color: var(--wgc-text-muted); margin-top: 0.3rem; }

.wgc-win  { color: var(--wgc-green); }
.wgc-draw { color: var(--wgc-gold); }
.wgc-loss { color: var(--wgc-red); }

/* XP progress bar */
.wgc-xp-bar {
  height: 6px;
  background: var(--wgc-border);
  border-radius: 3px;
  margin: 0.5rem 0 0.3rem;
  overflow: hidden;
}
.wgc-xp-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--wgc-gold), var(--wgc-gold-light));
  border-radius: 3px;
  transition: width 0.6s ease;
}

/* Tier badge */
.wgc-tier-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.55rem;
  border-radius: 99px;
  border: 1px solid currentColor;
  vertical-align: middle;
}
.wgc-tier-free    { color: #888; border-color: #888; }
.wgc-tier-premium { color: var(--wgc-gold); border-color: var(--wgc-gold); }
.wgc-tier-pro     { color: #a78bfa; border-color: #a78bfa; }

/* Badge (unread count) */
.wgc-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--wgc-red);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 99px;
  min-width: 16px;
  text-align: center;
  line-height: 1.4;
}

/* Main layout */
.wgc-main-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 720px) {
  .wgc-stats-grid { grid-template-columns: repeat(3, 1fr); }
  .wgc-main-layout { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .wgc-stats-grid { grid-template-columns: 1fr 1fr; }
  .wgc-stat-value { font-size: 1.4rem; }
}

/* Section header */
.wgc-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.wgc-section-header h3 {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--wgc-text-muted);
}

/* Feed */
.wgc-feed {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.wgc-feed-item {
  background: var(--wgc-bg-card);
  border: 1px solid var(--wgc-border);
  border-radius: var(--wgc-radius);
  padding: 0.85rem 1rem;
  transition: border-color var(--wgc-transition);
}
.wgc-feed-item.wgc-announcement { border-left: 3px solid #8b5cf6; box-shadow: -2px 0 8px rgba(139,92,246,0.4); }
.wgc-feed-item--submitted  { border-left: 3px solid #5b8dd9; }
.wgc-feed-item--confirmed  { border-left: 3px solid #4caf7d; }
.wgc-feed-item--pending    {
  border-left: 3px solid #e6a817;
  animation: wgc-pending-pulse 1.8s ease-in-out infinite;
}
@keyframes wgc-pending-pulse {
  0%   { border-left-color: #e6a817; box-shadow: -2px 0 8px rgba(230,168,23,0.0); }
  50%  { border-left-color: #ffd54f; box-shadow: -2px 0 10px rgba(230,168,23,0.6); }
  100% { border-left-color: #e6a817; box-shadow: -2px 0 8px rgba(230,168,23,0.0); }
}
.wgc-feed-item--rejected   { border-left: 3px solid #e05252; }

.wgc-feed-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--wgc-text);
  margin-bottom: 0.2rem;
}
.wgc-feed-body  { font-size: 0.82rem; color: var(--wgc-text-muted); line-height: 1.4; }
.wgc-feed-meta  { font-size: 0.72rem; color: var(--wgc-text-dim); margin-top: 0.35rem; }

.wgc-feed-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.wgc-btn-confirm {
  background: rgba(39,174,96,0.15);
  color: var(--wgc-green);
  border: 1px solid var(--wgc-green);
  padding: 0.35rem 0.9rem;
  border-radius: var(--wgc-radius);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--wgc-transition);
  font-family: var(--wgc-font);
}
.wgc-btn-confirm:hover { background: rgba(39,174,96,0.3); }

.wgc-btn-reject {
  background: rgba(192,57,43,0.15);
  color: var(--wgc-red);
  border: 1px solid var(--wgc-red);
  padding: 0.35rem 0.9rem;
  border-radius: var(--wgc-radius);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--wgc-transition);
  font-family: var(--wgc-font);
}
.wgc-btn-reject:hover { background: rgba(192,57,43,0.3); }

.wgc-loading { color: var(--wgc-text-dim); font-style: italic; font-size: 0.85rem; }

/* Recent matches */
.wgc-recent-matches {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.wgc-match-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--wgc-bg-card);
  border: 1px solid var(--wgc-border);
  border-radius: var(--wgc-radius);
  padding: 0.65rem 0.85rem;
}
.wgc-match-row.wgc-status-pending { opacity: 0.75; }

.wgc-match-result-badge {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
  flex-shrink: 0;
}
.wgc-result-win  .wgc-match-result-badge { background: rgba(39,174,96,0.2);  color: var(--wgc-green); border: 1px solid var(--wgc-green); }
.wgc-result-draw .wgc-match-result-badge { background: rgba(201,168,76,0.2); color: var(--wgc-gold);  border: 1px solid var(--wgc-gold); }
.wgc-result-loss .wgc-match-result-badge { background: rgba(192,57,43,0.2);  color: var(--wgc-red);   border: 1px solid var(--wgc-red); }

.wgc-match-info { flex: 1; min-width: 0; }
.wgc-match-opp  { display: block; font-size: 0.88rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wgc-match-meta { display: block; font-size: 0.73rem; color: var(--wgc-text-muted); }

.wgc-match-status {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}
.wgc-status-pending   { color: var(--wgc-gold); }
.wgc-status-confirmed { color: var(--wgc-green); }
.wgc-status-rejected  { color: var(--wgc-red); }

/* ── Modal ─────────────────────────────────────────────────────────────── */
.wgc-modal {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.wgc-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(3px);
}

.wgc-modal-box {
  position: relative;
  background: var(--wgc-bg-card);
  border: 1px solid var(--wgc-border);
  border-radius: var(--wgc-radius-lg);
  padding: 2rem;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--wgc-shadow);
  animation: wgc-modal-in 0.2s ease;
}
@keyframes wgc-modal-in {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}

.wgc-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--wgc-text-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 0.25rem;
  line-height: 1;
  transition: color var(--wgc-transition);
}
.wgc-modal-close:hover { color: var(--wgc-text); }

/* Radio group */
.wgc-radio-group {
  display: flex;
  gap: 0.75rem;
}

.wgc-radio-label {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem;
  border: 1px solid var(--wgc-border);
  border-radius: var(--wgc-radius);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--wgc-transition);
}
.wgc-radio-label input { accent-color: var(--wgc-red); }
.wgc-win-label:has(input:checked)  { background: rgba(39,174,96,0.15);  border-color: var(--wgc-green); color: var(--wgc-green); }
.wgc-draw-label:has(input:checked) { background: rgba(201,168,76,0.15); border-color: var(--wgc-gold);  color: var(--wgc-gold); }
.wgc-loss-label:has(input:checked) { background: rgba(192,57,43,0.15);  border-color: var(--wgc-red);   color: var(--wgc-red); }

/* Score row */
.wgc-score-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.wgc-score-field { margin-bottom: 0; }

/* ── Notification panel ────────────────────────────────────────────────── */
.wgc-notif-panel {
  position: fixed;
  top: 60px;
  right: 1rem;
  width: 340px;
  max-height: 480px;
  overflow-y: auto;
  background: var(--wgc-bg-card);
  border: 1px solid var(--wgc-border);
  border-radius: var(--wgc-radius-lg);
  box-shadow: var(--wgc-shadow);
  z-index: 8000;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  animation: wgc-modal-in 0.15s ease;
}

@media (max-width: 400px) {
  .wgc-notif-panel { width: calc(100vw - 2rem); right: 1rem; }
}

/* ── Tables ────────────────────────────────────────────────────────────── */
.wgc-table-wrap { overflow-x: auto; }

.wgc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.wgc-table th {
  text-align: left;
  padding: 0.6rem 0.85rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--wgc-text-muted);
  border-bottom: 1px solid var(--wgc-border);
  white-space: nowrap;
}
.wgc-table td {
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid rgba(42,42,58,0.5);
  color: var(--wgc-text);
}
.wgc-table tr:last-child td { border-bottom: none; }
.wgc-table tr:hover td { background: rgba(255,255,255,0.02); }

.wgc-result-cell { font-weight: 700; }
.wgc-result-win  .wgc-result-cell { color: var(--wgc-green); }
.wgc-result-draw .wgc-result-cell { color: var(--wgc-gold); }
.wgc-result-loss .wgc-result-cell { color: var(--wgc-red); }

.wgc-elo { font-weight: 700; color: var(--wgc-gold); }
.wgc-rating { font-weight: 700; color: var(--wgc-gold); }

.wgc-status-pill {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.5rem;
  border-radius: 99px;
}
.wgc-status-pending   { background: rgba(201,168,76,0.1); color: var(--wgc-gold); }
.wgc-status-confirmed { background: rgba(39,174,96,0.1);  color: var(--wgc-green); }
.wgc-status-rejected  { background: rgba(192,57,43,0.1);  color: var(--wgc-red); }

/* ── Profile ───────────────────────────────────────────────────────────── */
.wgc-profile-wrap { max-width: 800px; margin: 0 auto; }

.wgc-profile-hero {
  text-align: center;
  padding: 2rem 1rem;
  margin-bottom: 1.5rem;
}
.wgc-profile-name {
  font-family: var(--wgc-font-title);
  color: var(--wgc-gold);
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}
.wgc-profile-club {
  font-size: 0.85rem;
  color: var(--wgc-text-muted);
  margin-top: 0.5rem;
}

.wgc-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--wgc-text-muted);
  margin: 1.75rem 0 0.75rem;
  border-bottom: 1px solid var(--wgc-border);
  padding-bottom: 0.4rem;
}

/* ── Leaderboard ───────────────────────────────────────────────────────── */
.wgc-leaderboard-wrap { max-width: 800px; margin: 0 auto; }

.wgc-lb-filters {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.wgc-inline-field { display: flex; align-items: center; gap: 0.5rem; }
.wgc-inline-field label { font-size: 0.78rem; color: var(--wgc-text-muted); white-space: nowrap; margin: 0; }
.wgc-inline-field select { width: auto; }

.wgc-lb-table .wgc-top-1 td { color: #ffd700; font-weight: 700; }
.wgc-lb-table .wgc-top-2 td { color: #c0c0c0; }
.wgc-lb-table .wgc-top-3 td { color: #cd7f32; }

/* ── Autocomplete ──────────────────────────────────────────────────── */
.wgc-autocomplete-wrap { position: relative; }

.wgc-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--wgc-bg-card);
  border: 1px solid var(--wgc-border);
  border-top: none;
  border-radius: 0 0 var(--wgc-radius) var(--wgc-radius);
  z-index: 1000;
  max-height: 200px;
  overflow-y: auto;
  box-shadow: var(--wgc-shadow);
}

.wgc-suggestion-item {
  padding: 0.65rem 0.85rem;
  font-size: 0.9rem;
  cursor: pointer;
  color: var(--wgc-text);
  transition: background var(--wgc-transition);
}
.wgc-suggestion-item:hover { background: rgba(255,255,255,0.05); }
.wgc-suggestion-empty { color: var(--wgc-text-dim); cursor: default; font-style: italic; }

/* ── Global Sticky Header ──────────────────────────────────────────── */
.wgc-global-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: var(--wgc-bg-card);
  border-bottom: 1px solid var(--wgc-border);
  padding: 0.6rem 1.5rem;
}
.wgc-global-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.wgc-global-nick {
  font-weight: 700;
  font-size: 1rem;
  color: var(--wgc-gold);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color var(--wgc-transition);
}
.wgc-global-nick:hover { color: var(--wgc-gold-light); }
.wgc-global-actions { display: flex; gap: 0.5rem; align-items: center; }

/* Poenoti max-width na vseh straneh */
.wgc-leaderboard-wrap,
.wgc-profile-wrap,
.wgc-games-wrap {
  max-width: 1100px;
  margin: 0 auto;
}

/* ── Header nav (text buttons) ─────────────────────────────────────── */
.wgc-header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.wgc-header-logo img {
  height: 32px;
  width: auto;
  display: block;
  opacity: 0.9;
  transition: opacity var(--wgc-transition);
}
.wgc-header-logo:hover img { opacity: 1; }

.wgc-header-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.wgc-nav-btn {
  background: none;
  border: none;
  color: var(--wgc-text-muted);
  padding: 0.35rem 0.85rem;
  border-radius: var(--wgc-radius);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--wgc-font);
  text-decoration: none;
  transition: all var(--wgc-transition);
  display: inline-flex;
  align-items: center;
}
.wgc-nav-btn:hover {
  color: var(--wgc-gold);
  background: rgba(201,168,76,0.06);
}
.wgc-nav-logout:hover {
  color: var(--wgc-red);
  background: rgba(192,57,43,0.06);
}
.wgc-nav-notif {
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.35rem 0.5rem;
  position: relative;
  color: var(--wgc-text-muted);
  transition: color var(--wgc-transition);
}
.wgc-nav-notif:hover { color: var(--wgc-gold); }

/* ── Hamburger ─────────────────────────────────────────────────────── */
.wgc-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
}
.wgc-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--wgc-text-muted);
  border-radius: 2px;
  transition: all 0.2s;
}
.wgc-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.wgc-hamburger.open span:nth-child(2) { opacity: 0; }
.wgc-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile nav ────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .wgc-hamburger { display: flex; }

  .wgc-header-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--wgc-bg-card);
    border-bottom: 1px solid var(--wgc-border);
    flex-direction: column;
    padding: 0.75rem 1rem;
    gap: 0.5rem;
    z-index: 499;
  }
  .wgc-header-nav.open { display: flex; }
  .wgc-nav-btn { width: 100%; justify-content: center; }

  /* Mobile: log match before feed */
  .wgc-log-match-desktop { display: none; }
  .wgc-log-match-top { display: flex; margin-bottom: 1rem; }
}

@media (min-width: 641px) {
  .wgc-log-match-top { display: none; }
  .wgc-log-match-desktop { display: flex; }
}

/* ── Match detail modal ────────────────────────────────────────────── */
.wgc-match-detail-row {
  display: flex;
  justify-content: space-between;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(42,42,58,0.5);
  font-size: 0.88rem;
}
.wgc-match-detail-row:last-child { border-bottom: none; }
.wgc-match-detail-label { color: var(--wgc-text-muted); }
.wgc-match-detail-value { font-weight: 600; color: var(--wgc-text); }

/* ── Log Match as stat card ────────────────────────────────────────── */
.wgc-stat-card-btn {
  background: linear-gradient(135deg, var(--wgc-red), var(--wgc-red-dark)) !important;
  border-color: var(--wgc-red-dark) !important;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all var(--wgc-transition);
  user-select: none;
}
.wgc-stat-card-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(192,57,43,0.4);
  border-color: var(--wgc-red) !important;
}
.wgc-log-match-icon { font-size: 1.6rem; }
.wgc-log-match-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.03em;
}

/* ── Merged matches + WDL card ─────────────────────────────────────── */
.wgc-stat-wdl {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  margin-top: 0.5rem;
}
.wgc-wdl-sep { color: var(--wgc-text-dim); font-weight: 400; }

/* ── H2H grid ──────────────────────────────────────────────────────── */
.wgc-h2h-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}
.wgc-h2h-card {
  background: var(--wgc-bg-card);
  border: 1px solid var(--wgc-border);
  border-radius: var(--wgc-radius-lg);
  padding: 1rem;
  text-align: center;
}
.wgc-h2h-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--wgc-text-muted); margin-bottom: 0.5rem; }
.wgc-h2h-nick  { font-size: 1rem; font-weight: 700; color: var(--wgc-gold); margin-bottom: 0.25rem; }
.wgc-h2h-count { font-size: 0.78rem; color: var(--wgc-text-muted); }

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

/* ── Per-game stats grid ───────────────────────────────────────────── */
.wgc-per-game-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

/* ── Game tabs (profile + log-match) ──────────────────────────────── */
.wgc-game-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.wgc-game-tab {
  background: var(--wgc-bg-card);
  border: 1px solid var(--wgc-border);
  color: var(--wgc-text-muted);
  padding: 0.4rem 1rem;
  border-radius: 99px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--wgc-font);
  text-decoration: none;
  transition: all var(--wgc-transition);
}
.wgc-game-tab:hover,
.wgc-game-tab.active,
.wgc-game-tab.selected {
  background: rgba(201,168,76,0.15);
  border-color: var(--wgc-gold);
  color: var(--wgc-gold);
}
.wgc-game-tab-more {
  border-style: dashed;
  color: var(--wgc-text-dim);
}

/* ── Form card (log-match, settings page) ─────────────────────────── */
.wgc-form-card {
  background: var(--wgc-bg-card);
  border: 1px solid var(--wgc-border);
  border-radius: var(--wgc-radius-lg);
  padding: 2rem;
  max-width: 600px;
  margin: 0 auto;
}
.wgc-log-match-wrap,
.wgc-settings-wrap {
  max-width: 700px;
  margin: 0 auto;
}

/* ── Password strength ─────────────────────────────────────────────── */
.wgc-password-strength { margin-top: 0.5rem; }
.wgc-password-bar {
  height: 4px;
  background: var(--wgc-border);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 0.25rem;
}
.wgc-password-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s, background 0.3s;
  width: 0%;
}
.wgc-password-label { font-size: 0.72rem; color: var(--wgc-text-muted); }

/* ── Field hint ────────────────────────────────────────────────────── */
.wgc-field-hint {
  display: block;
  font-size: 0.72rem;
  color: var(--wgc-text-dim);
  margin-top: 0.25rem;
}

/* ── Pagination ────────────────────────────────────────────────────── */
.wgc-pagination {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 2rem;
  flex-wrap: wrap;
}
.wgc-page-btn {
  background: var(--wgc-bg-card);
  border: 1px solid var(--wgc-border);
  color: var(--wgc-text-muted);
  padding: 0.4rem 0.85rem;
  border-radius: var(--wgc-radius);
  font-size: 0.85rem;
  text-decoration: none;
  transition: all var(--wgc-transition);
}
.wgc-page-btn:hover,
.wgc-page-btn.active {
  border-color: var(--wgc-gold);
  color: var(--wgc-gold);
  background: rgba(201,168,76,0.08);
}

/* ── Notifications / Match History pages ──────────────────────────── */
.wgc-notifications-wrap,
.wgc-match-history-wrap {
  max-width: 900px;
  margin: 0 auto;
}

/* ── Match History desktop/mobile ─────────────────────────────────── */
.wgc-history-desktop { display: block; }
.wgc-history-mobile  { display: none; }

@media (max-width: 640px) {
  .wgc-history-desktop { display: none; }
  .wgc-history-mobile  { display: block; }
}

.wgc-btn-small {
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  border-radius: var(--wgc-radius);
  background: rgba(201,168,76,0.1);
  border: 1px solid var(--wgc-gold);
  color: var(--wgc-gold);
  cursor: pointer;
  font-family: var(--wgc-font);
  transition: all var(--wgc-transition);
}
.wgc-btn-small:hover {
  background: rgba(201,168,76,0.25);
}

/* ── Field Reports ─────────────────────────────────────────────────── */
.wgc-field-reports-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}
@media (max-width: 900px) { .wgc-field-reports-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .wgc-field-reports-grid { grid-template-columns: 1fr; } }

.wgc-field-report-card {
  background: var(--wgc-bg-card);
  border: 1px solid var(--wgc-border);
  border-radius: var(--wgc-radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.wgc-field-report-title {
  font-family: var(--wgc-font-display);
  font-size: 1rem;
  color: var(--wgc-gold);
  font-weight: 700;
  border-bottom: 1px solid var(--wgc-border);
  padding-bottom: 0.5rem;
}
.wgc-field-report-stats { display: flex; flex-direction: column; gap: 0.4rem; }
.wgc-fr-row { display: flex; justify-content: space-between; align-items: center; font-size: 0.82rem; }
.wgc-fr-label { color: var(--wgc-text-muted); }
.wgc-fr-value { font-weight: 600; color: var(--wgc-text); }
.wgc-field-report-rivals {
  border-top: 1px solid var(--wgc-border);
  padding-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.wgc-fr-rival { display: flex; justify-content: space-between; font-size: 0.78rem; }
.wgc-fr-rival-label { color: var(--wgc-text-muted); }
.wgc-fr-rival-nick { color: var(--wgc-gold); font-weight: 600; }

/* ── Tooltips ──────────────────────────────────────────────────────── */
.wgc-tooltip-wrap {
  position: relative;
  display: inline-block;
  margin-left: 0.3rem;
  cursor: pointer;
}
.wgc-tooltip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  background: var(--wgc-border);
  color: var(--wgc-text-muted);
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1;
}
.wgc-tooltip-text {
  display: none;
  position: absolute;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--wgc-bg-elevated);
  border: 1px solid var(--wgc-border);
  color: var(--wgc-text);
  font-size: 0.72rem;
  padding: 0.4rem 0.65rem;
  border-radius: var(--wgc-radius);
  white-space: nowrap;
  z-index: 100;
  pointer-events: none;
}
.wgc-tooltip-wrap:hover .wgc-tooltip-text,
.wgc-tooltip-wrap.active .wgc-tooltip-text { display: block; }

/* ── Hall of Rivals colored cards ─────────────────────────────────── */
.wgc-h2h-card.wgc-rival  { border-color: rgba(230,126,34,0.5);  background: rgba(230,126,34,0.06); }
.wgc-h2h-card.wgc-nemesis { border-color: rgba(192,57,43,0.5);   background: rgba(192,57,43,0.06); }
.wgc-h2h-card.wgc-victim  { border-color: rgba(39,174,96,0.5);   background: rgba(39,174,96,0.06); }

.wgc-novice { min-height: auto; width: 100%; box-sizing: border-box; }
.wgc-news-list { list-style: none; margin: 0; padding: 0; }
.wgc-news-item { border-bottom: 1px solid var(--wgc-border); }
.wgc-news-item:last-child { border-bottom: none; }
.wgc-news-trigger {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 0.9rem 0.25rem;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  gap: 1rem;
  text-decoration: none;
  transition: background 0.15s;
}
.wgc-news-trigger:hover { background: var(--wgc-bg-elevated); border-radius: var(--wgc-radius); }

/* Single news article */
.wgc-novica-single { max-width: 720px; margin: 0 auto; padding: 2rem 0; }
.wgc-novica-back { margin-bottom: 1.5rem; }
.wgc-novica-back a { color: var(--wgc-gold); font-size: 0.9rem; text-decoration: none; }
.wgc-novica-back a:hover { color: var(--wgc-gold-light); }
.wgc-novica-photo { margin-bottom: 1.5rem; }
.wgc-novica-photo img { width: 100%; max-height: 420px; object-fit: cover; border-radius: var(--wgc-radius); }
.wgc-novica-meta { font-size: 0.8rem; color: var(--wgc-text-muted); margin-bottom: 0.5rem; }
.wgc-novica-title { font-size: 1.8rem; font-weight: 700; color: #e34436; margin: 0 0 1.5rem 0; line-height: 1.3; }
.wgc-novica-content { font-size: 1rem; line-height: 1.8; color: var(--wgc-text); }
.wgc-news-title { color: var(--wgc-text); font-size: 0.95rem; font-weight: 500; }
.wgc-news-date  { color: var(--wgc-text-muted); font-size: 0.8rem; white-space: nowrap; }

/* Overlay */
.wgc-news-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
}
.wgc-news-popup {
  background: var(--wgc-bg-card);
  border: 1px solid var(--wgc-border);
  border-radius: var(--wgc-radius);
  max-width: 620px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  position: relative;
}
.wgc-news-close {
  position: absolute; top: 1rem; right: 1rem;
  background: none; border: none;
  color: var(--wgc-text-muted); font-size: 1.5rem;
  cursor: pointer; line-height: 1;
}
.wgc-news-close:hover { color: var(--wgc-text); }
.wgc-news-popup-photo img {
  width: 100%; max-height: 280px;
  object-fit: cover;
  border-radius: var(--wgc-radius);
  margin-bottom: 1.25rem;
}
.wgc-news-popup-title {
  font-size: 1.25rem; font-weight: 700;
  color: var(--wgc-gold);
  margin: 0 0 1rem 0;
}
.wgc-news-popup-content {
  color: var(--wgc-text);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ── Novica single — others section ───────────────────────────────── */
.wgc-novica-others { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--wgc-border); }
.wgc-novica-others-title { font-size: 1rem; font-weight: 600; color: var(--wgc-text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin: 0 0 1rem 0; }

/* ── Leaderboard embed (shortcode) ────────────────────────────────── */
.wgc-lb-embed { width: 100%; }
.wgc-lb-embed-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.wgc-lb-embed-table th { text-align: left; padding: 0.5rem 0.75rem; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: #888; border-bottom: 1px solid #333; }
.wgc-lb-embed-table td { padding: 0.6rem 0.75rem; border-bottom: 1px solid #222; color: #ddd; }
.wgc-lb-embed-table tr:last-child td { border-bottom: none; }
.wgc-lb-embed-table a { color: #ddd; text-decoration: none; }
.wgc-lb-embed-table a:hover { color: #c9a84c; }
.wgc-lb-embed-table .wgc-rating { font-weight: 600; color: #c9a84c; }
.wgc-lb-embed-table .wgc-top-1 td { color: #fff; }
.wgc-lb-embed-table .wgc-top-2 td { color: #eee; }
.wgc-lb-embed-table .wgc-top-3 td { color: #ddd; }

/* ── Dashboard hero greeting ──────────────────────────────────────── */
.wgc-dashboard-hero { margin-bottom: 1.5rem; margin-top: 0; }
.wgc-dashboard-greeting { font-size: 1.1rem; font-weight: 500; color: var(--wgc-text); margin: 0.25rem 0 0.1rem 0; }
.wgc-dashboard-tagline { font-size: 0.9rem; color: var(--wgc-text-muted); margin: 0; }

/* ── Feed scroll ──────────────────────────────────────────────────── */
.wgc-feed-scroll { max-height: none; overflow-y: visible; }

/* ── Dashboard news section ───────────────────────────────────────── */
.wgc-dashboard-news { margin-top: 0.5rem; }
.wgc-dashboard-news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
  padding: 0.75rem 0;
}
.wgc-dashboard-news-item {
  position: relative;
  background: #c9a84c;
  padding: 1.5rem 1rem 1rem 1rem;
  cursor: pointer;
  border-radius: 2px;
  box-shadow: 2px 4px 12px rgba(0,0,0,0.45), 0 1px 2px rgba(0,0,0,0.3);
  transition: transform 0.15s, box-shadow 0.15s;
  min-height: 110px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.wgc-dashboard-news-item:nth-child(odd)  { transform: rotate(-1.5deg); }
.wgc-dashboard-news-item:nth-child(even) { transform: rotate(1.2deg); }
.wgc-dashboard-news-item:nth-child(3n)   { transform: rotate(-0.6deg); }
.wgc-dashboard-news-item:hover { transform: rotate(0deg) scale(1.04); box-shadow: 3px 6px 18px rgba(0,0,0,0.55); z-index: 2; }
.wgc-dashboard-news-item::before {
  content: '';
  position: absolute;
  top: -8px; left: 50%; transform: translateX(-50%);
  width: 13px; height: 13px;
  background: #8a6d20;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0,0,0,0.6);
  z-index: 1;
}
.wgc-dashboard-news-title {
  font-family: 'Patrick Hand', 'Segoe Print', cursive;
  font-size: 1.05rem;
  color: #1a1100;
  font-weight: 600;
  line-height: 1.45;
  flex: 1;
}
.wgc-dashboard-news-date { font-size: 0.7rem; color: rgba(0,0,0,0.45); margin-top: 0.6rem; font-family: sans-serif; }
.wgc-dash-news-meta { font-size: 0.8rem; color: var(--wgc-text-muted); margin-bottom: 0.5rem; }
.wgc-dashboard-news-item .wgc-news-note-img-wrap { margin: 0 0 0.8rem 0; border-radius: 4px; overflow: hidden; }
.wgc-dashboard-news-item .wgc-news-note-img { width: 100%; height: 110px; object-fit: cover; display: block; border-radius: 4px; }

/* ── Feed collapse/expand ─────────────────────────────────────────── */
.wgc-feed-toggle { cursor: pointer; display: flex; justify-content: space-between; align-items: center; user-select: none; }
.wgc-feed-chevron { font-size: 1.2rem; color: var(--wgc-text-muted); transition: transform 0.2s; margin-left: 0.5rem; flex-shrink: 0; }
.wgc-feed-open .wgc-feed-chevron { transform: rotate(90deg); }
.wgc-feed-expandable { display: none; margin-top: 0.5rem; }
.wgc-feed-open .wgc-feed-expandable { display: block; }

/* ── Quest widget (dashboard) ─────────────────────────────────────── */
.wgc-quest-widget { margin-top: 2rem; background: var(--wgc-bg-card); border: 1px solid var(--wgc-border); border-radius: var(--wgc-radius); padding: 1.25rem; }
.wgc-quest-critmaster { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1.25rem; }
.wgc-critmaster-avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 2px solid var(--wgc-gold); }
.wgc-critmaster-avatar--lg { width: 72px; height: 72px; }
.wgc-critmaster-bubble {
  background: var(--wgc-bg-elevated);
  border: 1px solid var(--wgc-border);
  border-radius: 12px;
  border-bottom-left-radius: 4px;
  padding: 0.75rem 1rem;
  position: relative;
  flex: 1;
}
.wgc-critmaster-bubble::before {
  content: '';
  position: absolute;
  left: -10px; bottom: 14px;
  border: 6px solid transparent;
  border-right-color: var(--wgc-border);
}
.wgc-critmaster-bubble::after {
  content: '';
  position: absolute;
  left: -8px; bottom: 15px;
  border: 5px solid transparent;
  border-right-color: var(--wgc-bg-elevated);
}
.wgc-critmaster-name { font-size: 0.75rem; font-weight: 600; color: var(--wgc-gold); display: block; margin-bottom: 2px; }
.wgc-critmaster-bubble p { margin: 0; font-size: 0.88rem; color: var(--wgc-text); font-style: italic; }
.wgc-quest-body { }
.wgc-quest-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.wgc-quest-label { font-size: 0.75rem; font-weight: 600; color: var(--wgc-gold); text-transform: uppercase; letter-spacing: 0.06em; }
.wgc-quest-reward-badge { font-size: 0.75rem; font-weight: 600; color: #46b450; background: rgba(70,180,80,0.12); padding: 2px 8px; border-radius: 10px; }
.wgc-quest-title { font-size: 1.05rem; font-weight: 600; color: var(--wgc-text); margin-bottom: 0.25rem; }
.wgc-quest-desc { font-size: 0.85rem; color: var(--wgc-text-muted); margin-bottom: 0.75rem; }
.wgc-quest-progress-wrap { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.5rem; }
.wgc-quest-progress-bar { flex: 1; height: 8px; background: var(--wgc-bg-elevated); border-radius: 4px; overflow: hidden; border: 1px solid rgba(255,255,255,0.06); }
.wgc-quest-progress-fill { height: 100%; background: linear-gradient(90deg, var(--wgc-gold), #e8c97a); border-radius: 4px; transition: width 0.4s ease; }
.wgc-quest-progress-text { font-size: 0.8rem; color: var(--wgc-text-muted); white-space: nowrap; }
.wgc-quest-reward { font-size: 0.8rem; color: #46b450; }

/* ── Quests page ──────────────────────────────────────────────────── */
.wgc-quests-page { max-width: 700px; }
.wgc-quest-active-card { background: var(--wgc-bg-card); border: 1px solid var(--wgc-gold); border-radius: var(--wgc-radius); padding: 1.5rem; margin-bottom: 2rem; }
.wgc-quest-empty { text-align: center; padding: 2rem; color: var(--wgc-text-muted); }
.wgc-quest-empty img { width: 72px; margin-bottom: 1rem; border-radius: 50%; }
.wgc-quest-history { margin-top: 1rem; }
.wgc-section-title { font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--wgc-text-muted); margin-bottom: 0.75rem; }
.wgc-quest-history-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 0; border-bottom: 1px solid var(--wgc-border); }
.wgc-quest-history-item:last-child { border-bottom: none; }
.wgc-quest-history-icon { color: #46b450; font-size: 1rem; flex-shrink: 0; }
.wgc-quest-history-info { flex: 1; }
.wgc-quest-history-title { display: block; font-size: 0.9rem; color: var(--wgc-text); }
.wgc-quest-history-meta { font-size: 0.75rem; color: var(--wgc-text-muted); }
.wgc-quest-history-xp { font-size: 0.85rem; font-weight: 600; color: var(--wgc-gold); white-space: nowrap; }

/* ── Quest countdown ──────────────────────────────────────────────── */
.wgc-quest-countdown { font-size: 0.8rem; color: #e6a817; margin-bottom: 0.35rem; }

/* Select2 dark theme override */
.select2-container--default .select2-selection--single {
  background-color: var(--wgc-input-bg, #1a1a2e);
  border: 1px solid var(--wgc-border, #2a2a4a);
  border-radius: 8px;
  height: 48px;
  line-height: 48px;
  color: var(--wgc-text, #e0e0e0);
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
  color: var(--wgc-text, #e0e0e0);
  line-height: 46px;
  padding-left: 14px;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 46px;
}
.select2-dropdown {
  background-color: var(--wgc-card-bg, #12122a);
  border: 1px solid var(--wgc-border, #2a2a4a);
  border-radius: 8px;
  color: var(--wgc-text, #e0e0e0);
}
.select2-container--default .select2-results__option {
  padding: 8px 14px;
  color: var(--wgc-text, #e0e0e0);
}
.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background-color: var(--wgc-accent, #c9a84c);
  color: #000;
}
.select2-search--dropdown .select2-search__field {
  background-color: var(--wgc-input-bg, #1a1a2e);
  border: 1px solid var(--wgc-border, #2a2a4a);
  color: var(--wgc-text, #e0e0e0);
  border-radius: 6px;
  padding: 6px 10px;
}
.select2-container { width: 100% !important; }

/* ── Games List Page ─────────────────────────────────────────────────────── */
.wgc-games-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  margin-top: 1.5rem;
}
.wgc-game-card {
  width: calc(33.333% - 0.8rem);
  min-width: 180px;
  background: var(--wgc-card-bg);
  border: 1px solid var(--wgc-border);
  border-radius: var(--wgc-radius);
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  display: block;
}
.wgc-game-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
  border-color: var(--wgc-gold);
}
.wgc-game-card-img {
  height: 140px;
  background-size: cover;
  background-position: center;
  background-color: var(--wgc-bg-elevated);
}
.wgc-game-card-img--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}
.wgc-game-card-body {
  padding: 0.9rem 1rem;
}
.wgc-game-card-name {
  display: block;
  color: var(--wgc-gold);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}
.wgc-game-card-publisher {
  display: block;
  color: var(--wgc-text-muted);
  font-size: 0.8rem;
}
@media(max-width:768px){ .wgc-game-card{width:calc(50% - 0.6rem);} }
@media(max-width:480px){ .wgc-game-card{width:100%;} }

/* ── Game Single Page ────────────────────────────────────────────────────── */
.wgc-game-hero {
  height: 220px;
  background-size: cover;
  background-position: center;
  border-radius: var(--wgc-radius);
  margin-bottom: 1.5rem;
}
.wgc-game-info-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  margin-bottom: 2rem;
}
.wgc-game-info-grid .wgc-card {
  flex: 1;
  min-width: 220px;
}
.wgc-game-match-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--wgc-border);
  font-size: 0.9rem;
}
.wgc-game-match-row:last-child { border-bottom: none; }
.wgc-game-match-players { color: var(--wgc-text); font-weight: 500; }
.wgc-game-match-date { color: var(--wgc-text-muted); font-size: 0.8rem; }
.wgc-game-matches { margin-bottom: 2rem; }

/* News notes on game page */
.wgc-news-notes-grid { display:flex; flex-wrap:wrap; gap:1.5rem; padding:1rem 0; }
.wgc-news-note-wrap { position:relative; width:calc(33.333% - 1rem); min-width:180px; padding-top:12px; }
.wgc-news-note-pin {
  position:absolute; top:0; left:50%; transform:translateX(-50%);
  width:16px; height:16px;
  background:radial-gradient(circle at 40% 35%,#aaa,#555);
  border-radius:50%; box-shadow:0 2px 5px rgba(0,0,0,0.5); z-index:2;
}
.wgc-news-note {
  background:linear-gradient(145deg,#e0b84a,#c9a030);
  border-radius:6px; padding:1rem; display:flex; flex-direction:column;
  box-shadow:3px 4px 12px rgba(0,0,0,0.3); text-decoration:none;
  font-family:'Patrick Hand',cursive; transition:transform 0.2s;
}
.wgc-news-note:hover { transform:translateY(-3px); }
.wgc-news-note-img-wrap { width:100%; border-radius:4px; overflow:hidden; margin-bottom:0.7rem; }
.wgc-news-note-img { width:100%; height:110px; object-fit:cover; display:block; }
.wgc-news-note-title { color:#2a1a00; font-size:0.95rem; font-weight:600; line-height:1.4; margin-bottom:0.4rem; }
.wgc-news-note-date { color:#5a3d00; font-size:0.78rem; opacity:0.8; }
@media(max-width:768px){ .wgc-news-note-wrap{width:calc(50% - 0.75rem);} }
@media(max-width:480px){ .wgc-news-note-wrap{width:100%;} }

/* ── Game Single - Card color variants ───────────────────────────── */
.wgc-card--teal  { border-left: 3px solid #2dd4bf; }
.wgc-card--purple{ border-left: 3px solid #a78bfa; }
.wgc-card--gold  { border-left: 3px solid var(--wgc-gold); }

/* ── Game Single - Bottom grid ───────────────────────────────────── */
.wgc-games-wrap .wgc-game-bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
}
.wgc-game-bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
}
.wgc-game-bottom-left,
.wgc-game-bottom-middle,
.wgc-game-bottom-right {}

/* Leaderboard table */
.wgc-leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-top: 0.5rem;
}
.wgc-leaderboard-table th {
  text-align: left;
  color: var(--wgc-text-muted);
  font-weight: 600;
  padding: 0.4rem 0.5rem;
  border-bottom: 2px solid rgba(255,255,255,0.12);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.wgc-leaderboard-table th.wgc-lb-num { text-align: center; }
.wgc-leaderboard-table td {
  padding: 0.5rem 0.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  color: var(--wgc-text);
  text-align: left;
}
.wgc-leaderboard-table td.wgc-lb-num { text-align: center; color: var(--wgc-text-muted); }
.wgc-leaderboard-table tr:last-child td { border-bottom: none; }
.wgc-leaderboard-table tr:hover td { background: rgba(255,255,255,0.03); }
.wgc-leaderboard-table .wgc-lb-rank {
  color: var(--wgc-text-muted);
  font-weight: 700;
  width: 28px;
}
.wgc-leaderboard-table .wgc-lb-rank-1 { color: #f59e0b; }
.wgc-leaderboard-table .wgc-lb-rank-2 { color: #94a3b8; }
.wgc-leaderboard-table .wgc-lb-rank-3 { color: #cd7c3a; }
.wgc-leaderboard-table .wgc-lb-nick { font-weight: 600; }

/* 4-col news grid for game page */
.wgc-news-notes-grid--4col {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.wgc-news-notes-grid--4col .wgc-news-note-wrap {
  width: calc(25% - 1.125rem);
}

.wgc-news-notes-grid--2col .wgc-news-note-wrap {
  width: calc(50% - 0.75rem);
}
.wgc-news-notes-grid--2col {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.wgc-news-notes-grid--1col .wgc-news-note-wrap {
  width: 100%;
}
.wgc-news-notes-grid--1col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media(max-width:768px) {
  .wgc-games-wrap .wgc-game-bottom-grid,
  .wgc-game-bottom-grid { grid-template-columns: 1fr !important; }
  .wgc-news-notes-grid--4col .wgc-news-note-wrap { width: 100%; }
  .wgc-news-notes-grid--2col .wgc-news-note-wrap { width: 100%; }
}
