/* Penca / Prode — Donkey Store */

.penca-wrap {
  padding: 48px 0 96px;
  position: relative;
}

.penca-wrap::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(900px, 100%);
  height: 320px;
  background: radial-gradient(ellipse at 50% 0%, rgba(143, 0, 202, 0.18) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.penca-wrap .container {
  position: relative;
  z-index: 1;
}

/* Hero */
.penca-hero {
  background: linear-gradient(145deg, rgba(143, 0, 202, 0.22) 0%, rgba(20, 12, 35, 0.85) 50%, rgba(0, 0, 0, 0.5) 100%);
  border: 1px solid rgba(143, 0, 202, 0.35);
  border-radius: 20px;
  padding: 32px 36px;
  margin-bottom: 28px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.penca-hero h3 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.penca-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 12px;
}

.penca-stat-pill {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 0.85rem;
}

.penca-stat-pill strong {
  color: #c77dff;
  display: block;
  font-size: 1.1rem;
}

.penca-user-rank {
  background: linear-gradient(135deg, rgba(143, 0, 202, 0.4), rgba(80, 0, 120, 0.3));
  border: 1px solid rgba(199, 125, 255, 0.4);
  border-radius: 16px;
  padding: 16px 24px;
  text-align: center;
}

.penca-user-rank .rank-num {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  color: #fff;
}

/* Tabs */
.penca-tabs-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.penca-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
  border: none;
}

.penca-tabs .nav-link {
  color: rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 10px 20px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.penca-tabs .nav-link:hover {
  color: #fff;
  border-color: rgba(143, 0, 202, 0.4);
  background: rgba(143, 0, 202, 0.12);
}

.penca-tabs .nav-link.active {
  background: linear-gradient(135deg, rgba(143, 0, 202, 0.55), rgba(100, 0, 150, 0.4));
  border-color: rgba(199, 125, 255, 0.5);
  color: #fff;
  box-shadow: 0 4px 20px rgba(143, 0, 202, 0.25);
}

/* Phase filter */
.penca-phase-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.penca-phase-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.penca-phase-btn:hover,
.penca-phase-btn.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(199, 125, 255, 0.5);
}

/* Groups grid */
.wc-groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.wc-group-panel {
  background: rgba(18, 18, 28, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.wc-group-panel:hover {
  border-color: rgba(143, 0, 202, 0.35);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.wc-group-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: linear-gradient(90deg, rgba(143, 0, 202, 0.2), transparent);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.wc-group-letter {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #8f00ca, #5a0080);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(143, 0, 202, 0.35);
}

.wc-group-title {
  flex: 1;
  font-weight: 700;
  font-size: 1.05rem;
  margin: 0;
}

.wc-group-count {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.45);
}

.wc-group-matches {
  padding: 8px 12px 12px;
}

/* Match row */
.wc-match {
  padding: 14px 12px;
  border-radius: 12px;
  margin-bottom: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  transition: background 0.15s;
}

.wc-match:last-child {
  margin-bottom: 0;
}

.wc-match:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.06);
}

.wc-match.is-finished {
  opacity: 0.85;
}

.wc-match-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.wc-match-date {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
}

.wc-match-matchday {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(199, 125, 255, 0.85);
  font-weight: 600;
}

.wc-match-body {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: center;
}

.wc-team {
  text-align: center;
  min-width: 0;
}

.wc-team-name {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.25;
  word-break: break-word;
}

.wc-team img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  margin-bottom: 4px;
}

.wc-match-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.wc-score-display {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #fff;
}

.wc-score-inputs {
  display: flex;
  align-items: center;
  gap: 6px;
}

.wc-score-input {
  width: 48px;
  height: 40px;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(199, 125, 255, 0.35);
  border-radius: 10px;
  color: #fff;
}

.wc-score-input:focus {
  outline: none;
  border-color: #c77dff;
  box-shadow: 0 0 0 3px rgba(143, 0, 202, 0.25);
}

.wc-btn-save {
  background: linear-gradient(135deg, #8f00ca, #6a0099);
  border: none;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.wc-btn-save:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(143, 0, 202, 0.4);
}

.wc-btn-save:disabled {
  opacity: 0.6;
}

.wc-score-pending {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.25);
  font-weight: 600;
}

/* Badges */
.wc-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 4px 10px;
  border-radius: 999px;
}

.wc-badge-open {
  background: rgba(40, 167, 69, 0.2);
  color: #6ee7a0;
  border: 1px solid rgba(40, 167, 69, 0.35);
}

.wc-badge-closed {
  background: rgba(255, 193, 7, 0.15);
  color: #ffd666;
  border: 1px solid rgba(255, 193, 7, 0.3);
}

.wc-badge-finished {
  background: rgba(108, 117, 125, 0.25);
  color: #ced4da;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.wc-points-pill {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  margin-left: 4px;
}

.wc-points-exact {
  background: rgba(40, 167, 69, 0.25);
  color: #8dffab;
}

.wc-points-result {
  background: rgba(13, 110, 253, 0.25);
  color: #9ecbff;
}

/* Knockout section */
.wc-knockout-section {
  margin-top: 8px;
}

.wc-knockout-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid rgba(143, 0, 202, 0.4);
  display: flex;
  align-items: center;
  gap: 10px;
}

.wc-knockout-title::before {
  content: '🏆';
}

.wc-knockout-phase {
  margin-bottom: 24px;
}

.wc-knockout-phase h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #c77dff;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.wc-knockout-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}

/* Premios ranking */
.wc-prizes-section {
  margin-bottom: 28px;
}

.wc-prizes-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.wc-prizes-title::before {
  content: '🎁';
}

.wc-prizes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.wc-prize-card {
  position: relative;
  background: rgba(18, 18, 28, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  overflow: hidden;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.wc-prize-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.wc-prize-card.place-1 {
  border-color: rgba(255, 215, 0, 0.45);
  background: linear-gradient(180deg, rgba(255, 215, 0, 0.1) 0%, rgba(18, 18, 28, 0.9) 45%);
}

.wc-prize-card.place-2 {
  border-color: rgba(192, 192, 192, 0.35);
}

.wc-prize-card.place-3 {
  border-color: rgba(205, 127, 50, 0.35);
}

.wc-prize-rank {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.15);
  z-index: 2;
}

.wc-prize-card.place-1 .wc-prize-rank {
  color: #ffd700;
  border-color: rgba(255, 215, 0, 0.4);
}

.wc-prize-img-wrap {
  padding: 20px 16px 12px;
  background: radial-gradient(ellipse at 50% 30%, rgba(143, 0, 202, 0.15), transparent 70%);
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wc-prize-img-wrap img {
  max-width: 100%;
  max-height: 120px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.45));
}

.wc-prize-img-wrap.is-service img,
.wc-prize-img-wrap.is-brand img {
  max-height: 100px;
  border-radius: 12px;
  object-fit: cover;
}

.wc-prize-img-wrap.is-brand img {
  border-radius: 50%;
  border: 2px solid rgba(143, 0, 202, 0.35);
}

.wc-prize-body {
  padding: 14px 16px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.wc-prize-label {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1.3;
}

.wc-prize-item-name {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.wc-prize-winner {
  margin-top: 10px;
  font-size: 0.8rem;
  color: #c77dff;
  font-weight: 600;
}

.wc-podium-prize-hint {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 6px;
  line-height: 1.2;
}

/* Ranking */
.wc-ranking-card {
  background: rgba(18, 18, 28, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  overflow: hidden;
}

.wc-ranking-podium {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  gap: 12px;
  padding: 24px 20px 8px;
  align-items: end;
}

.wc-podium-item {
  text-align: center;
  padding: 16px 12px;
  border-radius: 14px 14px 0 0;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.wc-podium-item.place-1 {
  order: 2;
  background: linear-gradient(180deg, rgba(255, 215, 0, 0.15), rgba(255, 255, 255, 0.03));
  border-color: rgba(255, 215, 0, 0.35);
  padding-top: 28px;
}

.wc-podium-item.place-2 {
  order: 1;
}

.wc-podium-item.place-3 {
  order: 3;
}

.wc-podium-medal {
  font-size: 1.5rem;
  margin-bottom: 6px;
}

.wc-podium-name {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wc-podium-pts {
  font-size: 1.25rem;
  font-weight: 800;
  color: #c77dff;
}

.wc-leader-row {
  display: grid;
  grid-template-columns: 52px 1fr 72px 72px;
  gap: 12px;
  padding: 14px 20px;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.9rem;
}

.wc-leader-row.header {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.45);
  padding-top: 12px;
  padding-bottom: 8px;
}

.wc-leader-row.is-me {
  background: rgba(143, 0, 202, 0.12);
}

.wc-leader-pos {
  font-weight: 800;
  color: rgba(255, 255, 255, 0.5);
}

/* Mis puntos */
.wc-mine-summary {
  background: linear-gradient(135deg, rgba(143, 0, 202, 0.25), rgba(0, 0, 0, 0.3));
  border: 1px solid rgba(143, 0, 202, 0.3);
  border-radius: 16px;
  padding: 20px 24px;
  margin-bottom: 20px;
  text-align: right;
}

.wc-mine-summary .total {
  font-size: 2rem;
  font-weight: 800;
}

.wc-mine-list .wc-match {
  margin-bottom: 10px;
}

.penca-empty {
  text-align: center;
  padding: 56px 24px;
  color: rgba(255, 255, 255, 0.55);
}

.penca-empty-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  opacity: 0.5;
}

/* Participantes */
.wc-participants-card {
  background: rgba(18, 18, 28, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  overflow: hidden;
}

.wc-participants-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  background: linear-gradient(90deg, rgba(143, 0, 202, 0.18), transparent);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.wc-participants-header h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
}

.wc-participants-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.wc-participants-stat {
  font-size: 0.8rem;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.75);
}

.wc-participants-stat strong {
  color: #c77dff;
}

.wc-participants-list {
  padding: 8px 12px 16px;
}

.wc-participant {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  margin-bottom: 6px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}

.wc-participant:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
}

.wc-participant.is-me {
  background: rgba(143, 0, 202, 0.12);
  border-color: rgba(199, 125, 255, 0.35);
}

.wc-participant-avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #3a3a50, #252535);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  color: #c77dff;
  overflow: hidden;
}

.wc-participant-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wc-participant-name {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.wc-participant-meta {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.5);
}

.wc-participant-badges {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.wc-participant-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.wc-participant-badge.done {
  background: rgba(40, 167, 69, 0.2);
  color: #6ee7a0;
  border: 1px solid rgba(40, 167, 69, 0.35);
}

.wc-participant-badge.partial {
  background: rgba(255, 193, 7, 0.15);
  color: #ffd666;
  border: 1px solid rgba(255, 193, 7, 0.3);
}

.wc-participant-badge.you {
  background: rgba(143, 0, 202, 0.25);
  color: #e0b3ff;
  border: 1px solid rgba(143, 0, 202, 0.4);
}

@media (max-width: 576px) {
  .wc-participant {
    grid-template-columns: 36px 1fr;
    grid-template-rows: auto auto;
  }

  .wc-participant-badges {
    grid-column: 2;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
  }
}

/* Outright / Campeón */
.wc-outright-head {
  margin-bottom: 18px;
}

.wc-outright-head h3 {
  color: #fff;
  font-weight: 800;
  margin-bottom: 6px;
}

.wc-outright-deadline {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 14px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.85rem;
  background: rgba(143, 0, 202, 0.15);
  border: 1px solid rgba(143, 0, 202, 0.45);
  color: #e6c9ff;
}

.wc-outright-deadline.closed {
  background: rgba(255, 80, 80, 0.12);
  border-color: rgba(255, 80, 80, 0.4);
  color: #ffc7c7;
}

.wc-outright-card {
  background: rgba(18, 18, 28, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 22px;
}

.wc-outright-form {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-items: end;
}

.wc-outright-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wc-outright-field label {
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  margin: 0;
}

.wc-outright-select {
  width: 100%;
  background: rgba(10, 10, 18, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.9rem;
}

.wc-outright-select:focus {
  outline: none;
  border-color: #8f00ca;
}

.wc-outright-form .wc-btn-save {
  grid-column: 1 / -1;
  font-size: 0.9rem;
  padding: 12px;
}

.wc-outright-saved {
  grid-column: 1 / -1;
  color: #9be59b;
  font-size: 0.85rem;
  font-weight: 600;
}

.wc-outright-subtitle {
  color: #fff;
  font-weight: 700;
  margin: 14px 0 8px;
}

.wc-outright-result-banner {
  display: inline-block;
  background: linear-gradient(135deg, #ffd54a, #d99b00);
  color: #2a1d00;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: 10px;
  margin-bottom: 12px;
}

.wc-outright-results {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wc-outright-pick {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px 14px;
}

.wc-outright-pick-label {
  font-weight: 700;
  color: #fff;
  min-width: 130px;
}

.wc-outright-pick-team {
  flex: 1;
  color: rgba(255, 255, 255, 0.85);
}

@media (max-width: 992px) {
  .wc-prizes-grid {
    grid-template-columns: 1fr;
  }

  .wc-outright-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .wc-groups-grid {
    grid-template-columns: 1fr;
  }

  .wc-match-body {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .wc-match-center {
    order: -1;
  }

  .wc-ranking-podium {
    grid-template-columns: 1fr;
  }

  .wc-podium-item.place-1,
  .wc-podium-item.place-2,
  .wc-podium-item.place-3 {
    order: unset;
  }

  .penca-hero {
    padding: 24px 20px;
  }
}
