/*-------- 1.1 Typography --------*/
html * {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

}

body{
  background-attachment: fixed !important;
}


.bg-img {
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  width: 100vw;
  height: 100vh;
}


footer {
  color: white;
  padding: 25px;
}

footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

footer ul li {
  display: inline-block;
  margin-right: 15px;
}

footer ul li a {
  color: #555;
}

footer ul li:after {
  content: "|";
  font-weight: 300;
  position: relative;
  left: 10px;
}

/*============================================================================================*/
/* 3. COMMON */
/*============================================================================================*/
/*-------- Accordion --------*/

h2{
  color:white !important
}
.card {
  border: 0;
  margin-bottom: 5px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card .card-header {
  background-color: #fff;
  border-bottom: 1px solid #e1e8ed;
  padding: 20px;
}

.card-header h5 {
  font-size: 1rem;
}

.card-header h5 a {
  border: 0;
  display: block;
  color: #444;
}

.card-header h5 a i.indicator {
  font-size: 1.125rem;
  font-weight: normal;
  float: right;
  color: #409fff;
}

.card-header h5 a:hover i.indicator {
  color: #333;
}

/*============================================================================================*/
/* STILI GENERALI */
/*============================================================================================*/
.container {
  max-width: 800px;
  text-align: center;
  padding: 2rem;
}

.title {
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.description {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
}

/* Ricerca */
.search-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin-top: 30px;

}

.search-input-wrapper {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
  max-width: 600px;
}

.search-input {
  width: 250px;
  height: 50px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
  color: #000;
  text-transform: uppercase;
  padding: 0 1rem;
}

#submit-search {
  width: auto;
  min-width: 200px;
  height: 48px;
  margin: 0;
}

#submit-search:hover {
  background-color: #0056b3;
}

/* Risultati ricerca */
.search-results {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.1);
  background: #fff;
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 12px;
  overflow: hidden;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.table thead {
  background: rgba(0, 123, 255, 0.5);
  color: white;
}

.table thead tr {
  text-align: left;
}

.table thead th {
  padding: 15px;
  font-size: 1rem;
  text-transform: uppercase;
}

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

.table tbody tr:hover {
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
}

/* Effetto angoli arrotondati */
.table tr:first-child th:first-child {
  border-top-left-radius: 12px;
}

.table tr:first-child th:last-child {
  border-top-right-radius: 12px;
}

.table tr:last-child td:first-child {
  border-bottom-left-radius: 12px;
}

.table tr:last-child td:last-child {
  border-bottom-right-radius: 12px;
}


/* Loader */
.loading-spinner {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1050;
  background: transparent;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
}

.spinner-border {
  width: 3rem;
  height: 3rem;
}

/* Preferiti */
.favorites-container {
  max-width: 600px;
  margin: 100px auto;
  padding: 20px;
  background-color: #f9f9f9;
  border-radius: 8px;
}

.favorites-title {
  text-align: center;
  color: #333;
  margin-bottom: 30px;
}

.book-card {
  border: 1px solid #ddd;
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 5px;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
  background-color: #fff;
}

.book-title {
  margin: 0;
  color: #007bff;
}

.book-author {
  margin: 5px 0;
  color: #555;
}

.no-favorites {
  text-align: center;
  color: #888;
}

/* Dettagli libro */
.book-details-container {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  margin-top: 22px;
  color: #fff;
  position: relative;
  width: 60%;
  left: 20%;
  /* padding-left: 13%; */
}

.book-details-container2 {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  margin-top: 22px;
  color: #fff;
  position: relative;
  width: 60%;
  left: 0%;
  padding-left: 13%;
}

@media screen and (max-width: 1440px) {
  .book-details-container2 {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    margin-top: 22px;
    color: #fff;
    position: relative;
    width: 60%;
    left: 20%;
    padding-left: 13%;
  }
}

.book-cover2 {
  position: absolute;
  z-index: 1;
  top: 40%;
  left: 53%;
  transform: translate(-240px);
}

.book-cover {
  position: absolute;
  z-index: 1;
  top: 40%;
  left: 31%;
  transform: translate(-240px);
}

.book-cover-img {
  width: 120px;
  height: 200px;
  overflow: hidden;
  border-radius: 8px;
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  object-fit: contain;
}


.book-info {
  text-align: left;
  position: relative;
  background-size: cover;
  background-position: center;
  width: 100%;
  size: 100px;
  padding: 25px;
  padding-left: 77px;

  border-radius: 8px;
}

.card-button {
  border: none;
  border-radius: 15px;
  transition: all 0.3s ease;
  cursor: pointer;
  height: 300px;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  position: relative;
  overflow: hidden;
  padding: 20px;
}

.card-button:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
  color: inherit;
  text-decoration: none;
}

.card-button:active {
  transform: translateY(-2px);
}

.card-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.card-button:hover::before {
  left: 100%;
}

.card-header {
  display: flex;
  align-items: flex-start;
  margin-bottom: 20px;
}

.card-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
  text-align: left;
}

.card-images-container {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  padding: 20px 0;
}

.overlapping-images {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  width: 100%;
  height: 180px;
}

.image-placeholder {
  width: 150px; /* base width */
  aspect-ratio: 127 / 180;
  border-radius: 12px;
  /* background: rgba(255, 255, 255, 0.2); */
  border: 1px solid rgba(255, 255, 255, 0.3);
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.image-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-placeholder i {
  font-size: 2rem;
  color: rgba(255, 255, 255, 0.8);
}

.image-placeholder:nth-child(1) { transform: translateX(-120px) rotate(-5deg); z-index: 1; }
.image-placeholder:nth-child(2) { transform: translateX(-60px) rotate(2deg); z-index: 2; }
.image-placeholder:nth-child(3) { transform: translateX(0px) rotate(-1deg); z-index: 3; }
.image-placeholder:nth-child(4) { transform: translateX(60px) rotate(3deg); z-index: 2; }
.image-placeholder:nth-child(5) { transform: translateX(120px) rotate(-2deg); z-index: 1; }

.card-button:hover .image-placeholder {
  transform: translateX(0) rotate(0deg) scale(1.05);
}

.card-button:hover .image-placeholder:nth-child(1) { transform: translateX(-130px) rotate(-8deg) scale(1.05); }
.card-button:hover .image-placeholder:nth-child(2) { transform: translateX(-70px) rotate(3deg) scale(1.05); }
.card-button:hover .image-placeholder:nth-child(3) { transform: translateX(0px) rotate(-2deg) scale(1.1); }
.card-button:hover .image-placeholder:nth-child(4) { transform: translateX(70px) rotate(4deg) scale(1.05); }
.card-button:hover .image-placeholder:nth-child(5) { transform: translateX(130px) rotate(-3deg) scale(1.05); }

/* Colore unico per tutte le card */
.card-primary,
.card-success,
.card-warning,
.card-info {
  background-color: rgba(72, 94, 114, 0.4);
  color: white;
}

.card-footer-hp {
  position: absolute;
  bottom: 20px;
  right: 20px;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 500;
  color: white !important;
}

.card-footer-hp i {
  font-size: 0.9rem;
  transition: transform 0.3s ease;
}

.card-button:hover .card-footer-hp {
  opacity: 1;
  transform: translateY(0);
}

.card-button:hover .card-footer-hp i {
  transform: translateX(3px);
}

.flag-container {
  position: absolute;
  top: 0;
  right: 20px;
  cursor: pointer;
}

.flag-icon {
  padding-top: 14%;
}

.book-info-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(77, 94, 112, 0.8);
  backdrop-filter: blur(10px);
  border-radius: 8px;
}

.book-info-content {
  position: relative;
  z-index: 1;
  color: #fff;
}

.book-info-content h1 {
  margin-bottom: 10px;
}

.book-info-content ul {
  list-style: none;
  padding: 0;
}

.book-info-content li {
  margin-bottom: 5px;
}

.dynamic-background {
  transition: background-image 0.5s ease-in-out;
}

/* Background video (login page) */
.background-video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.fullscreen-inactivity {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  /* Assicurati che sia sopra gli altri elementi */
}

.background-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Assicurati che il video copra l'intero schermo */
}

/* Login page */
.login-wrapper {
  position: relative;
  height: 100vh;
}

.login-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  background-color: rgba(72, 94, 114, 0.4);
  padding-top: 10px;
  width: 50%;
  margin-left: 50%;
  position: relative;
  z-index: 1;
}

.logo-container {
  display: flex;
  justify-content: center;
  align-items: center;

  margin-bottom: 20px;
}

.logo {
  display: block;
  border-radius: 10px;
  width: 20rem;
}

.login-form {
  display: flex;
  gap: 20px;
  width: 350px;
  padding: 10px;
  border-radius: 20px;
  background-color: transparent;
  align-items: center;
}

.input-container {
  position: relative;
  flex-grow: 1;
}

.input-field {
  width: 350px;
  height: 45px;
  border-radius: 100px;
  padding: 15px 30px 15px 45px;
  background-color: rgba(255, 255, 255, 0.25);
  border: none;
  font-size: 14px;
  color: #fff;
}

.input-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
}

.login-button {
  padding: 10px 30px;
  background-color: rgba(249, 178, 46, 1);
  color: #fff;
  border: none;
  border-radius: 15px;
  cursor: pointer;
  font-size: 16px;
  white-space: nowrap;
}

.login-button:disabled {
  background-color: rgba(249, 178, 46, 0.6);
  cursor: not-allowed;
}

.loader-container {
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(0, 0, 0, 0.2);
  border-top: 4px solid #4c72af;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loading-text {
  margin: 0;
  font-size: 16px;
  color: #4c72af;
}

/* Consolidata .error-message */
.error-message {

  background-color: #ffebee;
  border: 1px solid #ffcdd2;
  color: #c62828;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  max-width: 90%;
  width: 400px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);

}

.success-message {
  color: green;
  margin-top: 20px;
}

.table-book{
  width: 100% !important;
  backdrop-filter: blur(10px) !important;
  background: rgba(255, 255, 255, 0.1) !important;
  border-radius: 16px !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
  color: #ffffff !important;
  font-family: 'Inter', sans-serif !important;
  text-align: center !important;
}
.table-book tr:hover {
  background-color: rgba(255, 255, 255, 0.1) !important;
}

.table-book table {
  width: 100%;
  border-collapse: collapse;
}

.table-book th, .table-book td {
  padding: 12px 16px;
}

.table-book thead {
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.table-book tr:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

@media (max-width: 576px) {
  .error-message {
    width: 90%;
    max-width: 300px;
    padding: 15px;
    font-size: 0.9rem;
  }

  .error-message .btn {
    width: 100%;
  }
}

.card-bg-blur {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(10px);
  opacity: 0.5;
  z-index: 0;
}

.card-bg-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.2);
  z-index: 1;
}

.card .row {
  position: relative;
  z-index: 2;
}

.error-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 9998;
}

/* Animazione */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

input::placeholder {
  color: rgba(251, 248, 245, 1);
}

/* Carte vinte */
.won-cards-container {
  margin-top: 4rem;
  padding: 1rem;
}

.won-cards-title {
  text-align: center;
  margin-bottom: 2rem;
}

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

.card-item {
  display: flex;
  align-items: center;
  padding: 1rem;
  border: 1px solid #ccc;
  margin-bottom: 1rem;
  border-radius: 8px;
  background-color: #f9f9f9;
}

.card-image {
  width: 100px;
  height: 100px;
  margin-right: 1rem;
}

.card-details {
  flex-grow: 1;
}

.card-details .title {
  font-weight: bold;
  margin-bottom: 5px;
}

.card-details .author {
  color: #555;
}

/* Dettaglio domande e radio button */
.questionnaire-content {
  background-color: #f9f9f9;
  border-radius: 10px;
  padding: 20px;

}

.main-question {
  font-size: 1.2rem;
  line-height: 1.4;
  font-weight: bold;
  margin-bottom: 1.5rem;
  color: #333;
}

.answer-group .form-check-label {
  padding: 12px;
  border-radius: 8px;
  background-color: #f8f9fa;
  transition: all 0.3s ease;
}

.answer-group .form-check-label:hover {
  background-color: #e9ecef;
}

.questionario-container {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 8px 15px;
  margin-left: auto;
}

.answer-group {
  margin-bottom: 1rem;
  padding: 10px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.radio-input {
  display: none;
}

.radio-questions {
  display: flex;
  align-items: center;
  padding: 10px;
  border: 2px solid #ccc;
  border-radius: 8px;
  transition: background 0.3s, border-color 0.3s;
  margin-bottom: 1rem;
  cursor: pointer;
}

.radio-questions:hover {
  background: #f9f9f9;
  border-color: #999;
}

.radio-questions label {
  display: flex;
  align-items: center;
  width: 100%;
  cursor: pointer;
}

.radio-questions label::after {
  content: '';
  display: inline-block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #ccc;
  margin-left: 10px;
  transition: all 0.2s ease;
}

.radio-questions label:has(.radio-input:checked)::after {
  background-color: #007bff;
  border-color: #007bff;
}

.radio-questions label span {
  flex-grow: 1;
}

/* Progressione e risposte */
.progression-title {
  font-size: 1.3rem;
  font-weight: bold;
  margin-bottom: 1.5rem;
  color: #007bff;
}

.answered-questions {
  list-style: none;
  padding: 0;
}

.answered-questions li {
  margin-bottom: 1rem;
  font-size: 1rem;
  color: #333;
  cursor: pointer;
}

.answered-questions .completed {
  color: #28a745;
}

.answered-questions .question-item {
  font-size: 1.1rem;
  color: #555;
}

.answered-questions .question-item:hover {
  text-decoration: underline;
}

.backward-btn,
.submit-btn {
  padding: 10px 15px;
  background-color: #007bff;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1.1rem;
  margin-top: 20px;
}

.backward-btn:hover,
.submit-btn:hover {
  background-color: #0056b3;
}

#bottom-wizard {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
}

#wizard_container {
  background-color: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin-top: 30px;

}

/* Responsive improvements */
@media (max-width: 768px) {
  .card-button {
    height: 250px;
    margin-bottom: 20px;
    padding: 15px;
}

.card-title {
    font-size: 1.3rem;
}

.overlapping-images {
    height: 120px;
}

.image-placeholder {
    width: 90px;
}

.image-placeholder i {
    font-size: 1.5rem;
}

.image-placeholder:nth-child(1) { transform: translateX(-120px) rotate(-5deg); }
.image-placeholder:nth-child(2) { transform: translateX(-60px) rotate(2deg); }
.image-placeholder:nth-child(3) { transform: translateX(0px) rotate(-1deg); }
.image-placeholder:nth-child(4) { transform: translateX(60px) rotate(3deg); }
.image-placeholder:nth-child(5) { transform: translateX(120px) rotate(-2deg); }
  .intro-title {
    font-size: 1.8rem;
  }

  .search-input-wrapper {
    flex-direction: column;
    align-items: stretch;
  }

  .search-input,
  #submit-search {
    width: 100%;
  }

  .col-xl-3,
  .col-xl-9 {
    width: 100%;
    max-width: 100%;
    flex: 0 0 100%;
  }

  .answered-questions {
    margin-bottom: 20px;
  }
}


/* Sezione introduttiva */
.intro-section {
  padding: 40px 0;
  text-align: center;
}

.intro-title {
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 1rem;
  color: #333;
}

.intro-description {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  color: #666;
}

/* Risultati ricerca (tabella) */
.search-results-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.search-results-table th,
.search-results-table td {
  border: 1px solid #ddd;
  padding: 10px;
  text-align: left;
}

.search-results-table th {
  background-color: #f4f4f4;
}

.book-thumbnail {
  width: 50px;
  height: auto;
  border-radius: 5px;
}

.search-results-message,
.no-results-message {
  width: 100%;
  text-align: center;
  margin: 10px auto;
}

.bottone {
  border-color: #fff;
}

/* Header e navigazione */
#header_in {
  position: relative;
  padding: 10px;
  background-color: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 8vh;
  margin-bottom: 20px;
}

.logo {
  display: block;
  border-radius: 10px;
}

.user-info {
  position: absolute;
  top: 20px;
  left: 10px;
  font-size: 1rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.user-avatar {
  display: flex;
  align-items: center;
}

.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  margin-right: 8px;
}

.nickname {
  text-transform: capitalize;
  font-size: 28px;
  font-weight: bold;
  color: #333;
}

.user-cards {
  margin-top: 5px;
}

.cards-info {
  font-size: 12px;
  color: rgb(102, 102, 102);
}

/* Navigation */
.main_nav {
  margin-top: 5px;
}

.nav-tabs {
  list-style: none;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 15px;
}

.nav-tabs li {
  display: inline-block;
}

.nav-tabs a {
  text-decoration: none;
  color: #333;
  font-size: 14px;
  padding: 10px;
  transition: 0.3s;
}

.nav-tabs a:hover,
.nav-tabs a.active {
  color: #007bff;
  font-weight: bold;
}

.error-container {
  text-align: center;
  margin-top: 50px;
}

.win-message {
  font-size: 20px;
  color: #28a745;
  font-weight: bold;
}

.lose-message {
  font-size: 18px;
  color: #d9534f;
  font-weight: bold;
}

.retry-btn {
  display: inline-block;
  margin-top: 20px;
  padding: 10px 20px;
  background-color: #007bff;
  color: #fff;
  text-decoration: none;
  border-radius: 5px;
  font-size: 16px;
  border: none;
  cursor: pointer;
}

.retry-btn:hover {
  background-color: #0056b3;
}

/* Consolidata .card-won */
.card-won {
  width: 200px;
  height: auto;
  max-width: 100%;
  display: block;
  margin: 20px auto;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 0.3s ease;
}

.card-won.flip-rapid {
  transition: transform 0.5s ease;
  transform: rotateY(360deg);
}

.card-won:hover {
  transform: scale(1.1);
}

.card-name {
  font-size: 18px;
  font-weight: bold;
  color: #ffffff;
  text-align: center;
  margin-top: 10px;
  padding: 5px 10px;
  border-radius: 8px;
  display: inline-block;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
  letter-spacing: 1px;
  transition: transform 0.3s ease-in-out;
}

/* Timer e warning */
.timer-container {
  text-align: center;
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 10px;
}

.warning {
  color: red;
  font-size: 1.5rem;
  animation: blink 1s infinite;
}

@keyframes blink {
  50% {
    opacity: 0.5;
  }
}

/* Import animate.css e animazioni personalizzate */
@import 'animate.css';

.animate__flipInX {
  animation: flipInX 0.3s ease;
}

@keyframes flipInX {
  from {
    transform: rotateY(90deg);
    opacity: 0;
  }

  to {
    transform: rotateY(0deg);
    opacity: 1;
  }
}

/* Altri stili */
.header-container {
  background-color: transparent;
}

.content {
  min-height: 80vh !important;
}

.eye-icon {
  position: absolute;
  right: 15px;
  top: 55%;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 18px;
  color: #f2f2f2;
}

.eye-icon:hover {
  color: #a5a5a5;
}

.hide {
  display: none !important;
}

.table-container {
  margin: 20px auto 0;
  width: 100%;
  max-width: 800px;
  overflow-x: auto;
}

table {
  margin-top: 20px !important;
}

.table th,
.table td {
  padding: 12px;
  border: 1px solid #ddd;
  text-align: center;
}

.table th {
  font-weight: bold;
}

.table tbody tr:hover {
  background-color: #f5f5f5;
  cursor: pointer;
}

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

.clickable-row {
  cursor: pointer;
}

.clickable-row:hover {
  background-color: #f5f5f5;
}

/* Notifica password */
.password-alert {
  position: fixed;
  top: 20px;
  left: -300px;
  z-index: 1000;
  padding: 12px 20px;
  background-color: #4caf50;
  color: #fff;
  border-radius: 5px;
  font-size: 16px;
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  white-space: nowrap;
  transition: transform 0.6s ease-in-out, opacity 0.6s ease-in-out;
  opacity: 1;
}

.animate {
  transform: translateX(350px);
}

.fade-out {
  transform: translateX(-300px);
  opacity: 0;
  transition: transform 0.6s ease-in-out, opacity 0.6s ease-in-out;
}

/* Tour */
.compact-tour {
  max-width: 260px;
  padding: 12px !important;
  border-radius: 8px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 1px solid #e5e7eb;
  background: #ffffff !important;
  font-family: 'Inter', sans-serif;
}

.compact-tour .shepherd-header {
  font-size: 15px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 8px;
}

.compact-tour .shepherd-text {
  font-size: 13px;
  line-height: 1.4;
  color: #4b5563;
  margin-bottom: 12px;
}

.compact-tour .shepherd-button {
  padding: 6px 12px !important;
  font-size: 13px !important;
  border-radius: 6px !important;
}

.minimal-highlight {
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.3) !important;
  border-radius: 6px !important;
}

.custom-highlight {
  position: relative;
  z-index: 10000;
  animation: pulse-highlight 1.5s infinite;
}

@keyframes pulse-highlight {
  0% {
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.3);
  }

  70% {
    box-shadow: 0 0 0 6px rgba(99, 102, 241, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
  }
}

.close-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 4px !important;
  background: none !important;
  color: #6b7280 !important;
}

.shepherd-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 5px;
  padding: 5px !important;
}

.shepherd-button {
  margin: 0 !important;
  padding: 6px 12px !important;
  font-size: 0.85rem !important;
  flex-shrink: 0;
  order: 1;
}

.shepherd-button.close-btn {
  order: 3;
  margin-left: auto !important;
}

.shepherd-button[data-action="next"] {
  order: 2;
}

/*============================================================================================*/
/* RESPONSIVE (Mobile First Approach) */
/*============================================================================================*/
@media (max-width: 767px) {
  #header_in {
    height: auto;
    padding: 10px;
  }

  .logo-container {
    height: auto;
    padding: 10px 0;
  }

  .user-info {
    position: static;
    text-align: center;
    margin-bottom: 15px;
  }

  .main_nav {
    position: static;
    display: block;
    margin-top: 15px;
  }

  .nav-tabs {
    flex-direction: column;
    gap: 5px;
  }

  .nav-tabs li {
    border-bottom: 1px solid #eee;
  }

  /* .container,
  .table-container {
    width: 95%;
    margin: 4rem auto 0;
    padding: 10px;
  } */

  .table-responsive {
    overflow-x: auto;
  }

  .logo {
    width: 16rem;
  }

  .table th,
  .table td {
    padding: 8px;
    font-size: 0.9rem;
  }

  .login-container {
    width: 100%;
    margin-left: 0;
    padding: 20px;
  }

  .input-field {
    width: 100%;
  }

  .card-details-container {
    width: 90%;
    padding: 10px;
    flex-direction: column;
  }

  .book-cover {
    position: static;
    transform: none;
    margin: 0 auto 20px;
  }

  .book-info {
    padding: 20px;
    margin-top: 0;
  }

  .add_top_60 {
    margin-top: 30px;
  }

  .margin_60 {
    padding: 30px 0;
  }

  .video_fallback {
    display: none;
  }
}

@media (min-width: 768px) and (max-width: 991px) {
  .container {
    max-width: 90%;
  }

  .table th,
  .table td {
    padding: 10px;
  }

  .book-info {
    padding: 40px;
  }
}

@media (max-width: 991px) {

  button,
  .btn,
  a.btn {
    min-height: 48px;
    padding: 12px 20px;
  }

  input,
  select,
  textarea {
    font-size: 16px;
  }

  img {
    max-width: 100%;
    height: auto;
  }

  .add_bottom_60 {
    margin-bottom: 30px;
  }

  .card-item {
    flex-direction: column;
    text-align: center;
  }

  .card-image {
    margin-right: 0;
    margin-bottom: 15px;
  }
}

@media (max-width: 480px) {
  .login-button {
    width: 100%;
    margin: 10px 0;
  }

  .card-won {
    width: 150px;
  }

  .error-message {
    font-size: 0.9rem;
    padding: 10px;
  }

  .timer-container {
    font-size: 1rem;
  }
}

.no-favorites-message {
  font-size: 1.2em;
  color: #666;
  text-align: center;
  margin-top: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Aggiungi al tuo file CSS */
.btn-secondary {
  background-color: #5a5a5a;
  border-color: #696969;
  padding: 0.5rem 1.5rem;
  transition: all 0.3s ease;
  min-width: 160px;
}

.btn-secondary:hover {
  background-color: #585858;
  border-color: #7e7e7e;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.bi-arrow-left-circle-fill {
  font-size: 1.2rem;
  vertical-align: middle;
}

/* Per mobile */
@media (max-width: 576px) {
  .container-fluid {
    margin-top: 15px !important;
    padding: 0;
    /* Rimuovi il padding predefinito */

  }

  .btn-secondary {
    padding: 0.4rem 1rem;
    font-size: 0.9rem;
    min-width: 140px;
  }

  .bi-arrow-left-circle-fill {
    font-size: 1rem;
  }
}


.quiz-carte-bar {
  width: 80px;
  height: 200px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  border-radius: 16px;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
  margin: 1%;
  margin-top: -10vh;
}

.quiz-carte-bar a {
  width: 100%;
  margin: 0 auto;
}

/* Stile di default per link inattivi */
.quiz-carte-bar a i,
.quiz-carte-bar a div {
  color: #777;
  /* oppure il colore di default che preferisci */
}

/* Stile per il link attivo */
.quiz-carte-bar a.active i,
.quiz-carte-bar a.active div {
  color: rgba(246, 195, 68) !important;
}

#menu-sezione {
  margin: 1%;
}





.content-container {
  margin-left: 0;
  /* Rimuovi il margine sinistro */
  padding: 20px;
  /* Aggiungi padding per evitare che il contenuto sia troppo vicino ai bordi */
  display: flex;
  flex-direction: column;
  align-items: center;
  /* Centra tutto il contenuto */
}

/* Gestione dello scrolling orizzontale */
.row.flex-row.flex-nowrap {
  overflow-x: auto;
}


/* Contenitore carosello */
.book-slider {
  width: 100%;
  /* Occupa tutta la larghezza della pagina */
  max-width: 100%;
  padding: 20px 0;
  margin: 0 auto
}

.carousel-inner {
  width: 100%;
}

.carousel-item {
  width: 100%;
}

.book-slide-card {
  position: relative;
  width: 450px;
  height: 250px;
  border-radius: 15px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1rem;
}

/* Sfondo sfocato sempre visibile */
.card-background {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(15px) brightness(0.5);
  /* Maggiore sfocatura */
  transform: scale(1.3);
  z-index: 1;
}

/* Contenuto in primo piano */
.card-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  width: 100%;
}

/* Copertina del libro più grande */
.cover {
  width: 140px;
  height: 200px;
  flex-shrink: 0;
  border-radius: 10px;
  overflow: hidden;
  /* Essenziale per il ritaglio */
  position: relative;
  background: rgba(255, 255, 255, 0.2);
}

.cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  /* Modifica in base alle tue esigenze, es: 'top center' */
  transition: transform 0.3s ease;
  display: block;
}

/* Informazioni libro */
.info {
  flex: 1;
  padding-left: 20px;
}

.info h4 {
  font-size: 1.4rem;
  font-weight: bold;
}

.info p {
  font-size: 1.1rem;
  opacity: 0.85;
}


/* Box sfocato */
.book-slide-info {
  width: 60%;
  /* Più spazio per il testo */
  height: 100%;
  position: relative;
  background: rgba(0, 0, 0, 0.75);
  /* Più contrasto */
  backdrop-filter: blur(6px);
  /* Sfocatura più evidente */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px;
  /* Più spazio interno */
  color: #fff;
  font-size: 1rem;
  border-radius: 0 15px 15px 0;
}

/* Titolo del libro */
.book-slide-title {
  font-weight: bold;
  font-size: 1.2rem;
  /* Più grande */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}

/* Nome autore */
.book-slide-author {
  font-size: 0.8rem;
  /* Più piccolo */
  opacity: 0.85;
  text-align: right;
}

/* Pulsanti del carosello */
.book-slider-control {
  width: 5%;

}

.center-content {
  display: flex;
  justify-content: center;
  /* Centra orizzontalmente */
  align-items: center;
  /* Centra verticalmente */
  width: 100%;
  /* Occupa tutta la larghezza */
  margin: 0 auto;
  /* Centra il contenitore */
}

.search-container {
  position: relative;
  max-width: 500px;
  /* Larghezza aumentata */
  width: 100%;
  display: flex;
  align-items: center;
}

.custom-input {
  width: 100%;
  height: 50px;
  padding: 0 50px 0 20px;
  background: rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 25px;
  color: white !important;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  flex-grow: 1;
  /* Occupa lo spazio disponibile */
  flex-shrink: 0;
  /* Non si riduce */
  min-width: 250px;
  /* Larghezza minima, da adattare alle tue esigenze */
  white-space: nowrap;
  padding: 10px 60px 20px 10px;
  /* top, right, bottom, left */
  box-sizing: border-box;
  /* Include padding nella larghezza */
  overflow: visible;
}

.custom-input::placeholder {
  color: #888;
  white-space: normal;
  /* Permette al placeholder di andare a capo se necessario */
}

.btn-icon {
  right: 15px;
  top: 50%;
  position: relative;
  transform: translateY(-50%);
  background: transparent !important;
  border: none !important;
  color: rgba(255, 255, 255, 0.8) !important;
  font-size: 1rem;
  padding: 0;
}

.btn-icon:hover {
  color: white !important;
  transform: translateY(-50%) scale(1.1);
}


.custom-input::placeholder {
  color: rgba(255, 255, 255, 0.7) !important;
}

.custom-input:focus {
  background: rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
  outline: none;
}



/* Stile per i libri già letti (verticale) */
.vertical-book-slide-card {
  display: flex;
  flex-direction: column;
  /* Disposizione verticale */
  width: 160px;
  /* Larghezza ridotta */
  height: auto;
  /* Altezza automatica */
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s;
  width: 140px;
  /* Riduci ulteriormente la larghezza */
  margin: 20px
}

.vertical-book-slide-card:hover {
  transform: scale(1.07);
}

/* Copertina per i libri già letti */
.vertical-book-slide-cover {
  width: 100%;
  height: 180px;
  /* Altezza fissa */
}

.vertical-book-slide-cover img {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  object-fit: cover;
}

/* Informazioni per i libri già letti */
.vertical-book-slide-info {
  width: 100%;
  padding: 10px;
  color: #fff;
  text-align: left;
  /* Testo centrato */
}

/* Titolo del libro (verticale) */
.vertical-book-slide-title {
  font-weight: bold;
  font-size: 1rem;
  text-overflow: ellipsis;
  margin-bottom: 5px;
  /* Spazio tra titolo e autore */
}

/* Autore del libro (verticale) */
.vertical-book-slide-author {
  font-size: 0.8rem;
  opacity: 0.85;
}

/* Stile icona fotocamera */
.btn-camera {
  background: rgba(255, 255, 255, 0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  border-radius: 50% !important;
  width: 50px;
  height: 50px;
  color: rgba(255, 255, 255, 0.8) !important;
  transition: all 0.3s ease;
}

.btn-camera:hover {
  background: rgba(255, 255, 255, 0.15) !important;
  color: white !important;
  transform: scale(1.1);
}

/* Ripristina allineamento originale */
.original-alignment {
  width: 100%;
  margin-left: 50px;
  /* Regola in base al tuo layout */
}

/* Mantieni il titolo principale centrato */
h2.text-light {
  text-align: center;
  width: auto;
}

.camera-preview {
  display: flex;
  flex-direction: column;
  align-items: center;

}

.camera-feed {
  width: 100vh;
  max-width: 500px;
  height: auto;
  border-radius: 5px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.camera-error-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}




/* Contenitore della ricerca */
.search-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 500px;
  margin: auto;
}

/* Input personalizzato trasparente con blur */
.custom-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(5px);
  color: #ffffff;
  border: none;
  border-radius: 30px;
  text-align: center;
  padding: 10px 60px 10px 10px;
  /* top, right, bottom, left */

}

/* Placeholder bianco */
.custom-input::placeholder {
  color: rgba(255, 255, 255, 0.8);
}

/* Bottone di ricerca con icona */
.btn-icon {
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: white;
  font-size: 1.2rem;
}

.verifying-message {
  margin-top: 10px;
  color: #fff;
  font-size: 1.2rem;
  text-align: center;
}



/* Nasconde i controlli del carosello su dispositivi con larghezza massima di 768px (mobile) */
/* @media (max-width: 768px) {
    .carousel-control-prev,
    .carousel-control-next {
      display: none !important;
    }
  } */

.tutti-libri-title {
  text-align: center;
  padding-bottom: 10px;
}

/* Contenitore principale del componente */
.tutti-libri-container {
  color: #fff;
  /* Colore del testo, se lo sfondo è scuro */
  padding: 1rem;
  /* Spazio interno */
}

/* Titolo della sezione */
.tutti-libri-title {
  margin-bottom: 1rem;
  font-weight: bold;
}

/* Griglia di card */
.tutti-libri-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 150px);
  gap: 3rem;
  justify-content: center;
}


/* Singola card del libro */
.tutti-libri-card {
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  text-align: center;
}

/* Sezione che contiene la copertina */
.tutti-libri-cover {
  width: 100%;
  height: 200px;
  /* Altezza fissa per le copertine */
  overflow: hidden;
}

.tutti-libri-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Ritaglia/scala l’immagine per riempire il contenitore */
  display: block;
  border-radius: 10px;
}

/* Sezione testo (titolo, autore) */
.tutti-libri-info {
  padding: 0.5rem;
}

.tutti-libri-info h4 {
  margin: 0.5rem 0;
  font-size: 1.1rem;
  font-weight: bold;
  text-align: left;
}

.tutti-libri-info p {
  margin: 0;
  font-size: 0.95rem;
  opacity: 0.9;
  text-align: left;
}

.image-skeleton {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.skeleton-animation {
  width: 60%;
  height: 80%;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  border-radius: 4px;
}

.overlay-zoomerd-card {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

/* .zoomed-card {
  width: 300px;
  height: auto;
  transition: transform 0.1s ease;
  perspective: 1000px;
  cursor: grab;
} */

.zoomed-card img {
  width: 100%;
  border-radius: 23px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transform-style: preserve-3d;
}

.zoomed-card {
  width: 500px;
  transition: transform 0.05s ease-out; /* lieve interpolazione */
  will-change: transform;
  touch-action: none;
  cursor: grab;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.progress {
  border-radius: 10px;
  overflow: hidden;
}

.progress-bar {
  transition: width 0.3s ease;
}

/* Media queries per schermi medi */
@media (max-width: 768px) {
  .tutti-libri-grid {
    gap: 1rem;
  }

  /* .tutti-libri-cover {
    height: 150px;
  } */

  .tutti-libri-info h4 {
    font-size: 1rem;
  }

  .tutti-libri-info p {
    font-size: 0.85rem;
  }
}

/* Media queries per schermi piccoli */
@media (max-width: 480px) {
  .tutti-libri-title {
    font-size: 1.3rem;
  }

  /* .tutti-libri-cover {
    height: 120px;
  } */

  .tutti-libri-info h4 {
    font-size: 0.9rem;
  }

  .tutti-libri-info p {
    font-size: 0.8rem;
  }
}


.slider-libri-gia-letti {
  gap: 3vh;
}

#carte-vinte {
  /* width: 76%; */
  align-items: center;
  margin: 3%;
  padding: 4px;
  /* position: relative;
  left: 13vh; */
  border-radius: 50px;
}

.welcome-text {
  position: absolute;
  left: 2%;
  top: 20%;
  transform: translateY(-50%);
  z-index: 2;
}

.gradient-text {
  color:rgba(249, 178, 46, 1);

  font-family: 'Poppins', sans-serif;
  font-size: 50px;
  /* Ridotto da 3.5rem */
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  white-space: nowrap;
}

.gradient-description {
  color:white;

  font-family: 'Poppins', sans-serif;
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1.6;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  /* white-space rimosso per permettere il testo a capo */
}

/* Responsive */
@media (max-width: 992px) {
  .welcome-text {
    position: static;
    transform: none;
    max-width: 100%;
    padding: 2rem;
    text-align: center;
  }

  .gradient-text {
    font-size: 2rem;
    white-space: normal;
    /* Permette il testo a capo su mobile */
  }

  .gradient-description {
    font-size: 1rem;
  }

  .login-container {
    top: auto;
    transform: none;
    padding: 2rem 1rem;
  }
}

.pagination .page-link {
  background-color: transparent !important;
  border-color: transparent !important;
  color: white !important;
}

.pagination .page-link:hover,
.pagination .page-link:focus {
  background-color: rgba(255, 255, 255, 0.1) !important;
  /* leggera evidenziazione al passaggio del mouse */
  border-color: transparent !important;
  color: white !important;
}

.pagination .page-item.active .page-link {
  background-color: transparent !important;
  border-color: transparent !important;
  color: white !important;
}

/* Puoi aggiungere questi stili al tuo file CSS */

.loading-container {
  padding: 40px 0;
}

.spinner-border {
  width: 3rem;
  height: 3rem;
}

/* Animazione pulsante per il testo */
@keyframes pulse {
  0% {
    opacity: 0.6;
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0.6;
  }
}

.loading-container p {
  animation: pulse 1.5s infinite;
}

/* Optional: Effetto di fade-in per le carte quando appaiono */
.card {
  transition: opacity 0.3s ease-in-out;
}

#carte-vinte .col {
  opacity: 0;
  animation: fadeIn 0.5s ease-in-out forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Applica un delay progressivo all'animazione di ogni carta */
#carte-vinte .col:nth-child(1) {
  animation-delay: 0.1s;
}

#carte-vinte .col:nth-child(2) {
  animation-delay: 0.2s;
}

#carte-vinte .col:nth-child(3) {
  animation-delay: 0.3s;
}

#carte-vinte .col:nth-child(4) {
  animation-delay: 0.4s;
}

#carte-vinte .col:nth-child(5) {
  animation-delay: 0.5s;
}

#carte-vinte .col:nth-child(6) {
  animation-delay: 0.6s;
}

/* e così via per quante carte prevedi di mostrare */

/* Right alignment container */
.questionnaire-content.right-aligned {
  /* position: relative;
  right: 5%;
  top: 0;
  width: 50%;
  height: 86vh; */
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-color: transparent;
  backdrop-filter: blur(8px);
  margin-right: -5%;
}

/* Transparent elements */
.transparent-element {
  background-color: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(5px);
  border-radius: 10px;
  padding: 15px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  /* position: relative; */
  top: -16%;
  /* width: 77vh; */
}

.transparent-container {
  background-color: transparent;
  padding: 12%;
  margin-top: 15px;
}

.transparent-text {
  color: rgba(0, 0, 0, 0.8);
  font-weight: 500;
}

/* Book header styling */
.book-header {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  position: relative;
  top: 12%;
  gap: 20px;

}

.book-title {
  margin: 0;
  font-size: 1.5rem;
}

.timer-container {
  font-weight: bold;
}

/* Question box styling */
.question-box {
  margin-bottom: 20px;
  position: relative;
  /* left: -16%; */
}

.question-header {
  font-size: 1.1rem;
  margin-bottom: 10px;
}

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

/* Answer options */
.transparent-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.transparent-option {
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  padding: 10px;
  transition: background-color 0.3s ease;
}

.transparent-option:hover {
  background-color: rgba(255, 255, 255, 0.5);
}

.transparent-option label {
  display: flex;
  align-items: center;
  cursor: pointer;
  width: 100%;
}

.transparent-option input[type="radio"] {
  margin-right: 10px;
}

/* Navigation buttons */
.navigation-buttons {
  display: flex;
  margin-top: 20px;
  /* position: relative; */
  left: 20vh;
  gap: 52px;
  width: 45vh;
}

.transparent-button {
  background-color: rgba(220, 212, 200, 0.3);
  backdrop-filter: blur(40px);
  color: white;
  border: none;
  width: 20vh;
  border-radius: 115px;
  padding: 8px 16px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.transparent-button:hover {
  background-color: rgba(137, 137, 137, 0.8);
}

.transparent-button:disabled {
  background-color: rgba(72, 72, 72, 0.4);
  cursor: not-allowed;
}

/* Resolution info */
.resolution-info {
  font-size: 0.8rem;
  text-align: right;
  margin-top: 10px;
  opacity: 0.6;
}

/* =================== RESPONSIVE DESIGN =================== */

/* Smartphone: schermi fino a 768px */
@media (max-width: 768px) {
  .questionnaire-content.right-aligned {
    width: 90%;
    right: 0;
    margin: auto;
    padding: 10px;
    height: auto;
  }

  .transparent-element {
    top: 0;
    padding: 10px;
    border-radius: 8px;
  }

  .book-header {
    flex-direction: column;
    text-align: center;
    top: 0;
  }

  .book-title {
    font-size: 1.2rem;
  }

  .timer-container {
    font-size: 1rem;
  }

  .question-box {
    left: 0;
    margin-bottom: 15px;
    text-align: center;
  }

  .question-header {
    font-size: 1rem;
  }

  .question-text {
    font-size: 1rem;
  }

  .navigation-buttons {
    flex-direction: column;
    align-items: center;
    left: 0;
    gap: 10px;
    width: 100%;
  }

  .transparent-button {
    padding: 10px 14px;
    font-size: 14px;
    width: 80%;
  }

  .transparent-options {
    align-items: center;
  }

  .transparent-option {
    width: 90%;
    text-align: center;
  }

  .resolution-info {
    text-align: center;
    font-size: 0.7rem;
  }
}

/* Dispositivi molto piccoli (max 480px) */
@media (max-width: 480px) {
  .questionnaire-content.right-aligned {
    width: 100%;
    padding: 5px;
  }

  .book-title {
    font-size: 1rem;
  }

  .timer-container {
    font-size: 0.9rem;
  }

  .question-header,
  .question-text {
    font-size: 0.9rem;
  }

  .transparent-button {
    padding: 8px 12px;
    font-size: 12px;
    width: 90%;
  }

  /* -------------*/
  .search-results-active .original-alignment {
    display: none;
    /* Nasconde il contenuto originale quando ci sono risultati di ricerca */
  }

  .search-results-container {
    margin-top: 20px;
    /* Aggiungi margine per separare la tabella dagli altri contenuti */
  }

  .backdrop-blur {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.1);
  }

  .active-link {
    color: orange !important;
  }

  .active-link .card-icon {
    filter: brightness(0) saturate(100%) invert(50%) sepia(90%) saturate(300%) hue-rotate(10deg);
  }
}