#frags {
  background-image: url("/assets/img/wood-bg.png");
  background-repeat: repeat;
  background-size: contain;
  background-position: center top;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  color: white;
  padding-top: 90px;
  padding-bottom: 40px;
}

#frags .container {
  width: 95%;
  max-width: 1400px;
}

#frags h2 {
  text-align: center;
  font-size: 28px;
  font-weight: 400;
  margin-bottom: 20px;
  color: #ffe100;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.frags-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.frags-controls select,
.frags-controls input {
  font-family: "Noto Serif", serif;
  font-size: 14px;
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 4px;
  background: rgba(0,0,0,0.5);
  color: #fff;
  outline: none;
}

.frags-controls select:focus,
.frags-controls input:focus {
  border-color: rgba(246,201,14,0.6);
}

.frags-controls input::placeholder {
  color: rgba(255,255,255,0.4);
}

.frags-controls input[type="date"] {
  color-scheme: dark;
}

/* Role checkboxes */
.role-checkboxes {
  display: flex;
  gap: 12px;
  align-items: center;
}

.role-checkboxes label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  color: rgba(255,255,255,0.8);
  cursor: pointer;
}

.role-checkboxes input[type="checkbox"] {
  accent-color: #ffe100;
  cursor: pointer;
}

.frags-cache-info {
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 15px;
}

/* Layout: tabla + panel lateral */
.frags-layout {
  display: flex;
  flex-wrap: nowrap;
  gap: 20px;
  align-items: flex-start;
}

.frags-main {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

/* Summary panel */
.frags-summary {
  width: 240px;
  flex-shrink: 0;
  border-radius: 4px;
  overflow: hidden;
  position: sticky;
  top: 100px;
}

.frags-summary-title {
  background: rgba(0,0,0,0.6);
  padding: 10px 12px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: #ffe100;
  border-bottom: 2px solid rgba(255,225,0,0.3);
  word-break: break-all;
}

.frags-summary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.frags-summary-table td {
  padding: 7px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.frags-summary-table td:last-child {
  text-align: right;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
}

.frags-summary-table tr:nth-child(odd) {
  background: rgba(0,0,0,0.25);
}

.frags-summary-table tr:nth-child(even) {
  background: rgba(0,0,0,0.15);
}

.frags-summary-table tr:hover {
  background: rgba(255,225,0,0.08);
}

.frags-summary-table tr.summary-sep td {
  padding: 0;
  border-bottom: 2px solid rgba(255,225,0,0.15);
  background: transparent;
}

.frags-summary-table tr.summary-sep:hover {
  background: transparent;
}

.frags-summary-table tr.summary-total td {
  color: #ffe100;
  font-weight: 600;
  background: rgba(0,0,0,0.4);
}

.frags-summary-table tr.summary-total td:last-child {
  color: #ffe100;
}

.frags-summary-table tr.summary-total:hover {
  background: rgba(0,0,0,0.4);
}

.frags-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.frags-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.frags-table thead th {
  background: rgba(0,0,0,0.6);
  padding: 10px 8px;
  text-align: left;
  font-weight: 600;
  font-size: 13px;
  color: #ffe100;
  border-bottom: 2px solid rgba(255,225,0,0.3);
  white-space: nowrap;
}

.frags-table tbody tr:nth-child(odd) {
  background: rgba(0,0,0,0.25);
}

.frags-table tbody tr:nth-child(even) {
  background: rgba(0,0,0,0.15);
}

.frags-table tbody tr:hover {
  background: rgba(255,225,0,0.08);
}

.frags-table td {
  padding: 7px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  white-space: nowrap;
}

.frags-table .col-date {
  color: rgba(255,255,255,0.6);
  font-size: 12px;
}

.frags-table .col-map {
  color: rgba(255,255,255,0.5);
  font-size: 12px;
}

.frags-table .col-level {
  text-align: center;
  color: rgba(255,255,255,0.7);
}

/* Faction colors */
.faction-1 { color: #4a9eff; }  /* Imperial - azul */
.faction-2 { color: #e0e0e0; }  /* Renegado - blanco */
.faction-3 { color: #ff4444; }  /* Caos - rojo */
.faction-4 { color: #44ddff; }  /* Sagrada - celeste */
.faction-5 { color: #ff9933; }  /* Republicano - naranja */
.faction-6 { color: #ffd700; }  /* Legion - dorado */
.faction-0 { color: #aaaaaa; }  /* Sin faccion */

.kill-arrow {
  color: rgba(255,255,255,0.3);
  padding: 0 4px;
}

/* Pagination */
.frags-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.frags-pagination button {
  font-family: "Noto Serif", serif;
  font-size: 13px;
  padding: 6px 12px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 3px;
  background: rgba(0,0,0,0.4);
  color: #fff;
  cursor: pointer;
}

.frags-pagination button:hover {
  border-color: rgba(246,201,14,0.5);
  background: rgba(0,0,0,0.6);
}

.frags-pagination button.active {
  background: rgba(255,225,0,0.2);
  border-color: #ffe100;
  color: #ffe100;
}

.frags-pagination button:disabled {
  opacity: 0.3;
  cursor: default;
}

.frags-stats {
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  margin-top: 8px;
}

.frags-empty {
  text-align: center;
  padding: 40px 0;
  color: rgba(255,255,255,0.5);
  font-size: 16px;
}

@media (max-width: 768px) {
  #frags {
    padding-top: 80px;
  }

  #frags .container {
    width: 100%;
    padding: 0 10px;
  }

  #frags h2 {
    font-size: 22px;
  }

  .frags-controls {
    flex-direction: column;
    gap: 8px;
  }

  .frags-controls select,
  .frags-controls input {
    width: 100%;
  }

  .frags-layout {
    flex-direction: column-reverse;
  }

  .frags-summary {
    width: 100%;
    position: static;
  }

  .frags-table {
    font-size: 12px;
  }

  .frags-table thead th,
  .frags-table td {
    padding: 5px 4px;
  }

  .frags-table .col-date {
    font-size: 11px;
  }
}
