:root {
  --primary: #22A699;
  --primary-dark: #1a8278;
  --primary-light: #2dbfaf;
  --accent: #F24C3D;
  --accent-dark: #d43829;
  --orange: #F29727;
  --text-dark: #1e2432;
  --text-med: #53627c;
  --text-light: #fff;
  --card-bg: #ffffff;
  --card-shadow: rgba(0, 0, 0, 0.08);
  --border-radius: 16px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--text-dark);
  min-height: 100vh;
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
}

/* Animowane tło */
.background-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
  animation: breathe 8s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.6; }
}

/* Header */
.header-gradient {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 4rem 2rem 3rem;
  text-align: center;
  color: white;
  position: relative;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.header-gradient::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 0%, rgba(255,255,255,0.1) 0%, transparent 70%);
  pointer-events: none;
}

.header-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.header-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.header-content h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  margin-bottom: 0.8rem;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  letter-spacing: -0.5px;
}

.subtitle {
  font-size: 1.1rem;
  opacity: 0.95;
  margin-bottom: 1.5rem;
  font-weight: 400;
}

.version-badges {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  flex-wrap: wrap;
}

.badge {
  display: inline-block;
  padding: 0.5rem 1.2rem;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 600;
  backdrop-filter: blur(10px);
  transition: var(--transition);
}

.badge-current {
  background: rgba(255, 255, 255, 0.25);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.badge-date {
  background: rgba(0, 0, 0, 0.2);
}

.badge-new {
  background: linear-gradient(135deg, var(--accent), var(--orange));
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* Container */
.container {
  max-width: 1200px;
  margin: -2rem auto 3rem;
  padding: 0 1.5rem 2rem;
  position: relative;
  z-index: 1;
}

/* Przycisk powrotu - ZACHOWANY ORYGINALNY STYL */
.back-button {
  background: linear-gradient(135deg, var(--orange), var(--accent));
  color: white;
  border: none;
  padding: 0.9rem 1.8rem;
  font-size: 1rem;
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 600;
  box-shadow: 0 6px 20px rgba(242, 76, 61, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 2.5rem;
}

.back-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(242, 76, 61, 0.45);
}

.back-button .arrow {
  font-size: 1.2rem;
  transition: var(--transition);
}

.back-button:hover .arrow {
  transform: translateX(-3px);
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.stat-card {
  background: rgba(255, 255, 255, 0.95);
  padding: 2rem;
  border-radius: var(--border-radius);
  text-align: center;
  box-shadow: 0 8px 30px var(--card-shadow);
  transition: var(--transition);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.stat-icon {
  font-size: 2.5rem;
  margin-bottom: 0.8rem;
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.3rem;
}

.stat-label {
  font-size: 0.95rem;
  color: var(--text-med);
  font-weight: 500;
}

/* Section */
.section {
  margin-bottom: 3rem;
}

.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: white;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

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

/* API Cards */
.api-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.api-card {
  background: rgba(255, 255, 255, 0.95);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: 0 8px 30px var(--card-shadow);
  transition: var(--transition);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.api-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.api-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.api-header img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.api-header h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-dark);
}

.api-desc {
  color: var(--text-med);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.api-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  background: rgba(34, 166, 153, 0.1);
  color: var(--primary-dark);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* Major Version (Grupowane wersje) */
.major-version {
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--border-radius);
  margin-bottom: 2rem;
  box-shadow: 0 8px 30px var(--card-shadow);
  overflow: hidden;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.major-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 1.5rem 2rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
}

.major-header:hover {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
}

.major-info h2 {
  font-size: 1.6rem;
  margin-bottom: 0.3rem;
  font-weight: 700;
}

.major-date {
  font-size: 0.95rem;
  opacity: 0.9;
  margin-right: 1rem;
}

.major-content {
  padding: 2rem;
}

.major-description {
  background: rgba(34, 166, 153, 0.05);
  padding: 1.5rem;
  border-radius: 12px;
  margin-bottom: 2rem;
  border-left: 4px solid var(--primary);
}

.major-description p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-dark);
}

/* Minor Version Group (np. 1.7, 1.8) */
.minor-version-group {
  margin-bottom: 2rem;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.minor-header {
  padding: 1.2rem 1.5rem;
  background: rgba(34, 166, 153, 0.15);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.minor-header:hover {
  background: rgba(34, 166, 153, 0.25);
}

.minor-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.minor-info h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: white;
  margin: 0;
}

.minor-count {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.1);
  padding: 0.3rem 0.8rem;
  border-radius: 12px;
  font-weight: 500;
}

.minor-content {
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.02);
}

/* Version Card */
.version-card {
  background: white;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(34, 166, 153, 0.15);
  overflow: hidden;
  transition: var(--transition);
}

.version-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 20px rgba(34, 166, 153, 0.15);
}

.version-card.featured {
  border: 2px solid var(--primary);
  box-shadow: 0 6px 30px rgba(34, 166, 153, 0.2);
}

.version-header {
  padding: 1.3rem 1.8rem;
  background: rgba(34, 166, 153, 0.03);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
  border-bottom: 1px solid rgba(34, 166, 153, 0.1);
}

.version-header:hover {
  background: rgba(34, 166, 153, 0.08);
}

.version-header.active {
  background: rgba(34, 166, 153, 0.1);
}

.version-info h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.3rem;
}

.version-date {
  font-size: 0.9rem;
  color: var(--text-med);
}

.toggle-icon {
  font-size: 1.2rem;
  color: var(--primary);
  transition: var(--transition);
  font-weight: bold;
}

.version-content {
  padding: 1.8rem;
  display: none;
}

/* Feature Categories */
.feature-category {
  margin-bottom: 2rem;
}

.feature-category h4 {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgba(34, 166, 153, 0.2);
}

.feature-list {
  list-style: none;
}

.feature-list > li {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  border-radius: 8px;
  transition: var(--transition);
}

.feature-list > li:hover {
  background: rgba(34, 166, 153, 0.03);
}

.feature-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
  width: 40px;
  text-align: center;
}

.feature-text {
  flex: 1;
}

.feature-text strong {
  font-size: 1.05rem;
  color: var(--text-dark);
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
}

.feature-text p {
  color: var(--text-med);
  line-height: 1.6;
  font-size: 0.95rem;
}

/* Tech Details */
.tech-details {
  background: linear-gradient(135deg, rgba(34, 166, 153, 0.05), rgba(34, 166, 153, 0.02));
  padding: 1.5rem;
  border-radius: 12px;
  margin-top: 2rem;
  border-left: 4px solid var(--primary);
}

.tech-details h5 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 1rem;
}

.tech-details ul {
  list-style: none;
}

.tech-details ul li {
  padding: 0.4rem 0;
  color: var(--text-dark);
  position: relative;
  padding-left: 1.5rem;
}

.tech-details ul li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: bold;
}

/* Footer */
.footer {
  text-align: center;
  padding: 2rem 1rem;
  margin-top: 3rem;
  color: white;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.footer p {
  margin-bottom: 0.5rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: white;
  text-decoration: none;
  transition: var(--transition);
  font-weight: 500;
}

.footer-links a:hover {
  color: var(--primary-light);
  text-decoration: underline;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .header-content h1 {
    font-size: 2rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .stat-card {
    padding: 1.5rem;
  }

  .api-grid {
    grid-template-columns: 1fr;
  }

  .major-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .major-info h2 {
    font-size: 1.3rem;
  }

  .minor-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .minor-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
  }

  .version-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .toggle-icon {
    align-self: flex-end;
  }

  .feature-list > li {
    flex-direction: column;
    gap: 0.5rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .container {
    padding: 0 1rem 2rem;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

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

  .stat-value {
    font-size: 2rem;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Dark mode support (opcjonalnie) */
@media (prefers-color-scheme: dark) {
  .version-card,
  .stat-card,
  .api-card {
    background: rgba(255, 255, 255, 0.98);
  }
}
