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

.stars i {
  font-size: 24px;
  margin-right: 4px;
  color: #ccc; /* domyślny szary kolor dla wszystkich gwiazdek */
}

i.active {
  color: gold; /* kolor gwiazdek zaznaczonych */
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  color: #333;
  background: linear-gradient(135deg, #111529 0%, #2a193b 100%);
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 30px;
  margin-bottom: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.logo h1 {
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 5px;
}

.logo p {
  color: #666;
  font-size: 1.1rem;
  font-weight: 400;
}

.rating-summary {
  text-align: right;
}

.average-rating {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 5px;
}

.rating-number {
  font-size: 2rem;
  font-weight: 700;
  color: #333;
}

.stars {
  display: flex;
  gap: 2px;
}

.star {
  color: #ffd700;
  font-size: 1.2rem;
}

.star.empty {
  color: #ddd;
}

.total-reviews {
  color: #666;
  font-size: 0.9rem;
}

.main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.submit-section,
.reviews-section {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.submit-section h2,
.reviews-section h2 {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 25px;
  color: #333;
}

.form-group {
  margin-bottom: 20px;
  position: relative;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #555;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e1e5e9;
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.3s ease;
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Field validation styles */
.form-group input.field-valid,
.form-group textarea.field-valid {
  border-color: #28a745;
  background-color: rgba(40, 167, 69, 0.05);
}

.form-group input.field-invalid,
.form-group textarea.field-invalid {
  border-color: #dc3545;
  background-color: rgba(220, 53, 69, 0.05);
}

.field-error {
  color: #dc3545;
  font-size: 0.85rem;
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.field-error::before {
  content: "⚠️";
  font-size: 0.8rem;
}

.rating-input {
  display: flex;
  gap: 5px;
  margin-bottom: 10px;
}

.rating-input .star {
  font-size: 2rem;
  color: #ddd;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.rating-input .star:hover,
.rating-input .star.active {
  color: #ffd700;
  transform: scale(1.1);
}

.char-count {
  text-align: right;
  font-size: 0.85rem;
  color: #666;
  margin-top: 5px;
  font-weight: 500;
}

.submit-btn {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.submit-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.btn-loader {
  display: inline-block;
}

.message {
  margin-top: 20px;
  padding: 15px;
  border-radius: 12px;
  font-weight: 500;
  border: 1px solid transparent;
}

.message.success {
  background: #d4edda;
  color: #155724;
  border-color: #c3e6cb;
}

.message.error {
  background: #f8d7da;
  color: #721c24;
  border-color: #f5c6cb;
}

.reviews-list {
  max-height: 600px;
  overflow-y: auto;
}

.review-item {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 15px;
  border-left: 4px solid #667eea;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.review-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.reviewer-name {
  font-weight: 600;
  color: #333;
}

.review-date {
  font-size: 0.85rem;
  color: #666;
}

.review-rating {
  margin-bottom: 10px;
}

.review-text {
  color: #555;
  line-height: 1.6;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.pagination button {
  padding: 8px 16px;
  border: 1px solid #ddd;
  background: white;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
}

.pagination button:hover {
  background: #f8f9fa;
  border-color: #667eea;
}

.pagination button.active {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

.loading {
  text-align: center;
  padding: 40px;
  color: #666;
  font-style: italic;
}

/* Security indicator styles */
.security-badge {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: rgba(40, 167, 69, 0.9);
  color: white;
  padding: 8px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  z-index: 1000;
}

.security-badge::before {
  content: "🔒";
  margin-right: 5px;
}

@media (max-width: 768px) {
  .header {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }

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

  .logo h1 {
    font-size: 2rem;
  }

  .container {
    padding: 15px;
  }

  .submit-section,
  .reviews-section {
    padding: 20px;
  }

  .pagination {
    gap: 5px;
  }

  .pagination button {
    padding: 6px 12px;
    font-size: 0.9rem;
  }
}

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

.review-item {
  animation: fadeIn 0.5s ease;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.btn-loader {
  animation: pulse 1.5s infinite;
}

/* Scrollbar styling */
.reviews-list::-webkit-scrollbar {
  width: 6px;
}

.reviews-list::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.reviews-list::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.reviews-list::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .submit-btn {
    background: #000;
    border: 2px solid #000;
  }

  .review-item {
    border: 2px solid #000;
  }
}

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