@font-face {
  font-family: "ProtestStrike";
  src: url("../souborykaktus/PROTESTSTRIKEFONT.ttf");
  font-display: swap;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "ProtestStrike";
  line-height: 1.6;
  color: #1a3a1a;
  background: linear-gradient(135deg, #f8f9fa 0%, #f1f3f4 25%, #e8eaed 50%, #2d7a2d 75%, #E3E3E3 100%);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow-x: hidden;
}

/* Kaktusové pozadí pro statistiky */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at 25% 75%, rgba(76, 175, 80, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 75% 25%, rgba(102, 187, 106, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(139, 195, 74, 0.04) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
  animation: kaktusFloat 35s ease-in-out infinite;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes kaktusFloat {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  25% { transform: translateY(-5px) rotate(0.2deg); }
  50% { transform: translateY(-2px) rotate(-0.2deg); }
  75% { transform: translateY(-7px) rotate(0.1deg); }
}

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

/* 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-icon {
  font-size: 2rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

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

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

.modern-header .nav-button {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
  border: 1px solid transparent;
  text-transform: none;
  letter-spacing: 0;
  box-shadow: none;
  white-space: nowrap;
}

.modern-header .nav-button.primary {
  background: rgba(47, 107, 31, 0.08);
  color: #14532d;
  border-color: rgba(47, 107, 31, 0.22);
}

.modern-header .nav-button.primary:hover {
  background: rgba(47, 107, 31, 0.12);
  transform: translateY(-1px);
  box-shadow: none;
}

.modern-header .nav-button:focus-visible {
  outline: 3px solid rgba(47, 107, 31, 0.35);
  outline-offset: 3px;
}


.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";
  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);
}

/* Stats Wrapper */
.stats-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);
}

/* Stats Sections */
.stats-section {
  margin-bottom: 3rem;
}

.stats-section:last-child {
  margin-bottom: 0;
}

.section-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  animation: fadeIn 0.6s ease forwards;
}

.section-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.section-header {
  background: linear-gradient(135deg, #f8fafc, #e2e8f0);
  padding: 2rem;
  text-align: center;
  border-bottom: 1px solid #e2e8f0;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2d3748;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.section-icon {
  font-size: 1.8rem;
}

.section-subtitle {
  color: #718096;
  font-size: 1rem;
}

.section-content {
  padding: 2rem;
}

/* Forms */
.stats-form {
  margin-bottom: 2rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #374151;
  font-size: 0.9rem;
}

.label-icon {
  font-size: 1rem;
}

.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;
  width: 100%;
}

.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;
}

.form-actions {
  text-align: center;
}

.submit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  background: linear-gradient(135deg, #4caf50, #45a049);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

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

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

/* Filter Section */
.filter-section {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
  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;
}

/* Results Section */
.results-section {
  margin-top: 2rem;
}

.pk-statistiky-updating {
  opacity: 0.55;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.pk-ranking-body {
  transition: opacity 0.2s ease;
}

.ranking-section.pk-statistiky-updating .pk-ranking-body {
  animation: fadeIn 0.35s ease forwards;
}

.results-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.results-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #2d3748;
  margin-bottom: 0.5rem;
}

.results-subtitle {
  color: #718096;
  font-size: 1rem;
}

/* Tables */
.table-container {
  overflow-x: auto;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  background: white;
}

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

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

.modern-table th {
  padding: 1rem 0.75rem;
  font-weight: 600;
  color: #2d3748;
  border-bottom: 2px solid #e2e8f0;
  text-align: left;
}

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

.modern-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);
}

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

/* Ranking Table */
.ranking-table .ranking-row:hover {
  background: linear-gradient(135deg, #f0fff4, #e6fffa);
}

.ranking-position {
  text-align: center;
}

.position-badge {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: white;
}

.position-badge.position-1 {
  background: linear-gradient(135deg, #ffd700, #ffb347);
}

.position-badge.position-2 {
  background: linear-gradient(135deg, #c0c0c0, #a8a8a8);
}

.position-badge.position-3 {
  background: linear-gradient(135deg, #cd7f32, #b8860b);
}

.position-badge:not(.position-1):not(.position-2):not(.position-3) {
  background: linear-gradient(135deg, #718096, #4a5568);
}

.player-name {
  font-weight: 600;
  color: #2d3748;
}

.stat-cell,
.average-cell {
  text-align: center;
}

/* Stat Values */
.stat-value {
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  display: inline-block;
  min-width: 2rem;
  text-align: center;
}

.stat-value.highlight {
  background: linear-gradient(135deg, #ffd89b, #19547b);
  color: white;
}

.stat-value.success {
  background: linear-gradient(135deg, #a8edea, #fed6e3);
  color: #2d3748;
}

.stat-value.warning {
  background: linear-gradient(135deg, #ffeaa7, #fab1a0);
  color: #2d3748;
}

.stat-value.danger {
  background: linear-gradient(135deg, #ff7675, #fd79a8);
  color: white;
}

.stat-value.star {
  background: linear-gradient(135deg, #fdcb6e, #e17055);
  color: white;
}

/* Status Badges */
.status-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge.active {
  background: linear-gradient(135deg, #48bb78, #38a169);
  color: white;
}

.status-badge.inactive {
  background: linear-gradient(135deg, #f56565, #e53e3e);
  color: white;
}

.status-badge.star {
  background: linear-gradient(135deg, #fdcb6e, #e17055);
  color: white;
}

/* Ranking Section */
.ranking-section {
  margin-top: 2rem;
}

.ranking-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.ranking-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2d3748;
}

/* Alert Messages */
.alert {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: 12px;
  margin: 1rem 0;
  font-weight: 500;
}

.alert-info {
  background: linear-gradient(135deg, #bee3f8, #90cdf4);
  color: #2c5282;
}

.alert-warning {
  background: linear-gradient(135deg, #feebc8, #f6ad55);
  color: #7b341e;
}

.alert-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

/* 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;
}

/* Action Buttons Section */
.actions-section {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #e2e8f0;
}

.action-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.action-button.primary {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.action-button.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.action-button.secondary {
  background: linear-gradient(135deg, #48bb78, #38a169);
  color: white;
  box-shadow: 0 4px 15px rgba(72, 187, 120, 0.3);
}

.action-button.secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(72, 187, 120, 0.4);
}

/* 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;
  }

  .stats-wrapper {
    padding: 1.5rem;
  }

  .section-header {
    padding: 1.5rem;
  }

  .section-content {
    padding: 1.5rem;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .filter-section {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .modern-select {
    width: 100%;
  }

  .modern-table {
    font-size: 0.8rem;
  }

  .modern-table th,
  .modern-table td {
    padding: 0.5rem 0.25rem;
  }

  .action-buttons {
    flex-direction: column;
    align-items: center;
  }

  .action-button {
    width: 100%;
    max-width: 300px;
  }

  .modern-header .nav-button {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
}

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

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

  .stats-wrapper {
    padding: 1rem;
  }

  .section-header {
    padding: 1rem;
  }

  .section-content {
    padding: 1rem;
  }

  .section-title {
    font-size: 1.2rem;
    flex-direction: column;
    gap: 0.5rem;
  }

  .modern-table {
    font-size: 0.7rem;
  }

  .modern-table th,
  .modern-table td {
    padding: 0.4rem 0.2rem;
  }

  .stat-value {
    font-size: 0.8rem;
    padding: 0.2rem 0.4rem;
    min-width: 1.5rem;
  }

  .position-badge {
    width: 1.5rem;
    height: 1.5rem;
    font-size: 0.8rem;
  }
}

/* Loading animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section-card:nth-child(even) {
  animation-delay: 0.1s;
}

.section-card:nth-child(3n) {
  animation-delay: 0.2s;
}
