/* main.css - główny arkusz stylów dla aplikacji quizowej */

/* === RESET I PODSTAWOWE STYLE === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f5f7fa;
  margin: 0;
  padding: 0;
}

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

/* === NAGŁÓWKI === */
h1, h2, h3 {
  margin-bottom: 0.5em;
  font-weight: 700;
  line-height: 1.2;
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.5rem;
}

/* === HEADER === */
.main-header {
  background: linear-gradient(135deg, #007bff, #0056b3);
  color: white;
  padding: 60px 20px;
  text-align: center;
  margin-bottom: 30px;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.main-header h1 {
  margin-bottom: 10px;
  font-size: 2.8rem;
}

.main-header p {
  font-size: 1.2rem;
  opacity: 0.9;
}

/* === FOOTER === */
.footer {
  text-align: center;
  padding: 20px;
  margin-top: 50px;
  color: #666;
  font-size: 0.9rem;
}

/* === PRZYCISKI === */
.btn {
  display: inline-block;
  background-color: #007bff;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  text-decoration: none;
  transition: background-color 0.3s ease, transform 0.1s ease;
}

.btn:hover {
  background-color: #0069d9;
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn.secondary {
  background-color: #28a745;
}

.btn.secondary:hover {
  background-color: #218838;
}

.btn.danger {
  background-color: #dc3545;
}

.btn.danger:hover {
  background-color: #c82333;
}

/* === FORMULARZE === */
.form-container {
  background: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

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

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

.form-control {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 1rem;
}

.form-control:focus {
  border-color: #007bff;
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.2);
}

.form-check {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
  margin-right: 10px;
  width: 18px;
  height: 18px;
}

.form-actions {
  margin-top: 30px;
  text-align: center;
}

/* === QUIZ === */
.quiz-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 30px;
  margin-bottom: 30px;
}

.question {
  margin-bottom: 30px;
}

.question-number {
  font-weight: 700;
  color: #007bff;
  margin-bottom: 10px;
}

.question-text {
  font-size: 1.2rem;
  margin-bottom: 15px;
}

.options {
  list-style: none;
  padding: 0;
}

.option {
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 5px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.option:hover {
  background-color: #f8f9fa;
}

.option.selected {
  background-color: #d0e8ff;
  border-color: #007bff;
}

.correct {
  background-color: #d4edda;
  border-color: #28a745;
}

.incorrect {
  background-color: #f8d7da;
  border-color: #dc3545;
}

/* === KARTY WYNIKÓW === */
.results-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 30px;
  margin-bottom: 30px;
  text-align: center;
}

.score-display {
  margin: 30px 0;
}

.score-number {
  font-size: 3rem;
  font-weight: 700;
  color: #007bff;
  margin-bottom: 10px;
}

.score-text {
  font-size: 1.2rem;
  color: #666;
}

.score-details {
  margin-bottom: 30px;
}

.score-table {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  border-collapse: collapse;
  text-align: left;
}

.score-table td {
  padding: 8px 15px;
}

.score-table td:first-child {
  font-weight: 600;
}

/* === WYKRESY === */
.chart-container {
  position: relative;
  height: 300px;
  max-width: 700px;
  margin: 0 auto 30px;
}

/* === MEDIA QUERIES === */
@media (max-width: 768px) {
  .main-header {
    padding: 40px 20px;
  }
  
  .main-header h1 {
    font-size: 2rem;
  }
  
  .container {
    padding: 0 15px;
  }
  
  .quiz-container,
  .results-container,
  .form-container {
    padding: 20px;
  }
  
  .btn {
    padding: 8px 16px;
    font-size: 0.9rem;
  }
}

/* === ANIMACJE === */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-in {
  animation: fadeIn 0.5s ease-in;
}

@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.slide-up {
  animation: slideUp 0.5s ease-out;
}

/* === TABELA WYNIKÓW === */
.leaderboard {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  background: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  overflow: hidden;
}

.leaderboard th,
.leaderboard td {
  padding: 12px 15px;
  text-align: left;
}

.leaderboard thead {
  background-color: #007bff;
  color: white;
}

.leaderboard tr:nth-child(even) {
  background-color: #f2f2f2;
}

.leaderboard tbody tr:hover {
  background-color: #e6f2ff;
}

.top-scorer {
  background-color: #fff8e1 !important;
}

/* === SPINNER ŁADOWANIA === */
.spinner {
  border: 4px solid rgba(0, 0, 0, 0.1);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border-left-color: #007bff;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* === KOMUNIKATY === */
.alert {
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 4px;
}

.alert-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-danger {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.alert-info {
  background-color: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}
.trophy {
font-size: 70px;
padding-bottom: 20px;
}