/* vysledky.css */
@font-face {
  font-family: "ProtestStrike";
  src: url("souborykaktus/PROTESTSTRIKEFONT.ttf"); /* Ujisti se, že cesta k fontu je správná */
  font-weight: normal;
  font-style: normal;
}

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  color: #1a1a1a;
  background: linear-gradient(135deg, #068000 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Modern Header */
.modern-header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-image {
  width: 4.5rem;
  height: 3rem;
  border-radius: 0.375rem;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.site-title {
  font-family: "ProtestStrike", Arial, sans-serif;
  font-size: 1.5rem;
  color: #2d3748;
  font-weight: 700;
}

.header-nav {
  display: flex;
  gap: 1rem;
}

.nav-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.nav-button.primary {
  background: linear-gradient(135deg, #4caf50, #45a049);
  color: white;
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.nav-button.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.nav-icon {
  font-size: 1.1rem;
}

/* Main Content */
.main-content {
  flex: 1;
  padding: 2rem 0;
}

.content-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.page-header {
  text-align: center;
  margin-bottom: 3rem;
}

.page-title {
  font-family: "ProtestStrike", Arial, sans-serif;
  font-size: 3rem;
  color: white;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.title-icon {
  font-size: 3rem;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.page-subtitle {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 300;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Filter Wrapper */
.filter-wrapper {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.season-filter {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.filter-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: #2d3748;
  font-size: 1.1rem;
}

.filter-icon {
  font-size: 1.2rem;
}

.select-wrapper {
  position: relative;
}

.modern-select {
  appearance: none;
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.75rem 3rem 0.75rem 1rem;
  font-size: 1rem;
  font-weight: 500;
  color: #2d3748;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 250px;
}

.modern-select:focus {
  outline: none;
  border-color: #4caf50;
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.modern-select:hover {
  border-color: #cbd5e0;
}

.select-wrapper::after {
  content: "▼";
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: #718096;
  font-size: 0.8rem;
}

.filter-button {
  background: linear-gradient(135deg, #4caf50, #45a049);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.filter-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

/* Results Wrapper */
.results-wrapper {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Results Table */
.results-table-container {
  overflow-x: auto;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  background: white;
  margin-bottom: 2rem;
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.results-table thead {
  background: linear-gradient(135deg, #f8fafc, #e2e8f0);
}

.results-table th {
  padding: 1rem 0.75rem;
  font-weight: 600;
  color: #2d3748;
  border-bottom: 2px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 10;
  text-align: left;
  white-space: nowrap;
}

.results-table tbody tr {
  transition: all 0.3s ease;
  border-bottom: 1px solid #f1f5f9;
}

.results-table tbody tr:hover {
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  transform: scale(1.01);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.results-table td {
  padding: 1rem 0.75rem;
  vertical-align: middle;
}

/* Match Row Styles */
.match-row.win {
  border-left: 4px solid #48bb78;
}

.match-row.loss {
  border-left: 4px solid #f56565;
}

.match-row.draw {
  border-left: 4px solid #ed8936;
}

/* Team Cell Styles */
.team-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 150px;
}

.team-cell.our-team {
  font-weight: 600;
}

.team-logo-container {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.team-logo {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.team-name {
  flex: 1;
}

/* Score Cell Styles */
.score-cell {
  text-align: center;
}

.score-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 700;
  font-size: 1.1rem;
  min-width: 80px;
  text-align: center;
}

.score-badge.win {
  background: linear-gradient(135deg, #c6f6d5, #48bb78);
  color: #22543d;
}

.score-badge.loss {
  background: linear-gradient(135deg, #fed7d7, #f56565);
  color: #742a2a;
}

.score-badge.draw {
  background: linear-gradient(135deg, #feebc8, #ed8936);
  color: #7b341e;
}

/* Date, Season, League, Round Cell Styles */
.date-cell {
  white-space: nowrap;
  font-weight: 500;
}

.season-cell,
.league-cell,
.round-cell {
  color: #718096;
}

/* Legend */
.legend-container {
  margin-top: 2rem;
}

.legend-card {
  background: linear-gradient(135deg, #f8fafc, #e2e8f0);
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid #e2e8f0;
}

.legend-title {
  font-size: 1.2rem;
  color: #2d3748;
  margin-bottom: 1rem;
  font-weight: 600;
}

.legend-items {
  display: flex;
  gap: 2rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.legend-badge {
  width: 20px;
  height: 20px;
  border-radius: 50%;
}

.legend-badge.win {
  background: linear-gradient(135deg, #c6f6d5, #48bb78);
}

.legend-badge.loss {
  background: linear-gradient(135deg, #fed7d7, #f56565);
}

.legend-badge.draw {
  background: linear-gradient(135deg, #feebc8, #ed8936);
}

/* Error Message */
.error-message {
  background: linear-gradient(135deg, #fed7d7, #f56565);
  color: #742a2a;
  padding: 2rem;
  border-radius: 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.error-icon {
  font-size: 3rem;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: #718096;
}

.empty-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: #2d3748;
}

.empty-state p {
  font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .header-content {
    padding: 1rem;
    flex-direction: column;
    gap: 1rem;
  }

  .site-title {
    font-size: 1.25rem;
  }

  .page-title {
    font-size: 2rem;
    flex-direction: column;
    gap: 0.5rem;
  }

  .title-icon {
    font-size: 2rem;
  }

  .content-container {
    padding: 0 1rem;
  }

  .filter-wrapper,
  .results-wrapper {
    padding: 1.5rem;
  }

  .filter-group {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .filter-label {
    justify-content: center;
  }

  .modern-select {
    width: 100%;
    min-width: unset;
  }

  /* Mobile Table Optimization */
  .results-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Optimized table layout for mobile */
  .results-table {
    table-layout: fixed;
    width: 100%;
    min-width: 520px; /* Increased to use more available space */
    font-size: 0.8rem;
  }

  /* Optimized column widths for mobile - much larger date column */
  .results-table th:nth-child(1) /* Datum */,
  .results-table td:nth-child(1) {
    width: 130px; /* Significantly increased for full date display */
  }

  .results-table th:nth-child(2) /* Sezóna */,
  .results-table td:nth-child(2) {
    width: 60px; /* Increased slightly */
  }

  .results-table th:nth-child(3) /* Liga */,
  .results-table td:nth-child(3) {
    width: 35px; /* Increased slightly */
  }

  .results-table th:nth-child(4) /* Kolo */,
  .results-table td:nth-child(4) {
    width: 35px; /* Increased slightly */
  }

  .results-table th:nth-child(5) /* Domácí */,
  .results-table td:nth-child(5) {
    width: 110px; /* Increased slightly */
  }

  .results-table th:nth-child(6) /* Hosté */,
  .results-table td:nth-child(6) {
    width: 110px; /* Increased slightly */
  }

  .results-table th:nth-child(7) /* Skóre */,
  .results-table td:nth-child(7) {
    width: 70px; /* Increased slightly */
  }

  /* Improve team cell display */
  .team-cell {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: unset;
    width: 100%;
    gap: 0.3rem; /* Reduced gap further */
  }

  .team-logo-container {
    width: 18px; /* Smaller logo */
    height: 18px;
    flex-shrink: 0;
  }

  .team-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80px; /* Adjusted for new layout */
    font-size: 0.75rem;
  }

  /* Ensure score is properly aligned */
  .score-cell {
    text-align: center;
    white-space: nowrap;
  }

  .score-badge {
    min-width: 50px; /* Reduced */
    padding: 0.3rem 0.4rem; /* Reduced padding */
    font-size: 0.75rem;
    font-weight: 600;
  }

  .legend-items {
    flex-direction: column;
    gap: 1rem;
  }

  .logo-image {
    width: 3rem;
    height: 2rem;
  }

  /* Date cell optimization */
  .date-cell {
    font-size: 0.75rem;
    font-weight: 500;
  }

  .season-cell,
  .league-cell,
  .round-cell {
    font-size: 0.7rem;
  }
}

@media (max-width: 480px) {
  .page-title {
    font-size: 1.5rem;
  }

  .page-subtitle {
    font-size: 1rem;
  }

  .filter-wrapper,
  .results-wrapper {
    padding: 1rem;
  }

  /* Further optimization for very small screens */
  .results-table {
    min-width: 480px; /* Increased to use more space */
    font-size: 0.75rem;
  }

  /* Adjust column widths for very small screens */
  .results-table th:nth-child(1),
  .results-table td:nth-child(1) {
    width: 125px; /* Still very generous for date */
  }

  .results-table th:nth-child(2),
  .results-table td:nth-child(2) {
    width: 55px;
  }

  .results-table th:nth-child(3),
  .results-table td:nth-child(3) {
    width: 32px;
  }

  .results-table th:nth-child(4),
  .results-table td:nth-child(4) {
    width: 32px;
  }

  .results-table th:nth-child(5),
  .results-table td:nth-child(5) {
    width: 105px;
  }

  .results-table th:nth-child(6),
  .results-table td:nth-child(6) {
    width: 105px;
  }

  .results-table th:nth-child(7),
  .results-table td:nth-child(7) {
    width: 65px;
  }

  .team-name {
    max-width: 70px;
    font-size: 0.7rem;
  }

  .score-badge {
    min-width: 45px;
    padding: 0.25rem 0.3rem;
    font-size: 0.7rem;
  }

  .team-logo-container {
    width: 16px;
    height: 16px;
  }
}

/* Remove horizontal scroll indicator for mobile since we optimized the layout */
@media (max-width: 768px) {
  .results-table-container::after {
    display: none; /* Remove scroll indicator since table should fit better now */
  }
}
