/**
 * Premium Results Styles
 */

/* Results header - moved to page-headers.css */

/* Statystyki */
.results-stats {
  background: linear-gradient(135deg, var(--acc), #5a5d8a);
  color: white;
  padding: 20px;
  border-radius: 16px;
  margin-bottom: 32px;
  box-shadow: 0 4px 16px rgba(51, 54, 135, 0.3);
}

.stats-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.stats-results {
  display: flex;
  gap: 24px;
}

.stat-win {
  padding: 6px 16px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  font-weight: 600;
}

.stat-draw {
  padding: 6px 16px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 20px;
}

.stat-loss {
  padding: 6px 16px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 20px;
  opacity: 0.8;
}

/* Dodatkowe filtry */
.results-filters {
  display: flex;
  gap: 32px;
  padding: 20px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  margin-top: 16px;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 16px;
}

.filter-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-right: 8px;
}

.filter-checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.filter-checkbox:hover {
  color: var(--acc);
}

.filter-checkbox input {
  width: 18px;
  height: 18px;
  accent-color: var(--acc);
  cursor: pointer;
}

.filter-checkbox span {
  user-select: none;
}

/* Widok kart */
.matches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 24px;
  margin-bottom: 48px;
}

.match-card {
  background: var(--card);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(51, 54, 135, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  animation: slideInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  animation-delay: calc(var(--index, 0) * 30ms);
}

.match-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(51, 54, 135, 0.15);
}

.match-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.match-league {
  padding: 4px 12px;
  border-radius: 20px;
  color: white;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.match-date {
  font-size: 13px;
  color: var(--text-secondary);
}

.match-teams {
  padding: 24px 20px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
}

.team-home, .team-away {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 500;
}

.team-home {
  justify-content: flex-end;
  text-align: right;
}

.team-away {
  justify-content: flex-start;
  text-align: left;
}

.team-home.is-ours .team-name,
.team-away.is-ours .team-name {
  color: var(--acc);
  font-weight: 700;
}

.team-badge {
  font-size: 20px;
}

.match-score {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 28px;
  font-weight: 700;
  padding: 8px 16px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 12px;
}

.match-score.win {
  background: linear-gradient(135deg, #4CAF50, #45a049);
  color: white;
}

.match-score.loss {
  background: linear-gradient(135deg, #f44336, #da190b);
  color: white;
}

.match-score.draw {
  background: linear-gradient(135deg, #9E9E9E, #757575);
  color: white;
}

.score-separator {
  opacity: 0.5;
  margin: 0 4px;
}

.score-pending {
  font-size: 24px;
  opacity: 0.3;
}

.match-info {
  padding: 0 20px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--text-secondary);
}

.match-venue {
  display: flex;
  align-items: center;
  gap: 4px;
}

.match-actions {
  padding: 16px 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  gap: 12px;
}

.btn-match-gallery,
.btn-match-link {
  flex: 1;
  padding: 10px 16px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-match-gallery {
  background: linear-gradient(135deg, var(--acc), #5a5d8a);
  color: white;
}

.btn-match-gallery:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(51, 54, 135, 0.3);
}

.btn-match-link {
  background: transparent;
  color: var(--acc);
  border: 2px solid var(--acc);
}

.btn-match-link:hover {
  background: var(--acc);
  color: white;
}

/* Widok tabeli */
.table-view .matches-table {
  background: var(--card);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.table-header {
  display: grid;
  grid-template-columns: 100px 100px 1fr 100px 1fr 100px;
  padding: 16px 20px;
  background: linear-gradient(135deg, var(--acc), #5a5d8a);
  color: white;
  font-weight: 600;
  font-size: 14px;
}

.table-row {
  display: grid;
  grid-template-columns: 100px 100px 1fr 100px 1fr 100px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  transition: all 0.2s ease;
  opacity: 0;
  animation: slideInLeft 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  animation-delay: calc(var(--index, 0) * 20ms);
}

.table-row:hover {
  background: rgba(51, 54, 135, 0.05);
}

.table-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.table-cell.is-ours {
  color: var(--acc);
  font-weight: 600;
}

.league-badge {
  padding: 4px 8px;
  border-radius: 12px;
  color: white;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.score-badge {
  padding: 4px 12px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 15px;
}

.score-badge.win {
  background: #4CAF50;
  color: white;
}

.score-badge.loss {
  background: #f44336;
  color: white;
}

.score-badge.draw {
  background: #9E9E9E;
  color: white;
}

.btn-icon {
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(51, 54, 135, 0.1);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  text-decoration: none;
  color: var(--text);
}

.btn-icon:hover {
  background: var(--acc);
  transform: scale(1.1);
}

.btn-icon:hover {
  filter: brightness(0) invert(1);
}

/* Widok timeline */
.results-timeline {
  padding: 20px 0;
}

.results-timeline .timeline-section {
  margin-bottom: 48px;
}

.results-timeline .timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: linear-gradient(135deg, var(--acc), #5a5d8a);
  color: white;
  border-radius: 12px;
  margin-bottom: 32px;
  box-shadow: 0 4px 16px rgba(51, 54, 135, 0.3);
}

.results-timeline .timeline-month {
  font-size: 20px;
  font-weight: 700;
  text-transform: capitalize;
}

.results-timeline .timeline-stats {
  display: flex;
  gap: 16px;
}

.results-timeline .timeline-line {
  position: relative;
  padding-left: 60px;
}

.results-timeline .timeline-line::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--acc), transparent);
  opacity: 0.3;
}

.results-timeline .timeline-entry {
  position: relative;
  margin-bottom: 32px;
  opacity: 0;
  animation: slideInLeft 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  animation-delay: calc(var(--index, 0) * 50ms);
}

.results-timeline .timeline-dot {
  position: absolute;
  left: -46px;
  top: 24px;
  width: 14px;
  height: 14px;
  border: 3px solid var(--bg);
  border-radius: 50%;
  z-index: 1;
}

.results-timeline .timeline-dot.wygrana {
  background: #4ecdc4;
  box-shadow: 0 0 0 4px rgba(78, 205, 196, 0.2);
}

.results-timeline .timeline-dot.przegrana {
  background: #ff6b6b;
  box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.2);
}

.results-timeline .timeline-dot.remis {
  background: #9E9E9E;
  box-shadow: 0 0 0 4px rgba(158, 158, 158, 0.2);
}

.results-timeline .timeline-content {
  position: relative;
}

.results-timeline .timeline-card {
  margin: 0;
}

/* Empty state */
.results-empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-secondary);
}

.results-empty-state h3 {
  font-size: 24px;
  margin-bottom: 12px;
  color: var(--text);
}

/* Animacje */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .matches-grid {
    grid-template-columns: 1fr;
  }
  
  .table-header,
  .table-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  
  .table-header {
    display: none;
  }
  
  .table-row {
    padding: 16px;
    background: var(--card);
    margin-bottom: 12px;
    border-radius: 12px;
  }
  
  .table-cell {
    display: flex;
    justify-content: space-between;
  }
  
  .table-cell::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--text-secondary);
  }
  
  .results-timeline .timeline-line {
    padding-left: 40px;
  }
  
  .results-timeline .timeline-line::before {
    left: 12px;
  }
  
  .results-timeline .timeline-dot {
    left: -34px;
  }
  
  .stats-summary {
    flex-direction: column;
    text-align: center;
  }
}