:root {
  --bg: #050505;
  --panel: #0f0f12;
  --card: #16161c;
  --text: #e8e8ee;
  --muted: #9ca0ac;
  --accent: #e53935;
  --accent-2: #444cf7;
  --border: #1f1f27;
  --success: #2ecc71;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

.hero {
  padding: 5px 56px 40px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  background: radial-gradient(ellipse at 20% 20%,
      rgba(229, 57, 53, 0.16),
      transparent 40%),
    radial-gradient(ellipse at 80% 10%, rgba(68, 76, 247, 0.2), transparent 35%),
    #050505;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: sticky;
  top: 0;
  background: rgba(5, 5, 5, 0.75);
  backdrop-filter: blur(8px);
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 5px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo-img {
  height: 40px;
  width: auto;
  object-fit: contain;
  display: block;
}

.brand-logo {
  font-size: 18px;
}

.brand-z {
  color: var(--accent);
}

.brand-sub {
  color: var(--muted);
  font-size: 13px;
}

.nav-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.nav-links a {
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--muted);
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-info-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card);
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
}

.user-name {
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-weight: 600;
}

.user-chip img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.btn {
  border: none;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s,
    color 0.2s;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--border);
}

.btn.primary {
  background: var(--accent);
  border-color: #b72d2b;
  color: #fff;
  box-shadow: 0 8px 30px rgba(229, 57, 53, 0.25);
}

.btn.secondary {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn.ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.hidden {
  display: none !important;
}

.hero-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  margin-top: 0;
  align-items: center;
  padding-top: 0;
}

.hero-text h1 {
  font-size: clamp(32px, 5vw, 52px);
  margin: 0 0 12px;
  line-height: 1.1;
}

.hero-text p {
  max-width: 600px;
  color: var(--muted);
  margin-bottom: 20px;
}

.hero-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-visual {
  position: relative;
  height: 360px;
  background: linear-gradient(145deg,
      rgba(229, 57, 53, 0.15),
      rgba(68, 76, 247, 0.18));
  border-radius: 20px;
  border: 1px solid var(--border);
  overflow: hidden;
}

.hand {
  position: absolute;
  inset: 0;
  /* Imagen removida - ya no está disponible en Imgur */
  mix-blend-mode: screen;
  opacity: 0.9;
  background: linear-gradient(135deg,
      rgba(229, 57, 53, 0.3),
      rgba(68, 76, 247, 0.3));
}

main {
  padding: 0 56px 80px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  max-width: 1400px;
  margin: 0 auto;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 16px 60px rgba(0, 0, 0, 0.35);
}

.panel-header h2 {
  margin: 0 0 6px;
}

.panel-header p {
  margin: 0 0 16px;
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 14px;
  border-radius: 12px;
  color: var(--text);
}

.bullet-list {
  list-style: disc;
  padding-left: 20px;
  color: var(--muted);
}

.rules-panel {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.rules-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rules-tag {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.rules-header h1 {
  margin: 0;
  font-size: clamp(32px, 4vw, 46px);
}

.rules-intro {
  margin: 0 auto;
  max-width: 640px;
  color: var(--muted);
}

.rules-lang-selector {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rules-lang-label {
  font-weight: 600;
  color: var(--muted);
}

.rules-lang-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.rule-lang-btn {
  background: var(--card);
  border: 1px solid var(--border);
}

.rule-lang-btn.active {
  background: var(--accent);
  border-color: #b72d2b;
}

.rules-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.rules-list {
  margin: 0;
  padding-left: 22px;
  color: var(--text);
}

.rules-list li {
  margin-bottom: 10px;
}

.rules-item {
  list-style: none;
  padding: 18px;
  margin-bottom: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.rules-item-title {
  margin: 0 0 8px;
  font-size: 18px;
}

.bans-main {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.bans-search-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.bans-subtitle {
  color: var(--muted);
  margin: 0;
}

.bans-search-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ban-search-visual {
  position: relative;
  width: min(720px, 100%);
  margin: 0 auto;
}

.ban-search-grid {
  position: absolute;
  inset: -30px;
  background-image: linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 24px 24px;
  filter: blur(1px);
  z-index: 0;
}

.ban-search-glow,
.ban-search-border {
  position: absolute;
  inset: -10px;
  border-radius: 16px;
  z-index: 1;
}

.ban-search-glow {
  background: radial-gradient(circle at 10% 30%, rgba(255, 77, 196, 0.35), transparent 55%),
    radial-gradient(circle at 90% 70%, rgba(86, 155, 255, 0.35), transparent 50%);
  filter: blur(30px);
}

.ban-search-border {
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.ban-search-main {
  position: relative;
  display: flex;
  align-items: center;
  background: #050505;
  border-radius: 14px;
  padding: 12px 12px 12px 56px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 3;
  overflow: hidden;
}

.ban-search-icon {
  position: absolute;
  left: 18px;
  color: rgba(255, 255, 255, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ban-search-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 18px;
  outline: none;
}

.ban-search-input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.ban-search-button {
  background: linear-gradient(120deg, #ff5ec3, #5b6bff);
  border: none;
  color: #fff;
  font-weight: 600;
  border-radius: 12px;
  padding: 12px 28px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ban-search-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(91, 107, 255, 0.35);
}

.bans-meta {
  color: var(--muted);
  font-size: 14px;
}

.bans-results-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.bans-loading {
  color: var(--muted);
}

.bans-results {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ban-card {
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(68, 76, 247, 0.15), rgba(229, 57, 53, 0.15));
  overflow: hidden;
}

.ban-card-name {
  padding: 12px 18px;
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  font-weight: 600;
}

.ban-card-name .label {
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.ban-card-body {
  padding: 18px;
  background: rgba(5, 5, 5, 0.6);
}

.ban-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.ban-grid-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.ban-grid-item .label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ban-description-text {
  margin: 16px 0 0;
  color: var(--muted);
}

.badge {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.badge-permanent {
  background: rgba(229, 57, 53, 0.15);
  color: #ff8a80;
}

.badge-temporary {
  background: rgba(255, 193, 7, 0.15);
  color: #ffd54f;
}

.related-account-list {
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
}

.rules-item-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
}

.rules-item-body p {
  margin: 0;
}

.rules-note {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.accordion details {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 10px;
}

.accordion summary {
  cursor: pointer;
  font-weight: 700;
}

.report-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 10px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

label {
  font-weight: 700;
}

input[type="text"],
input[type="file"],
textarea {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  color: var(--text);
  font-size: 14px;
}

textarea {
  resize: vertical;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 6px 10px;
  color: var(--muted);
}

.hint {
  color: var(--muted);
  font-size: 12px;
  margin: 0;
}

.hint.small {
  font-size: 11px;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.demo-list ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.demo-list li {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 12px;
  border-radius: 10px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
}

.report-panel {
  position: relative;
  overflow: hidden;
}

.report-panel::before {
  content: "";
  position: absolute;
  inset: -40px;
  background: radial-gradient(circle at 20% 20%, rgba(255, 94, 195, 0.12), transparent 55%),
    radial-gradient(circle at 80% 0%, rgba(91, 107, 255, 0.12), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.report-panel>* {
  position: relative;
  z-index: 1;
}

.report-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.report-form .field label {
  font-weight: 600;
}

.checkbox-grid label {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 10px 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: border 0.2s ease, background 0.2s ease;
}

.checkbox-grid input[type="checkbox"] {
  accent-color: var(--accent);
}

.checkbox-grid label:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
}

.file-upload-control {
  position: relative;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(5, 5, 5, 0.8);
}

.file-upload-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 94, 195, 0.3), rgba(91, 107, 255, 0.3));
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.file-upload-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.file-upload-info span {
  font-size: 14px;
  color: var(--muted);
}

.file-upload-button {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background: linear-gradient(120deg, #ff5ec3, #5b6bff);
  color: #fff;
  font-weight: 600;
  padding: 10px 18px;
  border: none;
  cursor: pointer;
}

.file-upload-button input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.file-upload-selected {
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: grid;
  place-items: center;
  z-index: 20;
}

.modal-content {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  max-width: 420px;
  width: calc(100% - 32px);
  text-align: center;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
}

.modal-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 14px;
}

/* Notification Modal */
.notification-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: grid;
  place-items: center;
  z-index: 30;
}

.notification-content {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0;
  max-width: 400px;
  width: calc(100% - 32px);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.notification-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.notification-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  color: var(--text);
}

.notification-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: background 0.2s;
}

.notification-close:hover {
  background: var(--border);
}

.notification-body {
  padding: 20px 24px;
  color: var(--muted);
  font-size: 14px;
}

.notification-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
}

.notification-ok-btn {
  background: var(--accent);
  border: none;
  color: #fff;
  padding: 10px 24px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.notification-ok-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 30px rgba(229, 57, 53, 0.25);
}

/* Active Users Panel */
.active-users-panel {
  margin-top: 0;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  /* LÍNEA 507: Altura total del panel de jugadores activos - AJUSTA AQUÍ */
  min-height: 500px;
}

.active-users-panel .panel-header {
  flex-shrink: 0;
  margin-bottom: 16px;
}

.active-users-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 0;
  flex: 1;
  /* LÍNEA 523: Altura del área con scroll de jugadores activos - AJUSTA AQUÍ */
  min-height: 375px;
}

.active-users-container::-webkit-scrollbar {
  width: 8px;
}

.active-users-container::-webkit-scrollbar-track {
  background: var(--card);
  border-radius: 4px;
}

.active-users-container::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.active-users-container::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

.active-user-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 4px;
  transition: background 0.2s;
  border-radius: 6px;
  cursor: pointer;
}

.active-user-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.active-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card);
}

.active-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.active-user-avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
}

.active-user-name {
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.active-users-loading {
  text-align: center;
  padding: 40px;
  color: var(--muted);
}

.active-users-empty {
  text-align: center;
  padding: 40px;
  color: var(--muted);
}

#activeUsersCount {
  color: var(--accent);
  font-weight: 700;
}

/* Ready Page Layout */
.ready-main {
  display: flex;
  flex-direction: column;
  max-width: 1920px;
  margin: 0 auto;
  padding: 0 40px 40px;
}

.ready-top-section {
  display: grid;
  grid-template-columns: 600px 550px;
  gap: 20px;
  align-items: start;
  margin-bottom: 24px;
  justify-content: center;
}

.ready-left-column {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
}

.ready-left-column .personal-panel {
  flex-shrink: 0;
}

.ready-left-column .active-users-panel {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.ready-right-column {
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 100px);
}

/* Personal Panel */
.personal-panel {
  margin-top: 0;
}

.personal-panel-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.personal-user-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.personal-user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card);
}

.personal-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.personal-user-details {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.personal-user-name {
  color: var(--text);
  font-weight: 600;
  font-size: 16px;
}

.personal-user-badge {
  background: var(--accent-2);
  color: #fff;
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 14px;
}

.personal-panel-actions {
  display: none;
}

.custom-maps-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  cursor: pointer;
  font-weight: 500;
}

.custom-maps-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--accent);
}

.find-game-btn {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Chat Panel */
.chat-panel {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #050505;
  /* Dark background */
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.chat-panel .panel-header {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  background: #0a0a0a;
}

.chat-container {
  display: flex;
  flex-direction: column;
  height: 600px;
  /* Fixed height to prevent stretching */
  position: relative;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: #050505;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
  /* Crucial for flex scrolling */
}

.chat-messages::-webkit-scrollbar {
  width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
  background: #444;
}

.chat-message {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 0;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chat-message:hover {
  background: transparent;
}

.chat-message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  /* Square with rounded corners */
  overflow: hidden;
  flex-shrink: 0;
  background: #111;
}

.chat-message-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-message-avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #333;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
}

.chat-message-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chat-message-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.chat-message-username {
  color: #fff;
  font-weight: 700;
  font-size: 14px;
}

.chat-message-time {
  color: #666;
  font-size: 11px;
}

.chat-message-text {
  color: #ccc;
  font-size: 14px;
  word-wrap: break-word;
  line-height: 1.4;
}

.chat-loading {
  text-align: center;
  padding: 20px;
  color: var(--muted);
}

.chat-input-container {
  display: flex;
  gap: 10px;
  padding: 16px;
  background: #0a0a0a;
  border-top: 1px solid var(--border);
}

.chat-input {
  flex: 1;
  background: #16161c;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  color: #fff;
  font-size: 14px;
  transition: border-color 0.2s;
}

.chat-input:focus {
  outline: none;
  border-color: var(--accent);
}

.chat-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.chat-send-btn {
  background: var(--accent);
  border: none;
  color: #fff;
  padding: 0 20px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.chat-send-btn:hover {
  background: #d32f2f;
}

.chat-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.chat-message-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.chat-message-username {
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
}

.chat-message-time {
  color: var(--muted);
  font-size: 11px;
}

.chat-message-text {
  color: var(--text);
  font-size: 14px;
  word-wrap: break-word;
  line-height: 1.4;
}

.chat-loading {
  text-align: center;
  padding: 20px;
  color: var(--muted);
}

.chat-input-container {
  display: flex;
  gap: 8px;
}

.chat-input {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--text);
  font-size: 14px;
}

.chat-input:focus {
  outline: none;
  border-color: var(--accent);
}

.chat-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.chat-send-btn {
  padding: 10px 20px;
  white-space: nowrap;
}

@media (max-width: 1024px) {
  .ready-top-section {
    grid-template-columns: 1fr;
  }

  .ready-right-column {
    position: static;
    max-height: none;
  }

  .chat-container {
    max-height: 500px;
  }
}

@media (max-width: 1024px) {
  .ready-main {
    padding: 0 20px 40px;
  }
}

@media (max-width: 720px) {

  .hero,
  main {
    padding: 20px;
  }

  .top-nav {
    flex-direction: column;
    align-items: flex-start;
  }

  .actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .active-users-container {
    gap: 6px;
  }

  .personal-panel-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .find-game-btn {
    width: 100%;
    justify-content: center;
  }

  .ready-main {
    padding: 0 20px 20px;
  }

  .ready-top-section {
    grid-template-columns: 1fr;
  }
}

/* Queue Columns */
.queue-columns-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  /* Increased gap for more separation */
  width: 100%;
  max-width: 100%;
  padding: 0 10px 40px;
}

.queue-column {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  display: grid;
  grid-template-columns: 300px 1fr;
  /* LEFT (Logo/Button/Count) - RIGHT (Players) */
  gap: 24px;
  min-height: 350px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s, box-shadow 0.2s;
}

.queue-column:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  border-color: var(--accent);
}

/* LEFT: Logo, Button, Count */
.queue-card-left {
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-right: 1px solid var(--border);
  padding-right: 24px;
}

.queue-logo {
  width: 140px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle,
      rgba(255, 255, 255, 0.05) 0%,
      transparent 70%);
  border-radius: 50%;
  padding: 10px;
  margin: 0 auto;
}

.queue-logo img {
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 15px rgba(255, 193, 7, 0.2));
}

.queue-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.queue-enter-btn,
.queue-exit-btn {
  width: 100%;
  padding: 12px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
}

.queue-enter-btn {
  background: var(--accent-2);
  border-color: var(--accent-2);
  color: #fff;
  box-shadow: 0 4px 15px rgba(68, 76, 247, 0.3);
}

.queue-enter-btn:hover {
  background: #333af5;
  transform: translateY(-1px);
}

.queue-exit-btn {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
}

.queue-exit-btn:hover {
  background: rgba(229, 57, 53, 0.1);
}

.queue-count {
  text-align: center;
  padding: 12px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.queue-count-label {
  display: block;
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.queue-count-number {
  font-size: 32px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

/* RIGHT: Player List ONLY */
.queue-players-list {
  overflow-y: auto;
  background: #0a0a0a;
  border-radius: 8px;
  border: 1px solid var(--border);
  padding: 4px;
}

.queue-players-list::-webkit-scrollbar {
  width: 6px;
}

.queue-players-list::-webkit-scrollbar-track {
  background: #000;
}

.queue-players-list::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 3px;
}

.queue-player-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  background: #ffc107;
  border: none;
  border-radius: 0;
  margin-bottom: 2px;
  transition: filter 0.2s;
  cursor: pointer;
  height: 40px;
}

.queue-player-item:nth-child(even) {
  background: #ffca2c;
}

.queue-player-item:hover {
  filter: brightness(1.1);
}

.queue-player-avatar {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
  background: #000;
  border: 1px solid rgba(0, 0, 0, 0.2);
}

.queue-player-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.queue-player-avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
}

.queue-player-name {
  color: #000;
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.queue-players-empty {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  font-size: 13px;
  font-style: italic;
  padding: 20px;
  min-height: 200px;
}

.queue-exit-btn:hover {
  background: #333;
  color: #ff6666;
}

.queue-count {
  text-align: center;
  width: 100%;
}

.queue-count-label {
  color: var(--muted);
  font-size: 11px;
  display: block;
  margin-bottom: 2px;
  text-transform: uppercase;
}

.queue-count-number {
  color: #fff;
  font-weight: 800;
  font-size: 22px;
  display: block;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.queue-players-list {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0;
  background: #111;
  /* Darker background for list */
}

.queue-players-list::-webkit-scrollbar {
  width: 5px;
}

.queue-players-list::-webkit-scrollbar-track {
  background: #111;
}

.queue-players-list::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 0;
}

.queue-players-list::-webkit-scrollbar-thumb:hover {
  background: #444;
}

.queue-player-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  margin-bottom: 1px;
  background: #ffc107;
  /* Yellow background like reference */
  color: #000;
  /* Black text for contrast */
  border: none;
  border-radius: 0;
  cursor: pointer;
  transition: filter 0.2s;
  height: 40px;
}

.queue-player-item:hover {
  filter: brightness(1.1);
  transform: none;
}

.queue-player-item:nth-child(even) {
  background: #ffca2c;
  /* Slightly different shade for stripes */
}

.queue-player-avatar {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  /* Square/rounded avatars */
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.queue-player-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.queue-player-avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  color: #fff;
  font-weight: 700;
  font-size: 12px;
}

.queue-player-name {
  color: #000;
  /* Black text */
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.queue-players-empty {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  font-size: 13px;
  font-style: italic;
  background: #1a1a1a;
}

@media (max-width: 720px) {
  .queue-columns-container {
    grid-template-columns: 1fr;
    padding: 0 20px 20px;
  }
}

gap: 20px;
padding: 0 40px;
min-width: min-content;
}

.stream-item {
  width: 200px;
  flex-shrink: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.stream-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  border-color: var(--accent);
}

.stream-thumbnail {
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  position: relative;
}

.stream-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stream-live-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #e53935;
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.stream-info {
  padding: 10px;
}

.stream-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.stream-user {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.stream-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
}

/* Stream Actions */
.stream-actions {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 20px;
  margin-top: 20px;
  border-top: 1px solid var(--border);
}

/* --- POSTER GRID DESIGN (EA SPORTS STYLE) --- */
.rewards-section {
  padding: 60px 40px;
  max-width: 1300px;
  margin: 0 auto;
  background: transparent;
}

.rewards-header {
  margin-bottom: 60px;
  text-align: center;
}

.rewards-header h2 {
  font-size: 3.5rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 15px;
  letter-spacing: -1px;
}

.rewards-header p {
  color: #888;
  font-size: 1.1rem;
}

.rewards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
}

.reward-card {
  background: #000;
  border-radius: 4px;
  /* Clean sharp look like EA */
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.reward-card:hover {
  transform: scale(1.02);
}

.reward-media {
  width: 100%;
  aspect-ratio: 1 / 1;
  /* Square poster */
  position: relative;
  overflow: hidden;
}

.reward-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.reward-card:hover .reward-media img {
  transform: scale(1.1);
}

.reward-overlay {
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 5;
}

.stock-badge {
  background: rgba(0, 0, 0, 0.8);
  color: #00ff88;
  padding: 4px 10px;
  border-radius: 2px;
  font-size: 0.75rem;
  font-weight: bold;
  text-transform: uppercase;
}

.reward-details {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.reward-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reward-desc {
  color: #666;
  font-size: 0.9rem;
  line-height: 1.4;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.8em;
}

.reward-action-area {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.reward-cost {
  font-size: 1.4rem;
  font-weight: 800;
  color: #ffaa00;
}

.reward-cost span {
  font-size: 0.8rem;
  color: #444;
}

.btn-redeem {
  background: #fff;
  color: #000;
  border: none;
  padding: 8px 16px;
  font-weight: 800;
  font-size: 0.8rem;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-redeem:hover {
  background: #ffaa00;
  color: #000;
}

/* Modals and other stuff same as before but cleaner */
.reward-confirmation-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(10px);
}

.reward-confirmation-content {
  background: #111;
  border: 1px solid #222;
  padding: 50px;
  text-align: center;
  max-width: 450px;
  border-radius: 12px;
}

.reward-confirmation-content h2 {
  color: #00ff88;
  margin-bottom: 20px;
}

/* Message Icon in Header */
.message-nav-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--muted);
  transition: all 0.2s;
}

.message-nav-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.message-nav-btn .badge-count {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #ffaa00;
  color: #000;
  font-size: 10px;
  font-weight: 900;
  padding: 2px 5px;
  border-radius: 10px;
  border: 2px solid #000;
  min-width: 18px;
  text-align: center;
  line-height: 1;
}

.message-nav-btn svg {
  width: 18px;
  height: 18px;
}