/* ==========================================
   GŁÓWNE STYLE DLA SYSTEMU QUIZÓW
   ========================================== */

/* Import czcionek */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* Zmienne kolorów */
:root {
  --primary-color: #cc66ff;
  --primary-light: #d98fff;
  --primary-dark: #a347d1;
  --secondary-color: #ff6b9d;
  --warning-color: #ffc107;
  --success-color: #28a745;
  --danger-color: #dc3545;
}

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

body {
  font-family: 'Poppins', sans-serif;
  background-color: #f5f5f5;
  color: #333;
  line-height: 1.6;
}

/* Nagłówek quizu */
.quiz-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  padding: 30px 0;
  text-align: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.quiz-header h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  font-weight: 700;
}

.quiz-header p {
  font-size: 1.1rem;
  opacity: 0.9;
}

/* Kontener główny */
.main-quiz-container {
  max-width: 700px;
  margin: -50px auto 40px;
  position: relative;
  z-index: 1;
}

.quiz-container {
  max-width: 800px;
  margin: -50px auto 40px;
  position: relative;
  z-index: 1;
}

/* Karty */
.card {
  border: none;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  background-color: white;
  margin-bottom: 20px;
  min-height: 400px;
}

.card-body {
  padding: 30px;
}

/* Przyciski */
.btn {
  padding: 12px 25px;
  border-radius: 10px;
  font-weight: 600;
  transition: all 0.3s;
  text-transform: none;
  font-size: 1rem;
  border: none;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary-color) 100%);
}

.btn-success {
  background-color: var(--success-color);
  color: white;
}

.btn-danger {
  background-color: var(--danger-color);
  color: white;
}

.btn-warning {
  background-color: var(--warning-color);
  color: white;
}

.btn-secondary {
  background-color: #6c757d;
  color: white;
}

.btn-info {
  background-color: #17a2b8;
  color: white;
}

.btn-outline-secondary {
  color: var(--primary-color);
  border-color: var(--primary-color);
  transition: all 0.3s;
}

.btn-outline-secondary:hover, .btn-outline-secondary:focus, .btn-outline-secondary:active {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

.btn-outline-primary {
  color: var(--primary-color);
  border-color: var(--primary-color);
  transition: all 0.3s;
}

.btn-outline-primary:hover, .btn-outline-primary:focus, .btn-outline-primary:active {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

/* Progressbary */
.progress {
  height: 8px;
  border-radius: 0;
  overflow: hidden;
  background-color: #e9ecef;
  margin-bottom: 0;
}

.progress-bar {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.bg-primary {
  background-color: var(--primary-color) !important;
}

.bg-warning {
  background-color: var(--warning-color) !important;
}

.bg-success {
  background-color: var(--success-color) !important;
}

.bg-danger {
  background-color: var(--danger-color) !important;
}

/* Badge */
.badge.bg-primary {
  background-color: var(--primary-color) !important;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 20px;
}

/* Timer */
.timer-circle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: conic-gradient(var(--primary-color) var(--progress, 100%), #f0f0f0 0);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-right: 15px;
}

.timer-circle::before {
  content: "";
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: white;
}

.timer-text {
  position: relative;
  font-weight: 600;
  color: var(--primary-color);
}

/* Treść pytania */
.question-text {
  min-height: 80px;
  font-size: 1.25rem;
  margin: 25px 0;
  line-height: 1.6;
  font-weight: 500;
  /* POPRAWKA: Zawijanie tekstu */
  white-space: normal !important;
  overflow: visible !important;
  word-wrap: break-word !important;
  word-break: break-word !important;
  max-width: 100%;
}

/* Sekcja odpowiedzi */
.answers-container {
  min-height: 200px;
}

/* Opcje odpowiedzi */
.answer-option {
  min-height: 60px;
  display: flex;
  align-items: center;
  padding: 15px;
  margin-bottom: 10px;
  border: 2px solid #adb5bd;
  border-radius: 12px;
  transition: all 0.3s;
  cursor: pointer;
  /* POPRAWKA: Zawijanie w opcjach */
  white-space: normal !important;
  overflow: visible !important;
  word-wrap: break-word !important;
  flex-wrap: wrap;
}

.answer-option:hover {
  border-color: var(--primary-color);
  background-color: rgba(204, 102, 255, 0.05);
}

.answer-option.selected {
  border-color: var(--primary-color);
  background-color: rgba(204, 102, 255, 0.1);
}

.form-check-input:checked {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.form-check-label {
  cursor: pointer;
  width: 100%;
  color: #495057;
  font-weight: 400;
  /* POPRAWKA: Najważniejsza zmiana - zawijanie tekstu etykiet */
  white-space: normal !important;
  overflow: visible !important;
  word-wrap: break-word !important;
  word-break: break-word !important;
  hyphens: auto;
}

/* Przycisk "Następne pytanie" */
.next-button-container {
  margin-top: 20px;
  padding-top: 10px;
}

/* Alerty */
.alert-info {
  background-color: rgba(204, 102, 255, 0.1);
  border-color: rgba(204, 102, 255, 0.2);
  color: var(--primary-dark);
}

.alert-info i {
  color: var(--primary-color);
}

/* Formularze */
.form-control {
  border-radius: 10px;
  padding: 12px;
  border: 2px solid #e1e1e1;
  transition: all 0.3s;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.25rem rgba(204, 102, 255, 0.25);
}

.input-with-icon {
  position: relative;
}

.input-with-icon .form-control {
  padding-left: 45px;
}

.input-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #aaa;
}

/* Wyniki quizu */
.result-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  padding: 30px;
  text-align: center;
}

.result-icon {
  font-size: 4rem;
  margin-bottom: 20px;
  color: white;
}

.result-details {
  padding: 25px;
  text-align: center;
}

.score-display {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 20px 0;
  color: var(--primary-color);
}

.circular-progress {
  position: relative;
  height: 150px;
  width: 150px;
  margin: 20px auto;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: transparent !important;
}

.circular-progress::before {
  content: "";
  position: absolute;
  height: 150px;
  width: 150px;
  border-radius: 50%;
  background: conic-gradient(var(--primary-color) var(--progress), #f0f0f0 var(--progress));
}

.circular-progress::after {
  content: "";
  position: absolute;
  height: 120px;
  width: 120px;
  border-radius: 50%;
  background-color: white;
}

.circular-text {
  position: relative;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
  z-index: 1;
}

/* Lista odpowiedzi (results) */
.question-review {
  margin: 25px 0;
  padding: 20px;
  border-radius: 12px;
  border: 2px solid #e9ecef;
  background-color: #f8f9fa;
}

.question-review h5 {
  color: #495057;
  margin-bottom: 20px;
  font-weight: 600;
}

/* Pasek administracyjny */
.navbar-admin {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* DataTables customization */
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: var(--primary-color) !important;
  color: white !important;
  border-color: var(--primary-color) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background: var(--primary-light) !important;
  color: white !important;
  border-color: var(--primary-light) !important;
}

/* Style tabeli */
.table-custom {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(0,0,0,0.05);
}

.table-custom thead {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
}

.table-custom thead th {
  border: none;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  padding: 15px;
}

.table-custom tbody tr {
  transition: all 0.3s;
}

.table-custom tbody tr:hover {
  background-color: rgba(204, 102, 255, 0.05);
  transform: scale(1.01);
}

.table > :not(caption) > * > * {
  padding: 12px 15px;
  vertical-align: middle;
}

#questions-table th,
#tokens-table th,
#results-table th {
  background-color: #f8f9fa;
  font-weight: 600;
  color: #495057;
}

.table > :not(caption) > * > * {
  padding: 6px 10px;
}

.question-text-cell {
  max-width: 500px;
}

.table-responsive {
  margin-bottom: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.text-center {
  text-align: center !important;
}

/* Przyciski akcji w tabelach */
.btn-action {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  margin-right: 5px;
  transition: all 0.2s ease;
  border: none;
}

.btn-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.1);
}

.btn-action.btn-info {
  background-color: #17a2b8;
  color: white;
}

.btn-action.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

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

.action-btns {
  white-space: nowrap;
  text-align: center;
}

/* Style dla edycji pytań */
.answer-row {
  position: relative;
  border: 1px solid #e9ecef;
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 15px;
  background-color: #f8f9fa;
}

.answer-number {
  position: absolute;
  top: -10px;
  left: -10px;
  background-color: var(--primary-color);
  color: white;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.remove-answer-btn {
  border-radius: 6px;
  padding: 5px 10px;
  transition: all 0.2s;
}

.remove-answer-btn:hover:not(:disabled) {
  background-color: #c82333;
  transform: translateY(-2px);
}

.form-check-inline {
  display: inline-flex;
  align-items: center;
  margin-right: 10px;
  /* POPRAWKA: Zawijanie dla form-check-inline */
  white-space: normal !important;
  width: auto;
}

/* Wygląd radio button jako poprawnej odpowiedzi */
.correct-answer-radio:checked {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

/* Style dla podglądu odpowiedzi */
.answer-card {
  display: flex;
  align-items: center;
  padding: 15px;
  margin-bottom: 15px;
  border-radius: 10px;
  border: 1px solid #e9ecef;
  background-color: #f8f9fa;
  position: relative;
}

.answer-card.correct {
  background-color: rgba(40, 167, 69, 0.1);
  border-color: rgba(40, 167, 69, 0.3);
  border-left: 5px solid #28a745;
}

.answer-text {
  flex: 1;
  padding: 0 15px;
  /* POPRAWKA: Zawijanie dla answer-text */
  white-space: normal !important;
  word-wrap: break-word !important;
}

.answer-points {
  flex: 0 0 60px;
  text-align: right;
  font-weight: bold;
  color: #28a745;
}

.correct-badge {
  font-weight: 600;
}

/* Style dla statystyk odpowiedzi */
.stats-bar {
  height: 25px;
  border-radius: 5px;
  margin-top: 5px;
  margin-bottom: 15px;
  position: relative;
  overflow: hidden;
  background-color: #e9ecef;
}

.stats-bar-fill {
  height: 100%;
  position: absolute;
  left: 0;
  top: 0;
  transition: width 0.5s ease;
}

.stats-bar-fill.correct {
  background-color: #28a745;
}

.stats-bar-fill.incorrect {
  background-color: #6c757d;
}

.stats-label {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  font-weight: bold;
  z-index: 2;
  text-shadow: 0 0 3px rgba(0,0,0,0.5);
}

.stats-card {
  border: 1px solid #e9ecef;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
}

.stats-title {
  font-weight: 600;
  margin-bottom: 15px;
}

.stats-summary {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
}

.stats-summary-item {
  text-align: center;
  padding: 10px;
  background-color: #f8f9fa;
  border-radius: 10px;
  flex: 1;
  margin: 0 5px;
}

.stats-summary-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.stats-summary-label {
  font-size: 0.9rem;
  color: #6c757d;
}

/* ==========================================
   MEDIA QUERIES DLA RESPONSYWNOŚCI
   ========================================== */

@media (max-width: 850px) {
  .quiz-container {
    width: 95%;
  }
  
  .main-quiz-container {
    width: 95%;
  }
  
  .question-text {
    font-size: 1.1rem;
  }
  
  .card-body {
    padding: 15px;
  }
  
  .quiz-header h1 {
    font-size: 1.5rem;
  }
}

@media (max-width: 767px) {
  /* Poprawki dla opcji odpowiedzi na małych ekranach */
  .answer-option {
    width: 100%;
    min-height: auto;
    height: auto;
    padding: 10px;
  }
  
  .form-check {
    margin-bottom: 0;
  }
  
  /* Poprawki dla kontenera quizu na urządzeniach mobilnych */
  .quiz-container {
    width: 100%;
    padding: 10px;
  }
  
  /* Poprawienie stylu pytania dla lepszej czytelności */
  .question-text {
    font-size: 1rem;
    min-height: auto;
    margin: 15px 0;
  }
}

@media (max-width: 576px) {
  .card {
    min-height: auto;
  }
  
  .question-text {
    min-height: auto;
  }
  
  .answers-container {
    min-height: auto;
  }
  
  .stats-summary {
    flex-direction: column;
  }
  
  .stats-summary-item {
    margin: 5px 0;
  }
  
  /* Dodatkowe zmniejszenie paddingu na małych ekranach */
  .answer-option {
    padding: 10px 8px;
  }
  
  .form-check-label {
    font-size: 0.95rem;
    line-height: 1.4;
  }
  
  .question-text {
    font-size: 1rem;
    line-height: 1.5;
  }
  
  /* Zapewnij, że kontenery mają odpowiednią szerokość */
  .quiz-container,
  .main-quiz-container {
    max-width: 100%;
    overflow-x: hidden;
  }
  
  .card {
    overflow-x: hidden;
  }
  
  .card-body {
    overflow-x: hidden;
    padding: 15px 10px;
  }
  
  /* Poprawka dla przycisków na stronie wyników */
  .mt-4.text-center {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  
  .mt-4.text-center .btn {
    width: 100%;
    margin-right: 0 !important;
  }
  
  /* Poprawka dla koła procentowego na mobile */
  .circular-progress {
    height: 120px;
    width: 120px;
  }
  
  .circular-progress::before {
    height: 120px;
    width: 120px;
  }
  
  .circular-progress::after {
    height: 90px;
    width: 90px;
  }
  
  .circular-progress .progress-value {
    font-size: 2rem;
  }
  
  .result-visual-wrapper .level-badge {
    font-size: 0.9rem;
    padding: 8px 20px;
  }
}

/* Dodatkowe poprawki dla bardzo małych ekranów */
@media (max-width: 400px) {
  .card-body {
    padding: 10px;
  }
  
  .answer-option {
    padding: 8px 6px;
    margin-bottom: 8px;
  }
  
  .timer-circle {
    width: 40px;
    height: 40px;
    margin-right: 10px;
  }
  
  .timer-circle::before {
    width: 32px;
    height: 32px;
  }
  
  .timer-text {
    font-size: 0.9rem;
  }
  
  .form-check-label {
    font-size: 0.9rem;
  }
  
  .card-body {
    padding: 12px 8px;
  }
  
  /* Jeszcze mniejsze koło na bardzo małych ekranach */
  .circular-progress {
    height: 100px;
    width: 100px;
  }
  
  .circular-progress::before {
    height: 100px;
    width: 100px;
  }
  
  .circular-progress::after {
    height: 75px;
    width: 75px;
  }
  
  .circular-progress .progress-value {
    font-size: 1.5rem;
  }
  
  /* Przyciski jeden pod drugim */
  .d-flex.gap-2 {
    flex-direction: column !important;
  }
  
  .d-flex.gap-2 .btn {
    width: 100% !important;
    margin-bottom: 8px;
  }
}

/* Style dla zdjęć w pytaniach */
.question-image {
  display: flex;
  justify-content: center;
  margin: 1rem auto;
  max-width: 75%;
  max-height: 350px;
  overflow: hidden;
}

.question-image img {
  max-width: 100%;
  max-height: 300px;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.question-image img {
  animation: fadeIn 0.5s ease-in-out;
}

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

/* Style dla przycisków kopiowania tokenów */
.copy-token-btn {
  margin-left: 8px;
  padding: 2px 6px;
  font-size: 0.8rem;
}

.copy-token-btn:hover {
  background-color: var(--primary-light);
  color: white;
}

/* Styl dla obrazków na urządzeniach mobilnych */
@media (max-width: 767px) {
  .question-image {
    max-width: 100%;
    max-height: 250px;
  }
  
  .question-image img {
    max-height: 230px;
  }
}

/* ==========================================
   DODATKOWE ZABEZPIECZENIA DLA DŁUGICH SŁÓW
   ========================================== */

.form-check-label,
.question-text,
.answer-text,
.quiz-card-title,
.quiz-card-description {
  overflow-wrap: break-word !important;
  word-wrap: break-word !important;
  -webkit-hyphens: auto;
  -moz-hyphens: auto;
  -ms-hyphens: auto;
  hyphens: auto;
}

/* Upewnij się, że tabele również są responsywne */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Poprawka dla kart quizów na mobile */
.quiz-card-mobile .quiz-card-title,
.quiz-card-mobile .quiz-card-description {
  white-space: normal !important;
  word-wrap: break-word !important;
}

/* ==========================================
   KRYTYCZNA POPRAWKA DLA KOŁA PROCENTOWEGO
   DODAJ TEN KOD NA KOŃCU PLIKU styles.css
   ========================================== */

/* Resetowanie i poprawka koła procentowego */
.circular-progress {
  position: relative !important;
  height: 150px !important;
  width: 150px !important;
  border-radius: 50% !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  background: transparent !important;
  margin: 20px auto !important;
}

/* Zewnętrzny pierścień z progressem */
.circular-progress::before {
  content: "" !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  height: 150px !important;
  width: 150px !important;
  border-radius: 50% !important;
  /* Używamy calc() do konwersji zmiennej CSS */
  background: conic-gradient(
    #cc66ff calc(var(--progress-percent, 0deg) * 1),
    #e9ecef calc(var(--progress-percent, 0deg) * 1)
  ) !important;
  z-index: 1 !important;
}

/* Wewnętrzny biały krąg */
.circular-progress::after {
  content: "" !important;
  position: absolute !important;
  top: 15px !important;
  left: 15px !important;
  height: 120px !important;
  width: 120px !important;
  border-radius: 50% !important;
  background-color: white !important;
  z-index: 2 !important;
}

/* Tekst z procentem */
.circular-progress .progress-value {
  position: relative !important;
  font-size: 2.5rem !important;
  font-weight: 700 !important;
  color: #cc66ff !important;
  z-index: 3 !important;
  line-height: 1 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Upewnij się że wrapper jest widoczny */
.result-visual-wrapper {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  margin: 30px 0 !important;
  gap: 20px !important;
  min-height: 250px !important;
}

/* ALTERNATYWNE ROZWIĄZANIE - Inline style fallback */
/* Jeśli powyższe nie działa, użyj tego: */
.circular-progress[style*="--progress-percent"] {
  position: relative !important;
}

/* Dla różnych wartości procentowych - fallback */
.circular-progress[data-percentage]::before {
  content: "" !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  height: 150px !important;
  width: 150px !important;
  border-radius: 50% !important;
  background: conic-gradient(
    #cc66ff calc(attr(data-percentage number, 0) * 3.6deg),
    #e9ecef 0deg
  ) !important;
}

/* Mobile responsywność */
@media (max-width: 576px) {
  .circular-progress {
    height: 120px !important;
    width: 120px !important;
  }
  
  .circular-progress::before {
    height: 120px !important;
    width: 120px !important;
  }
  
  .circular-progress::after {
    top: 12px !important;
    left: 12px !important;
    height: 96px !important;
    width: 96px !important;
  }
  
  .circular-progress .progress-value {
    font-size: 2rem !important;
  }
  
  /* Przyciski pod wynikiem */
  .result-details .mt-4.text-center {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
  }
  
  .result-details .btn {
    width: 100% !important;
    margin: 0 !important;
  }
}

@media (max-width: 400px) {
  .circular-progress {
    height: 100px !important;
    width: 100px !important;
  }
  
  .circular-progress::before {
    height: 100px !important;
    width: 100px !important;
  }
  
  .circular-progress::after {
    top: 10px !important;
    left: 10px !important;
    height: 80px !important;
    width: 80px !important;
  }
  
  .circular-progress .progress-value {
    font-size: 1.5rem !important;
  }
}

/* DEBUGOWANIE - USUŃ PO SPRAWDZENIU */
/* .circular-progress {
  border: 2px solid red !important;
} */

/* Animacja pojawiania się koła */
@keyframes rotateIn {
  from {
    transform: rotate(0deg);
    opacity: 0;
  }
  to {
    transform: rotate(360deg);
    opacity: 1;
  }
}

.circular-progress {
  animation: rotateIn 0.8s ease-out;
}

/* Dodatkowa poprawka dla niektórych przeglądarek */
.circular-progress {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* Poprawka dla przycisków Hall of Fame */
.btn-outline-primary {
  white-space: nowrap;
}

/* Jeśli nadal nie działa, spróbuj tego hacka */
.result-visual-wrapper > * {
  visibility: visible !important;
  opacity: 1 !important;
}
/* ==========================================
   OSTATECZNA POPRAWKA CENTROWANIA FOOTERA
   ========================================== */

/* Reset wszystkich możliwych stylów footera */
.quiz-footer {
  /* Reset */
  margin: 0 !important;
  margin-top: auto !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding: 20px 20px !important;
  
  /* Pozycjonowanie */
  width: 100% !important;
  max-width: 100% !important;
  left: 0 !important;
  right: 0 !important;
  
  /* Centrowanie tekstu */
  text-align: center !important;
  
  /* Wygląd */
  background-color: #f8f9fa !important;
  border-top: 1px solid #e9ecef !important;
  color: #6c757d !important;
  font-size: 0.9rem !important;
  
  /* Flexbox jako dodatkowe zabezpieczenie */
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  
  /* Usuń float jeśli jest */
  float: none !important;
  clear: both !important;
  
  /* Box model */
  box-sizing: border-box !important;
}

/* Upewnij się że rodzic nie ma dziwnych stylów */
body {
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  overflow-x: hidden !important;
}

/* Jeśli footer jest w kontenerze */
.quiz-footer-wrapper,
.footer-wrapper {
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  text-align: center !important;
}

/* Dla absolute positioning fallback */
@media screen {
  body {
    position: relative !important;
    min-height: 100vh !important;
    padding-bottom: 80px !important; /* Wysokość footera + padding */
  }
  
  .quiz-footer {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
  }
}

/* Specyficzne dla różnych układów strony */
.main-quiz-container + .quiz-footer,
.quiz-container + .quiz-footer,
.card + .quiz-footer,
.container + .quiz-footer {
  margin-top: 40px !important;
}